From ee8b3964a957e4eba68c8c2074896d47d399a38b Mon Sep 17 00:00:00 2001
From: SG <glazov@mail.desy.de>
Date: Mon, 25 May 2020 08:00:20 +0200
Subject: [PATCH 001/266] Move random numbers to G4Random::getTheEngine()

---
 .../LArG4ShowerLibSvc/LArG4ShowerLibSvc.h     |  8 -----
 .../src/LArG4ShowerLibSvc.cxx                 | 34 +++----------------
 2 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
index 78fbc29110a4..24be5f8365ce 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
@@ -23,11 +23,6 @@ namespace ShowerLib {
   class ShowerLibStatistics;
 }
 
-class IAtRndmGenSvc;
-
-namespace CLHEP {
-  class HepRandomEngine;
-}
 
   /**
    *
@@ -75,10 +70,7 @@ private:
     std::map<std::string,int> m_detmap;
 
     StringArrayProperty      m_fileNameList;                          //!< property, list of library files
-    StringProperty           m_rndmEngineName;                        //!< property, name of athena RNG engine
     
-    ServiceHandle<IAtRndmGenSvc> m_rndmGenSvc;
-    CLHEP::HepRandomEngine *m_rndmEngine;
 };
 
 #endif // G4SHOWERLIBSVC_G4SHOWERLIBSVC_H
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
index 6095a7a24447..cf8855bdf19c 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
@@ -9,17 +9,12 @@
 
 #include "PathResolver/PathResolver.h"
 
-#include "AthenaKernel/IAtRndmGenSvc.h"
 #include "AthenaKernel/Units.h"
-#include "CLHEP/Random/RandomEngine.h"
-#include "CLHEP/Random/RandGauss.h"
-
-
 
 #include <sstream>
 #include "TFile.h"
 #include "TTree.h"
-
+#include "Randomize.hh"
 
 namespace Units = Athena::Units;
 
@@ -27,14 +22,9 @@ namespace Units = Athena::Units;
 LArG4ShowerLibSvc::LArG4ShowerLibSvc(const std::string& name,ISvcLocator* svc)
   : base_class(name,svc)
   , m_fileNameList()
-  , m_rndmEngineName("FROZENSHOWERS")
-  , m_rndmGenSvc("AtDSFMTGenSvc", name)
-  , m_rndmEngine(nullptr)
 {
   declareProperty( "FileNameList",    m_fileNameList,   "List of filenames for direct reading" );
-  declareProperty( "RndmEngineName",  m_rndmEngineName, "Name of athena RNG engine" );
-  declareProperty( "RndmGenSvc",      m_rndmGenSvc, "Athena RNG service" );
-
+  
   /* BE SURE THIS ONE IS THE SAME AS IN LArG4FastSimSvc!!! */
   enum DETECTOR {EMB=100000,EMEC=200000,FCAL1=300000,FCAL2=400000,FCAL3=500000,HECLOC=600000,HEC=700000};
 
@@ -117,21 +107,6 @@ StatusCode LArG4ShowerLibSvc::initialize()
       ATH_MSG_INFO("      " << m_locations[(*it).first] << ": " << (*it).second->comment());
       m_statisticsMap[(*it).second] = (*it).second->createStatistics();
     }
-    // we have loaded some libs, so there is a point in RNG service
-    if (m_rndmEngineName.value().length() > 0) {
-      if (m_rndmGenSvc.retrieve().isSuccess()) {
-        m_rndmEngine = m_rndmGenSvc->GetEngine(m_rndmEngineName.value());
-        if (m_rndmEngine)
-          ATH_MSG_INFO("Successfully retrieved random number stream " << m_rndmEngineName.value());
-        else
-          ATH_MSG_WARNING("Couldn't retrieve random number stream " << m_rndmEngineName.value() << ". The simulation result may be biased.");
-      }
-      else {
-        ATH_MSG_WARNING("Couldn't retrieve random number service. The simulation result may be biased.");
-      }
-    } else {
-      ATH_MSG_WARNING("Empty name for random stream. No randomization will be applied.");
-    }
   }
 
   ATH_MSG_INFO("Shower library successfully initialized.");
@@ -208,9 +183,8 @@ LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag)
 
   // get a shower from the library
   int randomShift = 0;
-  if (m_rndmEngine) {
-    randomShift = (int)(CLHEP::RandGauss::shoot(m_rndmEngine, 0., 2.5)+0.5);
-  }
+  randomShift = (int)(CLHEP::RandGauss::shoot(G4Random::getTheEngine(), 0., 2.5)+0.5);
+
   std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), m_statisticsMap[library], randomShift);
 
   if (shower == nullptr) {
-- 
GitLab


From 941dc1c111a131f9fd4e2c3708eac2c1edf0ce17 Mon Sep 17 00:00:00 2001
From: SG <glazov@mail.desy.de>
Date: Mon, 25 May 2020 08:57:24 +0200
Subject: [PATCH 002/266] Introduce DEBUG_FrozenShowers and turn off statistics
 by default. Make getShower function to be const

---
 .../LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h        |  7 ++++++-
 .../LArG4ShowerLibSvc/LArG4ShowerLibSvc.h         |  7 +++++--
 .../LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx   | 15 ++++++++++++++-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h
index 1197d2241d85..0825f3f250c4 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h
@@ -5,6 +5,8 @@
 #ifndef LARG4SHOWERLIBSVC_ILIBLARSHOWERLIBSVC_H
 #define LARG4SHOWERLIBSVC_ILIBLARSHOWERLIBSVC_H
 
+// #define DEBUG_FrozenShowers
+
 // Include Files
 #include "GaudiKernel/IInterface.h"
 
@@ -23,8 +25,11 @@ public:
 
   virtual bool                    checkLibrary( G4int, int ) = 0;
 
+#ifdef DEBUG_FrozenShowers
   virtual std::vector<EnergySpot> getShower(const G4FastTrack&, int ) = 0;
-
+#else
+  virtual std::vector<EnergySpot> getShower(const G4FastTrack&, int ) const = 0;
+#endif
   virtual double                  getContainmentZ(const G4FastTrack&, int ) = 0;
   virtual double                  getContainmentR(const G4FastTrack&, int ) = 0;
 };
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
index 24be5f8365ce..0dd6d65c88b9 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h
@@ -52,15 +52,18 @@ public:
     virtual bool                    checkLibrary(G4int particleCode, int detectorTag);
 
     //! return list of energy depositions for given track (interface implementation)
+#ifdef DEBUG_FrozenShowers
     virtual std::vector<EnergySpot> getShower(const G4FastTrack& track, int detectorTag);
-
+#else
+    virtual std::vector<EnergySpot> getShower(const G4FastTrack& track, int detectorTag) const;
+#endif
     virtual double                  getContainmentZ(const G4FastTrack& track, int detectorTag);
     virtual double                  getContainmentR(const G4FastTrack& track, int detectorTag);
 
 private:
 
     //! get shower library from StoreGate by track (using current volume name)
-    const ShowerLib::IShowerLib* getShowerLib(G4int particleCode, int detectorTag);
+    const ShowerLib::IShowerLib* getShowerLib(G4int particleCode, int detectorTag) const;
 
     typedef std::map<int, const ShowerLib::IShowerLib*> libmap;
     libmap m_libraryMap;                                              //!< mapping StoreGate key to handle in StoreGate
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
index cf8855bdf19c..67a1cfb7a13c 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
@@ -105,7 +105,9 @@ StatusCode LArG4ShowerLibSvc::initialize()
     libmap::const_iterator it;
     for(it = m_libraryMap.begin();it != m_libraryMap.end(); it++) {
       ATH_MSG_INFO("      " << m_locations[(*it).first] << ": " << (*it).second->comment());
+#ifdef DEBUG_FrozenShowers
       m_statisticsMap[(*it).second] = (*it).second->createStatistics();
+#endif
     }
   }
 
@@ -139,7 +141,7 @@ StatusCode LArG4ShowerLibSvc::finalize()
  * Returns library from internal map based on the particle. Returns nullptr if there
  * is no library for needed particle/detector.
  */
-const ShowerLib::IShowerLib* LArG4ShowerLibSvc::getShowerLib(G4int particleCode, int detectorTag)
+const ShowerLib::IShowerLib* LArG4ShowerLibSvc::getShowerLib(G4int particleCode, int detectorTag) const
 {
   int location;
 
@@ -166,8 +168,14 @@ LArG4ShowerLibSvc::checkLibrary(G4int particleCode, int detectorTag)
  * Returns a shower based on the particle. Return empty shower if there is no
  * appropriate showers in the libraries.
  */
+
+#ifdef DEBUG_FrozenShowers
 std::vector<EnergySpot>
 LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag)
+#else
+std::vector<EnergySpot>
+LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag) const
+#endif
 {
   // get shower lib from the map
   const ShowerLib::IShowerLib* library = getShowerLib(track.GetPrimaryTrack()->GetDefinition()->GetPDGEncoding(), detectorTag);
@@ -185,7 +193,12 @@ LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag)
   int randomShift = 0;
   randomShift = (int)(CLHEP::RandGauss::shoot(G4Random::getTheEngine(), 0., 2.5)+0.5);
 
+#ifdef DEBUG_FrozenShowers
   std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), m_statisticsMap[library], randomShift);
+#else
+  std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), nullptr, randomShift);
+#endif
+
 
   if (shower == nullptr) {
     return std::vector<EnergySpot>();
-- 
GitLab


From a3481ff028d42c736753fa2c24489ea0ca83ac59 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 29 May 2020 09:45:53 +0200
Subject: [PATCH 003/266] Reporting non-standard errors

Introducing a knowledge file (nonStandardError.db) contains of non-standard errors.
Managing to find this errors during log scan and adding to the FATAL error message.
Providing a Unittest.
---
 Tools/PyJobTransforms/python/trfValidation.py | 12 +++++++++
 .../share/nonStandardErrors.db                |  2 ++
 .../test/test_trfValidation.py                | 25 ++++++++++++++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 Tools/PyJobTransforms/share/nonStandardErrors.db

diff --git a/Tools/PyJobTransforms/python/trfValidation.py b/Tools/PyJobTransforms/python/trfValidation.py
index ae79365a2198..a90de04f92a9 100644
--- a/Tools/PyJobTransforms/python/trfValidation.py
+++ b/Tools/PyJobTransforms/python/trfValidation.py
@@ -295,11 +295,14 @@ class athenaLogFileReport(logFileReport):
         return linesList
 
     def scanLogFile(self, resetReport=False):
+        nonStandardErrorsList = self.knowledgeFileHandler('nonStandardErrors.db')
+
         if resetReport:
             self.resetReport()
 
         for log in self._logfile:
             msg.debug('Now scanning logfile {0}'.format(log))
+            seenNonStandardError = ''
             # N.B. Use the generator so that lines can be grabbed by subroutines, e.g., core dump svc reporter
             try:
                 myGen = trfUtils.lineByLine(log, substepName=self._substepName)
@@ -350,6 +353,10 @@ class athenaLogFileReport(logFileReport):
                     if 'SysError in <TFile::WriteBuffer>' in line:
                         self.rootSysErrorParser(myGen, line, lineCounter)
                         continue
+                    # Check if the line is among the non-standard logging errors from the knowledge file
+                    if any(line in l for l in nonStandardErrorsList):
+                        seenNonStandardError = line
+                        continue
 
                     msg.debug('Non-standard line in %s: %s' % (log, line))
                     self._levelCounter['UNKNOWN'] += 1
@@ -388,6 +395,11 @@ class athenaLogFileReport(logFileReport):
                     if 'std::bad_alloc' in fields['message']:
                         fields['level'] = 'CATASTROPHE'
 
+                # concatenate the seen non-standard logging error to the FATAL
+                if fields['level'] == 'FATAL':
+                    if seenNonStandardError:
+                        line += '; ' + seenNonStandardError
+
                 # Count this error
                 self._levelCounter[fields['level']] += 1
 
diff --git a/Tools/PyJobTransforms/share/nonStandardErrors.db b/Tools/PyJobTransforms/share/nonStandardErrors.db
new file mode 100644
index 000000000000..fda62cd8ff52
--- /dev/null
+++ b/Tools/PyJobTransforms/share/nonStandardErrors.db
@@ -0,0 +1,2 @@
+# List of non-standard logging errors
+PYTHIA Abort from Pythia::next: reached end of Les Houches Events File
diff --git a/Tools/PyJobTransforms/test/test_trfValidation.py b/Tools/PyJobTransforms/test/test_trfValidation.py
index 02582a368569..de66245e3dbe 100755
--- a/Tools/PyJobTransforms/test/test_trfValidation.py
+++ b/Tools/PyJobTransforms/test/test_trfValidation.py
@@ -579,6 +579,21 @@ class athenaLogFileReportTests(unittest.TestCase):
 18:16:06 Caught signal 11(Segmentation fault). Details:
         '''
 
+        testKnowledgeFile = '''
+10:38:58  PYTHIA Abort from Pythia::next: reached end of Les Houches Events File
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8              INFO Event generation failed - re-trying.
+10:38:58 Pythia8             ERROR Exceeded the max number of consecutive event failures.
+10:38:58 Pythia8             FATAL /build/atnight/localbuilds/nightlies/21.6/athena/Generators/GeneratorModules/src/GenModule.cxx:56 (StatusCode GenModule::execute()): code 0: this->callGenerator()
+        '''
+
         with open('file1', 'w') as f1:
             print('This is test file 1 w/o meaning', file=f1)
         with open('file2', 'w') as f2:
@@ -605,6 +620,8 @@ class athenaLogFileReportTests(unittest.TestCase):
             print(testCoreDumpAbNormalLine, file=f11)
         with open('file12', 'w') as f12:
             print(testCoreDumpAbnormalPattern, file=f12)
+        with open('file13', 'w') as f13:
+            print(testKnowledgeFile, file=f13)
 
         self.myFileReport1 = athenaLogFileReport('file1')
         self.myFileReport2 = athenaLogFileReport('file2')
@@ -618,9 +635,10 @@ class athenaLogFileReportTests(unittest.TestCase):
         self.myFileReport10 = athenaLogFileReport('file10')
         self.myFileReport11 = athenaLogFileReport('file11')
         self.myFileReport12 = athenaLogFileReport('file12')
+        self.myFileReport13 = athenaLogFileReport('file13')
 
     def tearDown(self):
-        for f in 'file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7', 'file8', 'file9', 'file10', 'file11', 'file12',\
+        for f in 'file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7', 'file8', 'file9', 'file10', 'file11', 'file12', 'file13',\
                  'logWithSubstepNameSerial', 'logWithSubstepNameMP':
             try:
                 os.unlink(f)
@@ -712,6 +730,11 @@ ManagedAthenaTileMon reported an ERROR, but returned a StatusCode "SUCCESS"'''
         self.assertEqual(self.myFileReport12.worstError(), {'level': 'FATAL', 'nLevel': logging.FATAL,
                                                             'firstError': {'moreDetails': {'abnormalLine(s) before CoreDump': {'message0': 'TBufferFile::CheckObject:0: RuntimeWarning: reference to object of unavailable class TObject, offset=980837731 pointer will be 0', 'firstLine0': 7, 'count0': 2, 'message1': 'Error in <TExMap::Remove>: key 980837731 not found at 306', 'firstLine1': 6, 'count1': 2}, 'lastNormalLine before CoreDump': {'message': 'Error in <CreateRealData>: Cannot find data member # 0 of class Identifier for parent TileTrigger!', 'firstLine': 3, 'count': 1}}, 'message': 'Segmentation fault: Event counter: unknown; Run: unknown; Evt: unknown; Current algorithm: unknown; Current Function: unknown; Abnormal line(s) seen just before core dump: TBufferFile::CheckObject:0: Ru...[truncated] (see the jobReport)', 'firstLine': 9, 'count': 1}})
 
+    def test_knowledgeFile(self):
+        self.assertEqual(self.myFileReport13.worstError(), {'level': 'FATAL', 'nLevel': logging.FATAL,
+                                                           'firstError': {'count': 1, 'firstLine': 13,
+                                                               'message': 'Pythia8             FATAL /build/atnight/localbuilds/nightlies/21.6/athena/Generators/GeneratorModules/src/GenModule.cxx:56 (StatusCode GenModule::execute()): code 0: this->callGenerator(); PYTHIA Abort from Pythia::next: reached end of Les Houches Events File'}})
+
     def test_dbMonitor(self):
         print(self.myFileReport9) 
         self.assertEqual(self.myFileReport9.dbMonitor(), {'bytes': 579, 'time': 12.45})
-- 
GitLab


From 78373b902754a57107045f7253c9a919d18f4385 Mon Sep 17 00:00:00 2001
From: amete <serhanmete@gmail.com>
Date: Thu, 4 Jun 2020 18:41:27 +0200
Subject: [PATCH 004/266] Enable PerfMonMTSvc for MT>1 jobs, limit the number
 of messages printed for the event-loop

---
 .../PerfMonComps/src/PerfMonMTSvc.cxx         | 20 ++++++++++++------
 .../PerfMonComps/src/PerfMonMTSvc.h           |  5 +++++
 .../RecExample/RecExCommon/share/RecoUtils.py | 21 ++++++++++++-------
 3 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
index 6874925b87fb..cd52c4c97ace 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
@@ -22,7 +22,7 @@ using json = nlohmann::json;  // for convenience
  * Constructor
  */
 PerfMonMTSvc::PerfMonMTSvc(const std::string& name, ISvcLocator* pSvcLocator)
-    : AthService(name, pSvcLocator), m_eventCounter{0} {
+    : AthService(name, pSvcLocator), m_eventCounter{0}, m_eventLoopMsgCounter{0} {
   // Four main snapshots : Configure, Initialize, Execute, and Finalize
   m_snapshotData.resize(NSNAPSHOTS); // Default construct
 
@@ -254,8 +254,11 @@ void PerfMonMTSvc::eventLevelMon() {
       // Capture
       m_measurement_events.capture_event(m_eventCounter);
       m_eventLevelData.record_event(m_measurement_events, m_eventCounter);
-      // Report instantly
-      report2Log_EventLevel_instant();
+      // Report instantly - no more than m_eventLoopMsgLimit times
+      if(m_eventLoopMsgCounter < m_eventLoopMsgLimit) {
+        report2Log_EventLevel_instant();
+        m_eventLoopMsgCounter++;
+      }
     }
   }
   incrementEventCounter();
@@ -421,10 +424,15 @@ void PerfMonMTSvc::report2Log_EventLevel() {
 
   ATH_MSG_INFO("---------------------------------------------------------------------------------------");
 
+  m_eventLoopMsgCounter = 0; // reset counter
+
   for (const auto& it : m_eventLevelData.getEventLevelData()) {
-    ATH_MSG_INFO(format("%1% %|16t|%2$.2f %|28t|%3$.2f %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % it.first %
-                 (it.second.cpu_time * 0.001) % (it.second.wall_time * 0.001) % it.second.mem_stats.at("vmem") %
-                 it.second.mem_stats.at("rss") % it.second.mem_stats.at("pss") % it.second.mem_stats.at("swap"));
+    if(m_eventLoopMsgCounter < m_eventLoopMsgLimit) {
+      ATH_MSG_INFO(format("%1% %|16t|%2$.2f %|28t|%3$.2f %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % it.first %
+                   (it.second.cpu_time * 0.001) % (it.second.wall_time * 0.001) % it.second.mem_stats.at("vmem") %
+                   it.second.mem_stats.at("rss") % it.second.mem_stats.at("pss") % it.second.mem_stats.at("swap"));
+      m_eventLoopMsgCounter++;
+    }
     // Add to leak estimate
     if (it.first >= std::max(uint64_t(10), uint64_t(m_checkPointFactor))) {
       m_fit_vmem.addPoint(it.first, it.second.mem_stats.at("vmem"));
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
index 2c5027476f64..1981f195d1e4 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
@@ -147,6 +147,8 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
   Gaudi::Property<int> m_numberOfThreads{this, "numberOfThreads", 1, "Number of threads in the job."};
   /// Get the number of slots
   Gaudi::Property<int> m_numberOfSlots{this, "numberOfSlots", 1, "Number of slots in the job."};
+  /// Set the number of messages for the event-level report
+  Gaudi::Property<unsigned long> m_eventLoopMsgLimit{this, "eventLoopMsgLimit", 10, "Maximum number of event-level messages."};
 
   /// Snapshots data
   std::vector<PMonMT::MeasurementData> m_snapshotData;
@@ -162,6 +164,9 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
   // Count the number of events processed
   std::atomic<unsigned long long> m_eventCounter;
 
+  // Instant event-loop report counter
+  std::atomic<unsigned long> m_eventLoopMsgCounter;
+
   /* 
    * Data structure  to store component level measurements
    * We use pointer to the MeasurementData, because we use new keyword while creating them. Clear!
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
index 186eaf7e252d..dc60170b62bf 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
@@ -107,15 +107,20 @@ except Exception:
 
 if rec.doPerfMon() :
     try:
-        # see https://twiki.cern.ch/twiki/bin/view/Atlas/PerfMonComps
-        # and https://twiki.cern.ch/twiki/bin/view/Atlas/PerfMonSD
+        from AthenaCommon.ConcurrencyFlags import jobproperties as jp
         from PerfMonComps.PerfMonFlags import jobproperties
-        jobproperties.PerfMonFlags.OutputFile = "ntuple_"+OutFileName+".root"
-        jobproperties.PerfMonFlags.doMonitoring = True
-        jobproperties.PerfMonFlags.doFastMon = not rec.doDetailedPerfMon()
-        jobproperties.PerfMonFlags.doDetailedMonitoring = rec.doDetailedPerfMon()
-        jobproperties.PerfMonFlags.doSemiDetailedMonitoring = rec.doSemiDetailedPerfMon()
-        include( "PerfMonComps/PerfMonSvc_jobOptions.py" )
+        if jp.ConcurrencyFlags.NumThreads() <= 1:
+            # see https://twiki.cern.ch/twiki/bin/view/Atlas/PerfMonComps
+            # and https://twiki.cern.ch/twiki/bin/view/Atlas/PerfMonSD
+            jobproperties.PerfMonFlags.OutputFile = "ntuple_"+OutFileName+".root"
+            jobproperties.PerfMonFlags.doMonitoring = True
+            jobproperties.PerfMonFlags.doFastMon = not rec.doDetailedPerfMon()
+            jobproperties.PerfMonFlags.doDetailedMonitoring = rec.doDetailedPerfMon()
+            jobproperties.PerfMonFlags.doSemiDetailedMonitoring = rec.doSemiDetailedPerfMon()
+            include( "PerfMonComps/PerfMonSvc_jobOptions.py" )
+        else:
+            include( "PerfMonComps/PerfMonMTSvc_jobOptions.py" )
+            svcMgr.PerfMonMTSvc.jsonFileName = "perfmonmt_"+OutFileName+".json"
 
     except Exception:
         treatException("Could not load PerfMon" )
-- 
GitLab


From 0b637614781f91ea97927eef81b4f13c07faf007 Mon Sep 17 00:00:00 2001
From: amete <serhanmete@gmail.com>
Date: Thu, 4 Jun 2020 20:26:55 +0200
Subject: [PATCH 005/266] Minor tweak to the x-axis labels

---
 .../PerformanceMonitoring/PerfMonAna/bin/perfmonmt-plotter.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/PerformanceMonitoring/PerfMonAna/bin/perfmonmt-plotter.py b/Control/PerformanceMonitoring/PerfMonAna/bin/perfmonmt-plotter.py
index 3a7e2cfbf50e..6585790a5fcf 100644
--- a/Control/PerformanceMonitoring/PerfMonAna/bin/perfmonmt-plotter.py
+++ b/Control/PerformanceMonitoring/PerfMonAna/bin/perfmonmt-plotter.py
@@ -56,7 +56,7 @@ def plotLineChart(params):
   ax.set_xlabel(params['xlabel'])
   ax.set_ylabel(params['ylabel'])
 
-  ax.set_xticklabels(params['xVals'])
+  ax.set_xticklabels(params['xVals'], rotation='vertical')
   ax.tick_params(axis='both', which='major', labelsize=10)
   ax.set_title(params['title'])
   ax.legend()
-- 
GitLab


From e9a7cc9e824d97e7b6cb4f4de76761ccdac9a4f2 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 4 Jun 2020 16:46:36 +0200
Subject: [PATCH 006/266] TrigEgammaMatchingTool: Fix placement of using
 directive.

Don't put using directives in the global namespace in included files.
---
 .../TrigEgammaMatchingToolMT.icc              | 26 +++++++++----------
 .../src/TrigEgammaMatchingToolMTTest.cxx      |  4 ++-
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/TrigEgammaMatchingTool/TrigEgammaMatchingToolMT.icc b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/TrigEgammaMatchingTool/TrigEgammaMatchingToolMT.icc
index a9476a503cc9..4671ed79eb41 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/TrigEgammaMatchingTool/TrigEgammaMatchingToolMT.icc
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/TrigEgammaMatchingTool/TrigEgammaMatchingToolMT.icc
@@ -3,8 +3,6 @@
 */
 
 
-using namespace TrigCompositeUtils;
-
 
 // L2Calo, L2Electron, L2Photon, EFCalo, Electron and Photon trigger passed access
 template<class T>
@@ -77,10 +75,10 @@ inline bool TrigEgammaMatchingToolMT::closestObject( const xAOD::Egamma *eg, con
 
 
 template<class T>
-inline std::vector<LinkInfo<T>> TrigEgammaMatchingToolMT::getFeatures( const TrigCompositeUtils::Decision *dec , std::string trigger, std::string key)
+inline std::vector<TrigCompositeUtils::LinkInfo<T>> TrigEgammaMatchingToolMT::getFeatures( const TrigCompositeUtils::Decision *dec , std::string trigger, std::string key)
 const 
 {
-  std::vector<LinkInfo<T>> vec;
+  std::vector<TrigCompositeUtils::LinkInfo<T>> vec;
   auto initRoi = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(dec, "initialRoI"); 
   if( !initRoi.link.isValid() ) return vec;
 
@@ -117,7 +115,7 @@ inline const xAOD::EmTauRoI* TrigEgammaMatchingToolMT::getL1Feature( const TrigC
 
 // L1Calo
 template<>
-inline LinkInfo<TrigRoiDescriptorCollection> TrigEgammaMatchingToolMT::getFeature<TrigRoiDescriptorCollection>( const TrigCompositeUtils::Decision *dec , 
+inline TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> TrigEgammaMatchingToolMT::getFeature<TrigRoiDescriptorCollection>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                 std::string trigger)
 const
 {
@@ -130,24 +128,24 @@ const
       if( (*featLinkInfo.link)->roiWord() == (*initRoi.link)->roiWord() )  return featLinkInfo; 
     }                                                               
   }
-  return LinkInfo<TrigRoiDescriptorCollection>();
+  return TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection>();
 }
 
 
 // L2Calo
 template<>
-inline LinkInfo<xAOD::TrigEMClusterContainer> TrigEgammaMatchingToolMT::getFeature<xAOD::TrigEMClusterContainer>( const TrigCompositeUtils::Decision *dec , 
+inline TrigCompositeUtils::LinkInfo<xAOD::TrigEMClusterContainer> TrigEgammaMatchingToolMT::getFeature<xAOD::TrigEMClusterContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                   std::string trigger)
 const
 {
-  std::vector<LinkInfo<xAOD::TrigEMClusterContainer>> vec = getFeatures<xAOD::TrigEMClusterContainer>(dec, trigger, key("L2Calo") );
-  return !vec.empty() ? vec.front() : LinkInfo<xAOD::TrigEMClusterContainer>();
+  std::vector<TrigCompositeUtils::LinkInfo<xAOD::TrigEMClusterContainer>> vec = getFeatures<xAOD::TrigEMClusterContainer>(dec, trigger, key("L2Calo") );
+  return !vec.empty() ? vec.front() : TrigCompositeUtils::LinkInfo<xAOD::TrigEMClusterContainer>();
 }
 
 
 // L2Electron
 template<>
-inline std::vector<LinkInfo<xAOD::TrigElectronContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::TrigElectronContainer>( const TrigCompositeUtils::Decision *dec , 
+inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::TrigElectronContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::TrigElectronContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                               std::string trigger)
 const
 {
@@ -157,7 +155,7 @@ const
 
 // L2Photon
 template<>
-inline std::vector<LinkInfo<xAOD::TrigPhotonContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::TrigPhotonContainer>( const TrigCompositeUtils::Decision *dec , 
+inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::TrigPhotonContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::TrigPhotonContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                           std::string trigger)
 const
 {
@@ -167,7 +165,7 @@ const
 
 // EFCalo
 template<>
-inline std::vector<LinkInfo<xAOD::CaloClusterContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::CaloClusterContainer>( const TrigCompositeUtils::Decision *dec , 
+inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::CaloClusterContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::CaloClusterContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                             std::string trigger)
 const
 {
@@ -177,7 +175,7 @@ const
 
 // Electron
 template<>
-inline std::vector<LinkInfo<xAOD::ElectronContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::ElectronContainer>( const TrigCompositeUtils::Decision *dec , 
+inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::ElectronContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::ElectronContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                       std::string trigger)
 const
 {
@@ -187,7 +185,7 @@ const
 
 // Photon
 template<>
-inline std::vector<LinkInfo<xAOD::PhotonContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::PhotonContainer>( const TrigCompositeUtils::Decision *dec , 
+inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::PhotonContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::PhotonContainer>( const TrigCompositeUtils::Decision *dec , 
                                                                                                                   std::string trigger)
 const
 {
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
index 10ce7107557b..f64f79f66bee 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -7,6 +7,8 @@
 #include "DecisionHandling/TrigCompositeUtils.h"
 
 
+using namespace TrigCompositeUtils;
+
 
 
 TrigEgammaMatchingToolMTTest::TrigEgammaMatchingToolMTTest(const std::string& name,  ISvcLocator* pSvcLocator )
-- 
GitLab


From 84b1cf4bda43d40b145ab1cb0ecfe4db329a7711 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 4 Jun 2020 16:46:53 +0200
Subject: [PATCH 007/266] xAODTrackingAthenaPool: Update reference files.

Update test reference files for new xAOD variables.
---
 Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt b/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
index abc90da77d23..9065fdacc9df 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
@@ -41,7 +41,7 @@ find_package( AthenaPoolUtilitiesTest )
 
 if( ATHENAPOOLUTILITIESTEST_FOUND )
   set( XAODTRACKINGATHENAPOOL_REFERENCE_TAG
-       xAODTrackingAthenaPoolReference-01-00-00 )
+       xAODTrackingAthenaPoolReference-02-00-00 )
   run_tpcnv_legacy_test( xAODTrackingAthenaPool_20.1.7.2   AOD-20.1.7.2-full
                    REQUIRED_LIBRARIES xAODTrackingAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODTRACKINGATHENAPOOL_REFERENCE_TAG} )
-- 
GitLab


From 57fc42eaa5c0dcc510834ef2a976aeaa047b70b2 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 5 Jun 2020 11:53:42 +0200
Subject: [PATCH 008/266] JobTransforms+KitValidation: Delete obsolete packages

Delete obsolete packages and some files referencing their content.
---
 .../InDetSLHC_Example_TestConfiguration.xml   | 558 --------------
 .../AnalysisExamples/scripts/rome.reco.job    | 110 ---
 .../AnalysisExamples/scripts/rome.reco.sh     |  11 -
 Projects/Athena/package_filters.txt           |   2 -
 ...RecJobTransformTests_TestConfiguration.xml | 642 ----------------
 Tools/JobTransforms/CMakeLists.txt            |   7 -
 Tools/JobTransforms/include/JTPathUtils.def   |  62 --
 .../include/athenaCheckLog.ignore             | 184 -----
 Tools/JobTransforms/include/athenaCheckLog.kb |  26 -
 .../include/athenaCheckLog.success            |   1 -
 Tools/JobTransforms/include/checkLogUtils.def | 256 -------
 Tools/JobTransforms/include/checkfiles.def    |  55 --
 Tools/JobTransforms/include/colors.def        |  11 -
 Tools/JobTransforms/include/copy.def          |  40 -
 Tools/JobTransforms/include/dbUtils.def       |  45 --
 Tools/JobTransforms/include/fileUtils.def     | 144 ----
 .../include/jobInfo.body.xml.template         |  19 -
 Tools/JobTransforms/include/jobInfo.def       |  93 ---
 .../include/jobInfo.errors.xml.template       |   1 -
 .../include/jobInfo.head.xml.template         |   2 -
 .../include/jobInfo.tail.xml.template         |   1 -
 Tools/JobTransforms/include/metaData.def      |  65 --
 Tools/JobTransforms/include/patch.def         |  38 -
 Tools/JobTransforms/include/transformHelp.def |  77 --
 .../include/transformOptions.def              |  88 ---
 .../jobOptions/G4OptionsDC2/dc2_g4sim.py      | 132 ----
 .../FromPooltoAltfasttoCBNT.py                |  72 --
 .../FromPooltoAltfasttoCBNT_root.py           |  70 --
 .../Generator_pool_out_frag.py                |  12 -
 .../Generator_to_atlfast.py                   |  43 --
 .../Generator_to_atlfast_root.py              |  38 -
 .../dc2_A10.pythia_Atautau.py                 | 135 ----
 .../dc2_A5_zjjMadcup_pythia.py                |  15 -
 .../GeneratorOptionsDC2/dc2_A8_pythiaB.py     |  63 --
 .../dc2_B3_pythia_Bmumu.py                    | 100 ---
 .../dc2_FJ1_pythia_jetjet.py                  |  37 -
 .../dc2_FJ2_pythia_jetjet.py                  |  37 -
 .../dc2_FJ3_pythia_jetjet.py                  |  37 -
 .../dc2_FJ4_pythia_jetjet.py                  |  37 -
 .../GeneratorOptionsDC2/dc2_H5_filter_frag.py |   8 -
 .../dc2_H5_pythia_VBF_Hww.py                  | 105 ---
 .../GeneratorOptionsDC2/dc2_H8_pythia_Abb.py  | 118 ---
 .../GeneratorOptionsDC2/dc2_H9_pythia_Abb.py  | 119 ---
 .../dc2_J1_pythia_jetjet.py                   |  36 -
 .../dc2_J2_pythia_jetjet.py                   |  36 -
 .../dc2_J3_pythia_jetjet.py                   |  36 -
 .../dc2_J4_pythia_jetjet.py                   |  36 -
 .../dc2_J5_pythia_jetjet.py                   |  36 -
 .../dc2_J6_pythia_jetjet.py                   |  36 -
 .../dc2_J7_pythia_jetjet.py                   |  36 -
 .../dc2_J8_pythia_jetjet.py                   |  35 -
 .../dc2_M1_pythia_minbias.py                  |  27 -
 Tools/JobTransforms/share/AthExHelloWorld.kvt |  64 --
 Tools/JobTransforms/share/AthExHelloWorld.trf |  24 -
 .../share/AthenaPoolCaloCluster.kvt           |  97 ---
 .../AthenaPoolCaloCluster2StepReader.trf      |  25 -
 .../share/AthenaPoolCaloClusterReader.trf     |  25 -
 .../AthenaPoolCaloClusterStep1Writer.trf      |  25 -
 .../AthenaPoolCaloClusterStep2Writer.trf      |  25 -
 .../share/AthenaPoolCaloClusterWriter.trf     |  25 -
 .../share/AthenaPoolElementLinks.kvt          | 117 ---
 .../share/AthenaPoolEventInfoRead.trf         |  25 -
 .../share/AthenaPoolEventInfoWrite.trf        |  25 -
 .../share/AthenaPoolEventInfoWriteStep2.trf   |  25 -
 .../share/AthenaPoolEventInfoWriteStep3.trf   |  25 -
 .../share/AthenaPoolEventInfoWriteStep4.trf   |  25 -
 .../share/AthenaPoolInDetRawDataReader.trf    |  26 -
 .../share/AthenaPoolInDetRawDataWriter.trf    |  25 -
 .../share/AthenaPoolLArCellContReader.trf     |  25 -
 .../share/AthenaPoolLArCellContWriter.trf     |  25 -
 .../share/AthenaPoolMissingETRead.trf         |  25 -
 .../share/AthenaPoolMissingETWrite.trf        |  25 -
 .../share/AthenaPoolNavigation.kvt            | 137 ----
 Tools/JobTransforms/share/AthenaPoolTest.kvt  | 277 -------
 .../share/AthenaPoolTestRead.trf              |  25 -
 .../share/AthenaPoolTestReadNav.trf           |  25 -
 .../share/AthenaPoolTestStep2Write.trf        |  25 -
 .../share/AthenaPoolTestWrite.trf             |  25 -
 .../share/AtlasG4SimGeoModel.kvt              |  63 --
 .../share/AtlasG4SimGeoModel.trf              |  34 -
 Tools/JobTransforms/share/DC2AtlfastZee.kvt   |  87 ---
 Tools/JobTransforms/share/DC2EvgenAtt.kvt     |  82 ---
 Tools/JobTransforms/share/DC2EvgenB.kvt       |  82 ---
 Tools/JobTransforms/share/DC2EvgenBmm.kvt     |  82 ---
 Tools/JobTransforms/share/DC2EvgenHbbmm.kvt   |  83 ---
 Tools/JobTransforms/share/DC2EvgenHww.kvt     |  82 ---
 Tools/JobTransforms/share/DC2EvgenJJ.kvt      |  83 ---
 .../JobTransforms/share/DC2EvgenJetCalib.kvt  |  87 ---
 .../JobTransforms/share/DC2EvgenJetFilter.kvt |  82 ---
 Tools/JobTransforms/share/DC2EvgenMinBias.kvt |  82 ---
 Tools/JobTransforms/share/DC2EvgenSusy.kvt    |  82 ---
 Tools/JobTransforms/share/DC2EvgenTop.kvt     |  87 ---
 Tools/JobTransforms/share/DC2EvgenW4Jet.kvt   |  87 ---
 Tools/JobTransforms/share/DC2EvgenWminE.kvt   |  87 ---
 Tools/JobTransforms/share/DC2EvgenZee.kvt     |  83 ---
 Tools/JobTransforms/share/DC2EvgenZjj.kvt     |  86 ---
 Tools/JobTransforms/share/DC2EvgenZmm.kvt     |  83 ---
 Tools/JobTransforms/share/DC2EvgenZtt.kvt     |  83 ---
 Tools/JobTransforms/share/DC2G4digitHbbmm.kvt |  84 ---
 Tools/JobTransforms/share/DC2G4digitZee.kvt   |  84 ---
 Tools/JobTransforms/share/DC2G4simHbbmm.kvt   |  89 ---
 Tools/JobTransforms/share/DC2G4simZee.kvt     |  89 ---
 Tools/JobTransforms/share/DC2reconHbbmm.kvt   |  83 ---
 Tools/JobTransforms/share/DC2reconZee.kvt     |  83 ---
 Tools/JobTransforms/share/ESDtoAOD.kvt        | 121 ---
 Tools/JobTransforms/share/EvgenHiggs.kvt      |  80 --
 Tools/JobTransforms/share/EvgenMuon.kvt       |  81 --
 Tools/JobTransforms/share/EvgenMuonCalib.kvt  |  82 ---
 Tools/JobTransforms/share/G4digitHiggs.kvt    |  82 ---
 Tools/JobTransforms/share/G4digitMuon.kvt     |  82 ---
 Tools/JobTransforms/share/G4reconHiggs.kvt    |  83 ---
 Tools/JobTransforms/share/G4reconMuon.kvt     |  83 ---
 Tools/JobTransforms/share/G4simHiggs.kvt      |  86 ---
 Tools/JobTransforms/share/G4simMuon.kvt       |  86 ---
 .../share/InDetDetDescrExample.kvt            |  97 ---
 .../share/InDetReadSiDetectorElements.trf     |  24 -
 .../share/InDetReadTRTDetectorElements.trf    |  24 -
 Tools/JobTransforms/share/MooEventCompile.kvt |  65 --
 Tools/JobTransforms/share/Pythia_i.kvt        |  75 --
 Tools/JobTransforms/share/RecExCommon.kvt     |  99 ---
 Tools/JobTransforms/share/RecExToESD.kvt      | 106 ---
 Tools/JobTransforms/share/SimpleChecks.kvt    | 125 ----
 Tools/JobTransforms/share/dc2.atlfast.trf     | 158 ----
 .../share/dc2.eventmixing.RDO.trf             | 421 -----------
 .../share/dc2.eventmixing.layoutP.trf         | 449 -----------
 Tools/JobTransforms/share/dc2.eventmixing.trf | 438 -----------
 .../share/dc2.evgen.herwig.inputA0.trf        | 235 ------
 .../share/dc2.evgen.herwig.inputA4.trf        | 235 ------
 .../JobTransforms/share/dc2.evgen.herwig.trf  | 232 ------
 .../share/dc2.evgen.pythia.inputA5.trf        | 233 ------
 .../share/dc2.evgen.pythia.inputA7.trf        | 233 ------
 .../JobTransforms/share/dc2.evgen.pythia.trf  | 221 ------
 .../JobTransforms/share/dc2.evgen.pythiaB.trf | 217 ------
 Tools/JobTransforms/share/dc2.g4digit.trf     | 198 -----
 Tools/JobTransforms/share/dc2.g4sim.trf       | 408 ----------
 Tools/JobTransforms/share/dc2.recon.AOD.trf   | 212 ------
 Tools/JobTransforms/share/dc2.recon.ESD.trf   | 248 -------
 Tools/JobTransforms/share/dc2.recon.trf       | 175 -----
 Tools/JobTransforms/share/evgen.partgen.trf   | 206 ------
 Tools/JobTransforms/share/evgen.pythia.trf    | 199 -----
 Tools/JobTransforms/share/rome.fullchain.trf  | 696 ------------------
 .../src/MooEvent-00-01-16.tar.gz              | Bin 25187 -> 0 bytes
 .../templates/Transformation.template.trf     |  97 ---
 Tools/KitValidation/CMakeLists.txt            |  11 -
 Tools/KitValidation/doc/README                |  97 ---
 Tools/KitValidation/etc/KitValidation.conf    |  67 --
 .../include/KitValidationHelp.def             |  86 ---
 .../include/KitValidationOptions.def          |  88 ---
 Tools/KitValidation/include/colors.def        |  11 -
 Tools/KitValidation/include/confUtils.def     | 313 --------
 Tools/KitValidation/include/pathUtils.def     |  92 ---
 Tools/KitValidation/include/version.def       |  16 -
 Tools/KitValidation/run/KVtest.sh             |  76 --
 Tools/KitValidation/run/run.sh                |  16 -
 Tools/KitValidation/run/testdist.sh           |  24 -
 Tools/KitValidation/run/testkit.sh            |  22 -
 Tools/KitValidation/share/KitValidation       | 348 ---------
 Tools/KitValidation/share/kv_perfmon.py       |  23 -
 Tools/KitValidation/share/kv_reflex.py        |   1 -
 Tools/KitValidation/share/kvpost.py           | 384 ----------
 Tools/KitValidation/templates/template.kvt    | 169 -----
 .../scripts/TransformTestRunner.py            |  35 -
 162 files changed, 16237 deletions(-)
 delete mode 100755 InnerDetector/InDetExample/InDetSLHC_Example/test/InDetSLHC_Example_TestConfiguration.xml
 delete mode 100755 PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.job
 delete mode 100755 PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
 delete mode 100644 Tools/JobTransforms/CMakeLists.txt
 delete mode 100755 Tools/JobTransforms/include/JTPathUtils.def
 delete mode 100755 Tools/JobTransforms/include/athenaCheckLog.ignore
 delete mode 100755 Tools/JobTransforms/include/athenaCheckLog.kb
 delete mode 100755 Tools/JobTransforms/include/athenaCheckLog.success
 delete mode 100755 Tools/JobTransforms/include/checkLogUtils.def
 delete mode 100755 Tools/JobTransforms/include/checkfiles.def
 delete mode 100755 Tools/JobTransforms/include/colors.def
 delete mode 100755 Tools/JobTransforms/include/copy.def
 delete mode 100755 Tools/JobTransforms/include/dbUtils.def
 delete mode 100755 Tools/JobTransforms/include/fileUtils.def
 delete mode 100755 Tools/JobTransforms/include/jobInfo.body.xml.template
 delete mode 100755 Tools/JobTransforms/include/jobInfo.def
 delete mode 100755 Tools/JobTransforms/include/jobInfo.errors.xml.template
 delete mode 100755 Tools/JobTransforms/include/jobInfo.head.xml.template
 delete mode 100755 Tools/JobTransforms/include/jobInfo.tail.xml.template
 delete mode 100755 Tools/JobTransforms/include/metaData.def
 delete mode 100755 Tools/JobTransforms/include/patch.def
 delete mode 100755 Tools/JobTransforms/include/transformHelp.def
 delete mode 100755 Tools/JobTransforms/include/transformOptions.def
 delete mode 100755 Tools/JobTransforms/jobOptions/G4OptionsDC2/dc2_g4sim.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT_root.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_pool_out_frag.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast_root.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A10.pythia_Atautau.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A5_zjjMadcup_pythia.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A8_pythiaB.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_B3_pythia_Bmumu.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ1_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ2_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ3_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ4_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_filter_frag.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_pythia_VBF_Hww.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H8_pythia_Abb.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H9_pythia_Abb.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J1_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J2_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J3_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J4_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J5_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J6_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J7_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J8_pythia_jetjet.py
 delete mode 100755 Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_M1_pythia_minbias.py
 delete mode 100755 Tools/JobTransforms/share/AthExHelloWorld.kvt
 delete mode 100755 Tools/JobTransforms/share/AthExHelloWorld.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloCluster.kvt
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloCluster2StepReader.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloClusterReader.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloClusterStep1Writer.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloClusterStep2Writer.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolCaloClusterWriter.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolElementLinks.kvt
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolEventInfoRead.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolEventInfoWrite.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep2.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep3.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep4.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolInDetRawDataReader.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolInDetRawDataWriter.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolLArCellContReader.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolLArCellContWriter.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolMissingETRead.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolMissingETWrite.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolNavigation.kvt
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolTest.kvt
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolTestRead.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolTestReadNav.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolTestStep2Write.trf
 delete mode 100755 Tools/JobTransforms/share/AthenaPoolTestWrite.trf
 delete mode 100755 Tools/JobTransforms/share/AtlasG4SimGeoModel.kvt
 delete mode 100755 Tools/JobTransforms/share/AtlasG4SimGeoModel.trf
 delete mode 100755 Tools/JobTransforms/share/DC2AtlfastZee.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenAtt.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenB.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenBmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenHbbmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenHww.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenJJ.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenJetCalib.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenJetFilter.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenMinBias.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenSusy.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenTop.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenW4Jet.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenWminE.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenZee.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenZjj.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenZmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2EvgenZtt.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2G4digitHbbmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2G4digitZee.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2G4simHbbmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2G4simZee.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2reconHbbmm.kvt
 delete mode 100755 Tools/JobTransforms/share/DC2reconZee.kvt
 delete mode 100755 Tools/JobTransforms/share/ESDtoAOD.kvt
 delete mode 100755 Tools/JobTransforms/share/EvgenHiggs.kvt
 delete mode 100755 Tools/JobTransforms/share/EvgenMuon.kvt
 delete mode 100755 Tools/JobTransforms/share/EvgenMuonCalib.kvt
 delete mode 100755 Tools/JobTransforms/share/G4digitHiggs.kvt
 delete mode 100755 Tools/JobTransforms/share/G4digitMuon.kvt
 delete mode 100755 Tools/JobTransforms/share/G4reconHiggs.kvt
 delete mode 100755 Tools/JobTransforms/share/G4reconMuon.kvt
 delete mode 100755 Tools/JobTransforms/share/G4simHiggs.kvt
 delete mode 100755 Tools/JobTransforms/share/G4simMuon.kvt
 delete mode 100755 Tools/JobTransforms/share/InDetDetDescrExample.kvt
 delete mode 100755 Tools/JobTransforms/share/InDetReadSiDetectorElements.trf
 delete mode 100755 Tools/JobTransforms/share/InDetReadTRTDetectorElements.trf
 delete mode 100755 Tools/JobTransforms/share/MooEventCompile.kvt
 delete mode 100755 Tools/JobTransforms/share/Pythia_i.kvt
 delete mode 100755 Tools/JobTransforms/share/RecExCommon.kvt
 delete mode 100755 Tools/JobTransforms/share/RecExToESD.kvt
 delete mode 100755 Tools/JobTransforms/share/SimpleChecks.kvt
 delete mode 100755 Tools/JobTransforms/share/dc2.atlfast.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.eventmixing.RDO.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.eventmixing.layoutP.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.eventmixing.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.herwig.inputA0.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.herwig.inputA4.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.herwig.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.pythia.inputA5.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.pythia.inputA7.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.pythia.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.evgen.pythiaB.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.g4digit.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.g4sim.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.recon.AOD.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.recon.ESD.trf
 delete mode 100755 Tools/JobTransforms/share/dc2.recon.trf
 delete mode 100755 Tools/JobTransforms/share/evgen.partgen.trf
 delete mode 100755 Tools/JobTransforms/share/evgen.pythia.trf
 delete mode 100755 Tools/JobTransforms/share/rome.fullchain.trf
 delete mode 100644 Tools/JobTransforms/src/MooEvent-00-01-16.tar.gz
 delete mode 100755 Tools/JobTransforms/templates/Transformation.template.trf
 delete mode 100644 Tools/KitValidation/CMakeLists.txt
 delete mode 100755 Tools/KitValidation/doc/README
 delete mode 100755 Tools/KitValidation/etc/KitValidation.conf
 delete mode 100755 Tools/KitValidation/include/KitValidationHelp.def
 delete mode 100755 Tools/KitValidation/include/KitValidationOptions.def
 delete mode 100755 Tools/KitValidation/include/colors.def
 delete mode 100755 Tools/KitValidation/include/confUtils.def
 delete mode 100755 Tools/KitValidation/include/pathUtils.def
 delete mode 100755 Tools/KitValidation/include/version.def
 delete mode 100755 Tools/KitValidation/run/KVtest.sh
 delete mode 100755 Tools/KitValidation/run/run.sh
 delete mode 100755 Tools/KitValidation/run/testdist.sh
 delete mode 100755 Tools/KitValidation/run/testkit.sh
 delete mode 100755 Tools/KitValidation/share/KitValidation
 delete mode 100755 Tools/KitValidation/share/kv_perfmon.py
 delete mode 100755 Tools/KitValidation/share/kv_reflex.py
 delete mode 100755 Tools/KitValidation/share/kvpost.py
 delete mode 100755 Tools/KitValidation/templates/template.kvt
 delete mode 100755 Tools/PyJobTransforms/scripts/TransformTestRunner.py

diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/test/InDetSLHC_Example_TestConfiguration.xml b/InnerDetector/InDetExample/InDetSLHC_Example/test/InDetSLHC_Example_TestConfiguration.xml
deleted file mode 100755
index 94c1fb45cf04..000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/test/InDetSLHC_Example_TestConfiguration.xml
+++ /dev/null
@@ -1,558 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd">
-<unifiedTestConfiguration>
-<atn>
-
-<!-- ++++++++++++++++++++++++++ Running on Simulated Data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-
-
-<!-- Single Particle Evgen within simulation -->
-
-<TEST name="Athena_SLHC_single_particle_sim" type="athena" suite="InDetSLHC_Example">
-   <options_atn> InDetSLHC_Example/jobOptions_simulation_SLHC.py</options_atn>
-   <timelimit>20</timelimit>
-   <author> John Chapman </author>
-   <mailto> chapman@hep.phy.cam.ac.uk </mailto>
-   <expectations>
-      <errorMessage>FAILURE (ERROR)</errorMessage>
-      <successMessage>leaving with code 0</successMessage>
-      <returnValue>0</returnValue>
-   </expectations>
-</TEST>
-
-<!-- Needs to be updated for the current release.
-<TEST name="Athena_SLHC_single_particle_digi" type="athena" suite="InDetSLHC_Example">
-   <options_atn> InDetSLHC_Example/jobOptions_digitization_SLHC.py</options_atn>
-   <timelimit>20</timelimit>
-   <author> John Chapman </author>
-   <mailto> chapman@hep.phy.cam.ac.uk </mailto>
-   <expectations>
-      <errorMessage>FAILURE (ERROR)</errorMessage>
-      <successMessage>leaving with code 0</successMessage>
-      <returnValue>0</returnValue>
-   </expectations>
-</TEST>
--->
-
-<TEST name="Sim_tf_SLHC_single_particle_sim" type="script" suite="InDetSLHC_Example">
-      <options_atn>
-	Sim_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=test.HITS.pool.root --maxEvents=10 --skipEvents=0 --randomSeed=10 --preInclude='sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py,InDetSLHC_Example/preInclude.OverrideBFieldTag.py' --geometryVersion=ATLAS-P2-ITK-01-00-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='sim:InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --DataRunNumber 240000
-      </options_atn>
-      <timelimit>20</timelimit>
-      <author>John Chapman</author>
-      <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-      <expectations>
-            <errorMessage>FAILURE (ERROR)</errorMessage>
-            <returnValue>0</returnValue>
-      </expectations>
-</TEST>
-
-<!-- Needs to be updated for the current release.
-<TEST name="Digi_tf_SLHC_single_particle_digi" type="script" suite="InDetSLHC_Example">
-      <options_atn>
-        Digi_tf.py --inputHITSFile=test.HITS.pool.root --outputRDOFile=test.RDO.pool.root --maxEvents=10 --skipEvents=0 --preInclude='HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py' --geometryVersion=ATLAS-P2-ITK-01-00-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --digiSeedOffset1=11 --digiSeedOffset2=22 --doAllNoise=False --DataRunNumber 240000
-      </options_atn>
-      <timelimit>20</timelimit>
-      <author>John Chapman</author>
-      <expectations>
-            <errorMessage>FAILURE (ERROR)</errorMessage>
-            <returnValue>0</returnValue>
-      </expectations>
-</TEST>
--->
-
-
-<!-- InDet only Reco default -->
-
-<!-- Requires files built by digi test.
-<TEST name="Reco_tf_SLHC_single_particle_reco" type="script" suite="InDetSLHC_Example">
-  <options_atn>export TRF_ECHO=True; Reco_tf.py --geometryVersion=ATLAS-P2-ITK-01-00-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --inputRDOFile test.RDO.pool.root --preInclude InDetSLHC_Example/preInclude.SLHC.SiliconOnly.Reco.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py r2e:InDetSLHC_Example/postInclude.DigitalClustering.py --outputESDFile testESD.root --outputAODFile testAOD.root --maxEvents 10</options_atn>
-  <timelimit>30</timelimit>
-  <author>John Chapman</author>
-   <mailto> Susumu.Oda@cern.ch </mailto>
-  <prescript>rm -f $ATN_WORK_AREA/testESD.root $ATN_WORK_AREA/testAOD.root</prescript>
-  <expectations>
-    <errorMessage>FAILURE (ERROR)</errorMessage>
-    <returnValue>0</returnValue>
-  </expectations>
-</TEST>
--->
-
-
-<!-- Needs to be updated for the current release.
-<TEST name="Digi_tf_SLHC_single_particle_intime_pileup_digi" type="script" suite="InDetSLHC_Example">
-      <options_atn>
-	xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19.2.1_000001_200evt.pool.root $ATN_WORK_AREA;
-	xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc12_14TeV.119996.Pythia8_A2MSTW2008LO_minbias_inelastic_high.HITS.e1133_19.2.1_000001_50evt.pool.root $ATN_WORK_AREA;
-	export TRF_ECHO=True; 
-	Digi_tf.py --inputHITSFile=test.HITS.pool.root --outputRDOFile=test.RDO.pool.root --maxEvents=10 --skipEvents=0 --preInclude='HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py,InDetSLHC_Example/preInclude.digitization_metadata_hacks.py' --geometryVersion=ATLAS-P2-ITK-01-00-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --digiSeedOffset1=11 --digiSeedOffset2=22 --doAllNoise=False --numberOfLowPtMinBias=79.7237 --numberOfHighPtMinBias=0.2763 --pileupInitialBunch=0 --pileupFinalBunch=0 --bunchSpacing=900 --inputLowPtMinbiasHitsFile=mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19.2.1_000001_200evt.pool.root --inputHighPtMinbiasHitsFile=mc12_14TeV.119996.Pythia8_A2MSTW2008LO_minbias_inelastic_high.HITS.e1133_19.2.1_000001_50evt.pool.root --DataRunNumber 240008
-      </options_atn>
-      <timelimit>30</timelimit>
-      <author>John Chapman</author>
-      <prescript>rm -f $ATN_WORK_AREA/test.RDO.pool.root</prescript>
-      <expectations>
-            <errorMessage>FAILURE (ERROR)</errorMessage>
-            <returnValue>0</returnValue>
-       </expectations>
-    </TEST>
--->
-
-</atn>
-
-<kv>
-
-  <kvtest name='SimZeeJet_SLHC' enabled='true'>
-    <release>ALL</release>
-    <priority>20</priority>
-    <kvsuite>InDetSLHC</kvsuite>
-    <trf>Sim_tf.py</trf>
-    <desc>Z -> e e jet G4 event Simulation (InDetSLHC_Example)</desc>
-    <author>Silvia Miglioranzi [Silvia.Miglioranzi@cern.ch],John Chapman [chapman@hep.phy.cam.ac.uk]</author>
-    <inpath>${T_DATAPATH}/EvgenZeePyJT-${T_RELEASE}</inpath>
-    <infile>${T_PREFIX}-EvgenZeePyJT-${T_RELEASE}.pool.root</infile>
-    <inpool>PoolFileCatalog.xml</inpool>
-    <outpath>${T_DATAPATH}/SimulHITSZeeJetInDetSLHC-${T_RELEASE}</outpath>
-    <outfile>${T_PREFIX}-SimulHITSZeeJetInDetSLHC-${T_RELEASE}.pool.root</outfile>
-    <logfile>${T_PREFIX}-SimulHITSZeeJetInDetSLHC-${T_RELEASE}.log</logfile>
-    <signature>
-      --inputEVNTFile="${T_INFILE}" --outputHITSFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --preInclude='sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py,InDetSLHC_Example/preInclude.OverrideBFieldTag.py,KitValidation/kv_reflex.py' --geometryVersion=ATLAS-P2-ITK-01-00-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='sim:InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --DataRunNumber 240000
-    </signature>
-    <copyfiles>
-      ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-    </copyfiles>
-    <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-  </kvtest>
-  <kvtest name='DigitZeeJet_SLHC' enabled='true'>
-    <release>ALL</release>
-    <priority>30</priority>
-    <kvsuite>InDetSLHC</kvsuite>
-    <trf>Digi_tf.py</trf>
-    <desc>Z -> e e jet Digitization (InDetSLHC_Example)</desc>
-    <author>Silvia Miglioranzi [Silvia.Miglioranzi@cern.ch],John Chapman [chapman@hep.phy.cam.ac.uk]</author>
-    <version>1.0.0</version>
-    <inpath>${T_DATAPATH}/SimulHITSZeeJetInDetSLHC-${T_RELEASE}</inpath>
-    <infile>${T_PREFIX}-SimulHITSZeeJetInDetSLHC-${T_RELEASE}.pool.root</infile>
-    <inpool>PoolFileCatalog.xml</inpool>
-    <outpath>${T_DATAPATH}/DigitZeeJetInDetSLHC-${T_RELEASE}</outpath>
-    <outfile>${T_PREFIX}-DigitZeeJetInDetSLHC-${T_RELEASE}.pool.root</outfile>
-    <logfile>${T_PREFIX}-DigitZeeJetInDetSLHC-${T_RELEASE}.log</logfile>
-    <signature>
-      --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --preInclude='HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py,KitValidation/kv_reflex.py' --geometryVersion=ATLAS-P2-ITK-01-00-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --digiSeedOffset1=11 --digiSeedOffset2=22 --doAllNoise=False --DataRunNumber 240000
-    </signature>
-    <copyfiles>
-      ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-    </copyfiles>
-    <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-  </kvtest>
-  <kvtest name='RecoZeeJet_SLHC' enabled='true'>
-    <release>ALL</release>
-    <priority>40</priority>
-    <kvsuite>InDetSLHC</kvsuite>
-    <trf>Reco_tf.py</trf>
-    <desc>Z -> e e jet event reconstruction (InDetSLHC_Example)</desc>
-    <author>Silvia Miglioranzi [Silvia.Miglioranzi@cern.ch],John Chapman [chapman@hep.phy.cam.ac.uk]</author>
-    <inpath>${T_DATAPATH}/DigitZeeJetInDetSLHC-${T_RELEASE}</inpath>
-    <infile>${T_PREFIX}-DigitZeeJetInDetSLHC-${T_RELEASE}.pool.root</infile>
-    <inpool>PoolFileCatalog.xml</inpool>
-    <outpath>${T_DATAPATH}/RecoZeeJetInDetSLHC-${T_RELEASE}</outpath>
-    <outfile>${T_PREFIX}-RecoESDZeeJetInDetSLHC-${T_RELEASE}.pool.root</outfile>
-    <logfile>${T_PREFIX}-RecoZeeJetInDetSLHC-${T_RELEASE}.log</logfile>
-    <signature>
-      --inputRDOFile="${T_INFILE}" --outputESDFile="${T_OUTFILE}" --preInclude InDetSLHC_Example/preInclude.SLHC.SiliconOnly.Reco.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py,KitValidation/kv_reflex.py r2e:InDetSLHC_Example/postInclude.DigitalClustering.py --maxEvents=5 --geometryVersion=ATLAS-P2-ITK-01-00-00
-    </signature>
-    <copyfiles>
-       ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-    </copyfiles>
-    <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-  </kvtest>
-
-</kv>
-
-<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt">
-  <rttContactPerson>Andreas Korn</rttContactPerson>
-  <mailto>atlas.indetslhcrtt.monitoring@cern.ch</mailto>
-  <refRelease>15.0.0</refRelease>
-
-  <jobList>
-
-    <classification>
-      <displayClass>OfflineValidation</displayClass>
-      <displayProcess>Reco</displayProcess>
-      <displayComponent>Det-InDet</displayComponent>
-    </classification>
-
-    <chain>
-      <chainName>SLHCChainTestLOI</chainName>
-      <sequential>
-	<chainElement>
-	  <jobTransform userJobId="SimLOI">
-	    <doc>SLHCSimulation</doc>
-	    <jobTransformJobName>chainSimLOISLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Sim_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=SLHCtest.LOI.HITS.pool.root --maxEvents=500 --skipEvents=0 --randomSeed=10 --preInclude='sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py' --geometryVersion=ATLAS-P2-ITK-01-00-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='sim:InDetSLHC_Example/postInclude.SLHC_Setup.py' --postExec 'sim:ToolSvc.ISF_ParticlePositionFilterDynamic.CheckRegion=[1]' --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOI.HITS.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="DigiLOI">
-	    <doc>SLHCDigitization</doc>
-	    <jobTransformJobName>chainDigiLOISLHCRTT</jobTransformJobName>
-	    <jobTransformCmd> 
-	      Digi_tf.py --inputHITSFile=SLHCtest.LOI.HITS.pool.root --outputRDOFile=SLHCtest.LOI.RDO.pool.root --maxEvents=500 --skipEvents=0 --preInclude='HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py' --geometryVersion=ATLAS-P2-ITK-01-00-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --digiSeedOffset1=11 --digiSeedOffset2=22 --doAllNoise=False --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.LOI.HITS.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOI.RDO.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="RecoLOI">
-	    <doc>SLHCReconstruction</doc>
-	    <jobTransformJobName>chainRecoLOISLHCRTT</jobTransformJobName>
-	    <jobTransformCmd> 
-	      Reco_tf.py --inputRDOFile=SLHCtest.LOI.RDO.pool.root --preInclude InDetSLHC_Example/preInclude.SLHC.SiliconOnly.Reco.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py r2e:InDetSLHC_Example/postInclude.DigitalClustering.py --outputESDFile=SLHCtest.LOI.ESD.pool.root --maxEvents=500  --geometryVersion=ATLAS-P2-ITK-01-00-00 --outputAODFile=SLHCtest.LOI.AOD.pool.root --conditionsTag=OFLCOND-MC15c-SDR-06
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.LOI.RDO.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOI.ESD.pool.root</chainfileout>
-	  <chainfileout>SLHCtest.LOI.AOD.pool.root</chainfileout>
-	</chainElement>
-
-      </sequential>
-    </chain>
-
-    <chain>
-      <chainName>SLHCChainTestLOIVF</chainName>
-      <sequential>
-	<chainElement>
-	  <jobTransform userJobId="SimLOIVF">
-	    <doc>SLHCSimulation</doc>
-	    <jobTransformJobName>chainSimLOIVFSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      AtlasG4_tf.py --inputEVNTFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/EVNTexample/mc12_14TeV.105200.McAtNloJimmy_CT10_ttbar_LeptonFilter.evgen.EVNT.e1323_tid00851913_00/EVNT.00851913._001697.pool.root.1 --outputHITSFile=SLHCtest.LOIVF.HITS.pool.root --maxEvents=5 --skipEvents=0 --randomSeed=10 --preInclude='sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py' --geometryVersion=ATLAS-P2-ITK-02-01-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='sim:InDetSLHC_Example/postInclude.SLHC_Setup.py' --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOIVF.HITS.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="DigiLOIVF">
-	    <doc>SLHCDigitization</doc>
-	    <jobTransformJobName>chainDigiLOIVFSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Digi_tf.py --inputHITSFile=SLHCtest.LOIVF.HITS.pool.root --outputRDOFile=SLHCtest.LOIVF.RDO.pool.root --maxEvents=-1 --skipEvents=0 --preInclude='HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py' --geometryVersion=ATLAS-P2-ITK-02-01-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py' --digiSeedOffset1=11 --digiSeedOffset2=22 --doAllNoise=False --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.LOIVF.HITS.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOIVF.RDO.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="RecoLOIVF">
-	    <doc>SLHCReconstruction</doc>
-	    <jobTransformJobName>chainRecoLOIVFSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Reco_tf.py --inputRDOFile=SLHCtest.LOIVF.RDO.pool.root --preInclude InDetSLHC_Example/preInclude.SLHC.NoTRT.Reco.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py r2e:InDetSLHC_Example/postInclude.DigitalClustering.py --outputESDFile=SLHCtest.LOIVF.ESD.pool.root --maxEvents=-1 --geometryVersion=ATLAS-P2-ITK-02-01-00 --conditionsTag=OFLCOND-MC15c-SDR-06 --outputAODFile=SLHCtest.LOIVF.AOD.pool.root
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.LOIVF.RDO.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOIVF.ESD.pool.root</chainfileout>
-	  <chainfileout>SLHCtest.LOIVF.AOD.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="PhysvalLOIVF">
-	    <doc>SLHCPhysicsValidation</doc>
-	    <jobTransformJobName>chainPhysicsValidationLOIVFSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Reco_tf.py --inputAODFile SLHCtest.LOIVF.AOD.pool.root --geometryVersion ATLAS-P2-ITK-02-01-00 --conditionsTag OFLCOND-MC15c-SDR-06 --outputNTUP_PHYSVALFile SLHCtest.LOIVF.PHYSVAL.root --validationFlags doBtag doElectron doExample doExotics doHSG6 doInDet doJet doMET doMuon doPFlow doPhoton doPrimaryTracking doSMZMet doSMZee doSecondaryTracking doTau --preInclude pval:InDetSLHC_Example/preInclude.SLHC.NoTRT.Ana.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py --outputFileValidation False
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.LOIVF.AOD.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	    <testToRemove>
-              <jobGroupName>RTT:Top</jobGroupName>
-              <testidentifier>CheckFileRunner0</testidentifier>
-            </testToRemove>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.LOIVF.PHYSVAL.root</chainfileout>
-	</chainElement>
-      </sequential>
-    </chain>
-
-    <chain>
-      <chainName>SLHCChainTestRing</chainName>
-      <sequential>
-	<chainElement>
-	  <jobTransform userJobId="SimRing">
-	    <doc>SLHCSimulation</doc>
-	    <jobTransformJobName>chainSimRingSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/EVNTexample/mc12_14TeV.105204.McAtNloJimmy_AUET2CT10_ttbar_allhad.evgen.EVNT.e2238_tid01485091_00/EVNT.01485091._001049.pool.root.1 .
-	      Sim_tf.py --inputEVNTFile=EVNT.01485091._001049.pool.root.1 --outputHITSFile=SLHCtest.Ring.HITS.pool.root --maxEvents=5 --skipEvents=0 --randomSeed=10 --preInclude='sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py' --geometryVersion=ATLAS-P2-ITK-03-00-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='sim:InDetSLHC_Example/postInclude.SLHC_Setup.py' --postExec 'sim:ToolSvc.ISF_ParticlePositionFilterDynamic.CheckRegion=[1]' --DataRunNumber 240014
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Ring.HITS.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="DigiRing">
-	    <doc>SLHCDigitization</doc>
-	    <jobTransformJobName>chainDigiRingSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000001.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000002.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000003.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000004.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000005.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000006.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000007.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000008.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000009.HITS.pool.root .; xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.HITS.e1133_19235.ring_EXT0/low.000010.HITS.pool.root .;xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/user.oda.mc12_14TeV.119996.Pythia8_A2MSTW2008LO_minbias_inelastic_high.HITS.e1133_19235.ring_EXT0/high.000001.HITS.pool.root .; Digi_tf.py --inputHitsFile SLHCtest.Ring.HITS.pool.root --outputRDOFile SLHCtest.Ring.RDO.pool.root --LowPtMinbiasHitsFile ./low.0000*.HITS.pool.root --numberOfLowPtMinBias 139.5128 --HighPtMinbiasHitsFile high.000001.HITS.pool.root --numberOfHighPtMinBias 0.483448 --conditionsTag 'OFLCOND-MC15c-SDR-06' --geometryVersion 'ATLAS-P2-ITK-03-00-00' --pileupFinalBunch 6 --DataRunNumber 240014 --preInclude 'HITtoRDO:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py,Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrains2012Config1_DigitConfig.py,RunDependentSimData/configLumi_user.py' --postInclude 'HITtoRDO:PyJobTransforms/UseFrontier.py,InDetSLHC_Example/postInclude.SLHC_Digitization_lowthresh.py,InDetSLHC_Example/postInclude.SLHC_Setup.py' --preExec 'from LArROD.LArRODFlags import larRODFlags; larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True); larRODFlags.NumberOfCollisions.set_Value_and_Lock(140);rec.doTrigger.set_Value_and_Lock(False);rec.Commissioning.set_Value_and_Lock(True);userRunLumiOverride={"run":240014, "lb":1, "starttstamp":1410014000, "mu":140.0};from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=["SimLayout","PhysicsList"];digitizationFlags.doInDetNoise.set_Value_and_Lock(False)' --postExec 'mergeMcEventCollTool=job.StandardPileUpToolsAlg.PileUpTools["MergeMcEventCollTool"];mergeMcEventCollTool.FirstXing=0;mergeMcEventCollTool.LastXing=0;mergeMcEventCollTool.DoSlimming=False;pixeldigi.EnableSpecialPixels=False;CfgMgr.MessageSvc().setError+=["HepMcParticleLink"];' --skipEvents 0 --maxEvents 5 --jobNumber 509 --digiSeedOffset1 509 --digiSeedOffset2 509
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.Ring.HITS.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Ring.RDO.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="RecoRing">
-	    <doc>SLHCReconstruction</doc>
-	    <jobTransformJobName>chainRecoRingSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Reco_tf.py --maxEvents=-1 --inputRDOFile=SLHCtest.Ring.RDO.pool.root --outputESDFile=SLHCtest.Ring.ESD.pool.root --outputAODFile=SLHCtest.Ring.AOD.pool.root --DBRelease=current --conditionsTag=OFLCOND-MC15c-SDR-06 --geometryVersion=ATLAS-P2-ITK-03-00-00 --autoConfiguration=everything --preInclude "RAWtoESD:InDetSLHC_Example/preInclude.SLHC.NoTRT.Reco.py" "ESDtoAOD:InDetSLHC_Example/preInclude.SLHC.NoTRT.Reco.py" --postInclude "all:PyJobTransforms/UseFrontier.py,InDetSLHC_Example/postInclude.SLHC_Setup.py" "RAWtoESD:InDetSLHC_Example/postInclude.DigitalClustering.py" --preExec "all:from LArROD.LArRODFlags import larRODFlags; larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True); larRODFlags.NumberOfCollisions.set_Value_and_Lock(140);rec.doTrigger.set_Value_and_Lock(False);rec.Commissioning.set_Value_and_Lock(True);" 'RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False;' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"];'
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.Ring.RDO.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Ring.ESD.pool.root</chainfileout>
-	  <chainfileout>SLHCtest.Ring.AOD.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="PhysvalRing">
-	    <doc>SLHCPhysicsValidation</doc>
-	    <jobTransformJobName>chainPhysicsValidationRingSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Reco_tf.py --inputAODFile SLHCtest.Ring.AOD.pool.root --geometryVersion ATLAS-P2-ITK-03-00-00 --conditionsTag OFLCOND-MC15c-SDR-06 --outputNTUP_PHYSVALFile SLHCtest.Ring.PHYSVAL.root --validationFlags doBtag doElectron doExample doExotics doHSG6 doInDet doJet doMET doMuon doPFlow doPhoton doPrimaryTracking doSMZMet doSMZee doSecondaryTracking doTau --preInclude pval:InDetSLHC_Example/preInclude.SLHC.NoTRT.Ana.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py --outputFileValidation False
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.Ring.AOD.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	    <testToRemove>
-              <jobGroupName>RTT:Top</jobGroupName>
-              <testidentifier>CheckFileRunner0</testidentifier>
-            </testToRemove>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Ring.PHYSVAL.root</chainfileout>
-	</chainElement>
-      </sequential>
-    </chain>
-
-    <chain>
-      <chainName>SLHCChainTestsFCal</chainName>
-      <sequential>
-	<chainElement>
-	  <jobTransform userJobId="SimsFCal">
-	    <doc>SLHCSimulation</doc>
-	    <jobTransformJobName>chainSimsFCalSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/EVNTexample/mc12_14TeV.105204.McAtNloJimmy_AUET2CT10_ttbar_allhad.evgen.EVNT.e2238_tid01485091_00/EVNT.01485091._001049.pool.root.1 .
-	      ATHENA_CORE_NUMBER=3 Sim_tf.py --multiprocess --inputEVNTFile=EVNT.01485091._001049.pool.root.1 --outputHITSFile=SLHCtest.sFCal.HITS.pool.root --maxEvents=6 --skipEvents=0 --randomSeed=10 --preInclude='all:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py' --geometryVersion=ATLAS-P2-SFCAL-01-00-00_VALIDATION --conditionsTag=OFLCOND-MC15c-SDR-06 --postInclude='all:InDetSLHC_Example/postInclude.SLHC_Setup.py' --postExec 'sim:ToolSvc.ISF_ParticlePositionFilterDynamic.CheckRegion=[1]' --DataRunNumber 240120
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.sFCal.HITS.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="DigisFCal">
-	    <doc>SLHCDigitization</doc>
-	    <jobTransformJobName>chainDigisFCalSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd> 
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc15_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.simul.HITS.e1133_s2638_tid05646683_00/HITS.05646683._000001.pool.root.1 .;
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc15_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.simul.HITS.e1133_s2638_tid05646683_00/HITS.05646683._000002.pool.root.1 .;
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc15_14TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.simul.HITS.e1133_s2638_tid05646683_00/HITS.05646683._000003.pool.root.1 .;
-	      xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-slhc/users/oda/HITSexample/mc15_14TeV.119996.Pythia8_A2MSTW2008LO_minbias_inelastic_high.simul.HITS.e1133_s2638_tid05646691_00/HITS.05646691._000001.pool.root.1 .;
-              ATHENA_CORE_NUMBER=3 Digi_tf.py --multiprocess --inputHITSFile SLHCtest.sFCal.HITS.pool.root --outputRDOFile SLHCtest.sFCal.RDO.pool.root --LowPtMinbiasHitsFile HITS.05646683._00000[1,2,3].pool.root.1 --numberOfLowPtMinBias 199.3040 --HighPtMinbiasHitsFile HITS.05646691._000001.pool.root.1 --numberOfHighPtMinBias 0.69064 --conditionsTag OFLCOND-MC15c-SDR-06 --geometryVersion ATLAS-P2-SFCAL-01-00-00 --DataRunNumber 240120 --pileupFinalBunch 6 --preInclude 'all:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT.py' 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrains2012Config1_DigitConfig.py,RunDependentSimData/configLumi_user.py' --postInclude 'all:PyJobTransforms/UseFrontier.py,InDetSLHC_Example/postInclude.SLHC_Setup.py' 'HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization_lowthresh.py' --preExec 'HITtoRDO:from AthenaCommon.BeamFlags import jobproperties; jobproperties.Beam.bunchSpacing=25;from LArROD.LArRODFlags import larRODFlags; larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.NumberOfCollisions.set_Value_and_Lock(200);from CaloTools.CaloNoiseFlags import jobproperties;jobproperties.CaloNoiseFlags.FixedLuminosity.set_Value_and_Lock(200.0*1.45/8*50/25);rec.doTrigger.set_Value_and_Lock(False);userRunLumiOverride={"run":240120, "lb":1, "starttstamp":1410120000, "mu":200.0};from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=["SimLayout","PhysicsList"];digitizationFlags.doInDetNoise.set_Value_and_Lock(False)' --postExec 'HITtoRDO:mergeMcEventCollTool=job.StandardPileUpToolsAlg.PileUpTools["MergeMcEventCollTool"];mergeMcEventCollTool.FirstXing=0;mergeMcEventCollTool.LastXing=0;mergeMcEventCollTool.DoSlimming=False;pixeldigi.EnableSpecialPixels=False;CfgMgr.MessageSvc().setError+=["HepMcParticleLink"];conddb.addOverride("/LAR/Identifier/OnOffIdMap","LARIdentifierOnOffIdMap-SFCAL-000");conddb.addOverride("/LAR/Identifier/CalibIdMap","LARIdentifierCalibIdMap-SFCAL-000")' --skipEvents 0 --maxEvents 2 --digiSeedOffset1 50100 --digiSeedOffset2 50122 --jobNumber 123 --ignorePatterns 'ALL ,LArTTCellMap , ERROR .*'
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.sFCal.HITS.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.sFCal.RDO.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="RecosFCal">
-	    <doc>SLHCReconstruction</doc>
-	    <jobTransformJobName>chainRecosFCalSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      ATHENA_CORE_NUMBER=3 Reco_tf.py --multiprocess --inputRDOFile SLHCtest.sFCal.RDO.pool.root --outputESDFile SLHCtest.sFCal.ESD.pool.root --outputAODFile SLHCtest.sFCal.AOD.pool.root --geometryVersion 'all:ATLAS-P2-SFCAL-01-00-00' --conditionsTag 'all:OFLCOND-MC15c-SDR-06' --preInclude 'all:InDetSLHC_Example/preInclude.SLHC.NoTRT.Reco.py' --postInclude 'all:PyJobTransforms/UseFrontier.py,InDetSLHC_Example/postInclude.SLHC_Setup.py' 'RAWtoESD:InDetSLHC_Example/postInclude.DigitalClustering.py' --preExec 'all:from CaloTools.CaloNoiseFlags import jobproperties; jobproperties.CaloNoiseFlags.FixedLuminosity.set_Value_and_Lock(200.0*1.45/8*50/25)' --postExec 'all:from IOVDbSvc.CondDB import conddb;conddb.addOverride("/LAR/Identifier/OnOffIdMap","LARIdentifierOnOffIdMap-SFCAL-000");conddb.addOverride("/LAR/Identifier/CalibIdMap","LARIdentifierCalibIdMap-SFCAL-000")' 'RAWtoESD:xAODMaker__xAODTruthCnvAlg("GEN_AOD2xAOD",WriteInTimePileUpTruth=True)' --ignorePatterns 'ALL ,LArTTCellMap , ERROR .*'
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.sFCal.RDO.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>long</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.sFCal.ESD.pool.root</chainfileout>
-	  <chainfileout>SLHCtest.sFCal.AOD.pool.root</chainfileout>
-	</chainElement>
-      </sequential>
-    </chain>
-
-    <chain>
-      <chainName>SLHCChainTestMod</chainName>
-      <sequential>
-	<chainElement>
-	  <jobTransform userJobId="SimMod">
-	    <doc>SLHCSimulation</doc>
-	    <jobTransformJobName>chainSimModSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd>
-	      Sim_tf.py --inputEVNTFile /afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile SLHCtest.Mod.HITS.pool.root --maxEvents 500 --skipEvents 0 --randomSeed 10 --preExec 'sim:from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags;SLHC_Flags.SLHC_Version="SLHC-23-24-dev12";' --preInclude 'sim:InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.SiliconOnly.py' --geometryVersion ATLAS-P2-ITK-01-00-00_VALIDATION --conditionsTag OFLCOND-MC15c-SDR-06 --postInclude sim:InDetSLHC_Example/postInclude.SLHC_Setup.py --postExec 'sim:ToolSvc.ISF_ParticlePositionFilterDynamic.CheckRegion=[1]' --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Mod.HITS.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="DigiMod">
-	    <doc>SLHCDigitization</doc>
-	    <jobTransformJobName>chainDigiModSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd> 
-	      Digi_tf.py --inputHITSFile SLHCtest.Mod.HITS.pool.root --outputRDOFile SLHCtest.Mod.RDO.pool.root --maxEvents -1 --skipEvents 0 --preExec 'HITtoRDO:from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags;SLHC_Flags.SLHC_Version="SLHC-23-24-dev12";from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.doInDetNoise.set_Value_and_Lock(False)' --preInclude HITtoRDO:InDetSLHC_Example/preInclude.SiliconOnly.py --geometryVersion ATLAS-P2-ITK-01-00-00 --conditionsTag OFLCOND-MC15c-SDR-06 --postInclude HITtoRDO:InDetSLHC_Example/postInclude.SLHC_Digitization_lowthresh.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,PyJobTransforms/UseFrontier.py --digiSeedOffset1 111 --digiSeedOffset2 222 --DataRunNumber 240000
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.Mod.HITS.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Mod.RDO.pool.root</chainfileout>
-	</chainElement>
-
-	<chainElement>
-	  <jobTransform userJobId="RecoMod">
-	    <doc>SLHCReconstruction</doc>
-	    <jobTransformJobName>chainRecoModSLHCRTT</jobTransformJobName>
-	    <jobTransformCmd> 
-	      Reco_tf.py --inputRDOFile=SLHCtest.Mod.RDO.pool.root --preInclude InDetSLHC_Example/preInclude.SLHC.SiliconOnly.Reco.py --postInclude InDetSLHC_Example/postInclude.SLHC_Setup.py r2e:InDetSLHC_Example/postInclude.DigitalClustering.py --outputESDFile=SLHCtest.Mod.ESD.pool.root --maxEvents=-1 --geometryVersion=ATLAS-P2-ITK-01-00-00 --outputAODFile=SLHCtest.Mod.AOD.pool.root --conditionsTag=OFLCOND-MC15c-SDR-06 --preExec 'r2e:from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags;SLHC_Flags.SLHC_Version="SLHC-23-24-dev12"' 'e2a:from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags;SLHC_Flags.SLHC_Version="SLHC-23-24-dev12"' 
-	    </jobTransformCmd>
-	    <group>SLHCFCTTransform</group>
-	    <chaindataset_info>
-	      <jobTransformData/>
-	      <chaindatasetName>SLHCtest.Mod.RDO.pool.root</chaindatasetName>
-	      <dataset_info>
-		<jobTransformData/>
-		<datasetName>NONE.pool.root</datasetName>
-	      </dataset_info>
-	    </chaindataset_info>
-	    <queue>medium</queue>
-	  </jobTransform>
-	  <chainfileout>SLHCtest.Mod.ESD.pool.root</chainfileout>
-	  <chainfileout>SLHCtest.Mod.AOD.pool.root</chainfileout>
-	</chainElement>
-
-      </sequential>
-    </chain>
-  </jobList>
-  <jobGroups>
-    <jobGroup name="SLHCFCTTransform" parent="Transform">
-      <keepFilePattern>*.root</keepFilePattern>
-      <keepFilePattern>*.pdf</keepFilePattern>
-      <keepFilePattern>*.log</keepFilePattern>
-      <keepFilePattern>log.*</keepFilePattern>
-    </jobGroup>
-
-  </jobGroups>
-</rtt>
-
-</unifiedTestConfiguration>
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.job b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.job
deleted file mode 100755
index f08187f956f0..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.job
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /usr/bin/env sh
-
-export T_RELEASE=9.0.4
-export T_DISTREL=/afs/cern.ch/atlas/software/dist/$T_RELEASE
-export T_INCPATH=/afs/cern.ch/atlas/software/dist/9.0.4/Tools/JobTransforms/JobTransforms-00-02-10/include
-export POOLFILE=/afs/cern.ch/user/k/ketevi/scratch0/Tutorial/$T_RELEASE/PoolFileCatalog.xml
-
-export OUTPUTDIR=/castor/cern.ch/user/k/ketevi
-export LOGDIR=/afs/cern.ch/user/k/ketevi/scratch0/Tutorial/$T_RELEASE/log
-export ESDOUT=esd904
-export AODOUT=aod904
-
-export EXT=pool.root
-export NEVENT=100
-
-export FILENAME=$1
-export INPUTDIR=rfio:$2
-
-#--------------------------------------------------------------------------
-#          package dependencies
-#--------------------------------------------------------------------------
-#-------------------
-#      use Atlas $RELEASE
-#-------------------
-export ATLAS_ROOT=/afs/cern.ch/atlas 
-export DISTREL=$ATLAS_ROOT/software/dist/$T_RELEASE 
- 
-export ATLASDATA=$ATLAS_ROOT/offline/data 
-export ATLASBIN=$DISTREL/InstallArea/i686-slc3-gcc32-opt/bin 
-export ATLASLIB=$DISTREL/InstallArea/i686-slc3-gcc32-opt/lib 
- 
-export CMTVERSION=v1r16p20040901
-export CMTROOT=/afs/cern.ch/sw/contrib/CMT/$CMTVERSION 
-. ${CMTROOT}/mgr/setup.sh 
- 
- 
-# setup home 
-
-cat > requirements << EOF
-
-set     CMTSITE         CERN
-set     SITEROOT        /afs/cern.ch
-macro   ATLAS_DIST_AREA \${SITEROOT}/atlas/software/dist
-macro   ATLAS_TEST_AREA "" \
-        $T_RELEASE           "`pwd`"
-
-use     AtlasLogin      AtlasLogin-*    \$(ATLAS_DIST_AREA)
-
-EOF
-
-cat requirements
-#source /afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh
-cmt config 
-source setup.sh -tag=$T_RELEASE,opt 
-
-#shift
-#shift
-
-mkdir -p `pwd`/$T_RELEASE
-cd `pwd`/$RELEASE 
-pwd
-echo "##CMTCONFIG = $CMTCONFIG" 
-echo "##CMTPATH=$CMTPATH" 
-
-# if the release can be use out of the box, use thes 2 lines 
-echo "##sourcing AtlasRelease/AtlasRelease-09-00-04/cmt/setup.sh" 
-. $DISTREL/AtlasRelease/AtlasRelease-09-00-04/cmt/setup.sh ""
-
-
-cp /afs/cern.ch/user/k/ketevi/scratch0/Tutorial/9.0.4/Reconstruction/RecExample/RecExCommon/RecExCommon-00-03-02-11/scripts/rome.reco.trf .
-
-export TYPE=`echo $FILENAME | awk -F. '{print $3}'`
-if [[ $TYPE = 'Z_2e' ]]; then
-    export NUMBER=`echo $FILENAME | awk -F. '{print $6}'`
-    export ESDFILE=rome.initial.zee.$ESDOUT.$NUMBER.$EXT
-    export CBNTFILE=rome.initial.zee.ntuple.$NUMBER.root
-    export ESDDIR=$OUTPUTDIR/zee/esd
-    export AODFILE=rome.initial.zee.$ESDOUT.$AODOUT.$NUMBER.$EXT
-    export AODDIR=$OUTPUTDIR/zee/aod
-else
-    export NUMBER=`echo $FILENAME | awk -F. '{print $5}'`
-    export ESDFILE=rome.initial.zmm.$ESDOUT.$NUMBER.$EXT
-    export CBNTFILE=rome.initial.zmm.ntuple.$NUMBER.root
-    export ESDDIR=$OUTPUTDIR/zmm/esd
-    export AODFILE=rome.initial.zmm.$ESDOUT.$AODOUT.$NUMBER.$EXT
-    export AODDIR=$OUTPUTDIR/zmm/aod
-fi
-rome.reco.trf $INPUTDIR/$FILENAME $ESDFILE $AODFILE CBNTFILE $NEVENT 0
-
-mv logESD $LOGDIR/$ESDFILE.log
-mv logAOD $LOGDIR/$AODFILE.log
-
-#--------------------------------------------------------------------------
-#          output file copy
-#--------------------------------------------------------------------------
-if [[ -e $ESDFILE ]] ; then
-    echo "md5sum $ESDFILE `md5sum ESDFILE `"
-    rfmkdir -p $ESDDIR
-    rfcp $ESDFILE $ESDDIR/$ESDFILE
-    echo "rfcp result code = $?"
-fi
-
-if [[ -e $AODFILE ]] ; then
-    echo "md5sum $AODFILE `md5sum AODFILE `"
-    rfmkdir -p $AODDIR
-    rfcp $AODFILE $AODDIR/$AODFILE
-    echo "rfcp result code = $?"
-fi
-
-
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.sh b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.sh
deleted file mode 100755
index a5ca99c25307..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/scripts/rome.reco.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/env sh
-
-export INDIR=/castor/cern.ch/user/d/drebuzzi/q02initialprod/dig9.0.4/forAOD
-
-for FILENAME in `nsls $INDIR`; do
-  bsub -q 8nh -R " mem > 600 " rome.reco.job $FILENAME $INDIR
-done
-
-#export FILENAME=q02initialprod.0001.H_2mu.q02dig.digits.0001.pool.root
-#bsub -q 8nm -R " mem > 600 " rome.reco.job $FILENAME $INDIR
-
diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index 09bde47556f4..f16426834fe1 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -56,9 +56,7 @@
 #- DataQuality/DCSCalculator2
 
 # obsolete packages to be removed in a second step
-- Tools/KitValidation
 - Tracking/TrkTools/TrkSegmentConverter
-- Tools/JobTransforms
 
 # Huge D3PD librarys not really useful any more
 - PhysicsAnalysis/D3PDMaker/InDetD3PDMaker
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml b/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
deleted file mode 100755
index d6d89f147739..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
+++ /dev/null
@@ -1,642 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd">
-
-<unifiedTestConfiguration>
-    <atn>
-    
-        <!-- ++++++++++++++++++++++++++ Running on Simulated Data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-    
-        <!-- MC15 type digitization and reconstruction of 13 TeV MC with pileup -->
-        <TEST name="RECOSHIFT_Reco_MC15_13TeV" type="script" suite="reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; 
-                Reco_tf.py  '--inputHITSFile=/afs/cern.ch/atlas/project/rig/referencefiles/mc15/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s2887_tid08170896_00/HITS.08170896._001944.pool.root.1' '--jobNumber=64' '--maxEvents=10' '--postInclude=RecJobTransforms/UseFrontier.py' '--preExec' 'rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' 'RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False' 'ESDtoAOD:TriggerFlags.AODEDMSet="AODFULL"' 'RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doSlimming.set_Value_and_Lock(False)' 'ESDtoAOD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doSlimming.set_Value_and_Lock(False)' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup="MC_pp_v6_tight_mc_prescale"' '--skipEvents=0' '--autoConfiguration=everything' '--conditionsTag=OFLCOND-MC15c-SDR-09' '--geometryVersion=ATLAS-R2-2015-03-01-00' '--digiSeedOffset1=1' '--digiSeedOffset2=1'  '--steering=doRDO_TRIG'  '--outputAODFile=AOD.pool.root' '--outputRDOFile=RDO.pool.root' '--outputESDFile=ESD.pool.root'  --runNumber="110401" --pileupFinalBunch 6 --inputHighPtMinbiasHitsFile="/afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/HITS.05608152._002335.pool.root.1" --inputLowPtMinbiasHitsFile="/afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2195/HITS.05608147._000125.pool.root.1"
-            </options_atn>
-            <timelimit>60</timelimit>	
-            <author>Xiaohu Sun, Carl Gwilliam and Marie-Helene Genest</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>    
-    
-        <TEST name="RecoTf_MC15_no" type="script" suite="reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --inputRDOFile /afs/cern.ch/atlas/project/rig/referencefiles/mc15/RDO.pool.root --maxEvents 5 --autoConfiguration everything --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doCalo=False' 'rec.doInDet=False' 'rec.doMuon=False' 'rec.doJetMissingETTag=False' 'rec.doEgamma=False' 'rec.doMuonCombined=False' 'rec.doTau=False' 'rec.doTrigger=False' --outputESDFile my.ESD.pool.root
-            </options_atn>
-            <timelimit>30</timelimit>
-            <author>David Rousseau</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-
-        <TEST name="RecoTf_MC15" type="script" suite="reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --inputRDOFile /afs/cern.ch/atlas/project/rig/referencefiles/mc15/RDO.pool.root --maxEvents 5 --autoConfiguration everything --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' --outputESDFile my.ESD.pool.root
-            </options_atn>
-            <timelimit>30</timelimit>
-            
-            <author>David Rousseau</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    
-        <!-- ++++++++++++++++++++++++++ Running on Cosmics Data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-    
-        <!-- XS: please update with new 2015 cosmics file: cosmics 2015 reconstruction -->
-        <!-- Disabled since this has been failing for a long time.  See ATR-14581.
-        <TEST name="RecoTf_cosmic_data_2011" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/data/data11_cos.00193024.physics_CosmicCalo.merge.RAW/data11_cos.00193024.physics_CosmicCalo.merge.RAW._lb0096._SFO-ALL._0001.1 --maxEvents 10 --autoConfiguration everything --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHIST.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>Jamie Boyd</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-        -->
-    
-        <!-- ++++++++++++++++++++++++++ Running on highmu Data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-    
-        <!-- ++++++++++++++++++++++++++ Running on 7TeV collision data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-    
-        <!-- data11_7TeV reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_7TeV_data" type="script" suite="Reco_tf">
-            <options_atn> 	
-                export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/dataStreams_high_mu/high_mu-data11_7TeV.00179725.physics_JetTauEtmiss.merge.RAW._lb0021.data --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --maxEvents 5 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doTrigger=False'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>Jamie Boyd</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    
-        <!-- ++++++++++++++++++++++++++ Running on 8TeV collision data  +++++++++++++++++++++++++++++++++++++++++++++ -->
-        <!-- data12_8TeV reconstruction, all reco switched off -->
-        <TEST name="Reco_tf_8TeV_data_no" type="script" suite="reco_trf">
-            <options_atn>        
-                export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/dataStreams_high_mu/data12_8TeV/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --maxEvents 5 --autoConfiguration everything --preExec 'rec.doCalo=False' 'rec.doInDet=False' 'rec.doMuon=False' 'rec.doJetMissingETTag=False' 'rec.doEgamma=False' 'rec.doMuonCombined=False' 'rec.doTau=False' 'rec.doTrigger=False' 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' --outputESDFile my.ESD.pool.root  
-            </options_atn>
-            <timelimit>30</timelimit>
-            <author>David Rousseau</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    
-        <!-- data12_8TeV reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_8TeV_data" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/dataStreams_high_mu/data12_8TeV/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --maxEvents 5 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doTrigger=False'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>Jamie Boyd</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    
-        <!-- q-test 220 reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_q220" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --AMIConfig=q220 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>RIG Convenors</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-
-        <!-- q-test 221 reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_q221" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --AMIConfig=q221 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>RIG Convenors</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-
-        <!-- q-test 222 reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_q222" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --AMIConfig=q222 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False' 'DQMonFlags.doHLTMon=False'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>RIG Convenors</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    
-        <!-- q-test 223 reconstruction -->
-        <TEST name="RECOSHIFT_RecoTf_q223" type="script" suite="Reco_tf">
-            <options_atn>
-                export TRF_ECHO=True; Reco_tf.py --AMIConfig=q223 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False'
-            </options_atn>
-            <timelimit>60</timelimit>
-            <author>RIG Convenors</author>
-            <prescript>rm -f $ATN_WORK_AREA/*</prescript>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-    </atn>
-  
-    <kv>
-        <kvtest name='RecoZeeJet' enabled='true'>
-            <release>ALL</release>
-            <priority>40</priority>
-            <kvsuite>CSC</kvsuite>
-            <trf>Reco_tf.py</trf>
-            <desc>Z -> e e jet Reconstruction</desc>
-            <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-            <inpath>${T_DATAPATH}/MC12digitZeePyJT-${T_RELEASE}</inpath>
-            <infile>${T_PREFIX}-MC12digitZeePyJT-${T_RELEASE}.pool.root</infile>
-            <inpool>PoolFileCatalog.xml</inpool>
-            <outpath>${T_DATAPATH}/RecoZeeJet-${T_RELEASE}</outpath>
-            <outfile>${T_PREFIX}-RecoESDZeeJet-${T_RELEASE}.pool.root</outfile>
-            <logfile>${T_PREFIX}-RecoZeeJet-${T_RELEASE}.log</logfile>
-            <signature>
-                --inputRDOFile "${T_INFILE}" --outputESDFile "${T_OUTFILE}" --outputAODFile "${T_PREFIX}-RecoAODZeeJet-${T_RELEASE}.pool.root"  --maxEvents 10 --autoConfiguration everything --conditionsTag="OFLCOND-RUN12-SDR-32" --postInclude KitValidation/kv_reflex.py
-            </signature>
-            <copyfiles>
-                ${T_OUTFILE} ${T_PREFIX}-RecoAODZeeJet-${T_RELEASE}.pool.root ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-            </copyfiles>
-            <checkfiles>${T_OUTPATH}/${T_OUTFILE} ${T_OUTPATH}/${T_PREFIX}-RecoAODZeeJet-${T_RELEASE}.pool.root</checkfiles>
-        </kvtest>
-        <kvtest name='BM1recoTT' enabled='false'>
-            <release>ALL</release>
-            <priority>40</priority>
-            <kvsuite>BM1</kvsuite>
-            <trf>Reco_tf.py</trf>
-            <desc>Benchmark[1] tt Reconstruction</desc>
-            <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-            <inpath>${T_DATAPATH}/BM1digitTT-${T_RELEASE}</inpath>
-            <infile>${T_PREFIX}-BM1digitTT-${T_RELEASE}.pool.root</infile>
-            <inpool>PoolFileCatalog.xml</inpool>
-            <outpath>${T_DATAPATH}/BM1recoTT-${T_RELEASE}</outpath>
-            <outfile>${T_PREFIX}-BM1recoESDTT-${T_RELEASE}.pool.root</outfile>
-            <logfile>${T_PREFIX}-BM1recoTT-${T_RELEASE}.log</logfile>
-            <signature>
-                --inputRDOFile "${T_INFILE}" --outputESDFile "${T_OUTFILE}" --outputAODFile "${T_PREFIX}-BM1recoAODTT-${T_RELEASE}.pool.root"  --maxEvents 100 --autoConfiguration everything --postInclude KitValidation/kv_perfmon.py
-            </signature>
-            <copyfiles>
-                ${T_OUTFILE} ${T_PREFIX}-BM1recoAODTT-${T_RELEASE}.pool.root ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-            </copyfiles>
-            <checkfiles>${T_OUTPATH}/${T_OUTFILE} ${T_OUTPATH}/${T_PREFIX}-BM1recoAODTT-${T_RELEASE}.pool.root</checkfiles>
-        </kvtest>
-    </kv>
-  
-  
-    <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt">
-    
-        <rttContactPerson>Xiaohu Sun </rttContactPerson>
-        <mailto>atlas.rig@cern.ch</mailto>
-    
-        <jobList>
-      
-            <classification>
-                <displayClass>OfflineValidation</displayClass>
-                <displayProcess>Reco</displayProcess>
-                <displayComponent>Athena-Core</displayComponent>
-            </classification>
-      
-
-            <jobTransform userJobId="mc16">
-                <doc>Reco_tf runs on mc16, based on recon tag r9364 MC16a</doc>
-                <jobTransformJobName>RecoTf_mc16</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputRDOFile=/eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --maxEvents=300 --autoConfiguration everything --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501 --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHIST.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="mc16_trigsplit">
-                <doc>Reco_tf with split trigger runs on mc16</doc>
-                <jobTransformJobName>RecoTf_trigsplit_mc16</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputRDOFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --maxEvents 300 --autoConfiguration everything --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501 --steering RAWtoESD:in-RDO RAWtoESD:in-BS RAWtoESD:in+RDO_TRIG --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHIST.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <!-- Test runs on mc16 with Hephaestos-->
-      
-            <jobTransform userJobId="mc16_memleak">
-                <doc>Reco_tf runs on mc16 with Hephaestos for memory leak checking</doc>
-                <jobTransformJobName>RecoTf_memleak_mc16</jobTransformJobName>
-                <jobTransformCmd>
-				export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputRDOFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501 --maxEvents 10 --outputESDFile myESD.pool.root --athenaopts '--stdcmalloc --leak-check-execute'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="Reco_MC15_13TeV_nopileup">
-                <doc>Reco_tf for PhysVal, updated with q221 (2017-11-13), no pileup</doc>
-                <jobTransformJobName>Reco_MC15_tf</jobTransformJobName>
-                <jobTransformCmd>
-				export TRF_ECHO=True; Reco_tf.py --conditionsTag all:OFLCOND-MC16-SDR-17 --ignoreErrors 'False' --autoConfiguration='everything' --digiSeedOffset2 '1'  --preExec  'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(0.);from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet="AODFULL"'  'HITtoRDO:from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=["PhysicsList"];'  'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup="MC_pp_v7";from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False;' --digiSeedOffset1 '1' --steering 'doRDO_TRIG' --DataRunNumber '222525' --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root --imf False --maxEvents '500'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <chain>
-                <chainName>PhysicsValidationMC15ChainJob13TeV</chainName>
-                <sequential>
-                    <!-- Run Reco -->
-                    <chainElement>
-                        <jobTransform userJobId="Reco_MC15_13TeV">
-                            <doc>Reco_tf for PhysVal, updated with q221 (2017-11-13) + pileup</doc>
-                            <jobTransformJobName>Reco_MC15_tf</jobTransformJobName>
-                            <jobTransformCmd>
-							export TRF_ECHO=True; Reco_tf.py --conditionsTag all:OFLCOND-MC16-SDR-17 --ignoreErrors 'False' --autoConfiguration='everything' --digiSeedOffset2 '1'  --preExec  'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(0.);from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet="AODFULL"'  'HITtoRDO:from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=["PhysicsList"];'  'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup="MC_pp_v7";from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False;' --digiSeedOffset1 '1' --steering 'doRDO_TRIG' --DataRunNumber '222525' --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root --inputHighPtMinbiasHitsFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/*' --inputLowPtMinbiasHitsFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2195/*' --numberOfCavernBkg="0" --numberOfHighPtMinBias="0.12268057" --numberOfLowPtMinBias="39.8773194" --pileupFinalBunch 6 --imf False --maxEvents '500'
-                            </jobTransformCmd>
-                            <group>RecTrf</group>
-                            <queue>long</queue>
-                        </jobTransform>
-                        <chainfileout>myAOD.pool.root</chainfileout>
-                    </chainElement>
-	  
-                    <!-- Runs validation histogram code -->
-                    <chainElement>
-                        <jobTransform userJobId="PhysVal_MC15_13TeV_Example">
-                            <doc>Reco_tf runs physcs validation as defined by Carl G/Marie-Helene G, May 7 2014</doc>
-                            <jobTransformJobName>PhysVal_MC15_trf</jobTransformJobName>
-                            <jobTransformCmd>
-							export TRF_ECHO=True; Reco_tf.py --inputAODFile myAOD.pool.root --outputNTUP_PHYSVALFile PhysVal_13TeV_Example.pool.root --validationFlags doExample 
-                            </jobTransformCmd>
-                            <group>RecTrf</group>
-                            <chaindataset_info>
-                                <jobTransformData /> 
-                                <chaindatasetName>myAOD.pool.root</chaindatasetName>
-                                <dataset_info>
-                                    <jobTransformData />
-                                    <datasetName>/afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/MC15_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.AOD.e4993_s2887_r9044/AOD.10538155._000209.pool.root.1</datasetName>
-                                </dataset_info>
-                            </chaindataset_info>
-                            <queue>long</queue>
-                            <batchWallTime>300</batchWallTime>
-                        </jobTransform>
-                    </chainElement>
-                    <chainElement>
-                        <jobTransform userJobId="PhysVal_MC15_13TeV_All">
-						<!-- add preExec and remove doTopoCluster ATLJETMET-774 -->
-						<!-- add preExec to find the missing InDetPhysValFlags -->
-						<!-- based on https://gitlab.cern.ch/atlas/athena/merge_requests/6771/diffs 2018-01-19 -->
-                            <doc>Reco_tf runs physcs validation as defined by Carl G/Marie-Helene G, May 7 2014</doc>
-                            <jobTransformJobName>PhysVal_MC15_trf</jobTransformJobName>
-                            <jobTransformCmd>
-							export TRF_ECHO=True; Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root
-                            </jobTransformCmd>
-                            <group>RecTrf</group>
-                            <chaindataset_info>
-                                <jobTransformData /> 
-                                <chaindatasetName>myAOD.pool.root</chaindatasetName>
-                                <dataset_info>
-                                    <jobTransformData />
-                                    <datasetName>/afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/MC15_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.AOD.e4993_s2887_r9044/AOD.10538155._000209.pool.root.1</datasetName>
-                                </dataset_info>
-                            </chaindataset_info>
-                            <queue>long</queue>
-                            <batchWallTime>300</batchWallTime>
-                        </jobTransform>
-                    </chainElement>
-                </sequential>
-            </chain>
-      
-            <jobTransform userJobId="Reco_MC15_13TeV_nopileup_stdcmalloc">
-                <doc>Reco_tf for PhysVal, updated with q221 (2017-11-13), no pileup, with stdcmalloc</doc>
-                <jobTransformJobName>Reco_MC15_tf</jobTransformJobName>
-                <jobTransformCmd>
-				export TRF_ECHO=True; Reco_tf.py --conditionsTag all:OFLCOND-MC16-SDR-17 --ignoreErrors 'False' --autoConfiguration='everything' --digiSeedOffset2 '1'  --preExec  'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(0.);from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet="AODFULL"'  'HITtoRDO:from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=["PhysicsList"];'  'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup="MC_pp_v7";from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False;' --digiSeedOffset1 '1' --steering 'doRDO_TRIG' --DataRunNumber '222525' --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root --imf False --maxEvents '500' --athenaopts="--stdcmalloc"
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-
-            <jobTransform userJobId="mc16_rdotobs">
-                <doc>RDO to BS on tt mc16 </doc>
-                <jobTransformJobName>RecoTf_RDOtoBS</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputRDOFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --outputBSFile mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.data --autoConfiguration everything --maxEvents 300 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-                <testToRemove> 
-                    <jobGroupName>Transform</jobGroupName> 
-                    <testidentifier>CheckFileRunner0</testidentifier> 
-                </testToRemove> 
-            </jobTransform>
-      
-      
-            <!-- Test runs on Heavy Ion MC/Data -->
-            <jobTransform userJobId="mc15_heavy_ion">
-                <doc>heavy ion reconstruction test from Andrzej Olszewski and Iwona Grabowska-Bold</doc>
-                <jobTransformJobName>HeavyIon_mc</jobTransformJobName>
-                <jobTransformCmd>
-                    export TRF_ECHO=True; Reco_tf.py --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_5TeV.420000.Hijing_PbPb_5p02TeV_MinBias_Flow_JJFV6.merge.HITS.e4962_s3004_s2921/HITS.09732013._000496.pool.root.1 --outputESDFile=ESD.pool.root --outputAODFile=AOD.pool.root --maxEvents=25 --conditionsTag 'all:OFLCOND-MC15c-SDR-11' --postInclude 'all:RecJobTransforms/UseFrontier.py,SimulationJobOptions/postInclude.HijingPars.py' --preExec 'all:rec.doHeavyIon.set_Value_and_Lock(True)' --autoConfiguration 'everything' --triggerConfig 'MCRECO:MC_HI_v3_tight_mc_prescale' --DataRunNumber '226000' --geometryVersion 'all:ATLAS-R2-2015-03-01-00'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="data11_heavy_ion">
-                <doc>heavy ion reconstruction test from Andrzej Olszewski and Iwona Grabowska-Bold</doc>
-                <jobTransformJobName>HeavyIon_data</jobTransformJobName>
-                <jobTransformCmd>
-                    export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/HeavyIon/data11_hi.00193321.physics_HardProbes.merge.RAW._lb0050._SFO-9._0002.1 --outputESDFile ESD.pool.root --outputAODFile AOD.pool.root --conditionsTag COMCOND-BLKPA-RUN1-06 --geometryVersion ATLAS-R1-2011-02-00-00 --autoConfiguration=everything --maxEvents='25'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="data15_heavy_ion">
-                <doc>heavy ion reconstruction test from Andrzej Olszewski and Iwona Grabowska-Bold</doc>
-                <jobTransformJobName>HeavyIon_data</jobTransformJobName>
-                <jobTransformCmd>
-                    export TRF_ECHO=True; Reco_tf.py --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data15_hi.00286711.physics_MinBiasOverlay.daq.RAW._lb0217._SFO-2._0001.data --outputESDFile=ESD.root --outputAODFile=AOD.root --maxEvents=25 --conditionsTag 'default:CONDBR2-BLKPA-2016-07' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --autoConfiguration 'everything' --preExec 'all:rec.doHeavyIon.set_Value_and_Lock(True)'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <!-- Test runs on 8TeV collision data -->
-      
-            <jobTransform userJobId="data12_8TeV">
-                <doc>Reco_tf runs on 8TeV collision data</doc>
-                <jobTransformJobName>RecoTf_8TeV_data</jobTransformJobName>
-                <jobTransformCmd>
-                    Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/dataStreams_high_mu/data12_8TeV/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --maxEvents 300 --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root 
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-            <!-- Test runs on 13TeV collision data -->
-      
-            <jobTransform userJobId="data15_13TeV">
-                <doc>Reco_tf runs on 13TeV collision data 2015</doc>
-                <jobTransformJobName>RecoTf_13TeV_data_2015</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data15_13TeV.00283429.physics_Main.daq.RAW/data15_13TeV.00283429.physics_Main.daq.RAW._lb0154._SFO-1._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2016-14" --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="data16_13TeV">
-                <doc>Reco_tf runs on 13TeV collision data 2016</doc>
-                <jobTransformJobName>RecoTf_13TeV_data_2016</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data16_13TeV.00310809.physics_Main.daq.RAW/data16_13TeV.00310809.physics_Main.daq.RAW._lb1219._SFO-2._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2016-19" --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-            <!-- [fixed] tmp solution manually remove the failing class in finalization ATLASSIM-3277 -->
-			<!-- remove postExec 'from AthenaCommon.AlgSequence import AlgSequence;topSeq = AlgSequence();topSeq.remove("topSeq.InDetAmbiguitySolver")' -->
-            <jobTransform userJobId="data17_13TeV">
-                <doc>Reco_tf runs on 13TeV collision data 2017, early data, A3, Toroid and solenoid off</doc>
-                <jobTransformJobName>RecoTf_13TeV_data_2017</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-            <!-- Test runs on 13TeV collision data with Hephaestos -->
-            <jobTransform userJobId="data17_13TeV_memleak">
-                <doc>Reco_tf runs on 13TeV collision data with Hephaestos for checking for memory leaks 2017</doc>
-                <jobTransformJobName>RecoTf_13TeV_data</jobTransformJobName>
-                <jobTransformCmd>
-				export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 10 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --athenaopts '--stdcmalloc --leak-check-execute'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="data17_13TeV_fpe">
-                <doc>Reco_tf runs on 13TeV collision data with floating point exception enabled 2017</doc>
-                <jobTransformJobName>RecoTf_13TeV_data_fpe</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents -1 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doFloatingPointException=True;rec.doTrigger=False;' --postExec 'FPEAuditor.NStacktracesOnFPE=5'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <!-- Test runs on cosmic data -->
-      
-            <jobTransform userJobId="cosmis_allstream">
-                <doc>Reco_tf runs on cosmics with all streams</doc>
-                <jobTransformJobName>RecoTf_cosmics</jobTransformJobName>
-                <jobTransformCmd>
-                    Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/data/data11_cos.00193024.physics_CosmicCalo.merge.RAW/data11_cos.00193024.physics_CosmicCalo.merge.RAW._lb0096._SFO-ALL._0001.1 --maxEvents 300 --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --preExec="rec.doTrigger=False;" --outputESDFile myESD.pool.root --outputNTUP_MUONCALIBFile muonCalib.root --outputHISTFile myMergedMonitoring.root --outputTAGFile myTAG.pool.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <!-- Test runs on 7TeV collision data -->
-      
-            <jobTransform userJobId="data11_7TeV">
-                <doc>Reco_tf runs on 7TeV collision data with all streams</doc>
-                <jobTransformJobName>RecoTf_7TeV_data_a</jobTransformJobName>
-                <jobTransformCmd>
-                    Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/dataStreams_high_mu/high_mu-data11_7TeV.00179725.physics_JetTauEtmiss.merge.RAW._lb0021.data --maxEvents 300 --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="q221_dbrelease_pcache">
-                <doc>Reco_tf of a run-2 MC test with a nightly dbrelease, to test dbrelease before it is distributed</doc>
-                <jobTransformJobName>RecoTf_q221_diff_dbrelease</jobTransformJobName>
-                <jobTransformCmd>
-                    Reco_tf.py --AMIConfig q221 --DBRelease /afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/DBRelease-pcache-current.tar.gz --preExec rec.Production=False --postExec "print svcMgr.IOVDbSvc.Folders"
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <!-- Test runs on splash events -->
-            <jobTransform userJobId="splash_events">
-                <doc> Reco_tf runs on splash events with all streams</doc>
-                <jobTransformJobName>RecoTf_splash_events</jobTransformJobName>
-                <jobTransformCmd>
-                    export TRF_ECHO=True; Reco_tf.py --inputBSFile /afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/Data_13TeV/data15_comm.00265545.physics_MinBias.merge.RAW._lb0048._SFO-ALL._0001.1 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2015-04" --geometryVersion="ATLAS-R2-2015-03-01-00" --outputESDFile myESD.pool.root --outputNTUP_MUONCALIBFile muonCalib.root --outputHISTFile myMergedMonitoring.root --outputTAGFile myTAG.pool.root --maxEvents 300 --preExec 'rec.doTrigger=False;'
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <!-- Test runs with pileup MC samples w/o trigger -->
-            <jobTransform userJobId="DigiMReco_tf_FCT_MC16a">
-			<!-- read mc16a hits s3126 and digi+merge+reco based on r9364 -->
-                <doc>Test of DigiMReco from HITS to AOD/TAG</doc>
-                <jobTransformJobName>DigiMReco_FCT_MC16a_r9364</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --maxEvents=10 --outputRDOFile=mc16a.RDO.pool.root --outputESDFile=mc16a.ESD.pool.root --outputAODFile=mc16a.AOD.pool.root --digiSeedOffset1=1 --digiSeedOffset2=2 --inputHitsFile=/eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.simul.HITS.e5458_s3126/HITS.10730668._039360.pool.root.1 --jobNumber=1 --conditionsTag="default:OFLCOND-MC16-SDR-16" --geometryVersion="default:ATLAS-R2-2016-01-00-01" --skipEvents=0  --pileupFinalBunch=6 --autoConfiguration=everything --digiSteeringConf='StandardSignalOnlyTruth' --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)" "all:from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config='2016'" "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.cutLevel.set_Value_and_Lock(14); from JetRec import JetRecUtils;f=lambda s:[\"xAOD::JetContainer#AntiKt4%sJets\"%(s,),\"xAOD::JetAuxContainer#AntiKt4%sJetsAux.\"%(s,),\"xAOD::EventShape#Kt4%sEventShape\"%(s,),\"xAOD::EventShapeAuxInfo#Kt4%sEventShapeAux.\"%(s,),\"xAOD::EventShape#Kt4%sOriginEventShape\"%(s,),\"xAOD::EventShapeAuxInfo#Kt4%sOriginEventShapeAux.\"%(s,)]; JetRecUtils.retrieveAODList = lambda : f(\"EMPFlow\")+f(\"LCTopo\")+f(\"EMTopo\")+[\"xAOD::EventShape#NeutralParticleFlowIsoCentralEventShape\",\"xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoCentralEventShapeAux.\", \"xAOD::EventShape#NeutralParticleFlowIsoForwardEventShape\",\"xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoForwardEventShapeAux.\", \"xAOD::EventShape#ParticleFlowIsoCentralEventShape\",\"xAOD::EventShapeAuxInfo#ParticleFlowIsoCentralEventShapeAux.\", \"xAOD::EventShape#ParticleFlowIsoForwardEventShape\",\"xAOD::EventShapeAuxInfo#ParticleFlowIsoForwardEventShapeAux.\", \"xAOD::EventShape#TopoClusterIsoCentralEventShape\",\"xAOD::EventShapeAuxInfo#TopoClusterIsoCentralEventShapeAux.\", \"xAOD::EventShape#TopoClusterIsoForwardEventShape\",\"xAOD::EventShapeAuxInfo#TopoClusterIsoForwardEventShapeAux.\",\"xAOD::CaloClusterContainer#EMOriginTopoClusters\",\"xAOD::ShallowAuxContainer#EMOriginTopoClustersAux.\",\"xAOD::CaloClusterContainer#LCOriginTopoClusters\",\"xAOD::ShallowAuxContainer#LCOriginTopoClustersAux.\"]; from eflowRec.eflowRecFlags import jobproperties; jobproperties.eflowRecFlags.useAODReductionClusterMomentList.set_Value_and_Lock(True); from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock(\"AODSLIM\");" "all:from BTagging.BTaggingFlags import BTaggingFlags;BTaggingFlags.btaggingAODList=[\"xAOD::BTaggingContainer#BTagging_AntiKt4EMTopo\",\"xAOD::BTaggingAuxContainer#BTagging_AntiKt4EMTopoAux.\",\"xAOD::BTagVertexContainer#BTagging_AntiKt4EMTopoJFVtx\",\"xAOD::BTagVertexAuxContainer#BTagging_AntiKt4EMTopoJFVtxAux.\",\"xAOD::VertexContainer#BTagging_AntiKt4EMTopoSecVtx\",\"xAOD::VertexAuxContainer#BTagging_AntiKt4EMTopoSecVtxAux.-vxTrackAtVertex\"];" "ESDtoAOD:from ParticleBuilderOptions.AODFlags import AODFlags; AODFlags.ThinGeantTruth.set_Value_and_Lock(True);  AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(True); AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(True); from JetRec import JetRecUtils; aodlist = JetRecUtils.retrieveAODList(); JetRecUtils.retrieveAODList = lambda : [item for item in aodlist if not \"OriginTopoClusters\" in item];" --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" "RDOtoRDOTrigger:conddb.addOverride(\"/CALO/Ofl/Noise/PileUpNoiseLumi\",\"CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns\")" "ESDtoAOD:CILMergeAOD.removeItem(\"xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.LATERAL.LONGITUDINAL.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_BAD_HV_CELLS.N_BAD_HV_CELLS.ENG_POS.SIGNIFICANCE.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.PTD.BadChannelList\");CILMergeAOD.add(\"xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.N_BAD_CELLS.ENG_BAD_CELLS.BADLARQ_FRAC.AVG_TILE_Q.AVG_LAR_Q.CENTER_MAG.ENG_POS.CENTER_LAMBDA.SECOND_LAMBDA.SECOND_R.ISOLATION.EM_PROBABILITY\");StreamAOD.ItemList=CILMergeAOD()" --postInclude "default:PyJobTransforms/UseFrontier.py"  --LowPtMinbiasHitsFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000027.pool.root.1 --HighPtMinbiasHitsFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/HITS.10501933._000008.pool.root.1 --numberOfHighPtMinBias=0.116075313 --numberOfLowPtMinBias=44.3839246425 --numberOfCavernBkg=0 
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>long</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="amitag_q122">
-                <doc> Reco_tf runs with AMI configTag q122</doc>
-                <jobTransformJobName>RecoTrf_AMI_q122</jobTransformJobName>
-                <jobTransformCmd>
-                    echo 'Reco_tf.py --AMI=q122 --DataRunNumber 00191920 --outputESDFile=myESD.pool.root --outputAODFile=myAOD.pool.root --outputTAGFile=myTAG.pool.root &amp;&amp; mv myESD.pool.root myESD_$AtlasVersion.pool.root &amp;&amp; mv myAOD.pool.root myAOD_$AtlasVersion.pool.root &amp;&amp; mv myTAG.pool.root myTAG_$AtlasVersion.pool.root &amp;&amp; ln -s myESD_$AtlasVersion.pool.root myESD_current.pool.root &amp;&amp; ln -s myAOD_$AtlasVersion.pool.root myAOD_current.pool.root &amp;&amp; ln -s myTAG_$AtlasVersion.pool.root myTAG_current.pool.root' > doall.sh &amp;&amp; source doall.sh
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-      
-            <jobTransform userJobId="AthenaMT8_CaloReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT8_CaloReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=8 RecJobTransformTests_CaloHiveExOpts.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT8_PFCaloReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT8_PFCaloReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=8 RecJobTransformTests_PFlowHiveExOpts.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT8_MuonReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT8_MuonReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=8 RecJobTransformTests_MuonRec_myTopOptions_MT.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT1_CaloReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT1_CaloReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=1 RecJobTransformTests_CaloHiveExOpts.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT1_PFCaloReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT1_PFCaloReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=1 RecJobTransformTests_PFlowHiveExOpts.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT1_MuonReco">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT1_MuonReco</jobTransformJobName>
-                <jobTransformCmd>
-				athena --threads=1 RecJobTransformTests_MuonRec_myTopOptions_MT.py
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT1_q431">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT1_q431</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --AMI=q431 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00297447.physics_Main.daq.RAW._lb0555._SFO-1._0001.data --imf False --athenaopts='--threads=1' --maxEvents=300
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-            <jobTransform userJobId="AthenaMT1_q221">
-                <doc>AthenaMT test</doc>
-                <jobTransformJobName>AthenaMT1_q221</jobTransformJobName>
-                <jobTransformCmd>
-				Reco_tf.py --AMI=q221 --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root --imf False --athenaopts='--threads=1' --maxEvents=300
-                </jobTransformCmd>
-                <group>RecTrf</group>
-                <queue>medium</queue>
-            </jobTransform>
-
-
-        </jobList>
-    
-        <jobGroups>
-      
-            <jobGroup name="RecTrf" parent="Transform">
-                <keepFilePattern>*.root*</keepFilePattern>
-                <keepFilePattern>*.pmon.gz</keepFilePattern>
-                <keepFilePattern>*.log</keepFilePattern>
-                <keepFilePattern>log.*</keepFilePattern>
-                <keepFilePattern>logExtract.txt</keepFilePattern>
-                <keepFilePattern>SGAud*.out</keepFilePattern>
-                <keepFilePattern>*.txt</keepFilePattern>
-                <keepFilePattern>*.bz2</keepFilePattern>
-	
-                <keepFilePattern>jobReport*.json</keepFilePattern>
-                <keepFilePattern>*.data</keepFilePattern>
-	
-                <auxFilePattern>run_memleak_rjtt.sh</auxFilePattern>
-                <auxFilePattern>slurpRecoRTTTests.pl</auxFilePattern>
-                <auxFilePattern>compressRTTLogFiles_rjtt.sh</auxFilePattern>
-	
-                <action position="1" runInAtlasEnv="yes">
-                    <modulename>PostProcessRecoRTTTests</modulename>
-                    <testname>PostProcessRecoRTTTests</testname>
-                </action>
-	
-            </jobGroup>   
-        </jobGroups>
-    
-    </rtt>
-  
-</unifiedTestConfiguration>
diff --git a/Tools/JobTransforms/CMakeLists.txt b/Tools/JobTransforms/CMakeLists.txt
deleted file mode 100644
index e26f91c0bd96..000000000000
--- a/Tools/JobTransforms/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-################################################################################
-# Package: JobTransforms
-################################################################################
-
-# Declare the package name:
-atlas_subdir( JobTransforms )
-
diff --git a/Tools/JobTransforms/include/JTPathUtils.def b/Tools/JobTransforms/include/JTPathUtils.def
deleted file mode 100755
index 2612ad228af6..000000000000
--- a/Tools/JobTransforms/include/JTPathUtils.def
+++ /dev/null
@@ -1,62 +0,0 @@
-# Utility functions
-
-# Find a path starting from a string = path1:path2:path3:...:pathn
-JTPathFinder ()
-{
-  CHECK_FILE=$1
-  if [ "$JT_SEARCHPATH" = "" ] ; then
-    return -1
-  fi
-
-  echo "$JT_SEARCHPATH" \
-  | awk -F ':' '{ for (i=1; i<=NF; i++) print $i }' 2> /dev/null \
-  | while read current_path; do
-    FINDPATH=`eval \find $current_path -name "$CHECK_FILE" 2> /dev/null`
-    if [ "$FINDPATH" != "" ] ; then
-      for item in $FINDPATH ; do echo $item ; done
-      return 0
-    fi
-  done
-
-  return 1
-}
-
-
-# Build a full path starting from a releative one
-JTPathBuilder ()
-{
-  PATHSTRING=$1
-  TMPFILE=/tmp/tmp-path.$$
-  if [ "$PATHSTRING" = "" ] ; then
-    return -1
-  fi
-
-  NEWPATH=""
-  SKIPNEXT=0
-  PATHSTRING="`echo $PATHSTRING | sed -e "s#^\./##g"`"
-  FIRSTCHAR="`echo $PATHSTRING | cut -b 1`"
-  [ "$FIRSTCHAR" != "/" ] && PATHSTRING="$PWD/$PATHSTRING"
-  echo $PATHSTRING \
-  | awk -F '/' '{ for (i=NF; i>1; i--) print $i }' \
-  | while read line ; do
-    if [ "$line" != "." -a "$line" != ".." -a "$line" != "" -a $SKIPNEXT -eq 0 ]
-    then
-      NEWPATH="`cat $TMPFILE 2>/dev/null`"
-      if [ "$NEWPATH" != "" ] ; then
-        echo -n $line/$NEWPATH > $TMPFILE
-      else
-        echo -n $line > $TMPFILE
-      fi
-    fi
-    if [ "$line" = ".." ] ; then
-      let SKIPNEXT+=1
-    else
-      [ $SKIPNEXT -ne 0 ] && let SKIPNEXT-=1
-    fi
-  done
-
-  echo "/"`cat $TMPFILE`
-  rm -fr $TMPFILE
-
-  return 0
-}
diff --git a/Tools/JobTransforms/include/athenaCheckLog.ignore b/Tools/JobTransforms/include/athenaCheckLog.ignore
deleted file mode 100755
index c3693cd6bf36..000000000000
--- a/Tools/JobTransforms/include/athenaCheckLog.ignore
+++ /dev/null
@@ -1,184 +0,0 @@
-7.5.0 ,DetectorStore       ERROR retrieve(default): No valid proxy for default object
-7.8.0 ,PoolSvc           WARNING  Cannot get AthenaSealSvc
-9.3.0 ,CaloMgrDetDescrCnv  ERROR Could not get .*
-10.5.0,IOVSvc            WARNING Callback.*
-10.5.0,IOVSvc            WARNING Proxy.*
-10.5.0,RPC_Digitizer     WARNING negative propagation.*
-10.5.0,ToolSvc           WARNING Error setting properties for Tool GeoModelSvc.TileDetectorTool
-11.0.2,Photos              ERROR  ERROR in PHOTOS PARAMETERS .* is and invalid common block name
-11.0.2,tauAlg.tauTracks    ERROR Could not get Trk::VxFastFit tool
-11.0.2,ToolSvc             ERROR Error initializing Tool tauAlg.tauTracks
-ALL   ,MDT_Digitizer_new WARNING MDTSimHit has invalid
-ALL   ,ToolSvc.RegionS...  FATAL  .* .* doesn't exists
-ALL   ,DataProxy           FATAL accessData: ERROR conversion failed
-ALL   ,HConverter        WARNING Truncated directory name to
-ALL   ,iPatRec           WARNING could not find .* collection in StoreGate
-ALL   ,NewPixelCluster...WARNING Could not find the raw data objects
-ALL   ,NewSCT_Clusteri...WARNING Could not find the raw data objects
-ALL   ,SiClusterTruthM...  ERROR Could not find the .* map
-ALL   ,SpacePointTruth...  ERROR Cannot find cluster in the map
-ALL   ,TRTDriftCircleT...  ERROR Could not find the InDetSimData map
-ALL   ,CBNT_CaloCluste...  ERROR  Found  more than maximum clusters
-ALL   ,CBNT_Truth        WARNING only .* true particles per event are kept
-ALL   ,CBNT_Truth        WARNING only .* true vertices per event are kept
-ALL   ,CBNT_Truth        WARNING primary vertex .* has mothers
-ALL   ,ObjectManager     WARNING Factory for class:.* already exists
-ALL   ,AthenaEventLoopMgrWARNING Histograms saving not required
-ALL   ,AthenaSealSvc     WARNING Service already offline
-ALL   ,ConverterFactory  WARNING Converter for .* already exists
-ALL   ,DetectorStore       ERROR could not bind handle to AlignableTransform
-ALL   ,G4Svc             WARNING Service already initialized
-ALL   ,HistogramPersis...WARNING Histograms saving not required
-ALL   ,IdDictDetDescrCnv WARNING Unable to locate .*
-ALL   ,JobOptionsSvc       ERROR Unable to set property
-ALL   ,JobOptionsSvc     WARNING
-ALL   ,PoolSvc           WARNING initialize() in PoolSvc OUTPUT level is .*
-ALL   ,ServiceManager    WARNING Finalization of service .* failed
-ALL   ,ServiceManager    WARNING Service factory for type .* already declared
-ALL   ,AthenaEventLoopMgrWARNING No EventSelector selected
-ALL   ,Pythia              ERROR PYTHIA ERROR, entry PYINIT has .*
-ALL   ,HelloWorld          ERROR .*
-ALL   ,HelloWorld          FATAL .*
-ALL   ,HelloWorld        WARNING .*
-ALL   ,HbookHistSvc      WARNING HBOOK output file name missing
-ALL   ,RootHistSvc       WARNING no ROOT output file name, Histograms cannot be persistified
-ALL   ,PythiaB             ERROR  ERROR in PYTHIA PARAMETERS
-ALL   ,PoolSvc             ERROR PoolSvc::connect failed .* access mode = 1
-ALL   ,RPC_Digitizer     WARNING propagation time
-ALL   ,MuGM:MuonFactory    ERROR .*
-ALL   ,MuonIdHelper        ERROR init_hashes  Error: duplicated id for module .*
-ALL   ,ToolSvc.SCTDigi...  ERROR ServiceLocatorHelper::locateService: can not locate service
-ALL   ,MuCTPIByteStrea...WARNING  Cant get .*
-ALL   ,ToolSvc             ERROR Unable to finalize the following tools
-ALL   ,ToolSvc             ERROR Factory for Tool .* not found
-ALL   ,G4SimAlg            ERROR .*
-ALL   ,AtRndmGenSvc      WARNING .*
-ALL   ,ReadPixelRDO      WARNING Cannot find .*
-ALL   ,ReadPixelRDO      WARNING Message limit reached for .*
-ALL   ,ReadPixelRDO     WARNING |    .*
-ALL   ,AthenaEventLoopMgr  ERROR Unable to retrieve Event root object
-ALL   ,CBNT_Conversion   WARNING only .*
-ALL   ,CmbTowerBldr.LArCmWARNING CaloCell with E = 0 GeV at .*
-ALL   ,TowerMaker.LArToweWARNING CaloCell with E = 0 GeV at .*
-ALL   ,ToolSvc.TruthSelec  ERROR Could not retrieve McEventCollection
-ALL   ,CBNT_Audit          ERROR  Memory leak!.*
-ALL   ,SpacePointTruthMakWARNING Cannot find cluster in the map
-ALL   ,ToolSvc.RIO_OnTracWARNING No Tool for making MuonClusterOnTrack given.
-ALL   ,ToolSvc.RIO_OnTracWARNING No Tool for making MuonDriftCircleOnTrack given.
-ALL   ,ToolSvc.calonoisetWARNING CaloNoiseTool::pileupNoiseRMS : NOT IMPLEMENTED for TILEs.*
-ALL   ,ToolSvc.CBNT_IndexWARNING  High index failure rate. Check all the needed CBNT alg are run
-ALL   ,ToolSvc.LArTowerEMWARNING CaloCell with E = 0 GeV at.*
-ALL   ,ToolSvc.LArTowerEMWARNING use LArFCalTowerBuilderTool for the FCal - request ignored
-ALL   ,CBNT_Audit        WARNING  Probable Memory leak.*
-ALL   ,MdtIdHelper       WARNING Invalid tube.*
-ALL   ,VKalVrtPrim         ERROR No good tracks for primary vertex reconstruction
-ALL   ,BTagKtJets.InitialWARNING no jets on input
-ALL   ,BTagKtJets.PreClusWARNING No jets in input collection
-ALL   ,BTagKtJets.KtFindeWARNING No jets in input collection
-ALL   ,BTagKtJets.FinalEtWARNING no jets on input
-ALL   ,GeoModelSvc.MuonDeWARNING Detector Information coming from .*
-ALL   ,GeoModelSvc.PixelDWARNING .* Detector Information coming from .*
-ALL   ,GeoModelSvc.SCT_DeWARNING .* Detector Information coming from .*
-ALL   ,GeoModelSvc.TRT_DeWARNING .* Detector Information coming from .*
-ALL   ,ConeJets.CellCalib  ERROR no jets on input
-ALL   ,ConeJets.FinalEtCuWARNING no jets on input
-ALL   ,NewSiTrackerSpacePWARNING Unable to retrieve any.*
-ALL   ,InDetPrepRawDataTrWARNING Unable to retrieve any.*
-ALL   ,iPatRec           WARNING Unable to retrieve any SpacePoint collections
-ALL   ,iPatStatistics    WARNING Unable to retrieve any SpacePoint collections
-ALL   ,TruthConeJets.ConeWARNING  ZERO SIZE PROTOJET CONTAINER
-ALL   ,TruthConeJets.FinaWARNING no jets on input
-ALL   ,TruthConeJets.InitWARNING no jets on input
-ALL   ,TruthKtJets.TruthFWARNING no jets on input
-ALL   ,TruthKtJets.TruthIWARNING no jets on input
-ALL   ,TruthKtJets.TruthKWARNING No jets in input collection
-ALL   ,TruthKtJets.TruthPWARNING No jets in input collection
-ALL   ,CaloMgrDetDescrCnv  ERROR Could not get TileDetDescrManager
-ALL   ,Cone4Jets.CellCali  ERROR no jets on input!
-ALL   ,Cone4Jets.FinalEtCWARNING no jets on input
-ALL   ,AthenaPoolTestD...  ERROR   Could not get pileup event info as event info
-ALL   ,MuGM:ProcessCSC   WARNING.*
-ALL   ,RDirectoryCnv       ERROR Encountered an unknown object with key.*
-ALL   ,DataProxy         WARNING accessData:  IOA pointer not set
-ALL   ,MDT_Digitizer     WARNING MDTSimHit has invalid global time
-ALL   ,EventMixer          ERROR decodeTrigger.*
-ALL   ,TruthCone4Jets.FinWARNING no jets on input
-ALL   ,TruthCone4Jets.ConWARNING ZERO SIZE PROTOJET.*
-ALL   ,TruthKtJets.sysExe  ERROR ZMxpvSpacelike: rapidity for spacelike 4-vector.*
-ALL   ,TruthCone4Jets.FinWARNING no jets on input
-ALL   ,BTagKtJetsID.InitiWARNING no jets on input
-ALL   ,BTagKtJetsID.PreClWARNING No jets in input collection
-ALL   ,BTagKtJetsID.KtFinWARNING No jets in input collection
-ALL   ,BTagKtJetsID.FinalWARNING no jets on input
-ALL   ,ByteStreamAddressPWARNING  can not create TAD for (type,name) no CLID for .*
-ALL   ,ByteStreamCnvSvc  WARNING  Can not get CLID for .*
-ALL   ,ByteStreamInputSvcWARNING Service already initialized
-ALL   ,ToolSvc.Trk::Moore  ERROR brem found and scatterer parameter is out of bounds
-ALL   ,ToolSvc.Trk::Moore  ERROR no brem, and scatterer parameter is out of bounds
-ALL   ,ToolSvc.Trk::MooreWARNING Failed to convert Perigee.
-ALL   ,NewPixelClusterizaWARNING Could not find the raw data objects
-ALL   ,NewSCT_ClusterizatWARNING Could not find the raw data objects
-ALL   ,InDetPrepRawDataTrWARNING Unable to retrieve any PixelCluster collections
-ALL   ,InDetPrepRawDataTrWARNING Unable to retrieve any SCT_Cluster collections
-ALL   ,SiTrackerSpacePoinWARNING Unable to retrieve any SCT_Cluster collections
-ALL   ,SiTrackerSpacePoinWARNING Unable to retrieve any PixelCluster collections
-ALL   ,iPatRec           WARNING Unable to retrieve any SpacePoint collections
-ALL   ,iPatStatistics    WARNING Unable to retrieve any SpacePoint collections
-ALL   ,VKalVrtPrim       ERROR No good tracks for primary vertex reconstruction
-ALL   ,cavernEventSele...WARNING Can not connect to Database
-ALL   ,MDT_Digitizer    WARNING | .*
-ALL   ,MDT_Digitizer     WARNING Message limit reached for MDT_Digitizer
-ALL   ,minBiasEventSel...WARNING Can not connect to Database
-ALL   ,MuGM:ProcessCSC   WARNING  No DB entry found for the current technology
-ALL   ,MuGM:ProcessCSC   WARNING  update by hand a few numbers for the current
-ALL   ,MuonBuilder         ERROR Could not retrieve the HighPt CombinedMuonContainer
-ALL   ,MuonBuilder         ERROR Could not retrieve the LowPt CombinedMuonContainer
-ALL   ,RDirectoryCnv       ERROR Encountered an unknown object with key: .*
-ALL   ,TileLookForMuAlg    ERROR Candidates muons exceed array dimension
-ALL   ,.* #FIWARNING should be changed to DEBUG in the code
-ALL   ,.* AthWARNING
-ALL   ,.* OutputLWARNING
-ALL   ,.* MessageWARNING
-ALL   ,MDT_Digitizer     WARNING MDTSimHit has invalid radius
-ALL   ,#VD: TRT_TR_ProcesWARNING WARNING: Volume-nameTRT::.* not found
-ALL   ,TRT_TR_Process:...WARNING WARNING: Volume-nameTRT::.* not found
-ALL   ,IdDictDetDescrCnv WARNING  no record set found - using default dictionary
-ALL   ,G4AtlasApps::PyG4AWARNING  G4AtlasEngine: init_DetFacility is already done
-ALL   ,G4AtlasApps::PyG4AWARNING  G4AtlasEngine: init_Physics is already done
-ALL   ,TileGeoG4SD       WARNING TileInfo was not found in DetectorStore
-ALL   ,#output threshold WARNING
-ALL   ,CBNT_AodTrigger     ERROR CTP_Decision : CTP_Decision could not be retrieved
-ALL   ,CBNT_Athena         ERROR  ERROR executing sub-algorithm:CBNT_AodTrigger
-ALL   ,THistSvc.sysFinali  ERROR St9bad_alloc
-ALL   ,THistSvc.sysFinali  ERROR basic_string::_S_create
-ALL   ,THistSvc.sysFinali  FATAL  Standard std::exception is caught
-ALL   ,VKalVrtPrim         ERROR Primary vertex not found
-ALL   ,ToolSvc.Extrapolat  ERROR No default Propagator is configured
-ALL   ,CBNT_Audit          ERROR  Could not getMem
-ALL   ,ToolSvc.emshower.e  ERROR  egammaShowerShape: Cluster is neither in Barrel nor in Endcap, cannot calculate ShowerShape
-ALL   ,ProcessHits         ERROR SD ProcessHits : wrong name for tile section.*
-ALL   ,LArCondObjCnv2      ERROR  Failed to get the persistent object
-ALL   ,IdScan_Tau_L2.IDSc  ERROR Exiting ZFinder...
-ALL   ,IdScan_Tau_L2.IDSc  ERROR phi of spacepoint out of range!
-ALL   ,StepController_EF   FATAL Lvl2 Result Conversion failed exiting Step Controller
-ALL   ,StepSequencer_L2    ERROR  Algorithm execution failed
-ALL   ,T2IDTauHypo_g4_L2   ERROR No input TrigInDetTrackCollection
-ALL   ,TrigTauRec_h5_EF    ERROR problems while or after processing tool
-ALL   ,TrigTauRec_h5_EF.T  ERROR  No track container
-ALL   ,ToolSvc.TileBeamIn  ERROR can't retrieve .* from TDS
-ALL   ,StreamAOD_TopFolde  ERROR add: can not find type .* in clid db
-ALL   ,IdScan_Egamma_L2.I  ERROR Exiting ZFinder
-ALL   ,IdScan_Egamma_L2.I  ERROR phi of spacepoint out of range
-ALL   ,IdScan_Muon_L2.IDS  ERROR Exiting ZFinder
-ALL   ,IdScan_Muon_L2.IDS  ERROR phi of spacepoint out of range
-ALL   ,ToolSvc.InDetTrack  ERROR failed to create perigee parameters, reject fit
-ALL   ,HistorySvc          ERROR Algorithm .* not registered
-ALL   ,DetectorStore       ERROR retrieve(non-const): No valid proxy for object
-ALL   ,Athena              ERROR use of theApp.setup( .* ) is deprecated
-ALL   ,Athena              ERROR use 'include( .* )' instead
-ALL   ,Athena              ERROR Algorithm ".*": type missing, no properties set
-ALL   ,HelloAlg            ERROR An ERROR message
-ALL   ,HelloAlg            FATAL A FATAL error message
-ALL   ,Py:Configurable     ERROR .* undeclared or uses a backdoor
-ALL   ,Py:Athena           ERROR Algorithm .* type missing, no properties set
-ALL   ,WARNING
diff --git a/Tools/JobTransforms/include/athenaCheckLog.kb b/Tools/JobTransforms/include/athenaCheckLog.kb
deleted file mode 100755
index 7ed096169057..000000000000
--- a/Tools/JobTransforms/include/athenaCheckLog.kb
+++ /dev/null
@@ -1,26 +0,0 @@
-7.8.0,TRF_SEALSVC:62000:,ServiceManager    WARNING Finalization of service AthenaSealSvc failed
-8.0.0,TRF_DETSTORE:62100,pixelRoI            ERROR service_i: can not locate service DetectorStore
-ALL  ,TRF_POOLCONF:62200,EventSelectorAt...  ERROR (PersistencySvc) pool::PersistencySvc::UserDatabase::connectForRead: PFN is not existing in the catalog
-ALL  ,TRF_EVNTSEL:62300,ServiceManager      ERROR Unable to initialize Service: EventSelector
-ALL  ,TRF_DISTKIT:62400,JobOptionsSvc       ERROR \#016
-ALL  ,TRF_PDTSETUP:62500,PartPropSvc         ERROR Could not open PDT file
-ALL  ,TRF_PDTFILE:62510,PartPropSvc         ERROR Unable to access any PDT file
-ALL  ,TRF_ATHENACRASH:62600,AthenaCrash
-ALL  ,TRF_ATHENAPROXY:62700,DetectorStore       ERROR retrieve(default): No valid proxy for default object
-ALL  ,TRF_PROPERTY:62800,JobOptionsSvc       ERROR Unable to set property .*
-ALL  ,TRF_DLLLOAD:62900,DllClassManager     ERROR System Error
-ALL  ,TRF_DLLDECL:62910,ApplicationMgr      ERROR Failure loading declared DLL's
-ALL  ,TRF_MOD:61000,ApplicationMgr    WARNING Failed to load modules
-ALL  ,TRF_MODLOAD:61010,DllClassManager     ERROR Could not load module
-ALL  ,TRF_MODEP:61020,DllClassManager     ERROR Entry point .* in module .*
-ALL  ,TRF_ALGOINIT:61100,EventLoopMgr        ERROR Unable to initialize Algorithm
-ALL  ,TRF_SVRINIT:61200,ServiceManager      ERROR Unable to initialize Service
-ALL  ,TRF_SEGVIO:60000,segmentation violation
-ALL  ,TRF_CBNTATHEXE:60100,CBNT_Athena::execute\(\)
-ALL  ,TRF_CBNTAUDIT:60601,CBNT_Audit \s+ ERROR\s+Could not getMem
-ALL  ,TRF_EGAMSHSHAPE:60200,ERROR  egammaShowerShape: Cluster is neither in Barrel nor in Endcap, cannot calculate ShowerShape 
-ALL  ,TRF_LAREMEC:60201,LArEMECEnergyCorrection::CalculateChargeCollection
-ALL  ,CONN_COND:80100,IOVDbSvc \s+ FATAL\s+Cannot initialize Conditions Databases.'
-ALL  ,CONN_ORA3113:80101,Error ORA-03113
-ALL  ,INPUT_CORRUP:520101,Error in <TBuffer::CheckByteCount>: Byte count probably corrupted
-ALL  ,TRF_TRTDIGITEXE:60101,TRTDigitization::execute\(\)
diff --git a/Tools/JobTransforms/include/athenaCheckLog.success b/Tools/JobTransforms/include/athenaCheckLog.success
deleted file mode 100755
index 24d6f48e0e1f..000000000000
--- a/Tools/JobTransforms/include/athenaCheckLog.success
+++ /dev/null
@@ -1 +0,0 @@
-ALL  ,ApplicationMgr .* INFO Application Manager Finalized successfully
diff --git a/Tools/JobTransforms/include/checkLogUtils.def b/Tools/JobTransforms/include/checkLogUtils.def
deleted file mode 100755
index 44c6781ce59a..000000000000
--- a/Tools/JobTransforms/include/checkLogUtils.def
+++ /dev/null
@@ -1,256 +0,0 @@
-# Print Error Report Header
-printErrorHeader()
-{
-    printf "${C_SPECIAL}%s${C_NORMAL}\n" "--------  Problem report -------"
-}
-
-# Print Error Report Text
-printErrorText()
-{
-    printf "[${C_FAILURE}%s${C_NORMAL}]\n%s\n" "$1" "$2"
-}
-
-# Print Error Report Footer
-printErrorFooter()
-{
-        printf "${C_SPECIAL}%s${C_NORMAL}\n" "================================"
-}
-
-# Check Athena logfiles
-
-athenaCheckLog()
-{
-  LOG="$1"
-  TMP_CHECKLOG=/tmp/tmp.checklog.$$
-  T_CHECKLOGOUT=checklog.txt
-  TMP_IGNORE_FILE=/tmp/tmp.ignore.$$
-  TMP_KNOWLEDGE_BASE=/tmp/tmp.kb.$$
-  IGNORE_FILE=${T_INCPATH}/athenaCheckLog.ignore
-  KNOWLEDGE_BASE=${T_INCPATH}/athenaCheckLog.kb
-  ATHENASUCCESSFILE=${T_INCPATH}/athenaCheckLog.success
-  KEYALL="ALL"
-
-  rm -f ${TMP_CHECKLOG}
-
-# Check if the log is available
-  if [ ! -f $LOG ] ; then
-    printErrorHeader >> ${T_CHECKLOGOUT}
-    printErrorText "TRANSFORMATION/SOFTWARE Problem" "No athena logfile found" \
-                     >> ${T_CHECKLOGOUT}
-    printErrorFooter >> ${T_CHECKLOGOUT}
-    return 200
-  fi
-
-# Check if the release was properly configured
-  if [ "${T_RELEASE}" == "" ] ; then
-    printErrorHeader >> ${T_CHECKLOGOUT}
-    printErrorText "TRANSFORMATION CONFIG Problem" \
-                   "T_RELEASE not set or set to the wrong value" \
-                     >> ${T_CHECKLOGOUT}
-    printErrorFooter >> ${T_CHECKLOGOUT}
-    return 201
-  fi
-
-# Use only the first 3 digits of T_RELEASE
-  T_RELEASETEMP="`echo $T_RELEASE | cut -d . -f -3`"
- 
-# Check if Athena was closed succesfully
-  [ "$T_IGNOREATHENACRASH" = "yes" -a "$VERBOSE" = "yes" ] \
-                              && echo "Ignoring Athena crashes for this test"
-  ATHENASUCCESS="`grep ^${T_RELEASETEMP} ${ATHENASUCCESSFILE}`"
-  [ "$ATHENASUCCESS" = "" ] && ATHENASUCCESS="`grep ^${KEYALL} ${ATHENASUCCESSFILE} | cut -d ',' -f 2-`"
-  grep -q "$ATHENASUCCESS" "$LOG"
-  [ $? -eq 0 -o "$T_IGNOREATHENACRASH" = "yes" ] && ATHENAOK=1 || ATHENAOK=0
-
-# Look for errors and warnings 
-  awk '{type=match(substr($0,19,80),"(WARNING|  ERROR|  FATAL)"); if (type > 0) { print substr($0,0,18)substr($0,type+18,length($0)-type) }}' ${LOG} | sort | uniq > ${TMP_CHECKLOG}.0
-
-# Ignore the errors/warnings matching the lines in the ".ignore" file
-  egrep "^${KEYALL}|^${T_RELEASETEMP}" $IGNORE_FILE | cut -d ',' -f 2- > $TMP_IGNORE_FILE
-  if [ -f $TMP_IGNORE_FILE ] ; then
-    grep -v -f $TMP_IGNORE_FILE ${TMP_CHECKLOG}.0 > ${TMP_CHECKLOG}.1
-  else
-    cp ${TMP_CHECKLOG}.0 ${TMP_CHECKLOG}.1
-  fi
-  rm -f ${TMP_IGNORE_FILE}
-  mv -f ${TMP_CHECKLOG}.1 ${TMP_CHECKLOG}.0
-
-# Check for Athena crashes
-  if [ $ATHENAOK == 0 ] ; then
-    echo "AthenaCrash" >> ${TMP_CHECKLOG}.0
-  fi
-
-# Guess what is the problem 
-  touch ${TMP_CHECKLOG}
-  if [ -f $KNOWLEDGE_BASE ] ; then
-
-    # First check if we know these errors
-    egrep "^${KEYALL}|^${T_RELEASETEMP}" ${KNOWLEDGE_BASE} \
-                              | cut -d ',' -f 2- > $TMP_KNOWLEDGE_BASE
-    cat ${TMP_KNOWLEDGE_BASE} | while read line ; do
-      T_PROBTYPE="`echo "$line" | cut -d ',' -f 1`"
-      T_SIGNATURE="`echo "$line" | cut -d ',' -f 2`"
-      T_PROBLEM="`grep "$T_SIGNATURE" ${TMP_CHECKLOG}.0`"
-      if [ "$T_PROBLEM" != "" ] ; then
-        printErrorHeader >> ${TMP_CHECKLOG}
-        printErrorText "$T_PROBTYPE" "$T_PROBLEM" >> ${TMP_CHECKLOG}
-        printErrorFooter >> ${TMP_CHECKLOG}
-        grep -v "$T_SIGNATURE" ${TMP_CHECKLOG}.0 > ${TMP_CHECKLOG}.1
-        mv -f ${TMP_CHECKLOG}.1 ${TMP_CHECKLOG}.0
-      fi
-    done
-    rm -f ${TMP_KNOWLEDGE_BASE}
-
-    # These are unknown errors
-    cat ${TMP_CHECKLOG}.0 | while read line ; do
-      printErrorHeader >> ${TMP_CHECKLOG}
-      printErrorText "Unknown Problem" "$line" >> ${TMP_CHECKLOG}
-      printErrorFooter >> ${TMP_CHECKLOG}
-    done
-  else
-    cp ${TMP_CHECKLOG}.0 ${TMP_CHECKLOG}
-  fi
-  rm -f ${TMP_CHECKLOG}.0
-
-# Report the problems, if required 
-  if [ `cat $TMP_CHECKLOG| wc -l` != 0 -o $? != 0 ] ; then
-    cp ${TMP_CHECKLOG} ${T_CHECKLOGOUT}
-    [ $ATHENAOK -eq 1 ] && checklog_retcode=1 || checklog_retcode=2
-  else
-    [ $ATHENAOK -eq 1 ] && checklog_retcode=0 || checklog_retcode=2
-  fi
-  rm -f ${TMP_CHECKLOG}
-
-  if [ -s "${T_CHECKLOGOUT}" ] ; then
-    echo "JT>--------------------------"
-    echo "JT> An error occurred"
-    echo "JT> Printing CheckLog output"
-    echo "JT>--------------------------"
-    cat ${T_CHECKLOGOUT}
-    echo "JT>--------------------------"
-    echo "JT> End of CheckLog output"
-    echo "JT>--------------------------"
-    # Parse the athena log file scanning for known error patterns
-    athenaCategorizeErrors "$LOG"
-  else
-    echo "JT>--------------------------"
-    echo "JT> CheckLog OK"
-    echo "JT>--------------------------"
-  fi
-
-  return $checklog_retcode
-}
-
-
-# Check compilation logfiles
-
-compilationCheckLog()
-{
-  LOG="$1"
-  TMP_CHECKLOG=/tmp/tmp.checklog.$$
-  T_CHECKLOGOUT=checklog.txt
-
-  rm -f ${TMP_CHECKLOG}
-
-# Check if the log is available
-  if [ ! -f $LOG ] ; then
-    printErrorHeader >> ${T_CHECKLOGOUT}
-    printErrorText "COMPILATION PROBLEM" \
-                   "No compilation logfile found" >> ${T_CHECKLOGOUT}
-    printErrorFooter >> ${T_CHECKLOGOUT}
-    return 200
-  fi
-
-# Look for errors and warnings 
-  egrep -i "\*\*\*|no such file" ${LOG} | sort | uniq >> ${TMP_CHECKLOG}
-
-# Report the problems, if needed 
-  if [ `cat $TMP_CHECKLOG| wc -l` != 0 -o $? != 0 ] ; then
-    printErrorHeader > ${T_CHECKLOGOUT}
-    printErrorText "COMPILATION PROBLEM" >> ${T_CHECKLOGOUT}
-    grep -i "Now trying" ${LOG} | tail -n 1 >> ${T_CHECKLOGOUT}
-    cat ${TMP_CHECKLOG} >> ${T_CHECKLOGOUT}
-    printErrorFooter >> ${T_CHECKLOGOUT}
-    checklog_retcode=1
-  else
-    checklog_retcode=0
-  fi
-  rm -f ${TMP_CHECKLOG}
-
-  return $checklog_retcode
-}
-
-athenaCheckOutput () {
-  filename="${1}"
-  [ "${2}" == "" ] && maxevents=100000 || maxevents="${2}"
-
-  TMPJO=athenaCheckOutputOptions.py
-  echo "EventSelector.InputCollections = [ \"$filename\" ]" > ${TMPJO}
-  echo "theApp.EvtMax = $maxevents"                        >> ${TMPJO}
-
-  # Read the input file
-  athena.py AthenaPoolTest/EventInfoRead.py ${TMPJO}
-  checkOutput_retcode = $?
-
-  rm -f ${TMPJO}
-  return $checkOutput_retcode
-}
-
-# Extract the WARNING/ERROR/FATAL messages and categorize them for the logfiles
-
-athenaLogStats()
-{
-  LOG="$1"
-  TMP_LOGSTATS=/tmp/tmp.logstats.$$
-  T_LOGSTATSOUT=jtstats.txt
-
-  rm -f ${TMP_LOGSTATS}
-
-# Check if the log is available
-  if [ ! -f "$LOG" ] ; then
-    return 200
-  fi
-
-# Look for errors and warnings 
-  awk '{type=match(substr($0,19,30),"(WARNING|  ERROR|  FATAL)"); if (type > 0) { print substr($0,0,18)substr($0,type+18,length($0)-type) }}' ${LOG} | sort > ${TMP_LOGSTATS}
-
-  printf "WARNING %d\n" "`grep WARNING ${TMP_LOGSTATS} | wc -l`" \
-         >  ${T_LOGSTATSOUT}
-  printf "ERROR   %d\n" "`grep ERROR ${TMP_LOGSTATS} | wc -l`" \
-         >> ${T_LOGSTATSOUT}
-  printf "FATAL   %d\n" "`grep FATAL ${TMP_LOGSTATS} | wc -l`" \
-         >> ${T_LOGSTATSOUT}
-  rm -f ${TMP_LOGSTATS}
-
-  return 0
-}
-
-athenaCategorizeErrors() {
-  LOG="${1}"
-  KNOWLEDGE_BASE=${T_INCPATH}/athenaCheckLog.kb
-  TMP_KNOWLEDGE_BASE=/tmp/tmp.kb.$$
-  T_ERROR_CATEGORIES=error_categories.txt
-  TMP_ERROR_CATEGORIES=/tmp/tmp.$T_ERROR_CATEGORIES.$$
-  KEYALL="ALL"
-  
-  # Check for known patterns in the logfile 
-  if [ -s $KNOWLEDGE_BASE ] ; then
-    egrep "^${KEYALL}|^${T_RELEASETEMP}" ${KNOWLEDGE_BASE} \
-                              | cut -d ',' -f 2- > $TMP_KNOWLEDGE_BASE
-    cat ${TMP_KNOWLEDGE_BASE} | while read line ; do
-      T_PROBTYPE="`echo "$line" | cut -d ',' -f 1`"
-      T_SIGNATURE="`echo "$line" | cut -d ',' -f 2`"
-      T_PROBLEM="`grep "$T_SIGNATURE" ${LOG}`"
-      if [ "$T_PROBLEM" != "" ] ; then
-        echo "$T_PROBTYPE,$T_PROBLEM" >> ${TMP_ERROR_CATEGORIES}
-      fi
-    done
-    rm -f ${TMP_KNOWLEDGE_BASE}
-  fi
-  if [ -f ${TMP_ERROR_CATEGORIES} ] ; then
-      cut -d',' -f 1 ${TMP_ERROR_CATEGORIES} | sort | uniq -c | sed 's#:# #' \
-          > ${T_ERROR_CATEGORIES}
-      rm -f ${TMP_ERROR_CATEGORIES}
-  fi
-  return 0
-}
diff --git a/Tools/JobTransforms/include/checkfiles.def b/Tools/JobTransforms/include/checkfiles.def
deleted file mode 100755
index 41f5b91d2a54..000000000000
--- a/Tools/JobTransforms/include/checkfiles.def
+++ /dev/null
@@ -1,55 +0,0 @@
-# Check files
-
-registerLCG ()
-{
-  SFN="$1"
-  LFN="$2"
-  if [ "$T_VERBOSE" = "yes" ] ; then
-    echo "Registering file ${SFN} as ${LFN}"
-    echo edg-rm --vo atlas cr file:${SFN} -l lfn:${LFN}
-  fi
-  edg-rm --vo atlas cr file:${SFN} -l lfn:${LFN}
-  retcode=$?
-  return $retcode
-}
-
-
-checkFiles()
-{
-  retcode=0
-  # Check if the requested files have been created
-  while [ "$1" != "" ] ; do
-    SFNAME="`echo $1 |awk -F ',' '{print $1}'`"
-    LFNAME="`echo $1 |awk -F ',' '{print $2}'`"
-    # If an LFN is specified, enable GRID registration
-    [ "${LFNAME}" = "" ] && REGISTER="no" || REGISTER="yes"
-    shift
-    if [ -f "${SFNAME}" ] ; then
-
-      if [ "${VERBOSE}" = "yes" ] ; then
-        echo "File '${SFNAME}' found"
-        \ls -l "${SFNAME}"
-      fi
-
-      # Now register to the GRID, if requested
-      if [ "${REGISTER}" = "yes" -a "${T_GRID}" != "" ] ; then
-        case "${T_GRID}" in
-              LCG|lcg) registerLCG $SFNAME $LFNAME;;
-              *) echo "The ${T_GRID} GRID flavour is not supported yet";;
-        esac
-        let retcode+=$?
-      fi
-
-    else
-
-      if [ "$VERBOSE" = "yes" ] ; then
-        echo "Output file '${SFNAME}' has not been created!"
-      fi
-      let retcode+=100
-
-    fi
-  done
-
-  # exit from function with the appropriate return code
-  return $retcode
-}
diff --git a/Tools/JobTransforms/include/colors.def b/Tools/JobTransforms/include/colors.def
deleted file mode 100755
index 720a27cae72b..000000000000
--- a/Tools/JobTransforms/include/colors.def
+++ /dev/null
@@ -1,11 +0,0 @@
-# Colors
-if [ "$T_COLOR" = "yes" ] ; then
-  C_BANNER="\\033[1;31m"
-  C_FAILURE="\\033[1;31m"
-  C_HIGHLIGHT="\\033[1;31m"
-  C_SUCCESS="\\033[1;32m"
-  C_PASSED="\\033[1;33m"
-  C_RESULT="\\033[1;34m"
-  C_SPECIAL="\\033[1;34m"
-  C_NORMAL="\\033[0;39m"
-fi
diff --git a/Tools/JobTransforms/include/copy.def b/Tools/JobTransforms/include/copy.def
deleted file mode 100755
index 9032c741eb9c..000000000000
--- a/Tools/JobTransforms/include/copy.def
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copy various files
-
-copyFiles ()
-{
-  # Copy the required files in $T_OUTPATH
-  while [ "$1" != "" ] ; do
-    CURRENT_FILE="$1"; shift
-    if [ -f $CURRENT_FILE ] ; then
-      [ "${VERBOSE}" == "yes" ] && echo "mv $CURRENT_FILE $T_OUTPATH"
-      mv $CURRENT_FILE $T_OUTPATH
-    fi
-  done
-
-  # Print the logfile, if requested
-  if [ "${VERBOSE}" == "yes" -a -f ${T_OUTPATH}/${T_LOGFILE} ] ; then
-    echo "################################################"
-    echo "##        Printing Logfile for this job       ##"
-    echo "################################################"
-    cat ${T_OUTPATH}/${T_LOGFILE}
-  fi
-
-  # List the current dir contents
-  if [ "${VERBOSE}" == "yes" ] ; then
-    echo "################################################"
-    echo "##        Listing working directory           ##"
-    echo "################################################"
-    \ls
-  fi
-
-  # Copy core dumps, if requested
-  if [ "${T_SAVECORE}" == "yes" ] ; then
-    COREDUMP=`\ls core* 2>/dev/null`
-    if [ "${COREDUMP}" != "" ] ; then
-      [ "${VERBOSE}" == "yes" ]  && echo "Copying ${COREDUMP} to ${T_OUTPATH}"
-      cp ${COREDUMP} ${T_OUTPATH}
-    else
-      [ "${VERBOSE}" == "yes" ]  && echo "No core dump has been produced"
-    fi
-  fi
-}
diff --git a/Tools/JobTransforms/include/dbUtils.def b/Tools/JobTransforms/include/dbUtils.def
deleted file mode 100755
index f295bb897f0a..000000000000
--- a/Tools/JobTransforms/include/dbUtils.def
+++ /dev/null
@@ -1,45 +0,0 @@
-# Database utilities for JT
-
-addSQLiteSupport ()
-{
-T_CFGJOBOPTION="myjoboption.py"
-[ "$1" != "" ] && T_CFGJOBOPTION="$1"
-[ "$T_SQLITEGEOM" == "" ] && T_SQLITEGEOM="$SITEROOT/geomDB_sqlite"
-
-if [ -s $T_SQLITEGEOM ] ; then
-
-cat <<EOD >> $T_CFGJOBOPTION
-RDBAccessSvc = Service( "RDBAccessSvc" )
-RDBAccessSvc.UseDBConnSvc = FALSE
-RDBAccessSvc.Technology   = "sqlite"
-RDBAccessSvc.HostName     = "$T_SQLITEGEOM"
-EOD
-
-fi
-
-# Get the sqlite file from the release, if present, and copy it locally
-get_files -data geomDB_sqlite
-if [ -s geomDB_sqlite ] ; then
-  # If the sqlite db is locally found, extend the DATAPATH to reach and use it
-  export DATAPATH=$PWD:$DATAPATH
-fi
-}
-
-addLocalMySQLSupport ()
-{
-T_CFGJOBOPTION="myjoboption.py"
-[ "$1" != "" ] && T_CFGJOBOPTION="$1"
-
-if [ "$T_ATLASMYSQLSERVER" != "" ] ; then
-
-cat <<EOD >> $T_CFGJOBOPTION
-RDBAccessSvc = Service( "RDBAccessSvc" )
-RDBAccessSvc.Technology = "mysql"
-LArCondCnvDbServer      = "$T_ATLASMYSQLSERVER"
-RDBAccessSvc.HostName   = "$T_ATLASMYSQLSERVER"
-RDBAccessSvc.Port         = "3306"
-RDBAccessSvc.SchemaName   = "ATLASDD"
-EOD
-
-fi
-}
diff --git a/Tools/JobTransforms/include/fileUtils.def b/Tools/JobTransforms/include/fileUtils.def
deleted file mode 100755
index 89c1c7d45d87..000000000000
--- a/Tools/JobTransforms/include/fileUtils.def
+++ /dev/null
@@ -1,144 +0,0 @@
-# Function to count the events in a pool file
-# Author: Davide Costanzo
-
-eventCount() {
-  FILENAME="$1"
-  cat > _eventCount.py <<EOF
-#--------------------------------------------------------------
-# Load POOL support
-#--------------------------------------------------------------
-include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-EventSelector = Service( "EventSelector" )
-EventSelector.SkipEvents = 0
-theApp.EvtMax = -1
-EventSelector = Service( "EventSelector" )
-EventSelector.InputCollection        = "$FILENAME"
-
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = 3
-MessageSvc.defaultLimit = 9999999  # all messages
-#==============================================================
-
-EOF
-  # Count
-  value=`athena.py _eventCount.py 2>&1 | grep " start of event" | wc -l`
-  rm -f _eventCount.py
-  [ "$value" == "" ] && value=0
-  echo $value
-  return 0
-}
-
-expandFileList() {
-  STRING="${1}"
-  EXPANDMATCH="${2}"
-  TMPEM=tmp.expandmatch.$$
-  TMPEMRC=tmp.expandmatchrc.$$
-  expansionrc=0
-
-  # get the number of parts in the string
-  parts="`echo $STRING | awk -F '[\\\[\\\]]' '{ print NF }'`"
-
-  # If it is a file list "cat" it to stdout
-  if [ $parts -eq 1 ] ; then
-    if [ -s $STRING ] ; then
-      cat $STRING 2> /dev/null
-      expansionrc=$?
-      [ $expansionrc -ne 0 ] && return $expansionrc
-    else
-      if [ "$STRING" != "NONE" ] ; then
-        # Match the filenames
-        if [ "$EXPANDMATCH" == "match" ] ; then
-          \ls -d ${STRING}* 2>&1 > $TMPEM
-          expansionrc=$?
-          if [ $expansionrc -ne 0 ] ; then
-            rm -f $TMPEM
-            return $expansionrc
-          fi
-          cat $TMPEM | while read fn ; do
-            echo $fn
-          done
-          rm -f $TMPEM
-        else
-          echo $STRING
-        fi
-      fi
-    fi
-    return 0
-  fi
-
-  # Loop over the parts and expand the [x-y] constructs
-  echo $expansionrc > $TMPEMRC
-  echo $STRING | awk -F '[\\\[\\\]]' '{for (i=1; i<=NF; i++) print $i}' | \
-  while read part; do
-    let index=index+1
-    let arrayindex=0
-    str="`echo $part | sed 's/\n//g'`"
-
-    # Do expansion
-    if [ $((index % 2)) == 0 ] ; then
-      for subpart in `echo $part | sed 's/,/ /g'`; do
-        begin="`echo $subpart | cut -d '-' -f 1`"
-        end="`echo $subpart | cut -d '-' -f 2`"
-        size=${#end}
-        if [ ${#oldlist[@]} -gt 0 ] ; then
-          for oldlistitem in "${oldlist[@]}"; do
-            for item in `eval seq -f '%0${size}g' ${begin} ${end}`; do
-              list[${arrayindex}]="${oldlistitem}${item}"
-              let arrayindex=arrayindex+1
-            done
-          done
-        else
-          for item in `eval seq -f '%0${size}g' ${begin} ${end}`; do
-            list[${arrayindex}]="${oldlistitem}${item}"
-            let arrayindex=arrayindex+1
-          done
-        fi
-      done
-
-    # Copy fixed text
-    elif [ "$part" != "" ] ; then
-      if [ ${#oldlist[@]} -gt 0 ] ; then
-        for oldlistitem in "${oldlist[@]}"; do
-          list[${arrayindex}]="${oldlistitem}${str}"
-          let arrayindex=arrayindex+1
-        done
-      else
-        list[${arrayindex}]="${str}"
-      fi
-    fi
-
-    # Save the current array or print it
-    let oldindx=0
-    for listitem in "${list[@]}"; do
-      if [ "$index" == "$parts" ] ; then
-        # Match the filenames
-        if [ "$EXPANDMATCH" == "match" ] ; then
-          \ls -d ${listitem}* 2>&1 > $TMPEM
-          expansionrc=$?
-          [ $expansionrc -ne 0 ] && echo $expansionrc > $TMPEMRC
-          cat $TMPEM | while read fn ; do
-            echo $fn
-          done
-          rm -f $TMPEM
-        else
-          echo ${listitem}
-        fi
-      else
-        oldlist[$oldindx]=$listitem
-      fi
-      let oldindx=oldindx+1
-    done
-  done 
-  expansionrc=`cat $TMPEMRC`
-  rm -f $TMPEMRC
-
-  return $expansionrc
-}
-
-[ -d "`dirname $0`/../python" ] \
-       && export PYTHONPATH="`dirname $0`/../python":$PYTHONPATH
-[ -d $T_INCPATH ] && export DATAPATH=$T_INCPATH:$DATAPATH
diff --git a/Tools/JobTransforms/include/jobInfo.body.xml.template b/Tools/JobTransforms/include/jobInfo.body.xml.template
deleted file mode 100755
index 807287a56a62..000000000000
--- a/Tools/JobTransforms/include/jobInfo.body.xml.template
+++ /dev/null
@@ -1,19 +0,0 @@
-    <timestamp>@TIMESTAMP@</timestamp>
-    <elapsed>@ELAPSED@</elapsed>
-    <gcc>@GCCVERSION@</gcc>
-    <node>@NODENAME@</node>
-    <os>@OS@</os>
-    <distribution>@DISTRIBUTION@</distribution>
-    <kernel>@KERNEL@</kernel>
-    <machine>@MACHINE@</machine>
-    <processor>@PROCESSOR@</processor>
-    <cpu>@CPUNAME@</cpu>
-    <numofcpus>@CPUNUM@</numofcpus>
-    <mem>@MEM@</mem>
-    <bogomips>@BOGOMIPS@</bogomips>
-    <siteroot>@SITEROOT@</siteroot>
-    <release>@RELEASE@</release>
-    <distrel>@DISTREL@</distrel>
-    <warning>@WARNINGS@</warning>
-    <error>@ERRORS@</error>
-    <fatal>@FATALS@</fatal>
diff --git a/Tools/JobTransforms/include/jobInfo.def b/Tools/JobTransforms/include/jobInfo.def
deleted file mode 100755
index 341dab78c786..000000000000
--- a/Tools/JobTransforms/include/jobInfo.def
+++ /dev/null
@@ -1,93 +0,0 @@
-# Write the job info
-
-T_XMLJOBINFOTEMPLATEHEAD=${T_INCPATH}/jobInfo.head.xml.template
-T_XMLJOBINFOTEMPLATEBODY=${T_INCPATH}/jobInfo.body.xml.template
-T_XMLJOBINFOTEMPLATEERRORS=${T_INCPATH}/jobInfo.errors.xml.template
-T_XMLJOBINFOTEMPLATETAIL=${T_INCPATH}/jobInfo.tail.xml.template
-T_XMLJOBINFOOUTPUT=jobInfo.xml
-
-# Save the job start time
-T_STARTTIME=`date +%s`
-
-writeJobInfo ()
-{
-  # Log file name
-  LOGFILE="$1"
-  T_ERROR_CATEGORIES=error_categories.txt
-
-  # Override the output file name, if requested
-  [ "$2" != "" ] && T_XMLJOBINFOOUTPUT="$2"
-
-  # Get the job end time
-  T_ENDTIME=`date +%s`
-  T_TIMESTAMP="`date`"
-
-  # Calculate the elapsed time (in seconds)
-  T_ELAPSED=$((T_ENDTIME-T_STARTTIME))
-
-  # Get info on this machine
-  T_GCCVERSION="`gcc -v 2>&1 | grep ^gcc`"
-  T_NODENAME="`uname -n`"
-  T_OS="`uname -s`"
-  T_DISTRIBUTION="`lsb_release -d 2>/dev/null | sed 's#^Description:.##'`"
-  [ "$T_DISTRIBUTION" == "" ] && T_DISTRIBUTION="unknown"
-  T_KERNEL="`uname -vr`"
-  T_MACHINE="`uname -m`"
-  T_PROCESSOR="`uname -p`"
-  T_CPUNAME="`cat /proc/cpuinfo | grep '^model name' | tail -n 1 | cut -d':' -f 2- | sed 's/^ *//g'`"
-  T_CPUNUM=$((`cat /proc/cpuinfo | grep '^processor' | wc -l`))
-  T_BOGOMIPS="`cat /proc/cpuinfo | grep '^bogomips' | tail -n 1 | cut -d':' -f 2- | sed 's/^ *//g'`"
-  T_MEM=`cat /proc/meminfo | grep '^Mem:' | awk '{print $2}'`
-
-  # Get the info on WARNINGS/ERRORS/FATALS
-  athenaLogStats $LOGFILE
-  T_WARNINGS=-1
-  T_ERRORS=-1
-  T_FATALS=-1
-  if [ -f "$T_LOGSTATSOUT" ] ; then
-      T_WARNINGS=`grep WARNING $T_LOGSTATSOUT | awk '{print $2}'`
-      T_ERRORS=`grep ERROR $T_LOGSTATSOUT | awk '{print $2}'`
-      T_FATALS=`grep FATAL $T_LOGSTATSOUT | awk '{print $2}'`
-  fi
-
-  # Write the xml output file (HEAD)
-  cat ${T_XMLJOBINFOTEMPLATEHEAD} > ${T_XMLJOBINFOOUTPUT}
-
-  # Write the xml output file (BODY)
-  sed -e "s#@TIMESTAMP@#$T_TIMESTAMP#g" \
-      -e "s#@ELAPSED@#$T_ELAPSED#g" \
-      -e "s#@NODENAME@#$T_NODENAME#g" \
-      -e "s#@GCCVERSION@#$T_GCCVERSION#g" \
-      -e "s/@KERNEL@/$T_KERNEL/g" \
-      -e "s#@OS@#$T_OS#g" \
-      -e "s#@DISTRIBUTION@#$T_DISTRIBUTION#g" \
-      -e "s#@MACHINE@#$T_MACHINE#g" \
-      -e "s#@PROCESSOR@#$T_PROCESSOR#g" \
-      -e "s#@CPUNAME@#$T_CPUNAME#g" \
-      -e "s#@CPUNUM@#$T_CPUNUM#g" \
-      -e "s#@BOGOMIPS@#$T_BOGOMIPS#g" \
-      -e "s#@MEM@#$T_MEM#g" \
-      -e "s#@WARNINGS@#$T_WARNINGS#g" \
-      -e "s#@ERRORS@#$T_ERRORS#g" \
-      -e "s#@FATALS@#$T_FATALS#g" \
-      -e "s#@SITEROOT@#$SITEROOT#g" \
-      -e "s#@RELEASE@#$T_RELEASE#g" \
-      -e "s#@DISTREL@#$T_DISTREL#g" \
-      ${T_XMLJOBINFOTEMPLATEBODY} >> ${T_XMLJOBINFOOUTPUT}
-
-  # Write the xml output file (ERROR ACRONYMS)
-  if [ -s "${T_ERROR_CATEGORIES}" ] ; then
-      cat ${T_ERROR_CATEGORIES} | while read line; do
-          OCCURR="`echo $line | awk '{ print $1 }'`"
-          ACRONYM="`echo $line | awk '{ print $2 }'`"
-          ERRORID="`echo $line | awk '{ print $3 }'`"
-          sed -e "s#@OCCURR@#$OCCURR#g" \
-              -e "s#@ACRONYM@#$ACRONYM#g" \
-              -e "s#@ERRORID@#$ERRORID#g" \
-          ${T_XMLJOBINFOTEMPLATEERRORS} >> ${T_XMLJOBINFOOUTPUT}
-      done
-  fi
-
-  # Write the xml output file (TAIL)
-  cat ${T_XMLJOBINFOTEMPLATETAIL} >> ${T_XMLJOBINFOOUTPUT}
-}
diff --git a/Tools/JobTransforms/include/jobInfo.errors.xml.template b/Tools/JobTransforms/include/jobInfo.errors.xml.template
deleted file mode 100755
index 2af6aca6f9db..000000000000
--- a/Tools/JobTransforms/include/jobInfo.errors.xml.template
+++ /dev/null
@@ -1 +0,0 @@
-    <erroracronym value="@OCCURR@" id="@ERRORID@">@ACRONYM@</erroracronym>
diff --git a/Tools/JobTransforms/include/jobInfo.head.xml.template b/Tools/JobTransforms/include/jobInfo.head.xml.template
deleted file mode 100755
index 6718637a486b..000000000000
--- a/Tools/JobTransforms/include/jobInfo.head.xml.template
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jtinfo>
diff --git a/Tools/JobTransforms/include/jobInfo.tail.xml.template b/Tools/JobTransforms/include/jobInfo.tail.xml.template
deleted file mode 100755
index 6ffbcbe9a3ef..000000000000
--- a/Tools/JobTransforms/include/jobInfo.tail.xml.template
+++ /dev/null
@@ -1 +0,0 @@
-</jtinfo>
diff --git a/Tools/JobTransforms/include/metaData.def b/Tools/JobTransforms/include/metaData.def
deleted file mode 100755
index 47e89fe852ed..000000000000
--- a/Tools/JobTransforms/include/metaData.def
+++ /dev/null
@@ -1,65 +0,0 @@
-# meta data writer
-
-T_METADATAOUT="metadata.xml"
-let T_OPENEDTAGS=0
-
-metaDataHeader ()
-{
-  echo "${T_TAGOFFSET}<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>" > ${T_METADATAOUT}
-  echo "${T_TAGOFFSET}<!-- ATLAS file meta-data catalog -->" >> ${T_METADATAOUT}
-  echo "${T_TAGOFFSET}<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">" \
-                                  >> ${T_METADATAOUT}
-  echo "${T_TAGOFFSET}<POOLFILECATALOG>" >> ${T_METADATAOUT}
-  T_TAGOFFSET="${T_TAGOFFSET}  "
-  return
-}
-
-metaDataFooter ()
-{
-  T_TAGOFFSET="`echo $T_TAGOFFSET | cut -b 3-`"
-  echo "${T_TAGOFFSET}</POOLFILECATALOG>" >> ${T_METADATAOUT}
-  return
-}
-
-metaDataOpenTag ()
-{
-  TAG=$1; shift
-  if [ "${TAG}" != "" ] ; then
-    TAGSTR="${T_TAGOFFSET}<${TAG}"
-    while [ "$1" != "" ] ; do
-      ATTR=$1; shift
-      TAGSTR="${TAGSTR} ${ATTR}"
-    done
-    TAGSTR="${TAGSTR}>"
-    echo "${TAGSTR}" >> ${T_METADATAOUT}
-    let T_OPENEDTAGS+=1
-    T_TAGOFFSET="${T_TAGOFFSET}  "
-  fi
-}
-
-metaDataAddTag ()
-{
-  TAG=$1; shift
-  if [ "${TAG}" != "" ] ; then
-    TAGSTR="${T_TAGOFFSET}<${TAG}"
-    while [ "$1" != "" ] ; do
-      ATTR=$1; shift
-      TAGSTR="${TAGSTR} ${ATTR}"
-    done
-    TAGSTR="${TAGSTR}/>"
-    echo "${TAGSTR}" >> ${T_METADATAOUT}
-  fi
-}
-
-metaDataCloseTag ()
-{
-  TAG=$1
-  if [ "${TAG}" != "" ] ; then
-    if [ $T_OPENEDTAGS -gt 0 ] ; then
-      T_TAGOFFSET="`echo "$T_TAGOFFSET" | cut -b 3-`"
-      let T_OPENEDTAGS-=1
-    fi
-    TAGSTR="${T_TAGOFFSET}</${TAG}>"
-    echo "${TAGSTR}" >> ${T_METADATAOUT}
-  fi
-}
diff --git a/Tools/JobTransforms/include/patch.def b/Tools/JobTransforms/include/patch.def
deleted file mode 100755
index 32fa0acad9c2..000000000000
--- a/Tools/JobTransforms/include/patch.def
+++ /dev/null
@@ -1,38 +0,0 @@
-# Compile the patches for this AtlasRelease
-[ "$T_SRCPATH" = "" ] && T_SRCPATH=`dirname $0`/../src
-
-patchRelease ()
-{
-  [ "$T_PATCHES" = "" ] && T_PATCHES=AtlasReleasePatches-${T_RELEASE}.tar.gz
-  [ "$T_CMTSITE" = "" ] && T_CMTSITE="STANDALONE"
-  WORKING_DIR=$PWD
-
-  if [ -f ${T_SRCPATH}/${T_PATCHES} ] ; then
-    echo "Compiling patches from archive ${T_SRCPATH}/${T_PATCHES}"
-    tar xfz ${T_SRCPATH}/${T_PATCHES}
-    RELEASE=$T_RELEASE
-    cmt config
-    source setup.sh
-    cd TestRelease/*/cmt
-    cmt broadcast cmt config
-    source setup.sh
-    cmt broadcast gmake -s
-    retcode=$?
-    if [ ${retcode} -eq 0 ] ; then
-      retcode=0
-    else
-      echo "JobTransformsPatch  ERROR Compilation of ${T_PATCHES} patches failed"
-      retcode=10
-    fi
-    cd $WORKING_DIR
-    #cp -f ${CMTINSTALLAREA}/share/*.mac .
-    #cp -f ${CMTINSTALLAREA}/XML/* .
-    #cp -f ${CMTINSTALLAREA}/share/*.xml .
-    #cp -f ${CMTINSTALLAREA}/share/*.dtd .
-    #cp -f ${CMTINSTALLAREA}/share/*.txt .
-    #cp -f ${CMTINSTALLAREA}/share/management .
-    #cp -f ${CMTINSTALLAREA}/share/geometry .
-  fi
-
-  return ${retcode}
-}
diff --git a/Tools/JobTransforms/include/transformHelp.def b/Tools/JobTransforms/include/transformHelp.def
deleted file mode 100755
index 9e2fa9c220bd..000000000000
--- a/Tools/JobTransforms/include/transformHelp.def
+++ /dev/null
@@ -1,77 +0,0 @@
-help ()
-{
-  echo "Usage: $0 [option]"
-  echo "       OPTIONS:"
-  echo "            -b|--release-base <release base name>"
-  echo "                 Specify the release base name to use"
-  echo "            --bw"
-  echo "                 Don't display colors"
-  echo "            -C|--save-core"
-  echo "                 Save coredumps, if available"
-  echo "            -d|--data-path <path>"
-  echo "                 Force creating the output files in <path>/<subdir>"
-  echo "                 where <subdir> is created automatically"
-  echo "            --dataset <dataset num>"
-  echo "                 Specify the dataset number for this run"
-  echo "            --etamax <value>"
-  echo "                 Set the maximum eta for simulations"
-  echo "            --etamin <value>"
-  echo "                 Set the minimum eta for simulations"
-  echo "            -e|--events <num of events>"
-  echo "                 Number of events to process"
-  echo "            --first-event <event number>"
-  echo "                 First event to process"
-  echo "            -G|--grid <GRID flavour>"
-  echo "                 Enable GRID specific features"
-  echo "            -g|--guess-problem"
-  echo "                 Try to guess which kind of problem occurred if failing"
-  echo "            -H|--hist"
-  echo "                 Histogram name (if any)"
-  echo "            --ignore-crash"
-  echo "                 Ignore athena crashes"
-  echo "            --in-desc <description>"
-  echo "                 Input data description"
-  echo "            --in-path <path>"
-  echo "                 Path to the input data"
-  echo "            -i|--input <filename>"
-  echo "                 Input filename"
-  echo "            -l|--logfile"
-  echo "                 Log filename"
-  echo "            --min-bias-desc <description>"
-  echo "                 Minimum Bias, input data description"
-  echo "            -n|--no-stop"
-  echo "                 Don't stop testing when the first test fails"
-  echo "            -N|--ntuple"
-  echo "                 Name of the output ntuple (if any)"
-  echo "            --out-desc <description>"
-  echo "                 Output data description"
-  echo "            --out-path <path>"
-  echo "                 Path to store the output data"
-  echo "            -o|--output"
-  echo "                 Output filename"
-  echo "            -p|--path <path>"
-  echo "                 Specify the path to the SITEROOT of the installation"
-  echo "            -P|--prefix <prefix>"
-  echo "                 Prefix for input and output filenames"
-  echo "            --project <project name>"
-  echo "                 ATLAS project name to use"
-  echo "            --random <random seed>"
-  echo "                 Random seed for this run"
-  echo "            -r|--release <release version>"
-  echo "                 Specify the release version of the software to use"
-  echo "            -s|--scripts <path>"
-  echo "                 Specify the path to the scripts directory"
-  echo "            --sim-macro <macro filename>"
-  echo "                 Simulation macro filename"
-  echo "            --sim-params <simulation parameters>"
-  echo "                 Simulation parameters"
-  echo "            -t|--temp-path <path>"
-  echo "                 Path to the temp space, where to create a temp dir"
-  echo "            -v|--verbose"
-  echo "                 Be verbose"
-  echo "            -V|--version"
-  echo "                 Show the package version"
-  echo "            -h|-help"
-  echo "                 Print this help"
-  exit 2
-}
diff --git a/Tools/JobTransforms/include/transformOptions.def b/Tools/JobTransforms/include/transformOptions.def
deleted file mode 100755
index 425825385c19..000000000000
--- a/Tools/JobTransforms/include/transformOptions.def
+++ /dev/null
@@ -1,88 +0,0 @@
-# Function to show the version of the package
-showVersion ()
-{
-  echo
-  echo "========>>> Transformation info <<<========"
-  echo ">>> Path     : `dirname $0`"
-  echo ">>> Filename : `basename $0`"
-  echo ">>> Info     : $T_TRANSDESC v$T_TRANSVER"
-  echo ">>> Author   : $T_TRANSAUTH"
-  echo
-  return
-}
-
-# Function to setup the run time environment for KV
-kvtSetup ()
-{
-  if [ "$T_PROJECT" == "" ] ; then
-    T_DISTREL=${ATLAS_ROOT}/${T_RELEASEBASE}/${T_RELEASE}
-    source ${T_DISTREL}/Control/AthenaRunTime/*/cmt/setup.sh
-  else
-    T_DISTREL=${ATLAS_ROOT}/${T_PROJECT}/${T_RELEASE}
-    source ${T_DISTREL}/${T_PROJECT}RunTime/cmt/setup.sh
-  fi
-}
-
-# Defaults
-T_COLOR="yes"
-T_GUESSPROBLEM="no"
-T_IGNOREATHENACRASH="no"
-T_GRID=""
-T_NOSTOP="no"
-T_SAVECORE="no"
-T_TEMPPATH=/tmp
-VERBOSE="no"
-
-# Read options from the command line
-OPTS=`getopt -o Cd:i:gG:H:l:nN:o:p:P:r:b:s:t:vVh -l bw,data-path:,dataset:,etamax:,etamin:,events:,first-event:,grid:,guess-problem,hist:,ignore-crash,in-desc:,in-path:,input:,logfile:,min-bias-desc:,no-stop,ntuple:,out-desc:,out-path:,output:,path:,prefix:,project:,random:,release:,release-base:,save-core,scripts:,sim-macro:,sim-params:,temp-path:,verbose,version,help -- "$@"`
-                                                                                
-if [ $? != 0 ] ; then echo "Terminating..." ; fi
-                                                                                
-eval set -- "$OPTS"
-                                                                                
-while true ; do
-        case "$1" in
-		--bw)               T_COLOR="no"; shift;;
-		--data-path|-d)     T_DATAPATH=$2; shift 2;;
-		--dataset)          T_DATASET=$2; shift 2;;
-		--etamax)           T_ETAMAX=$2; shift 2;;
-		--etamin)           T_ETAMIN=$2; shift 2;;
-		--events)           T_NUMEVENTS=$2; shift 2;;
-		--first-event)      T_FIRSTEVENT=$2; shift 2;;
-		--grid|-G)          T_GRID="$2"; shift 2;;
-                --guess-problem|-g) T_GUESSPROBLEM="yes"; shift;;
-                --hist|-H)          T_HISFILE="$2"; shift 2;;
-                --ignore-crash)     T_IGNOREATHENACRASH="yes"; shift;;
-		--in-desc)          T_INDESC="$2"; shift 2;;
-		--in-path)          T_INPATH="$2"; shift 2;;
-		--input|-i)         T_INFILE="$2"; shift 2;;
-                --no-stop|-n)       T_NOSTOP="yes"; shift;;
-                --ntuple|-N)        T_NTUPLE="$2"; shift 2;;
-		--logfile|-l)       T_LOGFILE="$2"; shift 2;;
-		--min-bias-desc)    T_MBDESC="$2"; shift 2;;
-		--out-desc)         T_OUTDESC="$2"; shift 2;;
-		--out-path)         T_OUTPATH="$2"; shift 2;;
-		--output|-o)        T_OUTFILE="$2"; shift 2;;
-		--path|-p)          ATLAS_ROOT="$2"; shift 2;;
-		--prefix|-P)        T_PREFIX=$2; shift 2;;
-		--project)          T_PROJECT=$2; shift 2;;
-		--random)           T_RANDOM=$2; shift 2;;
-		--release|-r)       T_RELEASE="$2"; shift 2;;
-		--release-base|-b)  T_RELEASEBASE="$2"; shift 2;;
-		--save-core|-C)     T_SAVECORE="yes"; shift;;
-		--scripts|-s)       T_SCRIPTPATH=$2; shift 2;;
-		--sim-macro)        T_MACRO="$2"; shift 2;;
-		--sim-params)       T_PARAMS="$2"; shift 2;;
-		--temp-path|-t)     T_TEMPPATH="$2"; shift 2;;
-		--verbose|-v)       VERBOSE="yes"; shift;;
-		--version|-V)       showVersion; exit;;
-		--help|-h)          help;shift;;
-                --)                 shift ; break ;;
-                \?)                 break ;
-                exit ;;
-        esac
-done
-
-export T_IGNOREATHENACRASH
-export T_RELEASE
-export T_COLOR
diff --git a/Tools/JobTransforms/jobOptions/G4OptionsDC2/dc2_g4sim.py b/Tools/JobTransforms/jobOptions/G4OptionsDC2/dc2_g4sim.py
deleted file mode 100755
index 334b32bc353c..000000000000
--- a/Tools/JobTransforms/jobOptions/G4OptionsDC2/dc2_g4sim.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#==============================================================
-#
-# Job options file for GEANT4 Simulation, using 
-# Geo2G4 for the InnerDetector and the MuonSystem
-#
-# - reads Generator objects from the AthenaPool file
-# - converts them to transient objects
-# - performs GEANT4 simulation
-# - writes output (SimHits) via AthenaPool
-#==============================================================
-
-#--------------------------------------------------------------
-# Load POOL support 
-#--------------------------------------------------------------
-include ( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-#--------------------------------------------------------------
-# Options for reading from POOL (use POOL implicit collection)
-#--------------------------------------------------------------
-EventSelector = Service( "EventSelector" )
-EventSelector.InputCollections = PoolEvgenInput
-
-#--------------------------------------------------------------
-# Options for writing to POOL  
-#--------------------------------------------------------------
-include ( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
-
-theApp.OutStream     = [ "Stream1" ] 
-theApp.OutStreamType = "AthenaOutputStream" 
-
-Stream1 = Algorithm ( "Stream1" )
-Stream1.EvtConversionSvc = "AthenaPoolCnvSvc" 
-
-Stream1.OutputFile = PoolHitsOutput
-
-#--------------------------------------------------------------
-# Define output stream items  
-#--------------------------------------------------------------
-# Full list
-Stream1.ItemList += [ "EventInfo#*",                  
-                      "McEventCollection#*",
-                      "TrackRecordCollection#*",
-                      "SiHitCollection#*",
-                      "TRTUncompressedHitCollection#*",
-                      "TileHitVector#*",
-                      "LArHitContainer#*",
-                      "CaloCalibrationHitContainer#*",
-                      "RPCSimHitCollection#*",
-                      "TGCSimHitCollection#*",
-                      "CSCSimHitCollection#*",
-                      "MDTSimHitCollection#*" ]
-
-# hit AthenaPool converters
-include ( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-include ( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-include ( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-include ( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-include ( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-include ( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-
-theApp.Dlls += [ "GeneratorObjectsAthenaPoolPoolCnv" ]
-
-#--------------------------------------------------------------
-# Setting up and running GEANT4
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include ( "NovaCnvSvc/NovaCnvSvc_jobOptions.py" )
-include ( "NovaConverters/NovaConverters_jobOptions.py" )
-include ( "PartPropSvc/PartPropSvc.py" )
-include( "G4Svc/jobOptions.G4Svc.py" )
-
-# GeoModel stuff
-#--------------------------------------------------------------
-theApp.DLLs   += [ "Geo2G4" ]
-theApp.ExtSvc += [ "Geo2G4Svc" ]
-
-# GeoModel stuff
-#--------------------------------------------------------------
-include ("AtlasGeoModel/SetGeometryVersion.py")
-include ("AtlasGeoModel/GeoModelInit.py")
-GeoModelSvc.MuonDetectorTool.IncludeInertMaterials = 1
-
-theApp.Dlls   += [ "G4SimAlg" ]
-theApp.TopAlg += [ "G4SimAlg" ]
-
-#--------------------------------------------------------------
-# G4Svc options
-#--------------------------------------------------------------
-G4Svc = Service ( "G4Svc" )
-G4Svc.PhysicsList       = "none"
-G4Svc.SaveHits          =  FALSE
-G4Svc.Visualize         =  FALSE
-G4Svc.RunVerbosity      =      0
-G4Svc.EventVerbosity    =      0
-G4Svc.TrackingVerbosity =      0
-G4Svc.Listener          =  FALSE
-G4Svc.InteractiveG4     =  FALSE
-G4Svc.FADSMacro         = "AtlasGeoModel.mac:EtaPhiFilter_settings.mac:PhysicsList.mac:TimingActions.mac:TrackRecord.mac:MCTruth.mac"
-
-# G4SimAlg options
-#--------------------------------------------------------------
-G4SimAlg = Algorithm ( "G4SimAlg" )
-G4SimAlg.Dll = "G4PhysicsLists:G4UserActions"
-
-#--------------------------------------------------------------
-# Event-related parameters
-#--------------------------------------------------------------
-# Number of output events to be processed
-theApp.EvtMax = EvtMax
-
-# Number of input events to be skipped
-EventSelector.SkipEvents = SkipEvents
-
-
-#--------------------------------------------------------------
-# OUTPUT PRINTOUT LEVEL
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-# you can override this for individual modules if necessary
-#--------------------------------------------------------------
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = WARNING
-
-Stream1.OutputLevel = 5
-theApp.OutputLevel  = 5
-
-AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-AthenaPoolCnvSvc.OutputLevel = 5
-
-#==============================================================
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT.py
deleted file mode 100755
index cb3aed219388..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-##########################################################
-#
-# jobOptions to run Atlfast and fill the CBNT ntuple 
-#
-include( "PartPropSvc/PartPropSvc.py" )
-
-include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-theApp.Dlls += [ "CBNT_Truth" ]
-CBNT_Athena = Algorithm( "CBNT_Athena" )
-CBNT_Athena.Members += [ "CBNT_SpclMC"]; 
-#------------------------------------------------------------
-# Load main libraries
-#------------------------------------------------------------
-EventSelector = Service ( "EventSelector" )
-EventSelector.InputCollections = [ "McEvent.root" ]
-theApp.Dlls += [ "HbookCnv" ]
-#------------------------------------------------------------
-# Persistency services ntuples etc...
-#------------------------------------------------------------
-theApp.HistogramPersistency = "HBOOK"
-HistogramPersistencySvc = Service( "HistogramPersistencySvc" )
-HistogramPersistencySvc.OutputFile  = "atlfast.hbook"
-NtupleSvc = Service( "NtupleSvc" )
-NtupleSvc.Output = ["FILE1 DATAFILE='atlfast.ntup' TYP='HBOOK' OPT='NEW'"]
-HbookHistSvc = Service( "HbookHistSvc" )
-HbookHistSvc.NPAWC = 1500000 
-#------------------------------------------------------------
-# Number of events and OutputLevel
-#------------------------------------------------------------
-theApp.EvtMax                = 10
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel               = 2
-#------------------------------------------------------------
-# Monte Carlo Generators stuff
-#------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-theApp.Dlls   += [  "GeneratorObjectsAthenaPoolPoolCnv" ]
-#--------------------------------------------------------------
-# Setup Atlfast
-#--------------------------------------------------------------
-include( "AtlfastAlgs/Atlfast_CBNT.py" )
-
-CBNT_Athena.Members += [ "Atlfast::CBNT_Atlfast/CBNT_Atlfast" ]
-CBNT_Atlfast = Algorithm( "CBNT_Atlfast" )
-CBNT_Atlfast.NtupleLocID="/FILE1/CBNT/3333"
-#switch on/off ntuple blocks
-CBNT_Atlfast.FillIsolatedElectrons = TRUE
-CBNT_Atlfast.FillIsolatedPhotons   = TRUE
-CBNT_Atlfast.FillIsolatedMuons     = TRUE
-CBNT_Atlfast.FillNonIsolatedMuons  = TRUE
-CBNT_Atlfast.FillJets              = TRUE
-CBNT_Atlfast.FillJetsB             = TRUE
-CBNT_Atlfast.FillHistory           = FALSE
-CBNT_Atlfast.FillEventData         = TRUE
-GlobalEventDataMaker = Algorithm( "GlobalEventDataMaker" )
-GlobalEventDataMaker.Invisibles += [1000022]; # make susy LSP invisible
-AtlfastB = Algorithm( "AtlfastB" )
-AtlfastB.TauEff=1.0; # put this to 1.0 to simplify validation
-#--------------------------------------------------------------
-# Setup CBNT
-#--------------------------------------------------------------
-theApp.Dlls += [ "CBNT_Utils" ]
-theApp.Dlls += [ "CBNT_Athena" ]
-theApp.TopAlg += ["CBNT_Athena"]
-#==============================================================
-#
-# End of job options file
-#
-###############################################################
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT_root.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT_root.py
deleted file mode 100755
index 3f971e8ff88a..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/FromPooltoAltfasttoCBNT_root.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-##########################################################
-#
-# jobOptions to run Atlfast and fill the CBNT ntuple 
-#
-include( "PartPropSvc/PartPropSvc.py" )
-
-include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-theApp.Dlls += [ "CBNT_Truth" ]
-CBNT_Athena = Algorithm( "CBNT_Athena" )
-CBNT_Athena.Members += [ "CBNT_SpclMC"]; 
-#------------------------------------------------------------
-# Load main libraries
-#------------------------------------------------------------
-EventSelector = Service ( "EventSelector" )
-EventSelector.InputCollections = [ "McEvent.root" ]
-theApp.Dlls += [ "RootHistCnv" ]
-#------------------------------------------------------------
-# Persistency services ntuples etc...
-#------------------------------------------------------------
-theApp.HistogramPersistency = "ROOT"
-HistogramPersistencySvc = Service( "HistogramPersistencySvc" )
-HistogramPersistencySvc.OutputFile  = "atlfast.root"
-NtupleSvc = Service( "NtupleSvc" )
-NtupleSvc.Output = ["FILE1 DATAFILE='atlfast.ntup' TYP='ROOT' OPT='NEW'"]
-#------------------------------------------------------------
-# Number of events and OutputLevel
-#------------------------------------------------------------
-theApp.EvtMax                = 10
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel               = 2
-#------------------------------------------------------------
-# Monte Carlo Generators stuff
-#------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-theApp.Dlls   += [  "GeneratorObjectsAthenaPoolPoolCnv" ]
-#--------------------------------------------------------------
-# Setup Atlfast
-#--------------------------------------------------------------
-include( "AtlfastAlgs/Atlfast_CBNT.py" )
-
-CBNT_Athena.Members += [ "Atlfast::CBNT_Atlfast/CBNT_Atlfast" ]
-CBNT_Atlfast = Algorithm( "CBNT_Atlfast" )
-CBNT_Atlfast.NtupleLocID="/FILE1/CBNT/3333"
-#switch on/off ntuple blocks
-CBNT_Atlfast.FillIsolatedElectrons = TRUE
-CBNT_Atlfast.FillIsolatedPhotons   = TRUE
-CBNT_Atlfast.FillIsolatedMuons     = TRUE
-CBNT_Atlfast.FillNonIsolatedMuons  = TRUE
-CBNT_Atlfast.FillJets              = TRUE
-CBNT_Atlfast.FillJetsB             = TRUE
-CBNT_Atlfast.FillHistory           = FALSE
-CBNT_Atlfast.FillEventData         = TRUE
-GlobalEventDataMaker = Algorithm( "GlobalEventDataMaker" )
-GlobalEventDataMaker.Invisibles += [1000022]; # make susy LSP invisible
-AtlfastB = Algorithm( "AtlfastB" )
-AtlfastB.TauEff=1.0; # put this to 1.0 to simplify validation
-#--------------------------------------------------------------
-# Setup CBNT
-#--------------------------------------------------------------
-theApp.Dlls += [ "CBNT_Utils" ]
-theApp.Dlls += [ "CBNT_Athena" ]
-theApp.TopAlg += ["CBNT_Athena"]
-#==============================================================
-#
-# End of job options file
-#
-###############################################################
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_pool_out_frag.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_pool_out_frag.py
deleted file mode 100755
index b2795bee1f52..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_pool_out_frag.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
-
-theApp.Dlls   += [ "GeneratorObjectsAthenaPoolPoolCnv" ]
-Stream1 = Algorithm( "Stream1" )
-Stream1.ItemList += ["2101#*", "133273#*" ]
-#PoolSvc = Service( "PoolSvc" )
-#PoolSvc.Output = "McEvent.root"
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast.py
deleted file mode 100755
index c46f46eac6d5..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-include( "AtlfastAlgs/Atlfast_CBNT.py" )
-
-theApp.Dlls += [ "CBNT_Truth" ]
-CBNT_Athena = Algorithm( "CBNT_Athena" )
-CBNT_Athena.Members += [ "CBNT_SpclMC"]; 
-CBNT_Athena.Members += [ "Atlfast::CBNT_Atlfast/CBNT_Atlfast" ]
-CBNT_Atlfast = Algorithm( "CBNT_Atlfast" )
-CBNT_Atlfast.NtupleLocID="/FILE1/CBNT/3333"
-#switch on/off ntuple blocks
-CBNT_Atlfast.FillIsolatedElectrons = TRUE
-CBNT_Atlfast.FillIsolatedPhotons   = TRUE
-CBNT_Atlfast.FillIsolatedMuons     = TRUE
-CBNT_Atlfast.FillNonIsolatedMuons  = TRUE
-CBNT_Atlfast.FillJets              = TRUE
-CBNT_Atlfast.FillJetsB             = TRUE
-CBNT_Atlfast.FillHistory           = FALSE
-CBNT_Atlfast.FillEventData         = TRUE
-GlobalEventDataMaker = Algorithm( "GlobalEventDataMaker" )
-GlobalEventDataMaker.Invisibles += [1000022]; # make susy LSP invisible
-AtlfastB = Algorithm( "AtlfastB" )
-AtlfastB.TauEff=1.0; # put this to 1.0 to simplify validation
-#--------------------------------------------------------------
-# Setup CBNT
-#--------------------------------------------------------------
-theApp.Dlls += [ "CBNT_Utils" ]
-theApp.Dlls += [ "CBNT_Athena" ]
-theApp.TopAlg += ["CBNT_Athena"]
-# Histogram & Ntuple Persistency
-#--------------------------------------------------------------
-# Change the following line to "RootHistCnv" for ROOT persistency
-theApp.Dlls                += [ "HbookCnv" ]
-# Change the following line to "ROOT" for ROOT persistency
-theApp.HistogramPersistency = "HBOOK"
-HbookHistSvc = Service( "HbookHistSvc" )
-HbookHistSvc.NPAWC = 1500000 
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-#HistogramPersistencySvc.OutputFile  = "histo.hbook";
-NTupleSvc = Service( "NTupleSvc" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='atlfast.ntup' OPT='NEW' TYP='HBOOK'" ] 
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast_root.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast_root.py
deleted file mode 100755
index d99f476657b7..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/Generator_to_atlfast_root.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-include( "AtlfastAlgs/Atlfast_CBNT.py" )
-
-theApp.Dlls += [ "CBNT_Truth" ]
-CBNT_Athena = Algorithm( "CBNT_Athena" )
-CBNT_Athena.Members += [ "CBNT_SpclMC"]; 
-CBNT_Athena.Members += [ "Atlfast::CBNT_Atlfast/CBNT_Atlfast" ]
-CBNT_Atlfast = Algorithm( "CBNT_Atlfast" )
-CBNT_Atlfast.NtupleLocID="/FILE1/CBNT/3333"
-#switch on/off ntuple blocks
-CBNT_Atlfast.FillIsolatedElectrons = TRUE
-CBNT_Atlfast.FillIsolatedPhotons   = TRUE
-CBNT_Atlfast.FillIsolatedMuons     = TRUE
-CBNT_Atlfast.FillNonIsolatedMuons  = TRUE
-CBNT_Atlfast.FillJets              = TRUE
-CBNT_Atlfast.FillJetsB             = TRUE
-CBNT_Atlfast.FillHistory           = FALSE
-CBNT_Atlfast.FillEventData         = TRUE
-GlobalEventDataMaker = Algorithm( "GlobalEventDataMaker" )
-GlobalEventDataMaker.Invisibles += [1000022]; # make susy LSP invisible
-AtlfastB = Algorithm( "AtlfastB" )
-AtlfastB.TauEff=1.0; # put this to 1.0 to simplify validation
-#--------------------------------------------------------------
-# Setup CBNT
-#--------------------------------------------------------------
-theApp.Dlls += [ "CBNT_Utils" ]
-theApp.Dlls += [ "CBNT_Athena" ]
-theApp.TopAlg += ["CBNT_Athena"]
-# Histogram & Ntuple Persistency
-#--------------------------------------------------------------
-theApp.Dlls                += [ "RootHistCnv" ]
-theApp.HistogramPersistency = "ROOT"
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-NTupleSvc = Service( "NTupleSvc" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='atlfast.ntup' OPT='NEW' TYP='ROOT'" ]; 
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A10.pythia_Atautau.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A10.pythia_Atautau.py
deleted file mode 100755
index 5cacef640613..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A10.pythia_Atautau.py
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-# Generator fragement
-theApp.Dlls  += [ "TruthExamples", "Pythia_i","Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = ["Pythia", "Tauola", "Photos"]
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532",
-		   "TAUOLA 1048027510 345500367","TAUOLA_INIT 920021 3347532", 
-		   "PHOTOS 2045027510 245500367","PHOTOS_INIT 930021 3447532"]# AtRndmGenSvc.ReadFromFile = true;
-# A to tau tau
-#tauola used
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-                               "pysubs msel 0"
-                              ,"pysubs msub 186 1"
-                              ,"pysubs msub 187 1"
-                              ,"pyint2 kfpr 186 2 5"
-                              ,"pyint2 kfpr 187 2 5"
-                              ,"pymssm imss 1 1"
-                              ,"pymssm rmss 5 36."
-                              ,"pymssm rmss 19 800."
-                              ,"pydat3 mdme 420 1 0"
-                              ,"pydat3 mdme 421 1 0"
-                              ,"pydat3 mdme 422 1 0"
-                              ,"pydat3 mdme 423 1 0"
-                              ,"pydat3 mdme 424 1 0"
-                              ,"pydat3 mdme 425 1 0"
-                              ,"pydat3 mdme 426 1 0"
-                              ,"pydat3 mdme 427 1 0"
-                              ,"pydat3 mdme 428 1 0"
-                              ,"pydat3 mdme 429 1 0"
-                              ,"pydat3 mdme 430 1 1"
-                              ,"pydat3 mdme 432 1 0"
-                              ,"pydat3 mdme 433 1 0"
-                              ,"pydat3 mdme 434 1 0"
-                              ,"pydat3 mdme 435 1 0"
-                              ,"pydat3 mdme 436 1 0"
-                              ,"pydat3 mdme 437 1 0"
-                              ,"pydat3 mdme 438 1 0"
-                              ,"pydat3 mdme 439 1 0"
-                              ,"pydat3 mdme 440 1 0"
-                              ,"pydat3 mdme 441 1 0"
-                              ,"pydat3 mdme 442 1 0"
-                              ,"pydat3 mdme 443 1 0"
-                              ,"pydat3 mdme 444 1 0"
-                              ,"pydat3 mdme 445 1 0"
-                              ,"pydat3 mdme 446 1 0"
-                              ,"pydat3 mdme 447 1 0"
-                              ,"pydat3 mdme 448 1 0"
-                              ,"pydat3 mdme 449 1 0"
-                              ,"pydat3 mdme 450 1 0"
-                              ,"pydat3 mdme 451 1 0"
-                              ,"pydat3 mdme 452 1 0"
-                              ,"pydat3 mdme 453 1 0"
-                              ,"pydat3 mdme 454 1 0"
-                              ,"pydat3 mdme 455 1 0"
-                              ,"pydat3 mdme 456 1 0"
-                              ,"pydat3 mdme 457 1 0"
-                              ,"pydat3 mdme 458 1 0"
-                              ,"pydat3 mdme 459 1 0"
-                              ,"pydat3 mdme 460 1 0"
-                              ,"pydat3 mdme 461 1 0"
-                              ,"pydat3 mdme 462 1 0"
-                              ,"pydat3 mdme 463 1 0"
-                              ,"pydat3 mdme 464 1 0"
-                              ,"pydat3 mdme 465 1 0"
-                              ,"pydat3 mdme 466 1 0"
-                              ,"pydat3 mdme 467 1 0"
-                              ,"pydat3 mdme 468 1 0"
-                              ,"pydat3 mdme 469 1 0"
-                              ,"pydat3 mdme 470 1 0"
-                              ,"pydat3 mdme 471 1 0"
-                              ,"pydat3 mdme 472 1 0"
-                              ,"pydat3 mdme 473 1 0"
-                              ,"pydat3 mdme 474 1 0"
-                              ,"pydat3 mdme 475 1 0"
-                              ,"pydat3 mdme 476 1 0"
-                              ,"pydat3 mdme 477 1 0"
-                              ,"pydat3 mdme 478 1 0"
-                              ,"pydat3 mdme 479 1 0"
-                              ,"pydat3 mdme 480 1 0"
-                              ,"pydat3 mdme 481 1 0"
-                              ,"pydat3 mdme 482 1 0"
-                              ,"pydat3 mdme 483 1 0"
-                              ,"pydat3 mdme 484 1 0"
-                              ,"pydat3 mdme 485 1 0"
-                              ,"pydat3 mdme 486 1 0"
-                              ,"pydat3 mdme 487 1 0"
-                              ,"pydat3 mdme 488 1 0"
-                              ,"pydat3 mdme 489 1 0"
-                              ,"pydat3 mdme 490 1 0"
-                              ,"pydat3 mdme 491 1 0"
-                              ,"pydat3 mdme 492 1 0"
-                              ,"pydat3 mdme 493 1 0"
-                              ,"pydat3 mdme 494 1 0"
-                              ,"pydat3 mdme 495 1 0"
-                              ,"pydat3 mdme 496 1 0"
-                              ,"pydat3 mdme 497 1 0"
-                              ,"pydat3 mdme 498 1 0"
-                              ,"pydat3 mdme 499 1 0"
-			      ,"pydat3 mdme 500 1 0"
-			      ,"pydat3 mdme 501 1 0"
-			      ,"pydat3 mdme 502 1 0"
-                              ,"pydat3 mdcy 15 1 0"
-                              ,"pypars mstp 128 0"  
-                              ,"pyinit output junk800.dat"
-                              ,"pyinit dumpr 1 5"
-                              ,"pyinit pylistf 2",
-			      "pypars mstp 82 4",
-			      "pypars mstp 7 6",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5"]
-Tauola = Algorithm( "Tauola" )
-Tauola.TauolaCommand = [      "tauola polar 1",
-                              "tauola radcor 1",
-                              "tauola phox 0.01",
-                              "tauola dmode 0",
-			      "tauola jak1 0",
-                              "tauola jak2 0"]
-Photos = Algorithm( "Photos" )
-Photos.PhotosCommand = [      "photos pmode 2",
-			      "photos xphcut 0.01",
-			      "photos alpha -1.",
-			      "photos interf 1",
-			      "photos isec 1",
-			      "photos iftop 0"]
-# End of job options file
-#
-###############################################################
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A5_zjjMadcup_pythia.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A5_zjjMadcup_pythia.py
deleted file mode 100755
index 77550d29874e..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A5_zjjMadcup_pythia.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = ["pyinit user madcup"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A8_pythiaB.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A8_pythiaB.py
deleted file mode 100755
index 0393fd3bb945..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_A8_pythiaB.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# makes pythia events with a b jet or pt>15 and |eta|<2.5 
-theApp.Dlls += [ "TruthExamples", "PythiaB" ]
-theApp.Dlls += [ "GeneratorFilters" ]
-theApp.Dlls += [ "GaudiAud" ]
-theAuditorSvc = AuditorSvc()
-theAuditorSvc.Auditors  = [ "ChronoAuditor" ]
-theApp.TopAlg = ["PythiaB" ,  "BSignalFilter"]
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-#--------------------------------------------------------------				 
-#              PARAMETERS  SPECIFIC  TO   PYTHIAB
-#--------------------------------------------------------------
-PythiaB = Algorithm( "PythiaB" )
-PythiaB.ForceBDecay = "no"
-PythiaB.ForceCDecay = "no"
-#--------------------------------------------------------------
-# --------  PYTHIA PARAMETERS OPTIMAL FOR BEAUTY PRODUCTION  --
-#--------------------------------------------------------------
-#  'msel 5' is only for fast tests! 
-#  for correct b-producion you should use 'msel 1'
-# 'mstj 26 0' = no mixing
-# 'mstp 51 1' = CTEQ3(<-use this one)  'mstp 51 7' = CTEQ5
-include( "PythiaB/Btune.py" )
-
-PythiaB.PythiaCommand += ["pysubs ckin 3 15.",
-                                "pysubs ckin 9 -3.5",
-				"pysubs ckin 10 3.5",
-				"pysubs ckin 11 -3.5",
-				"pysubs ckin 12 3.5",
-				"pysubs msel 1",
-				"mstp 51 7",
-                                "pypars mstp 82 4",
-                               "pydat1 mstj 11 3",
-                                "pydat1 mstj 22 2",
-                               "pydat1 parj 54 -0.07",
-                              "pydat1 parj 55 -0.006",
-                              "pypars parp 82 1.8",
-                              "pypars parp 84 0.5"]
-#--------------------------------------------------------------
-# -------------  DEFINE SELECTION CUTS  -------------
-#--------------------------------------------------------------				
-#  ------------- Selections on b  quarks   -------------
-# simulate  only b-flavour events
-PythiaB.flavour =  5.
-# PythiaB force exclusive decay channels only on b=-5 side 
-# ------------------- b=5  --- and/or ---  b=-5 --------
-PythiaB.cutbq = ["15. 2.5 or 15. 2.5"]
-#  ------------- LVL1 muon cuts 0=OFF 1=ON -------------
-PythiaB.lvl1cut = [ 0.,  6., 2.5]
-#  ------------- LVL2 muon/electron cuts  0=OFF 1=ON-------------
-PythiaB.lvl2cut = [ 0.,  13.,     6.,   2.5]
-#PythiaB.lvl2cut = { 0.,  11.,     6.,   2.5};
-#  ------------- Offline cuts 0=OFF 1=ON -------------
-PythiaB.offcut = [ 0., 0.5, 2.5, 3., 2.5, 0.5, 2.5]
-#  ------------- Number of repeated hadronization mhadr -------------
-#PythiaB.mhadr =  14. ;
-#  ------------- For how many events store B-chain in NTUPLE -------------
-BSignalFilter = Algorithm( "BSignalFilter" )
-BSignalFilter.SignaltoNtup = 50
-#  ------------- For how many events store B-chain in ascii -------------
-PythiaB.SignalDumptoAscii =  50.
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_B3_pythia_Bmumu.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_B3_pythia_Bmumu.py
deleted file mode 100755
index 3db4c47d9e72..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_B3_pythia_Bmumu.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-#
-# Job options file for generation of B-events 
-#  in user selected exclusive channel
-theApp.Dlls += [ "TruthExamples", "PythiaB" ]
-theApp.Dlls += [ "GeneratorFilters" ]
-#--------------------------------------------------------------
-# Algorithms 
-#--------------------------------------------------------------
-theApp.TopAlg = ["PythiaB" ,  "BSignalFilter"]
-theApp.ExtSvc += ["AtRndmGenSvc"]
-#--------------------------------------------------------------
-# Number of events to be accepted !! (default is 10)
-# re-written if use B job submition script
-# RunNumber, FirstEvent re-written if use B job submition script
-#--------------------------------------------------------------
-theApp.EvtMax = 25000
-EventSelector = Service( "EventSelector" )
-EventSelector.RunNumber   = 1
-EventSelector.FirstEvent  = 1
-#--------------------------------------------------------------
-#User random number seeds - re-written if use B job submition script
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel               = 3
-#--------------------------------------------------------------				 
-#              PARAMETERS  SPECIFIC  TO   PYTHIAB
-#--------------------------------------------------------------
-#PythiaB.ForceBDecay = "no";
-PythiaB = Algorithm( "PythiaB" )
-PythiaB.ForceCDecay = "no"
-#--------------------------------------------------------------				 
-# -------------  FORCE   YOUR  B CHANNEL  HERE -------------
-#--------------------------------------------------------------
-# To force your B-decay channels decomment following 2 lines:
-include( "PythiaB/CloseAntibQuark.py" )
-
-PythiaB.ForceBDecay = "yes"
-#   T H R E E   E X A M P L E S    T O   O P E N    Y O U R    C H A N N E L 				 
-#   Decomment one of following examples or create your analogically
-# open your exclusive channel here  Bs -> mumu 				 
-PythiaB.PythiaCommand += ["pydat3 mdme 977 1 1",    
-				"pydat3 kfdp 977 1 13",
-				"pydat3 kfdp 977 2 -13"        ]
-# open your exclusive channel here  Bs -> Ds pi with Ds->phi pi
-##include "Dsphipi.txt" 				 
-#PythiaB.PythiaCommand += {"pydat3 mdme 967 1 1",
-#                                "pydat3 mdme 831 1 1"      };
-#PythiaB.ForceCDecay = "yes";                                
-# open your exclusive channel here  Bs -> J/psi(mumu) K0 
-#PythiaB.PythiaCommand += {"pydat3 mdme 889 1 1",    
-#				"pydat3 mdme 858 1 0",
-#				"pydat3 mdme 860 1 0"        };
-#--------------------------------------------------------------
-# --------  PYTHIA PARAMETERS OPTIMAL FOR BEAUTY PRODUCTION  --
-#--------------------------------------------------------------
-#  'msel 5' is only for fast tests! 
-#  for correct b-producion you should use 'msel 1'
-# 'mstj 26 0' = no mixing
-# 'mstp 51 1' = CTEQ3(<-use this one)  'mstp 51 7' = CTEQ5
-include( "PythiaB/Btune.py" )
-
-PythiaB.PythiaCommand += ["pysubs ckin 3 15.",
-                                "pysubs ckin 9 -3.5",
-				"pysubs ckin 10 3.5",
-				"pysubs ckin 11 -3.5",
-				"pysubs ckin 12 3.5",
-				 "pysubs msel 1"]
-#--------------------------------------------------------------
-# -------------  DEFINE SELECTION CUTS  -------------
-#--------------------------------------------------------------				
-#  ------------- Selections on b  quarks   -------------
-# simulate  only b-flavour events
-PythiaB.flavour =  5.
-# PythiaB force exclusive decay channels only on b=-5 side 
-# ------------------- b=5  --- and/or ---  b=-5 --------
-PythiaB.cutbq = ["0. 102.5 and 10. 2.5"]
-#  ------------- LVL1 muon cuts 0=OFF 1=ON -------------
-PythiaB.lvl1cut = [ 1.,  6., 2.5]
-#  ------------- LVL2 muon/electron cuts  0=OFF 1=ON-------------
-PythiaB.lvl2cut = [ 0.,  13.,     6.,   2.5]
-#PythiaB.lvl2cut = { 0.,  11.,     6.,   2.5};
-#  ------------- Offline cuts 0=OFF 1=ON -------------
-PythiaB.offcut = [ 1., 0.5, 2.5, 6., 2.5, 0.5, 2.5]
-#  ------------- Number of repeated hadronization mhadr -------------
-PythiaB.mhadr =  14. 
-#  ------------- For how many events store B-chain in NTUPLE -------------
-BSignalFilter = Algorithm( "BSignalFilter" )
-BSignalFilter.SignaltoNtup = 50
-#  ------------- For how many events store B-chain in ascii -------------
-PythiaB.SignalDumptoAscii =  5.
-# End of job options file
-#
-###############################################################
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ1_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ1_pythia_jetjet.py
deleted file mode 100755
index 3a12dfaa4315..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ1_pythia_jetjet.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 32.6.",
-			      "pysubs ckin 13 2.5",
-			      "pysubs ckin 14 5",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ2_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ2_pythia_jetjet.py
deleted file mode 100755
index f47656016b35..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ2_pythia_jetjet.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 81.5",
-			      "pysubs ckin 13 2.5",
-			      "pysubs ckin 14 5",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ3_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ3_pythia_jetjet.py
deleted file mode 100755
index aa2ec3d73066..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ3_pythia_jetjet.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 163.",
-			      "pysubs ckin 13 2.5",
-			      "pysubs ckin 14 5",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ4_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ4_pythia_jetjet.py
deleted file mode 100755
index a78125b2f109..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_FJ4_pythia_jetjet.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 326.",
-			      "pysubs ckin 13 2.5",
-			      "pysubs ckin 14 5",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_filter_frag.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_filter_frag.py
deleted file mode 100755
index f2630a1446de..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_filter_frag.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-Filter = Algorithm( "Filter" )
-Filter.Members = ["MultiLeptonFilter"]
-MultiLeptonFilter = Algorithm( "MultiLeptonFilter" )
-MultiLeptonFilter.NLeptons = 1
-MultiLeptonFilter.Etacut = 2.7
-MultiLeptonFilter.Ptcut = 5000.
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_pythia_VBF_Hww.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_pythia_VBF_Hww.py
deleted file mode 100755
index 0c113d149f90..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H5_pythia_VBF_Hww.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-# VBF higgs to WW mass 170, one W decay leptonically, other hadronically.
-theApp.Dlls  += [ "TruthExamples", "Pythia_i"]
-theApp.TopAlg = ["Pythia"]
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]; 
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = ["pydatr mrpy 1 8834",
-                              "pyinit pylisti 12",
-                              "pyinit pylistf 1",
-                              "pyinit dumpr 1 5",
-                              "pystat 1 3 4 5", 
-                              "pypars mstp 128 0",
-			      "pysubs msel 0",
-			      "pysubs msub 123 1",  
-			      "pysubs msub 124 1",  
-			      "pydat2 pmas 25 1 170.",
-			      "pydat3 mdme 210 1 0",
-			      "pydat3 mdme 211 1 0",
-			      "pydat3 mdme 212 1 0",
-			      "pydat3 mdme 213 1 0",
-			      "pydat3 mdme 214 1 0",
-			      "pydat3 mdme 215 1 0",
-			      "pydat3 mdme 216 1 0",
-			      "pydat3 mdme 217 1 0",
-			      "pydat3 mdme 218 1 0",
-			      "pydat3 mdme 219 1 0",
-			      "pydat3 mdme 220 1 0",
-			      "pydat3 mdme 221 1 0",
-			      "pydat3 mdme 222 1 0",
-			      "pydat3 mdme 223 1 0",
-			      "pydat3 mdme 224 1 0",
-			      "pydat3 mdme 225 1 0",
-			      "pydat3 mdme 226 1 1",
-			      "pydat3 mdme 227 1 0",
-			      "pydat3 mdme 228 1 0",
-			      "pydat3 mdme 229 1 0",
-			      "pydat3 mdme 230 1 0",
-			      "pydat3 mdme 231 1 0",
-			      "pydat3 mdme 232 1 0",
-			      "pydat3 mdme 233 1 0",
-			      "pydat3 mdme 234 1 0",
-			      "pydat3 mdme 235 1 0",
-			      "pydat3 mdme 236 1 0",
-			      "pydat3 mdme 237 1 0",
-			      "pydat3 mdme 238 1 0",
-			      "pydat3 mdme 239 1 0",
-			      "pydat3 mdme 240 1 0",
-			      "pydat3 mdme 241 1 0",
-			      "pydat3 mdme 242 1 0",
-			      "pydat3 mdme 243 1 0",
-			      "pydat3 mdme 244 1 0",
-			      "pydat3 mdme 245 1 0",
-			      "pydat3 mdme 246 1 0",
-			      "pydat3 mdme 247 1 0",
-			      "pydat3 mdme 248 1 0",
-			      "pydat3 mdme 249 1 0",
-			      "pydat3 mdme 250 1 0",
-			      "pydat3 mdme 251 1 0",
-			      "pydat3 mdme 252 1 0",
-			      "pydat3 mdme 253 1 0",
-			      "pydat3 mdme 254 1 0",
-			      "pydat3 mdme 255 1 0",
-			      "pydat3 mdme 256 1 0",
-			      "pydat3 mdme 257 1 0",
-			      "pydat3 mdme 258 1 0",
-			      "pydat3 mdme 259 1 0",
-			      "pydat3 mdme 260 1 0",
-			      "pydat3 mdme 261 1 0",
-			      "pydat3 mdme 262 1 0",
-			      "pydat3 mdme 263 1 0",
-			      "pydat3 mdme 264 1 0",
-			      "pydat3 mdme 265 1 0",
-			      "pydat3 mdme 266 1 0",
-			      "pydat3 mdme 267 1 0",
-			      "pydat3 mdme 268 1 0",
-			      "pydat3 mdme 269 1 0",
-			      "pydat3 mdme 270 1 0",
-			      "pydat3 mdme 271 1 0",
-			      "pydat3 mdme 272 1 0",
-			      "pydat3 mdme 273 1 0",
-			      "pydat3 mdme 274 1 0",
-			      "pydat3 mdme 275 1 0",
-			      "pydat3 mdme 276 1 0",
-			      "pydat3 mdme 277 1 0",
-			      "pydat3 mdme 278 1 0",
-			      "pydat3 mdme 279 1 0",
-			      "pydat3 mdme 280 1 0",
-			      "pydat3 mdme 281 1 0",
-			      "pydat3 mdme 282 1 0",
-			      "pydat3 mdme 283 1 0",
-			      "pydat3 mdme 284 1 0",
-			      "pydat3 mdme 285 1 0",
-			      "pydat3 mdme 286 1 0",
-			      "pydat3 mdme 287 1 0",
-			      "pydat3 mdme 288 1 0",
-			      "pydat1 mstj 22 2",
-			      "pydat1 mstj 11 3",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars mstp 82 4",
-         			"pypars parp 82 1.8",
-			      "pypars parp 84 0.5"]
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H8_pythia_Abb.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H8_pythia_Abb.py
deleted file mode 100755
index 28d299e85f83..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H8_pythia_Abb.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-# MSSM H to bbA to bbar mass of 130.
-theApp.Dlls  += [ "TruthExamples", "Pythia_i"]
-theApp.TopAlg = ["Pythia"]
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 7055 6790", " PYTHIA_INIT 2956 6616"]
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = ["pydatr mrpy 1 2912",
-                              "pyinit pylisti 12",
-                              "pyinit pylistf 5",
-                              "pyinit dumpr 1 1",
-                              "pystat 1 3 4 5",
-                              "pypars mstp 128 0",
-         "pysubs msel 0",
-         "pysubs msub 186 1",
-         "pysubs msub 187 1",
-         "pyint2 kfpr 186 2 5",
-         "pyint2 kfpr 187 2 5",
-         "pysubs ckin 51 10",
-         "pysubs ckin 52 -1",
-         "pysubs ckin 53 10",
-         "pysubs ckin 54 -1",
-         "pymssm imss 1 1",
-         "pymssm imss 4 1",
-         "pymssm rmss 5 30",
-         "pymssm rmss 19 300",
-         "pydat3 mdme 420 1 0",
-         "pydat3 mdme 421 1 0",
-         "pydat3 mdme 422 1 0",
-         "pydat3 mdme 423 1 0",
-         "pydat3 mdme 424 1 0",
-         "pydat3 mdme 425 1 0",
-         "pydat3 mdme 426 1 0",
-         "pydat3 mdme 427 1 0",
-         "pydat3 mdme 428 1 0",
-         "pydat3 mdme 429 1 1",
-         "pydat3 mdme 430 1 0",
-         "pydat3 mdme 431 1 0",
-         "pydat3 mdme 432 1 0",
-         "pydat3 mdme 433 1 0",
-         "pydat3 mdme 434 1 0",
-         "pydat3 mdme 435 1 0",
-         "pydat3 mdme 436 1 0",
-         "pydat3 mdme 437 1 0",
-         "pydat3 mdme 438 1 0",
-         "pydat3 mdme 439 1 0",
-         "pydat3 mdme 440 1 0",
-         "pydat3 mdme 441 1 0",
-         "pydat3 mdme 442 1 0",
-         "pydat3 mdme 443 1 0",
-         "pydat3 mdme 444 1 0",
-         "pydat3 mdme 445 1 0",
-         "pydat3 mdme 446 1 0",
-         "pydat3 mdme 447 1 0",
-         "pydat3 mdme 448 1 0",
-         "pydat3 mdme 449 1 0",
-         "pydat3 mdme 450 1 0",
-         "pydat3 mdme 451 1 0",
-         "pydat3 mdme 452 1 0",
-         "pydat3 mdme 453 1 0",
-         "pydat3 mdme 454 1 0",
-         "pydat3 mdme 455 1 0",
-         "pydat3 mdme 456 1 0",
-         "pydat3 mdme 457 1 0",
-         "pydat3 mdme 458 1 0",
-         "pydat3 mdme 459 1 0",
-         "pydat3 mdme 460 1 0",
-         "pydat3 mdme 461 1 0",
-         "pydat3 mdme 462 1 0",
-         "pydat3 mdme 463 1 0",
-         "pydat3 mdme 464 1 0",
-         "pydat3 mdme 465 1 0",
-         "pydat3 mdme 466 1 0",
-         "pydat3 mdme 467 1 0",
-         "pydat3 mdme 468 1 0",
-         "pydat3 mdme 469 1 0",
-         "pydat3 mdme 470 1 0",
-         "pydat3 mdme 471 1 0",
-         "pydat3 mdme 472 1 0",
-         "pydat3 mdme 473 1 0",
-         "pydat3 mdme 474 1 0",
-         "pydat3 mdme 475 1 0",
-         "pydat3 mdme 476 1 0",
-         "pydat3 mdme 477 1 0",
-         "pydat3 mdme 478 1 0",
-         "pydat3 mdme 479 1 0",
-         "pydat3 mdme 480 1 0",
-         "pydat3 mdme 481 1 0",
-         "pydat3 mdme 482 1 0",
-         "pydat3 mdme 483 1 0",
-         "pydat3 mdme 484 1 0",
-         "pydat3 mdme 485 1 0",
-         "pydat3 mdme 486 1 0",
-         "pydat3 mdme 487 1 0",
-         "pydat3 mdme 488 1 0",
-         "pydat3 mdme 489 1 0",
-         "pydat3 mdme 490 1 0",
-         "pydat3 mdme 491 1 0",
-         "pydat3 mdme 492 1 0",
-         "pydat3 mdme 493 1 0",
-         "pydat3 mdme 494 1 0",
-         "pydat3 mdme 495 1 0",
-         "pydat3 mdme 496 1 0",
-         "pydat3 mdme 497 1 0",
-         "pydat3 mdme 498 1 0",
-         "pydat3 mdme 499 1 0",
-         "pydat3 mdme 500 1 0",
-         "pydat3 mdme 501 1 0",
-         "pydat3 mdme 502 1 0",
-         "pydat1 mstj 22 2",
-         "pydat1 mstj 11 3",
-         "pydat1 parj 54 -0.07",
-         "pydat1 parj 55 -0.006",
-         "pypars mstp 82 4",
-         "pypars parp 82 1.8",
-         "pypars parp 84 0.5"]
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H9_pythia_Abb.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H9_pythia_Abb.py
deleted file mode 100755
index 3ed6ba825cce..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_H9_pythia_Abb.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-# MSSM H to bbA to bbar mass of 115.
-theApp.Dlls  += [ "TruthExamples", "Pythia_i"]
-theApp.TopAlg = ["Pythia"]
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 7055 6790", " PYTHIA_INIT 2956 6616"]
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = ["pydatr mrpy 1 2912",
-                              "pyinit pylisti 12",
-                              "pyinit pylistf 5",
-                              "pyinit dumpr 1 1",
-                              "pystat 1 3 4 5",
-                              "pypars mstp 128 0",
-         "pysubs msel 0",
-         "pysubs msub 186 1",
-         "pysubs msub 187 1",
-         "pyint2 kfpr 186 2 5",
-         "pyint2 kfpr 187 2 5",
-          "pysubs ckin 3  10",
-         "pysubs ckin 51 10",
-         "pysubs ckin 52 -1",
-         "pysubs ckin 53 10",
-         "pysubs ckin 54 -1",
-         "pymssm imss 1 1",
-         "pymssm imss 4 1",
-         "pymssm rmss 5 30",
-         "pymssm rmss 19 500",
-         "pydat3 mdme 420 1 0",
-         "pydat3 mdme 421 1 0",
-         "pydat3 mdme 422 1 0",
-         "pydat3 mdme 423 1 0",
-         "pydat3 mdme 424 1 1",
-         "pydat3 mdme 425 1 0",
-         "pydat3 mdme 426 1 0",
-         "pydat3 mdme 427 1 0",
-         "pydat3 mdme 428 1 0",
-         "pydat3 mdme 429 1 0",
-         "pydat3 mdme 430 1 0",
-         "pydat3 mdme 431 1 0",
-         "pydat3 mdme 432 1 0",
-         "pydat3 mdme 433 1 0",
-         "pydat3 mdme 434 1 0",
-         "pydat3 mdme 435 1 0",
-         "pydat3 mdme 436 1 0",
-         "pydat3 mdme 437 1 0",
-         "pydat3 mdme 438 1 0",
-         "pydat3 mdme 439 1 0",
-         "pydat3 mdme 440 1 0",
-         "pydat3 mdme 441 1 0",
-         "pydat3 mdme 442 1 0",
-         "pydat3 mdme 443 1 0",
-         "pydat3 mdme 444 1 0",
-         "pydat3 mdme 445 1 0",
-         "pydat3 mdme 446 1 0",
-         "pydat3 mdme 447 1 0",
-         "pydat3 mdme 448 1 0",
-         "pydat3 mdme 449 1 0",
-         "pydat3 mdme 450 1 0",
-         "pydat3 mdme 451 1 0",
-         "pydat3 mdme 452 1 0",
-         "pydat3 mdme 453 1 0",
-         "pydat3 mdme 454 1 0",
-         "pydat3 mdme 455 1 0",
-         "pydat3 mdme 456 1 0",
-         "pydat3 mdme 457 1 0",
-         "pydat3 mdme 458 1 0",
-         "pydat3 mdme 459 1 0",
-         "pydat3 mdme 460 1 0",
-         "pydat3 mdme 461 1 0",
-         "pydat3 mdme 462 1 0",
-         "pydat3 mdme 463 1 0",
-         "pydat3 mdme 464 1 0",
-         "pydat3 mdme 465 1 0",
-         "pydat3 mdme 466 1 0",
-         "pydat3 mdme 467 1 0",
-         "pydat3 mdme 468 1 0",
-         "pydat3 mdme 469 1 0",
-         "pydat3 mdme 470 1 0",
-         "pydat3 mdme 471 1 0",
-         "pydat3 mdme 472 1 0",
-         "pydat3 mdme 473 1 0",
-         "pydat3 mdme 474 1 0",
-         "pydat3 mdme 475 1 0",
-         "pydat3 mdme 476 1 0",
-         "pydat3 mdme 477 1 0",
-         "pydat3 mdme 478 1 0",
-         "pydat3 mdme 479 1 0",
-         "pydat3 mdme 480 1 0",
-         "pydat3 mdme 481 1 0",
-         "pydat3 mdme 482 1 0",
-         "pydat3 mdme 483 1 0",
-         "pydat3 mdme 484 1 0",
-         "pydat3 mdme 485 1 0",
-         "pydat3 mdme 486 1 0",
-         "pydat3 mdme 487 1 0",
-         "pydat3 mdme 488 1 0",
-         "pydat3 mdme 489 1 0",
-         "pydat3 mdme 490 1 0",
-         "pydat3 mdme 491 1 0",
-         "pydat3 mdme 492 1 0",
-         "pydat3 mdme 493 1 0",
-         "pydat3 mdme 494 1 0",
-         "pydat3 mdme 495 1 0",
-         "pydat3 mdme 496 1 0",
-         "pydat3 mdme 497 1 0",
-         "pydat3 mdme 498 1 0",
-         "pydat3 mdme 499 1 0",
-         "pydat3 mdme 500 1 0",
-         "pydat3 mdme 501 1 0",
-         "pydat3 mdme 502 1 0",
-         "pydat1 mstj 22 2",
-         "pydat1 mstj 11 3",
-         "pydat1 parj 54 -0.07",
-         "pydat1 parj 55 -0.006",
-         "pypars mstp 82 4",
-         "pypars parp 82 1.8",
-         "pypars parp 84 0.5"]
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J1_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J1_pythia_jetjet.py
deleted file mode 100755
index 676f835cdf0b..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J1_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 17.",
-			      "pysubs ckin 4 35.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J2_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J2_pythia_jetjet.py
deleted file mode 100755
index a3ea5c1af0a8..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J2_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 35.",
-			      "pysubs ckin 4 70.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J3_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J3_pythia_jetjet.py
deleted file mode 100755
index 6d0189fa3d14..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J3_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 70.",
-			      "pysubs ckin 4 140.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J4_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J4_pythia_jetjet.py
deleted file mode 100755
index 46b20fea2abc..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J4_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 140.",
-			      "pysubs ckin 4 280.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J5_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J5_pythia_jetjet.py
deleted file mode 100755
index 1079653b0e52..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J5_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 280.",
-			      "pysubs ckin 4 560.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J6_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J6_pythia_jetjet.py
deleted file mode 100755
index 1e20f1228783..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J6_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 560.",
-			      "pysubs ckin 4 1120.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J7_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J7_pythia_jetjet.py
deleted file mode 100755
index e4ef6bcbfef7..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J7_pythia_jetjet.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 1120.",
-			      "pysubs ckin 4 2240.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J8_pythia_jetjet.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J8_pythia_jetjet.py
deleted file mode 100755
index fdf48463d08a..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_J8_pythia_jetjet.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# dijet production with pythia
-theApp.Dlls  += [ "TruthExamples", "Pythia_i" ]
-theApp.TopAlg = ["Pythia"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-# AtRndmGenSvc.ReadFromFile = true;
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = [
-			      "pysubs msel 0",
-			      "pysubs ckin 3 2240.",
-			      "pysubs msub 11 1",
-			      "pysubs msub 12 1",
-			      "pysubs msub 13 1",
-			      "pysubs msub 68 1",
-			      "pysubs msub 28 1",
-			      "pysubs msub 53 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5",
-			      "pyinit pylisti 12",
-			      "pyinit pylistf 1",
-			      "pystat 1 3 4 5",
-			      "pyinit dumpr 1 5",
-			      "pypars mstp 128 0"]
-#---------------------------------------------------------------
-#---------------------------------------------------------------
diff --git a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_M1_pythia_minbias.py b/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_M1_pythia_minbias.py
deleted file mode 100755
index 5fa027fe5bf8..000000000000
--- a/Tools/JobTransforms/jobOptions/GeneratorOptionsDC2/dc2_M1_pythia_minbias.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#min bias sample.
-theApp.Dlls  += [ "Pythia_i"]
-theApp.TopAlg = ["Pythia"]
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand= [	 "pysubs msel 1",
-			      "pypars mstp 82 4",
-			      "pydat1 mstj 11 3",
-			      "pydat1 mstj 22 2",
-			      "pydat1 parj 54 -0.07",
-			      "pydat1 parj 55 -0.006",
-			      "pypars parp 82 1.8",
-			      "pypars parp 84 0.5"]
-#---------------------------------------------------------------
-# Ntuple service output
-#---------------------------------------------------------------
-#==============================================================
-#
-# End of job options file
-#
-###############################################################
diff --git a/Tools/JobTransforms/share/AthExHelloWorld.kvt b/Tools/JobTransforms/share/AthExHelloWorld.kvt
deleted file mode 100755
index 5a6bc65d08e8..000000000000
--- a/Tools/JobTransforms/share/AthExHelloWorld.kvt
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-##set -x
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AthExHelloWorld"
-T_TRANSVER=1.1.0
-T_TRANSDESC="Athena Hello World"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##       Starting athena HelloWorld           ##"
-  echo "################################################"
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthExHelloWorld.trf &> ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthExHelloWorld.trf b/Tools/JobTransforms/share/AthExHelloWorld.trf
deleted file mode 100755
index 81ffb6ae845b..000000000000
--- a/Tools/JobTransforms/share/AthExHelloWorld.trf
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Run athena HelloWorld
-athena.py AthExHelloWorld/HelloWorldOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloCluster.kvt b/Tools/JobTransforms/share/AthenaPoolCaloCluster.kvt
deleted file mode 100755
index a48b90e7e0cb..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloCluster.kvt
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AthenaPoolCaloCluster"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Athena Pool Test (CaloCluster)"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##          Starting athena POOL tests        ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolCaloClusterWriter.trf &> ${T_TMPDIR}/${T_LOGFILE}.0
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.0 > ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool CaloClusterWriter"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolCaloClusterReader.trf &> ${T_TMPDIR}/${T_LOGFILE}.1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.1 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool CaloClusterReader"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit ${overall_retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloCluster2StepReader.trf b/Tools/JobTransforms/share/AthenaPoolCaloCluster2StepReader.trf
deleted file mode 100755
index 9df5ba03c52d..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloCluster2StepReader.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/CaloCluster2StepReader_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloClusterReader.trf b/Tools/JobTransforms/share/AthenaPoolCaloClusterReader.trf
deleted file mode 100755
index 35d2fdb13637..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloClusterReader.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/CaloClusterReader_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloClusterStep1Writer.trf b/Tools/JobTransforms/share/AthenaPoolCaloClusterStep1Writer.trf
deleted file mode 100755
index 3b8bc8fbe364..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloClusterStep1Writer.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/CaloClusterStep1Writer_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloClusterStep2Writer.trf b/Tools/JobTransforms/share/AthenaPoolCaloClusterStep2Writer.trf
deleted file mode 100755
index e96934fe548d..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloClusterStep2Writer.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/CaloClusterStep2Writer_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolCaloClusterWriter.trf b/Tools/JobTransforms/share/AthenaPoolCaloClusterWriter.trf
deleted file mode 100755
index 8e7b3b980469..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolCaloClusterWriter.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/CaloClusterWriter_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolElementLinks.kvt b/Tools/JobTransforms/share/AthenaPoolElementLinks.kvt
deleted file mode 100755
index 9de42a894cfd..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolElementLinks.kvt
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AthenaPoolTestElementLinks"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Athena Pool Test (ElementLinks across files)"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##          Starting athena POOL tests        ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolCaloClusterStep1Writer.trf &> ${T_TMPDIR}/${T_LOGFILE}.0
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.0 > ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool CaloClusterStep1Writer"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolCaloClusterStep2Writer.trf &> ${T_TMPDIR}/${T_LOGFILE}.1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.1 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool CaloClusterStep2Writer"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolCaloCluster2StepReader.trf &> ${T_TMPDIR}/${T_LOGFILE}.2
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.2 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool CaloCluster2StepReader"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit ${overall_retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolEventInfoRead.trf b/Tools/JobTransforms/share/AthenaPoolEventInfoRead.trf
deleted file mode 100755
index 8162006ed301..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolEventInfoRead.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="11.0.2"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/EventInfoRead.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolEventInfoWrite.trf b/Tools/JobTransforms/share/AthenaPoolEventInfoWrite.trf
deleted file mode 100755
index dd6472303bb9..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolEventInfoWrite.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="11.0.2"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/EventInfoWrite.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep2.trf b/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep2.trf
deleted file mode 100755
index ddb713101fe4..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep2.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="11.0.2"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/EventInfoWriteStep2.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep3.trf b/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep3.trf
deleted file mode 100755
index 86c9be6a331c..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep3.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="11.0.2"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/EventInfoWriteStep3.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep4.trf b/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep4.trf
deleted file mode 100755
index d5390acc5ea0..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolEventInfoWriteStep4.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="11.0.2"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/EventInfoWriteStep4.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolInDetRawDataReader.trf b/Tools/JobTransforms/share/AthenaPoolInDetRawDataReader.trf
deleted file mode 100755
index 9857f9d65657..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolInDetRawDataReader.trf
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-athena.py AthenaPoolTest/InDetRawDataReader_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolInDetRawDataWriter.trf b/Tools/JobTransforms/share/AthenaPoolInDetRawDataWriter.trf
deleted file mode 100755
index 028f6963a7f5..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolInDetRawDataWriter.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/InDetRawDataWriter_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolLArCellContReader.trf b/Tools/JobTransforms/share/AthenaPoolLArCellContReader.trf
deleted file mode 100755
index b54e3d811600..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolLArCellContReader.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/LArCellContReader_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolLArCellContWriter.trf b/Tools/JobTransforms/share/AthenaPoolLArCellContWriter.trf
deleted file mode 100755
index 24cf62c4ce51..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolLArCellContWriter.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/LArCellContWriter_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolMissingETRead.trf b/Tools/JobTransforms/share/AthenaPoolMissingETRead.trf
deleted file mode 100755
index 0a835014b47e..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolMissingETRead.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/MissingETRead_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolMissingETWrite.trf b/Tools/JobTransforms/share/AthenaPoolMissingETWrite.trf
deleted file mode 100755
index f9bee1eb8015..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolMissingETWrite.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/MissingETWrite_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolNavigation.kvt b/Tools/JobTransforms/share/AthenaPoolNavigation.kvt
deleted file mode 100755
index 8c9f017b399f..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolNavigation.kvt
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AthenaPoolTestNavigation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Athena Pool Test (back navigation across files)"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##          Starting athena POOL tests        ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolTestWrite.trf &> ${T_TMPDIR}/${T_LOGFILE}.0
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.0 > ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool TestWrite"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolTestRead.trf &> ${T_TMPDIR}/${T_LOGFILE}.1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.1 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool TestRead"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolTestStep2Write.trf &> ${T_TMPDIR}/${T_LOGFILE}.2
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.2 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool TestStep2Write"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolTestReadNav.trf &> ${T_TMPDIR}/${T_LOGFILE}.3
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.3 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool TestReadNav"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit ${overall_retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolTest.kvt b/Tools/JobTransforms/share/AthenaPoolTest.kvt
deleted file mode 100755
index d6ce2180677c..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolTest.kvt
+++ /dev/null
@@ -1,277 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AthenaPoolTest"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Athena Pool Test"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##          Starting athena POOL tests        ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-## Call the transformation
-#${T_SCRIPTPATH}/AthenaPoolMissingETWrite.trf &> ${T_TMPDIR}/${T_LOGFILE}.0
-#retcode=$?
-#
-## Error report
-#[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-#
-#cat ${T_TMPDIR}/${T_LOGFILE}.0 > ${T_TMPDIR}/${T_LOGFILE}
-#printf "%-45s " "AthenaPool MissingETWrite"
-#if [ ${retcode} -eq 0 ] ; then
-#  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-#else
-#  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-#  if [ "$T_NOSTOP" == "no" ] ; then
-#    cd /tmp; rm -fr ${T_TMPDIR};
-#    exit ${retcode}
-#  fi
-#  overall_retcode=$retcode
-#fi
-
-## Call the transformation
-#${T_SCRIPTPATH}/AthenaPoolMissingETRead.trf &> ${T_TMPDIR}/${T_LOGFILE}.1
-#retcode=$?
-#
-## Error report
-#[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-#
-#cat ${T_TMPDIR}/${T_LOGFILE}.1 >> ${T_TMPDIR}/${T_LOGFILE}
-#printf "%-45s " "AthenaPool MissingETRead"
-#if [ ${retcode} -eq 0 ] ; then
-#  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-#else
-#  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-#  if [ "$T_NOSTOP" == "no" ] ; then
-#    cd /tmp; rm -fr ${T_TMPDIR};
-#    exit ${retcode}
-#  fi
-#  overall_retcode=$retcode
-#fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolInDetRawDataWriter.trf &> ${T_TMPDIR}/${T_LOGFILE}.2
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.2 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool InDetRawDataWriter"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolInDetRawDataReader.trf &> ${T_TMPDIR}/${T_LOGFILE}.3
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.3 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool InDetRawDataReader"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-## Call the transformation
-#${T_SCRIPTPATH}/AthenaPoolLArCellContWriter.trf &> ${T_TMPDIR}/${T_LOGFILE}.4
-#retcode=$?
-#
-## Error report
-#[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-#
-#cat ${T_TMPDIR}/${T_LOGFILE}.4 >> ${T_TMPDIR}/${T_LOGFILE}
-#printf "%-45s " "AthenaPool LArCellContWriter"
-#if [ ${retcode} -eq 0 ] ; then
-#  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-#else
-#  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-#  if [ "$T_NOSTOP" == "no" ] ; then
-#    cd /tmp; rm -fr ${T_TMPDIR};
-#    exit ${retcode}
-#  fi
-#  overall_retcode=$retcode
-#fi
-
-## Call the transformation
-#${T_SCRIPTPATH}/AthenaPoolLArCellContReader.trf &> ${T_TMPDIR}/${T_LOGFILE}.5
-#retcode=$?
-#
-## Error report
-#[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-#
-#cat ${T_TMPDIR}/${T_LOGFILE}.5 >> ${T_TMPDIR}/${T_LOGFILE}
-#printf "%-45s " "AthenaPool LArCellContReader"
-#if [ ${retcode} -eq 0 ] ; then
-#  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-#else
-#  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-#  if [ "$T_NOSTOP" == "no" ] ; then
-#    cd /tmp; rm -fr ${T_TMPDIR};
-#    exit ${retcode}
-#  fi
-#  overall_retcode=$retcode
-#fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolEventInfoWrite.trf &> ${T_TMPDIR}/${T_LOGFILE}.6
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.6 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool EventInfoWrite"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolEventInfoWriteStep2.trf &> ${T_TMPDIR}/${T_LOGFILE}.7
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.7 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool EventInfoWriteStep2"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolEventInfoWriteStep3.trf &> ${T_TMPDIR}/${T_LOGFILE}.8
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.8 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool EventInfoWriteStep3"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolEventInfoWriteStep4.trf &> ${T_TMPDIR}/${T_LOGFILE}.9
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.9 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool EventInfoWriteStep4"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AthenaPoolEventInfoRead.trf &> ${T_TMPDIR}/${T_LOGFILE}.10
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.10 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "AthenaPool EventInfoRead"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit ${overall_retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolTestRead.trf b/Tools/JobTransforms/share/AthenaPoolTestRead.trf
deleted file mode 100755
index f06dbdfa0c3e..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolTestRead.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/AthenaPoolTestRead.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolTestReadNav.trf b/Tools/JobTransforms/share/AthenaPoolTestReadNav.trf
deleted file mode 100755
index 1b51ad0301e3..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolTestReadNav.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/AthenaPoolTestReadNav.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolTestStep2Write.trf b/Tools/JobTransforms/share/AthenaPoolTestStep2Write.trf
deleted file mode 100755
index ea2e99eb40bb..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolTestStep2Write.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/AthenaPoolTestStep2Write.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AthenaPoolTestWrite.trf b/Tools/JobTransforms/share/AthenaPoolTestWrite.trf
deleted file mode 100755
index 9701a47d9c5b..000000000000
--- a/Tools/JobTransforms/share/AthenaPoolTestWrite.trf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5                                                                                
-athena.py AthenaPoolTest/AthenaPoolTestWrite.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AtlasG4SimGeoModel.kvt b/Tools/JobTransforms/share/AtlasG4SimGeoModel.kvt
deleted file mode 100755
index 1aafcd3adfbf..000000000000
--- a/Tools/JobTransforms/share/AtlasG4SimGeoModel.kvt
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="AtlasG4SimGeoModel"
-T_TRANSVER=1.1.0
-T_TRANSDESC="Athena G4 Simulation with GeoModel"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##      Starting athena AtlasG4Sim test       ##"
-  echo "################################################"
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/AtlasG4SimGeoModel.trf &> ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/AtlasG4SimGeoModel.trf b/Tools/JobTransforms/share/AtlasG4SimGeoModel.trf
deleted file mode 100755
index dcecf2909ff8..000000000000
--- a/Tools/JobTransforms/share/AtlasG4SimGeoModel.trf
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-
-# Set up the run conditions
-ln -sf ${T_DISTREL}/InstallArea/share/*.mac .
-ln -sf ${T_DISTREL}/InstallArea/share/*.xml .
-ln -sf ${T_DISTREL}/InstallArea/share/*.dtd .
-ln -sf ${T_DISTREL}/InstallArea/share/management .
-ln -sf ${T_DISTREL}/InstallArea/share/geometry .
-ln -sf ${ATLASCALDATA}/bmagatlas02.data fieldmap.dat
-get_files -data PDGTABLE.MeV
-export LARG4FCALROOT=${T_DISTREL}/InstallArea
-
-# Call athena
-athena.py AtlasG4Sim/jobOptions.AtlasGeoG4Sim.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2AtlfastZee.kvt b/Tools/JobTransforms/share/DC2AtlfastZee.kvt
deleted file mode 100755
index 7a562e5f7f0c..000000000000
--- a/Tools/JobTransforms/share/DC2AtlfastZee.kvt
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2EvgenZee"
-T_OUTDESC="DC2AtlfastZee"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 atlfast Z -> mu mu analysis"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_HISTO" == "" ]  && T_HISTO="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.hist"
-T_HISTO="`echo $T_HISTO | awk '{ print tolower($0) }'`"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.atlfast.trf "${T_INFILE}" "${T_HISTO}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} ${T_HISTO} ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_HISTO},${T_HISTO} \
-           ${T_OUTPATH}/${T_NTUPLE},${T_NTUPLE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenAtt.kvt b/Tools/JobTransforms/share/DC2EvgenAtt.kvt
deleted file mode 100755
index 9a9a04018b02..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenAtt.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenAtt"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 A -> t t generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_A10.pythia_Atautau.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenB.kvt b/Tools/JobTransforms/share/DC2EvgenB.kvt
deleted file mode 100755
index 26175844ee80..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenB.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenB"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 B-jet generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A8_pythiaB.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenBmm.kvt b/Tools/JobTransforms/share/DC2EvgenBmm.kvt
deleted file mode 100755
index d2e57fd61768..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenBmm.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenBmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 bb->B->(mu6mu6) generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_B3_pythia_Bmumu.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenHbbmm.kvt b/Tools/JobTransforms/share/DC2EvgenHbbmm.kvt
deleted file mode 100755
index f014a14605fe..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenHbbmm.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenHbbmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 h -> b b m m  generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2469
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=24690001
-T_PARAMS="dc2_pythia_h_bbmm.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.root"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenHww.kvt b/Tools/JobTransforms/share/DC2EvgenHww.kvt
deleted file mode 100755
index 9260af92fef8..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenHww.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenAtt"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 A -> t t generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_H5_pythia_VBF_Hww.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenJJ.kvt b/Tools/JobTransforms/share/DC2EvgenJJ.kvt
deleted file mode 100755
index 9fa2edd7d7d1..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenJJ.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenJetJet"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 DiJet generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_B1_pythia_jetjet.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenJetCalib.kvt b/Tools/JobTransforms/share/DC2EvgenJetCalib.kvt
deleted file mode 100755
index 16df7536ed2c..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenJetCalib.kvt
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenJetCalib"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Jet Calibration generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2800
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=28000007
-T_PARAMS="dc2_J1_pythia_jetjet.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# Copy the input files
-T_INPDATA="DC2WminE.events"
-T_INPDATAURL="http://www.nikhef.nl/~stanb/ProductionData/DC2/MCATNLO/W_prod/Wmin_E"
-wget ${T_INPDATAURL}/${T_INPDATA}
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenJetFilter.kvt b/Tools/JobTransforms/share/DC2EvgenJetFilter.kvt
deleted file mode 100755
index bf7001c0b2df..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenJetFilter.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenJetFilter"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Jet (pt>17) generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2900
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=29000007
-T_PARAMS="dc2_B4_pythia_dijet.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenMinBias.kvt b/Tools/JobTransforms/share/DC2EvgenMinBias.kvt
deleted file mode 100755
index 3aecfe3a7c20..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenMinBias.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenMinBias"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Minimum Bias generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2900
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=29000007
-T_PARAMS="dc2_M1_pythia_minbias.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenSusy.kvt b/Tools/JobTransforms/share/DC2EvgenSusy.kvt
deleted file mode 100755
index 41de2ed20ef0..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenSusy.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenSusy"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 susy generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A9_herwig_susy.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.herwig.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenTop.kvt b/Tools/JobTransforms/share/DC2EvgenTop.kvt
deleted file mode 100755
index a5bf1e2174c9..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenTop.kvt
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenTop"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 top generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A0_herwig_mcatnlo.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# Copy the input files
-T_INPDATA="DC2Prod_1.events"
-T_INPDATAURL="http://www.nikhef.nl/~stanb/ProductionData/DC2/MCATNLO/Top_prod"
-wget ${T_INPDATAURL}/${T_INPDATA}
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.herwig.inputA0.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" "${T_INPDATA}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenW4Jet.kvt b/Tools/JobTransforms/share/DC2EvgenW4Jet.kvt
deleted file mode 100755
index e4f9e0b4d26b..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenW4Jet.kvt
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenW4Jet"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 W+4Jet generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A7_w4jets_alpgen_pythia.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# Copy the input files
-T_INPDATA="wjetdc_1.unw"
-T_INPDATAURL="http://www.nikhef.nl/~stanb/ProductionData/DC2/AlpGen/W4jets/wjetdc_"
-wget ${T_INPDATAURL}/${T_INPDATA}
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.inputA7.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" "${T_INPDATA}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenWminE.kvt b/Tools/JobTransforms/share/DC2EvgenWminE.kvt
deleted file mode 100755
index 74d75811580c..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenWminE.kvt
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenWminE"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 W generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A4_herwig_mcatlno.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# Copy the input files
-T_INPDATA="DC2WminE.events"
-T_INPDATAURL="http://www.nikhef.nl/~stanb/ProductionData/DC2/MCATNLO/W_prod/Wmin_E"
-wget ${T_INPDATAURL}/${T_INPDATA}
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.herwig.inputA4.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" "${T_INPDATA}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenZee.kvt b/Tools/JobTransforms/share/DC2EvgenZee.kvt
deleted file mode 100755
index 8a36e3c8b4ff..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenZee.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenZee"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Z -> e e generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_A1_pythia_z_ee.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenZjj.kvt b/Tools/JobTransforms/share/DC2EvgenZjj.kvt
deleted file mode 100755
index dd0ca73fbaac..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenZjj.kvt
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenZjj"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Zjj generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=20
-T_RANDOM=26740007
-T_PARAMS="dc2_A5_zjjMadcup_pythia.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# Copy the input files
-T_INPDATA="event_input.dat"
-get_files -data ${T_INPDATA} > /dev/null 2>&1
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.inputA5.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" "${T_INPDATA}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenZmm.kvt b/Tools/JobTransforms/share/DC2EvgenZmm.kvt
deleted file mode 100755
index e2b03e491e64..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenZmm.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenZmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Z -> mu mu generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_A2_pythia_z_mumu.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2EvgenZtt.kvt b/Tools/JobTransforms/share/DC2EvgenZtt.kvt
deleted file mode 100755
index de9c04315bf9..000000000000
--- a/Tools/JobTransforms/share/DC2EvgenZtt.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="DC2EvgenZtt"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 Z -> tau tau generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS="dc2_A3_pythia_z_tautau.py"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntup"
-T_NTUPLE="`echo $T_NTUPLE | awk '{ print tolower($0) }'`"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" "${T_NTUPLE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} \
-          metadata.xml ${T_NTUPLE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2G4digitHbbmm.kvt b/Tools/JobTransforms/share/DC2G4digitHbbmm.kvt
deleted file mode 100755
index 22545ea1b09e..000000000000
--- a/Tools/JobTransforms/share/DC2G4digitHbbmm.kvt
+++ /dev/null
@@ -1,84 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2G4simHbbmm"
-T_OUTDESC="DC2G4digitHbbmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 h -> b b m m digitization"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_FIRSTEVENT=1
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-[ $T_FIRSTEVENT -gt 1 ] && let T_SKIP=${T_FIRSTEVENT}-1
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4digit.trf "${T_INFILE}" "${T_OUTFILE}" "${T_NUMEVENTS}" "${T_SKIP}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2G4digitZee.kvt b/Tools/JobTransforms/share/DC2G4digitZee.kvt
deleted file mode 100755
index d1d558822c9b..000000000000
--- a/Tools/JobTransforms/share/DC2G4digitZee.kvt
+++ /dev/null
@@ -1,84 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2G4simZee"
-T_OUTDESC="DC2G4digitZee"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 Z -> e e digitization"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_FIRSTEVENT=1
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-[ $T_FIRSTEVENT -gt 1 ] && let T_SKIP=${T_FIRSTEVENT}-1
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4digit.trf "${T_INFILE}" "${T_OUTFILE}" "${T_NUMEVENTS}" "${T_SKIP}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2G4simHbbmm.kvt b/Tools/JobTransforms/share/DC2G4simHbbmm.kvt
deleted file mode 100755
index 15e8d6d80e71..000000000000
--- a/Tools/JobTransforms/share/DC2G4simHbbmm.kvt
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2EvgenHbbmm"
-T_OUTDESC="DC2G4simHbbmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 h -> b b m m  simulation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_ETAMIN="-2"
-T_ETAMAX="2"
-T_NUMEVENTS=10
-T_FIRSTEVENT=1
-T_SKIP=0
-T_RANDOM=30000001
-T_LAYOUT="DC2"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-[ $T_FIRSTEVENT -gt 1 ] && let T_SKIP=${T_FIRSTEVENT}-1
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4sim.trf "${T_INFILE}" "${T_OUTFILE}" "${T_ETAMIN}" "${T_ETAMAX}" "${T_NUMEVENTS}" "${T_SKIP}" "${T_RANDOM}" "${T_LAYOUT}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml \
-          ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2G4simZee.kvt b/Tools/JobTransforms/share/DC2G4simZee.kvt
deleted file mode 100755
index 997bb1570ea3..000000000000
--- a/Tools/JobTransforms/share/DC2G4simZee.kvt
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2EvgenZee"
-T_OUTDESC="DC2G4simZee"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 Z -> e e simulation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_ETAMIN="-2"
-T_ETAMAX="2"
-T_NUMEVENTS=10
-T_FIRSTEVENT=1
-T_SKIP="0"
-T_RANDOM=26740007
-T_LAYOUT="DC2"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-[ $T_FIRSTEVENT -gt 1 ] && let T_SKIP=${T_FIRSTEVENT}-1
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4sim.trf "${T_INFILE}" "${T_OUTFILE}" "${T_ETAMIN}" "${T_ETAMAX}" "${T_NUMEVENTS}" "${T_SKIP}" "${T_RANDOM}" "${T_LAYOUT}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml \
-          ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2reconHbbmm.kvt b/Tools/JobTransforms/share/DC2reconHbbmm.kvt
deleted file mode 100755
index ac85b80258a8..000000000000
--- a/Tools/JobTransforms/share/DC2reconHbbmm.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2G4digitHbbmm"
-T_OUTDESC="DC2reconHbbmm"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 h -> b b m m reconstruction"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntuple"
-[ "$T_HISFILE" == "" ] && T_HISFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.hist"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.validation.recon.trf "${T_INFILE}" "${T_OUTFILE}" "${T_HISFILE}" ${T_NUMEVENTS} ${T_SKIP} >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} ${T_OUTFILE} ${T_HISFILE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/DC2reconZee.kvt b/Tools/JobTransforms/share/DC2reconZee.kvt
deleted file mode 100755
index e3e0cb0f4fef..000000000000
--- a/Tools/JobTransforms/share/DC2reconZee.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="DC2G4digitZee"
-T_OUTDESC="DC2reconZee"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 Z -> e e reconstruction"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntuple"
-[ "$T_HISFILE" == "" ] && T_HISFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.hbook"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.recon.trf "${T_INFILE}" "${T_OUTFILE}" "${T_HISFILE}" ${T_NUMEVENTS} ${T_SKIP} >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} ${T_OUTFILE} ${T_HISFILE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/ESDtoAOD.kvt b/Tools/JobTransforms/share/ESDtoAOD.kvt
deleted file mode 100755
index 916431394c76..000000000000
--- a/Tools/JobTransforms/share/ESDtoAOD.kvt
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/sh
-
-#####################################################################
-##   ESDtoAOD for KitValidation                                    ##
-##                                                                 ##
-##   Tadashi Maeno <Tadashi.Maeno@cern.ch>                         ##
-##   David Rousseau <rousseau@lal.in2p3.fr>                        ##
-##   Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>                  ##
-#####################################################################
-
-# Defaults
-T_RELEASE=8.5.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_INDESC=RecExToESD
-T_OUTDESC=ESDtoAOD
-T_TRANSVER=1.0.0
-T_TRANSDESC=ESDtoAOD
-T_TRANSAUTH="Tadashi Maeno <Tadashi.Maeno@cern.ch>, David Rousseau <rousseau@lal.in2p3.fr>, Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# Input and Output directory
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE=ESD.pool.root
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE=AOD.pool.root
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-# get input file
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "        Starting ${T_TRANSDESC}"
-  echo "################################################"
-fi
-
-# to be removed when HOST and OS set in the release
-[ "$HOST" ] || export HOST=host
-export OS=Linux
-
-# prepare the test
-RecExCommon_links.sh &> ${T_TMPDIR}/${T_LOGFILE}.0
-
-mv PoolFileCatalog.xml _PoolFileCatalog.xml
-cp -p ${T_INPATH}/PoolFileCatalog.xml .
-cat PoolFileCatalog.xml >> ${T_TMPDIR}/${T_LOGFILE}.0
-
-# set the maximum amount of virtual memory available to ~1.3GB
-ulimit -Sv 1300000 2> /dev/null
-if [ $? -ne 0 ]; then
-  echo "Cannot get enough virtual memory, exiting..." ; exit 1
-fi
-
-#DR run the test on just 2 events
-# for 9.0.0
-#athena.py -s -c "EvtMax=2" ParticleEventAthenaPool/optESDtoAOD.py \
-#RecExCommon/RecExCommon_topOptions.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-# Don't produce or use CBNT
-get_files -jo ParticleEventAthenaPool/ESDtoAOD_topOptions.py &> /dev/null
-cat > job.py <<EOD
-EvtMax=2
-doCBNT=FALSE
-EOD
-grep -v CBNT ESDtoAOD_topOptions.py >> job.py
-
-# starting after 9.0.0
-athena.py job.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-athenaCheckLog ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}.0 ${T_TMPDIR}/${T_LOGFILE} \
-PoolFileCatalog.xml ${T_OUTFILE} \
-CLIDDBout.txt cdb.log
-
-#
-#if [ $retcode -eq 0 ] ; then
-#  checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-#  retcode=$?
-#fi
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/EvgenHiggs.kvt b/Tools/JobTransforms/share/EvgenHiggs.kvt
deleted file mode 100755
index d90116428289..000000000000
--- a/Tools/JobTransforms/share/EvgenHiggs.kvt
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="EvgenHiggs"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 preprod Higgs generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2674
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=26740007
-T_PARAMS='["pyinit pylisti 12","pyinit pylistf 1","pyinit dumpr 1 5","pystat 1 3 4 5","pysubs msel 0","pysubs msub 102 1","pysubs msub 123 1","pysubs msub 124 1","pydat2 pmas 25 1 130.","pydat3 mdme 210 1 0","pydat3 mdme 211 1 0","pydat3 mdme 212 1 0","pydat3 mdme 213 1 0","pydat3 mdme 214 1 0","pydat3 mdme 215 1 0","pydat3 mdme 218 1 0","pydat3 mdme 219 1 0","pydat3 mdme 220 1 0","pydat3 mdme 222 1 0","pydat3 mdme 223 1 1","pydat3 mdme 224 1 1","pydat3 mdme 225 1 1","pydat3 mdme 226 1 0","pydat3 mdme 162 1 0","pydat3 mdme 163 1 0","pydat3 mdme 164 1 0","pydat3 mdme 165 1 0","pydat3 mdme 166 1 0","pydat3 mdme 167 1 0","pydat3 mdme 170 1 1","pydat3 mdme 171 1 1","pydat3 mdme 172 1 0","pydat3 mdme 174 1 0","pydat3 mdme 175 1 0","pydat3 mdme 176 1 0","pydat3 mdme 177 1 0","pydat3 mdme 178 1 0","pydat3 mdme 179 1 0","pydat3 mdme 182 1 1","pydat3 mdme 183 1 0","pydat3 mdme 184 1 1","pydat3 mdme 185 1 0","pydat3 mdme 186 1 0","pydat3 mdme 187 1 0","pypars mstp 82 4","pypars mstp 128 0","pydat1 mstj 11 3","pydat1 mstj 22 2","pydat1 parj 54 -0.07","pydat1 parj 55 -0.006","pypars parp 82 2.2"]'
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-                                                                                
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/evgen.pythia.trf "${T_DATASET}" "${T_OUTFILE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/EvgenMuon.kvt b/Tools/JobTransforms/share/EvgenMuon.kvt
deleted file mode 100755
index 8bf0a3546ec3..000000000000
--- a/Tools/JobTransforms/share/EvgenMuon.kvt
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="EvgenMuon"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.1.0
-T_TRANSDESC="DC2 preprod single muon generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2833
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=28330001
-T_PARAMS="[\"PDGcode: sequence -13 13\",\"Et: constant 50000\",\"eta: flat -3.2 3.2","phi: flat 0 6.283185\"]"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/evgen.partgen.trf "${T_DATASET}" "${T_OUTFILE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE} \
-           ${T_OUTPATH}/PoolFileCatalog.xml
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/EvgenMuonCalib.kvt b/Tools/JobTransforms/share/EvgenMuonCalib.kvt
deleted file mode 100755
index 3947691125b2..000000000000
--- a/Tools/JobTransforms/share/EvgenMuonCalib.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_OUTDESC="EvgenMuonCalib"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod single muon generation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_DATASET=2833
-T_FIRSTEVENT=1
-T_NUMEVENTS=1000
-T_RANDOM=28330001
-T_PARAMS="{\"PDGcode: sequence -13 13\",\"Et: constant 50000\",\"eta: flat 0.1 0.2\",\"phi: flat 3.054326 3.228859\"}"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-[ $T_FIRSTEVENT -gt 1 ] && let T_SKIP=${T_FIRSTEVENT}-1
-
-mkdir -p $T_OUTPATH
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-#--------------------------------------------------------------------------
-#          Signature:  datasetnr outfilename first total ran pytcmd
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/evgen.partgen.trf "${T_DATASET}" "${T_OUTFILE}" ${T_FIRSTEVENT} ${T_NUMEVENTS} ${T_RANDOM} "${T_PARAMS}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE} \
-           ${T_OUTPATH}/PoolFileCatalog.xml
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4digitHiggs.kvt b/Tools/JobTransforms/share/G4digitHiggs.kvt
deleted file mode 100755
index ae8e25dd533f..000000000000
--- a/Tools/JobTransforms/share/G4digitHiggs.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="G4simHiggs"
-T_OUTDESC="G4digitHiggs"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod Higgs digitization"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4digit.trf "${T_INFILE}" "${T_OUTFILE}" "${T_NUMEVENTS}" "${T_SKIP}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4digitMuon.kvt b/Tools/JobTransforms/share/G4digitMuon.kvt
deleted file mode 100755
index b972f5d0ac6a..000000000000
--- a/Tools/JobTransforms/share/G4digitMuon.kvt
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="G4simMuon"
-T_OUTDESC="G4digitMuon"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod single muon digitization"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4digit.trf "${T_INFILE}" "${T_OUTFILE}" "${T_NUMEVENTS}" "${T_SKIP}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4reconHiggs.kvt b/Tools/JobTransforms/share/G4reconHiggs.kvt
deleted file mode 100755
index da1bdfa9db33..000000000000
--- a/Tools/JobTransforms/share/G4reconHiggs.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="G4digitHiggs"
-T_OUTDESC="G4reconHiggs"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod higgs reconstruction"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntuple"
-[ "$T_HISFILE" == "" ] && T_HISFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.hbook"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.validation.recon.trf "${T_INFILE}" "${T_OUTFILE}" "${T_HISFILE}" ${T_NUMEVENTS} ${T_SKIP} >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} ${T_OUTFILE} ${T_HISFILE} 
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4reconMuon.kvt b/Tools/JobTransforms/share/G4reconMuon.kvt
deleted file mode 100755
index 15a8dbc1a557..000000000000
--- a/Tools/JobTransforms/share/G4reconMuon.kvt
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="G4digitMuon"
-T_OUTDESC="G4reconMuon"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod single muon reconstruction"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_SKIP="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.ntuple"
-[ "$T_HISFILE" == "" ] && T_HISFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.hbook"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.recon.trf "${T_INFILE}" "${T_OUTFILE}" "${T_HISFILE}" ${T_NUMEVENTS} ${T_SKIP} >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} ${T_OUTFILE} ${T_HISFILE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4simHiggs.kvt b/Tools/JobTransforms/share/G4simHiggs.kvt
deleted file mode 100755
index 8f41cd102c2a..000000000000
--- a/Tools/JobTransforms/share/G4simHiggs.kvt
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="EvgenHiggs"
-T_OUTDESC="G4simHiggs"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod Higgs simulation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_ETAMIN="-2"
-T_ETAMAX="2"
-T_NUMEVENTS=10
-T_RANDOM=26740007
-T_SKIP="0"
-T_LAYOUT="DC2"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4sim.trf "${T_INFILE}" "${T_OUTFILE}" "${T_ETAMIN}" "${T_ETAMAX}" "${T_NUMEVENTS}" "${T_SKIP}" "$T_RANDOM" "${T_LAYOUT}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/G4simMuon.kvt b/Tools/JobTransforms/share/G4simMuon.kvt
deleted file mode 100755
index 0fbebda6b719..000000000000
--- a/Tools/JobTransforms/share/G4simMuon.kvt
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.1.0"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_INDESC="EvgenMuon"
-T_OUTDESC="G4simMuon"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="DC2 preprod single muon simulation"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_ETAMIN="-2"
-T_ETAMAX="2"
-T_NUMEVENTS=10
-T_RANDOM=28330001
-T_SKIP="0"
-T_LAYOUT="DC2"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-ln -fs ${T_INPATH}/${T_INFILE} .
-
-#--------------------------------------------------------------------------
-#          Signature:  infilename outfilename macrofilename nevents skip
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-${T_SCRIPTPATH}/dc2.g4sim.trf "${T_INFILE}" "${T_OUTFILE}" "${T_ETAMIN}" "${T_ETAMAX}" "${T_NUMEVENTS}" "${T_SKIP}" "$T_RANDOM" "${T_LAYOUT}" >> ${T_TMPDIR}/${T_LOGFILE} 2>&1 
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE} metadata.xml
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-                                                                                
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/InDetDetDescrExample.kvt b/Tools/JobTransforms/share/InDetDetDescrExample.kvt
deleted file mode 100755
index aa8b4940a68a..000000000000
--- a/Tools/JobTransforms/share/InDetDetDescrExample.kvt
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="InDetDetDescrExample"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Inner Detector Description example"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##       Starting InDetDetDescr examples      ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-# Call the transformation
-${T_SCRIPTPATH}/InDetReadSiDetectorElements.trf &> ${T_TMPDIR}/${T_LOGFILE}.0
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.0 > ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "ReadSiDetectorElements"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Call the transformation
-${T_SCRIPTPATH}/InDetReadTRTDetectorElements.trf &> ${T_TMPDIR}/${T_LOGFILE}.1
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && (cat checklog.txt; rm -f checklog.txt)
-
-cat ${T_TMPDIR}/${T_LOGFILE}.1 >> ${T_TMPDIR}/${T_LOGFILE}
-printf "%-45s " "ReadTRTDetectorElements"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  if [ "$T_NOSTOP" == "no" ] ; then
-    cd /tmp; rm -fr ${T_TMPDIR};
-    exit ${retcode}
-  fi
-  overall_retcode=$retcode
-fi
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit ${overall_retcode}
diff --git a/Tools/JobTransforms/share/InDetReadSiDetectorElements.trf b/Tools/JobTransforms/share/InDetReadSiDetectorElements.trf
deleted file mode 100755
index f18842914b58..000000000000
--- a/Tools/JobTransforms/share/InDetReadSiDetectorElements.trf
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# Call athena
-athena.py InDetDetDescrExample/ReadSiDetectorElements_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/InDetReadTRTDetectorElements.trf b/Tools/JobTransforms/share/InDetReadTRTDetectorElements.trf
deleted file mode 100755
index 939ac733bdbc..000000000000
--- a/Tools/JobTransforms/share/InDetReadTRTDetectorElements.trf
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# Call athena
-athena.py InDetDetDescrExample/ReadTRT_DetectorElements_jobOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/MooEventCompile.kvt b/Tools/JobTransforms/share/MooEventCompile.kvt
deleted file mode 100755
index 79a4151e80f5..000000000000
--- a/Tools/JobTransforms/share/MooEventCompile.kvt
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_SRCPATH="$T_SCRIPTPATH/../src"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC="MooEventCompile"
-T_TRANSVER=1.1.0
-T_TRANSDESC="User code compilation (MooEvent)"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-export CMTPATH=${PWD}:${CMTPATH}
-#source ${ATLAS_ROOT}/setup.sh
-
-T_SRCTAR="`\ls ${T_SRCPATH}/MooEvent-*.tar.gz | tail -n 1`"
-tar xfz ${T_SRCTAR}
-cd MuonSpectrometer/Moore/MooEvent/*/cmt
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##       Starting MooEvent Compilation        ##"
-  echo "################################################"
-fi
-
-# Start compilation
-(cmt config; source setup.sh -tag_add=DC2; make) &> ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-cp ${T_TMPDIR}/${T_LOGFILE} ${T_OUTPATH}
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/Pythia_i.kvt b/Tools/JobTransforms/share/Pythia_i.kvt
deleted file mode 100755
index 756b51afc08b..000000000000
--- a/Tools/JobTransforms/share/Pythia_i.kvt
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-# Defaults
-T_RELEASE=8.5.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC=Pythia_i
-T_TRANSVER=1.0.0
-T_TRANSDESC="Pythia_i"
-T_TRANSAUTH="Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "        Starting ${T_TRANSDESC}"
-  echo "################################################"
-fi
-
-# to be removed when HOST and OS set in the release
-[ "$HOST" ] || export HOST=host
-export OS=Linux
-
-# prepare the test
-get_files PDGTABLE.MeV &> ${T_TMPDIR}/${T_LOGFILE}.0
-
-# run the test
-athena.py Pythia_i/jobOptions.pythia.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-#athenaCheckLog ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}.0 ${T_TMPDIR}/${T_LOGFILE} \
-CLIDDBout.txt AtRndmGenSvc.out
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/RecExCommon.kvt b/Tools/JobTransforms/share/RecExCommon.kvt
deleted file mode 100755
index 101a17113c13..000000000000
--- a/Tools/JobTransforms/share/RecExCommon.kvt
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-#####################################################################
-##   Reconstruction Example (RecExCommon) test for KitValidation   ##
-##                                                                 ##
-##   David Rousseau <rousseau@lal.in2p3.fr>                        ##
-##   Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>                  ##
-#####################################################################
-
-# Defaults
-T_RELEASE=8.5.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC=RecExCommon
-T_TRANSVER=1.0.0
-T_TRANSDESC="RecExCommon"
-T_TRANSAUTH="David Rousseau <rousseau@lal.in2p3.fr>, Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "        Starting ${T_TRANSDESC}"
-  echo "################################################"
-fi
-
-# to be removed when HOST and OS set in the release
-[ "$HOST" ] || export HOST=host
-export OS=Linux
-
-# prepare the test
-RecExCommon_links.sh &> ${T_TMPDIR}/${T_LOGFILE}.0
-
-#DR ATLASTESTDATAFILE=${ATLASTESTDATA}/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root
-
-#DR do not create PoolInsertFileToCatalog, this is done correctly by RecExCommon_links.sh
-#rm -f PoolFileCatalog.xml
-#pool_insertFileToCatalog ${ATLASTESTDATAFILE} &> /dev/null
-cat PoolFileCatalog.xml >> ${T_TMPDIR}/${T_LOGFILE}.0
-
-#DR not necessary anymore
-#sed -e "s#/afs/cern.ch/atlas/offline/data/testfile#${ATLASTESTDATA}#" RecExCommon_topOptions.py >| _RecExCommon_topOptions.py
-#mv _RecExCommon_topOptions.py RecExCommon_topOptions.py
-
-# set the maximum amount of virtual memory available to ~1.3GB
-ulimit -Sv 1300000 2> /dev/null
-if [ $? -ne 0 ]; then
-  echo "Cannot get enough virtual memory, exiting..." ; exit 1
-fi
-
-#DR run the test on just 2 events
-athena.py -s -c "EvtMax=2" myTopOptions.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-athenaCheckLog ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}.0 ${T_TMPDIR}/${T_LOGFILE} \
-ntuple.root CLIDDBout.txt cdb.log
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/RecExToESD.kvt b/Tools/JobTransforms/share/RecExToESD.kvt
deleted file mode 100755
index 0470727ce657..000000000000
--- a/Tools/JobTransforms/share/RecExToESD.kvt
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-
-#####################################################################
-##   RecExToESD test for KitValidation                             ##
-##                                                                 ##
-##   Tadashi Maeno <Tadashi.Maeno@cern.ch>                         ##
-##   David Rousseau <rousseau@lal.in2p3.fr>                        ##
-##   Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>                  ##
-#####################################################################
-
-# Defaults
-T_RELEASE=8.5.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_OUTDESC=RecExToESD
-T_TRANSVER=1.0.0
-T_TRANSDESC=RecExToESD
-T_TRANSAUTH="Tadashi Maeno <Tadashi.Maeno@cern.ch>, David Rousseau <rousseau@lal.in2p3.fr>, Grigori Rybkine <Grigori.Rybkine@rhul.ac.uk>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# Output directory
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_OUTFILE" == "" ] && T_OUTFILE=ESD.pool.root
-[ "$T_NTUPLE" == "" ]  && T_NTUPLE=histo.root
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "        Starting ${T_TRANSDESC}"
-  echo "################################################"
-fi
-
-# to be removed when HOST and OS set in the release
-[ "$HOST" ] || export HOST=host
-export OS=Linux
-
-# prepare the test
-RecExCommon_links.sh &> ${T_TMPDIR}/${T_LOGFILE}.0
-
-cat PoolFileCatalog.xml >> ${T_TMPDIR}/${T_LOGFILE}.0
-
-# set the maximum amount of virtual memory available to ~1.3GB
-ulimit -Sv 1300000 2> /dev/null
-if [ $? -ne 0 ]; then
-  echo "Cannot get enough virtual memory, exiting..." ; exit 1
-fi
-
-#DR run the test on just 2 events
-# for 9.0.0
-#athena.py -s -c "EvtMax=2" ParticleEventAthenaPool/optRecExToESD.py \
-#RecExCommon/RecExCommon_topOptions.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-# starting after 9.0.0
-athena.py -s -c "EvtMax=2" ParticleEventAthenaPool/RecExToESD.AOD.TAG_topOptions.py &> ${T_TMPDIR}/${T_LOGFILE}
-
-athenaCheckLog ${T_TMPDIR}/${T_LOGFILE}
-retcode=$?
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles ${T_TMPDIR}/${T_LOGFILE}.0 ${T_TMPDIR}/${T_LOGFILE} \
-PoolFileCatalog.xml ${T_OUTFILE} ${T_NTUPLE} \
-recClusters.out Out.MuonboyTiming Out.MuonboyRecInfo Out.MuonboyDumpF \
-CLIDDBout.txt fort.79 cdb.log
-
-#
-#if [ $retcode -eq 0 ] ; then
-#  checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE}
-#  retcode=$?
-#fi
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/SimpleChecks.kvt b/Tools/JobTransforms/share/SimpleChecks.kvt
deleted file mode 100755
index 6016d6a5ea20..000000000000
--- a/Tools/JobTransforms/share/SimpleChecks.kvt
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/sh
-
-# checkSharedLibs function
-checkSharedLibs ()
-{
-  retcode=0
-  exclude_list=""
-  rm -f temp.libs
-  find $SHLIB -perm +755 -exec ldd {} 2>/dev/null \; >> temp.libs
-  grep "not found" temp.libs | egrep -v "$exclude_list" | awk '{print $1}' > temp-missing.libs.tmp
-  grep -v "not found" temp.libs | grep $SITEROOT | awk '{print $3}' > temp-found.libs.tmp
-  sort temp-missing.libs.tmp | uniq > temp-missing.libs
-  sort temp-found.libs.tmp | uniq > temp-found.libs
-  rm -f temp-missing.libs.tmp temp-found.libs.tmp temp.libs
-  MISSING_LIBS=`cat temp-missing.libs | wc -l`
-  FOUND_LIBS=`cat temp-found.libs | wc -l`
-  if [ $MISSING_LIBS -ne 0 ] ; then
-    printf "${C_FAILURE}%d %s" $MISSING_LIBS "missing librar"
-    [ $MISSING_LIBS -gt 1 ] && printf "%s${C_NORMAL}\n" "ies:" \
-                       || printf "%s${C_NORMAL}\n" "y:"
-    cat temp-missing.libs
-    if [ "$VERBOSE" == "yes" ] ; then
-      echo -e "${C_SPECIAL}List of library paths searched:${C_NORMAL}"
-      for item in `echo ${LD_LIBRARY_PATH} | sed 's/:/ /g'`; do
-        echo -e "   $item"
-      done
-    fi
-    retcode=1
-  else
-    if [ "$VERBOSE" = "yes" ] ; then
-      printf "${C_SUCCESS}%d librar" $FOUND_LIBS
-      [ $FOUND_LIBS -gt 1 ] && printf "%s " "ies" || printf "%s " "y"
-      printf "%s${C_NORMAL}\n" "found and checked"
-    fi
-  fi
-  rm -fr temp-missing.libs temp-found.libs
-
-  return $retcode 
-}
-
-
-###################################################
-#                  Main script                    #
-###################################################
-
-# Defaults
-T_RELEASE=8.1.0
-T_RELEASEBASE=dist
-ATLAS_ROOT=${SITEROOT}
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-T_TRANSVER=1.0.0
-T_TRANSDESC="RunTime Simple Checks"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the run time environment
-kvtSetup
-
-if [ "${VERBOSE}" = "yes" ] ; then
-  echo "################################################"
-  echo "##         Performing simple checks           ##"
-  echo "################################################"
-fi
-
-# Overall return code
-overall_retcode=0
-
-# Check if athena.py is there
-EXE=`which athena.py 2> /dev/null`
-retcode=$?
-printf "%-45s " "athena executable"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  overall_retcode=1
-  [ "$T_NOSTOP" = "no" ] && (cd /tmp; rm -fr ${T_TMPDIR}; exit ${retcode})
-fi
-
-# Check if athena has all basic shared libraries available
-SHLIB=$EXE
-checkSharedLibs
-retcode=$?
-printf "%-45s " "athena shared libs"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  overall_retcode=1
-  [ "$T_NOSTOP" = "no" ] && (cd /tmp; rm -fr ${T_TMPDIR}; exit ${retcode})
-fi
-
-# Check the shared libraries in
-# $ATLAS_ROOT/dist/$T_RELEASE/InstallArea/$CMTCONFIG/lib
-SHLIB=${ATLAS_ROOT}/dist/${T_RELEASE}/InstallArea/${CMTCONFIG}/lib
-checkSharedLibs
-retcode=$?
-printf "%-45s " "Release shared libraries"
-if [ ${retcode} -eq 0 ] ; then
-  printf "[${C_PASSED}PASSED${C_NORMAL}]\n"
-else
-  printf "[${C_FAILURE}FAILED${C_NORMAL}]\n"
-  overall_retcode=1
-  [ "$T_NOSTOP" = "no" ] && (cd /tmp; rm -fr ${T_TMPDIR}; exit ${retcode})
-fi
-
-# Clean up
-cd /tmp; rm -fr ${T_TMPDIR}
-
-exit $overall_retcode
diff --git a/Tools/JobTransforms/share/dc2.atlfast.trf b/Tools/JobTransforms/share/dc2.atlfast.trf
deleted file mode 100755
index 0d29cc03858c..000000000000
--- a/Tools/JobTransforms/share/dc2.atlfast.trf
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 atlfast transformation                                            ##
-## uses Atlas (version >= 8.0.1)                                         ##
-## signature: inputfile histname ntupname first total                    ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate atlfast ntuple from generation file                          ##
-##                                                                       ##
-## (C) Alessandro De Salvo                                               ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -lt 5; then
-  echo "DC2 atlfast transformation v$T_CORETRANSVER"
-  echo usage: `basename $0`  "<inputfile>" "<histname>" "<ntupname>" "<first>" "<total>" 
-  exit 30
-fi
-
-#####################################################
-
-export INFN=$1
-export HIST=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-
-
-########## START TRANS
-
-cat > job.py <<EOF
-##############################################################
-#
-# Job options file
-#
-#==============================================================
-#
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-include ("GeneratorOptionsDC2/FromPooltoAltfasttoCBNT_root.py")
-HistogramPersistencySvc.OutputFile  = "$HIST"
-NtupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-EOF
-else
-cat >> job.py << EOF
-include ("GeneratorOptionsDC2/FromPooltoAltfasttoCBNT.py")
-HistogramPersistencySvc.OutputFile  = "$HIST";
-NtupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-EOF
-fi
-
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-MessageSvc.OutputLevel = 5
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ
-EventSelector = Algorithm ("EventSelector")
-EventSelector.InputCollections = ["$INFN"]
-EventSelector.FirstEvent  = $MYFIRST
-
-#
-###############################################################
-EOF
-
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-echo "##working directory is:" `pwd`
-grep MHz /var/log/dmesg 
-echo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f $T_POOLFILE ] ; then
-  echo "##"
-  echo "## ... copying $T_POOLFILE ..."
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$HIST" ] && retcode=43
-  [ ! -s "$NTUP" -a ! -s "$HIST" ] && retcode=44
-fi
-
-echo " "
-echo "End of job."
-
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.eventmixing.RDO.trf b/Tools/JobTransforms/share/dc2.eventmixing.RDO.trf
deleted file mode 100755
index ed21f1e15442..000000000000
--- a/Tools/JobTransforms/share/dc2.eventmixing.RDO.trf
+++ /dev/null
@@ -1,421 +0,0 @@
-#! /usr/bin/env sh
-
-##########################################################
-##  RDO event mixing                                    ##
-##  with ATLAS Release >= 9.0.0                         ##
-##  Writes BS output in EventStorage format.            ##
-##                                                      ##
-##  (C) Armin Nairz, Nectarios Benekos,                 ##
-##      Alessandro De Salvo                             ##
-##########################################################
-
-T_CORETRANSVER=1.1.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="9.0.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 8 ; then
-  echo "Event mixing transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <dset> <outfilename> <nevt> <mixing_options>"
-  echo 
-  echo "  <dset> ............ dataset number"
-  echo "  <streamsdef> ...... event ranges for streams (comma separated list). In the form"
-  echo "                      <first [stream 1]>:<last [stream 1]>,<first [stream 2]>:<last [stream 2]>"
-  echo "  <inputfiles> ...... input files for streams (comma separated list). In the form"
-  echo "                      <file 1 [stream 1]>:<file 2 [stream 1]>,<file 1 [stream 2]>,..."
-  echo "  <outfilename> ..... local name of output file"
-  echo "  <nevt> ............ number of output events to be processed" 
-  echo "  <numberofSFO> ..... number of Event Filter Subfarm Output Managers"
-  echo "  <filenum> ......... file number"
-  echo "  <offset> .......... offset for event numbers"
-  echo ""
-  echo "Info: /afs/cern.ch/atlas/project/dc2/preprod805/evtmix805/jobOptionsFragment.txt"
-  echo
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  sigfilename mbfilename outfilename numcolls nevt skip
-#--------------------------------------------------------------------------
-export DSET=$1
-export STREAMS=$2
-export INFN=$3
-export OUTFN=$4
-export NEVT=$5
-export NSFO=$6
-export FNUM=$7
-export OFFS=$8
- 
-#--------------------------------------------------------------------------
-#    set up and run event-mixing job
-#--------------------------------------------------------------------------
-
-echo "#######################   ATLAS Event Mixing   ###################"
-echo "#######################        ATLAS RDO       ###################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-unset LOCALSIM
-unset LOCALRUNDIR
-unset POOL_OUTMSG_LEVEL 
-unset POOL_STORAGESVC_DB_AGE_LIMIT
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the paches, if needed
-T_PATCHES=EventMixingPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions fragment
-#--------------------------------------------------------------------------
-T_JOBOPTFRAG=jobOptions.EvtMix_fragment.py
-rm -f $T_JOBOPTFRAG
-echo "## ... generating job option fragment $T_JOBOPTFRAG"
-cat > $T_JOBOPTFRAG << EOD
-EventMixer = Algorithm( "EventMixer" )
-EOD
-
-# Event mixer triggers
-let counter=0
-echo $STREAMS | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  FIRST="`echo $stream | cut -d ':' -f 1`"
-  LAST="`echo $stream | cut -d ':' -f 2`"
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-EventMixer.TriggerList += [ "EventSelectorAthenaPool/InputStream${STREAMNUM}Selector:${FIRST}:${LAST}" ];
-EOF
-done
-echo >> $T_JOBOPTFRAG
-
-# Event mixer input streams
-let counter=0
-echo $INFN | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-InputStream${STREAMNUM}Selector = Algorithm( "InputStream${STREAMNUM}Selector" )
-InputStream${STREAMNUM}Selector.InputCollections = [
-EOF
-  echo $stream | awk -F ':' '{ for (i=1; i<=NF; i++) { \
-                                 if (i<NF) { \
-                                   print "\""$i"\"," \
-                                 } else { \
-                                   print "\""$i"\"" } } }' \
-               >> $T_JOBOPTFRAG
-  echo "]" >> $T_JOBOPTFRAG
-done
-
-# Event mixer events
-cat >> $T_JOBOPTFRAG << EOF
-
-EventMixer.EventNumbers = [
-EOF
-
-# Lookup table for overall ordering for event numbers:
-declare -a lookup=(0 1 2 6 5 4 3 7 8 9)
-
-offset=$(((NSFO*(FNUM/NSFO)*NEVT)+(FNUM%NSFO)))
-let counter=0
-lineout=""
-for i in `seq 0 $((NEVT-1))`; do
-  let counter=$counter+1
-  ibase=$((10*(i/10)))
-  imod=$((i%10))
-  evtno=$((offset+NSFO*(ibase+lookup[imod])+OFFS))
-  lineout="${lineout} ${evtno}"
-  if [ $i -lt $((NEVT-1)) ] ; then
-    lineout="${lineout},"
-  fi
-  if [ $counter -ge 10 -o $i -eq $((NEVT-1)) ] ; then
-    echo $lineout >> $T_JOBOPTFRAG
-    lineout=""
-    let counter=0
-  fi
-done
-
-echo "]" >> $T_JOBOPTFRAG
-
-#--------------------------------------------------------------------------
-echo "## ... whose content is "
-echo "---------------------------------------------------------------------"
-cat $T_JOBOPTFRAG
-echo "---------------------------------------------------------------------"
-echo " "
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions file
-#--------------------------------------------------------------------------
-cat > jobOptions.EvtMix_RDO.py <<EOF
- 
-#==============================================================
-#
-#  JobOptions file for RDO Event Mixing
-#
-#  Authors: Paolo Calafiura
-#           Nectarios Chr. Benekos
-#           Armin Nairz
-#
-#==============================================================
-                                                                                
-include( "AthenaCommon/Atlas.UnixStandardJob.py" )
-                                                                                
-theApp.Dlls += [ "PoolSvc", "AthenaPoolCnvSvc", "AthenaPoolCnvSvcPoolCnv", "EventSelectorAthenaPool" ]
-EventPersistencySvc = Service( "EventPersistencySvc" )
-EventPersistencySvc.CnvServices += [ "AthenaPoolCnvSvc" ]
-theApp.Dlls += [ "McEventSelector" ]
-include( "AthenaSealSvc/AthenaSealSvc_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# POOL Converters
-#--------------------------------------------------------------
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-include( "TrigT1EventAthenaPool/TrigT1EventAthenaPool_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# GeoModel and DetDescr options
-#--------------------------------------------------------------
-include( "AtlasGeoModel/GeoModelCommon.py" )
-                                                                                
-# Inner Detector
-include( "AtlasGeoModel/InDetGeoModel.py" )
-theApp.Dlls += [ "InDetRawUtils" ]
-                                                                                
-# Calorimeters
-include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
-include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" )
-include( "TileDetMgrDetDescrCnv/TileDetMgrDetDescrCnv_jobOptions.py" )
-include( "TileConditions/TileConditions_jobOptions.py" )
-                                                                                
-# Muons
-include( "AtlasGeoModel/MuonGeoModel.py" )
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.Muon_setOn()
-include( "AmdcAth/AmdcAth_jobOptions.py" )
-#include( "AmdbAth/AmdbAth_jobOptions.py" )
-include( "MuonByteStreamCnvTest/MuonRdoDigit_jobOptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# Event-mixing options
-#--------------------------------------------------------------
-ProxyProviderSvc = Service( "ProxyProviderSvc" )
-theApp.ExtSvc += [ "MixingEventSelector/EventMixer" ]
-ProxyProviderSvc.ProviderNames += [ "EventMixer" ]
-                                                                                
-theApp.EvtSel = "EventMixer"
-EventMixer = Algorithm( "EventMixer" )
-EventMixer.OutputRunNumber = $DSET
-include( "$T_JOBOPTFRAG" )
-                                                                                
-#--------------------------------------------------------------
-# Options for writing to POOL
-#--------------------------------------------------------------
-theApp.OutStream     = [ "Stream1" ];
-theApp.OutStreamType = "AthenaOutputStream";
-Stream1 = Algorithm( "Stream1" )
-Stream1.EvtConversionSvc = "AthenaPoolCnvSvc";
-                                                                                
-Stream1.ForceRead = True   # Force read of output data objects
-
-Stream1.OutputFile = "$OUTFN"
-
-# Define output stream
-Stream1.ItemList += [ "EventInfo#*" ];
-Stream1.ItemList += [ "McEventCollection#*" ];
-##from InDetDigitization
-Stream1.ItemList += [ "PixelRDO_Container#*" ];
-Stream1.ItemList += [ "SCT_RDO_Container#*" ];
-Stream1.ItemList += [ "TRT_RDO_Container#*" ]
-Stream1.ItemList += [ "InDetSimDataCollection#*" ];
-##from CaloDigitization
-Stream1.ItemList += [ "LArRawChannelContainer#*" ]
-Stream1.ItemList += [ "TileRawChannelContainer#*" ]
-##from MuonDigitization
-Stream1.ItemList += [ "CscRawDataContainer#*" ]
-Stream1.ItemList += [ "MdtCsmContainer#*" ]
-Stream1.ItemList += [ "RpcPadContainer#*" ]
-Stream1.ItemList += [ "TgcRdoContainer#*" ]
-Stream1.ItemList += [ "TrackRecordCollection#*" ]
-Stream1.ItemList += [ "MuonSimDataCollection#*" ]
-##from LVL1
-Stream1.ItemList += [ "ROIB::RoIBResult#*", "MuCTPI_RDO#*" ]
-
-#--------------------------------------------------------------
-# Event-related parameters
-#--------------------------------------------------------------
-# Number of output events to be processed
-theApp.EvtMax = $NEVT
-                                                                                
-#--------------------------------------------------------------
-# Monitor and debug printouts
-#--------------------------------------------------------------
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = 4
-MessageSvc.setVerbose += [ "MixingEventSelector::TriggerList" ]
-EventMixer.OutputLevel = 1
-Stream1.OutputLevel    = 4
-                                                                                
-AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
-AthenaEventLoopMgr.OutputLevel = 3;  #get event printout
-                                                                                
-#--------------------------------------------------------------
-# Write out a summary of the time spent
-#--------------------------------------------------------------
-theApp.Dlls += [ "GaudiAud" ]
-theAuditorSvc = AuditorSvc()
-theAuditorSvc.Auditors += [ "ChronoAuditor" ]
-                                                                                
-ChronoStatSvc = Service( "ChronoStatSvc" )
-ChronoStatSvc.OutputLevel = 3
-                                                                                
-#==============================================================
-                                                                                
-EOF
-
-# If $T_ATLASMYSQLSERVER is set, use the address $T_ATLASMYSQLSERVER for the DB
-# otherwise use the default servers
-if [ "$T_ATLASMYSQLSERVER" != "" ] ; then
-cat >> jobOptions.EvtMix_RDO.py <<EOF
-NovaCnvSvc.Host = "$T_ATLASMYSQLSERVER"
-IOVDbSvc.serverName="$T_ATLASMYSQLSERVER"
-                                                                                
-#==============================================================
-EOF
-
-# Create a conf file for mysql
-cat > my.cnf << EOF
-[client]
-host = $T_ATLASMYSQLSERVER
-database = LArNBDC2
-
-[reader]
-user = reader
-
-EOF
-fi
-
-#--------------------------------------------------------------------------
-
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-else
-  cat PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-export POOL_STORAGESVC_DB_AGE_LIMIT=50
-echo "## ... setting POOL_STORAGESVC_DB_AGE_LIMIT=$POOL_STORAGESVC_DB_AGE_LIMIT"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-#--------------------------------------------------------------------------
-
-#############################################
-##        TEMPORARY BUG WORKAROUND         ##
-##                                         ##
-## Create an entry for the output pool     ##
-## file in the PoolFileCatalog.xml catalog ##
-#############################################
-
-FCregisterPFN -p $OUTFN -t ROOT_All
-retcode=$?
-
-# Exit immediately if an error occurs
-if [ $retcode -ne 0 ] ; then
-  exit $retcode
-fi
-
-#--------------------------------------------------------------------------
-
-time athena.py -b jobOptions.EvtMix_RDO.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-echo SIZE: `ls -l $OUTFN`     
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "end of job"
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.eventmixing.layoutP.trf b/Tools/JobTransforms/share/dc2.eventmixing.layoutP.trf
deleted file mode 100755
index e45f6b81653a..000000000000
--- a/Tools/JobTransforms/share/dc2.eventmixing.layoutP.trf
+++ /dev/null
@@ -1,449 +0,0 @@
-#! /usr/bin/env sh
-
-##########################################################
-##  RDO event mixing                                    ##
-##  with ATLAS Release >= 9.0.0                         ##
-##  Writes BS output in EventStorage format.            ##
-##                                                      ##
-##  (C) Armin Nairz, Nectarios Benekos,                 ##
-##      Alessandro De Salvo                             ##
-##########################################################
-
-T_CORETRANSVER=1.1.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="9.0.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-[ "$T_TRFDATAPATH" = "" ] && T_TRFDATAPATH=`dirname $0`
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 8 ; then
-  echo "Event mixing transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <dset> <outfilename> <nevt> <mixing_options>"
-  echo 
-  echo "  <dset> ............ dataset number"
-  echo "  <streamsdef> ...... event ranges for streams (comma separated list). In the form"
-  echo "                      <first [stream 1]>:<last [stream 1]>,<first [stream 2]>:<last [stream 2]>"
-  echo "  <inputfiles> ...... input files for streams (comma separated list). In the form"
-  echo "                      <file 1 [stream 1]>:<file 2 [stream 1]>,<file 1 [stream 2]>,..."
-  echo "  <outfilename> ..... local name of output file"
-  echo "  <nevt> ............ number of output events to be processed" 
-  echo "  <numberofSFO> ..... number of Event Filter Subfarm Output Managers"
-  echo "  <filenum> ......... file number"
-  echo "  <offset> .......... offset for event numbers"
-  echo ""
-  echo "Info: /afs/cern.ch/atlas/project/dc2/preprod805/evtmix805/jobOptionsFragment.txt"
-  echo
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  sigfilename mbfilename outfilename numcolls nevt skip
-#--------------------------------------------------------------------------
-export DSET=$1
-export STREAMS=$2
-export INFN=$3
-export OUTFN=$4
-export NEVT=$5
-export NSFO=$6
-export FNUM=$7
-export OFFS=$8
- 
-#--------------------------------------------------------------------------
-#    set up and run event-mixing job
-#--------------------------------------------------------------------------
-
-echo "#######################   ATLAS Event Mixing   ###################"
-echo "####################### ATLAS RDO-->ByteSTream ###################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-unset LOCALSIM
-unset LOCALRUNDIR
-unset POOL_OUTMSG_LEVEL 
-unset POOL_STORAGESVC_DB_AGE_LIMIT
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-export DATAPATH=$T_TRFDATAPATH:$DATAPATH
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the paches, if needed
-T_PATCHES=EventMixingPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions fragment
-#--------------------------------------------------------------------------
-T_JOBOPTFRAG=jobOptions.EvtMix_fragment.py
-rm -f $T_JOBOPTFRAG
-echo "## ... generating job option fragment $T_JOBOPTFRAG"
-cat > $T_JOBOPTFRAG << EOD
-EventMixer = Algorithm( "EventMixer" )
-EOD
-
-# Event mixer triggers
-let counter=0
-echo $STREAMS | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  FIRST="`echo $stream | cut -d ':' -f 1`"
-  LAST="`echo $stream | cut -d ':' -f 2`"
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-EventMixer.TriggerList += [ "EventSelectorAthenaPool/InputStream${STREAMNUM}Selector:${FIRST}:${LAST}" ];
-EOF
-done
-echo >> $T_JOBOPTFRAG
-
-# Event mixer input streams
-let counter=0
-echo $INFN | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-InputStream${STREAMNUM}Selector = Algorithm( "InputStream${STREAMNUM}Selector" )
-InputStream${STREAMNUM}Selector.InputCollections = [
-EOF
-  echo $stream | awk -F ':' '{ for (i=1; i<=NF; i++) { \
-                                 if (i<NF) { \
-                                   print "\""$i"\"," \
-                                 } else { \
-                                   print "\""$i"\"" } } }' \
-               >> $T_JOBOPTFRAG
-  echo "]" >> $T_JOBOPTFRAG
-done
-
-# Event mixer events
-cat >> $T_JOBOPTFRAG << EOF
-
-EventMixer.EventNumbers = [
-EOF
-
-# Lookup table for overall ordering for event numbers:
-declare -a lookup=(0 1 2 6 5 4 3 7 8 9)
-
-offset=$(((NSFO*(FNUM/NSFO)*NEVT)+(FNUM%NSFO)))
-let counter=0
-lineout=""
-for i in `seq 0 $((NEVT-1))`; do
-  let counter=$counter+1
-  ibase=$((10*(i/10)))
-  imod=$((i%10))
-  evtno=$((offset+NSFO*(ibase+lookup[imod])+OFFS))
-  lineout="${lineout} ${evtno}"
-  if [ $i -lt $((NEVT-1)) ] ; then
-    lineout="${lineout},"
-  fi
-  if [ $counter -ge 10 -o $i -eq $((NEVT-1)) ] ; then
-    echo $lineout >> $T_JOBOPTFRAG
-    lineout=""
-    let counter=0
-  fi
-done
-
-echo "]" >> $T_JOBOPTFRAG
-
-#--------------------------------------------------------------------------
-echo "## ... whose content is "
-echo "---------------------------------------------------------------------"
-cat $T_JOBOPTFRAG
-echo "---------------------------------------------------------------------"
-echo " "
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions file
-#--------------------------------------------------------------------------
-cat > jobOptions.EvtMix_RDO.py <<EOF
- 
-#==============================================================
-#
-#  JobOptions file for RDO Event Mixing
-#
-#  Authors: Paolo Calafiura
-#           Nectarios Chr. Benekos
-#           Armin Nairz
-#
-#==============================================================
-                                                                                
-include( "AthenaCommon/Atlas.UnixStandardJob.py" )
-                                                                                
-theApp.Dlls += [ "PoolSvc", "AthenaPoolCnvSvc", "AthenaPoolCnvSvcPoolCnv", "EventSelectorAthenaPool" ]
-EventPersistencySvc = Service( "EventPersistencySvc" )
-EventPersistencySvc.CnvServices += [ "AthenaPoolCnvSvc" ]
-theApp.Dlls += [ "McEventSelector" ]
-include( "AthenaSealSvc/AthenaSealSvc_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# POOL Converters
-#--------------------------------------------------------------
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-include( "TrigT1EventAthenaPool/TrigT1EventAthenaPool_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# GeoModel and DetDescr options
-#--------------------------------------------------------------
-include( "AtlasGeoModel/GeoModelCommon.py" )
-                                                                                
-# Inner Detector
-include( "AtlasGeoModel/InDetGeoModel.py" )
-theApp.Dlls += [ "InDetRawUtils" ]
-                                                                                
-# Calorimeters
-include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
-include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" )
-include( "TileDetMgrDetDescrCnv/TileDetMgrDetDescrCnv_jobOptions.py" )
-include( "TileConditions/TileConditions_jobOptions.py" )
-                                                                                
-# Muons
-include( "AtlasGeoModel/MuonGeoModel.py" )
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.Muon_setOn()
-include( "AmdcAth/AmdcAth_jobOptions.py" )
-#include( "AmdbAth/AmdbAth_jobOptions.py" )
-include( "MuonByteStreamCnvTest/MuonRdoDigit_jobOptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# Event-mixing options
-#--------------------------------------------------------------
-ProxyProviderSvc = Service( "ProxyProviderSvc" )
-theApp.ExtSvc += [ "MixingEventSelector/EventMixer" ]
-ProxyProviderSvc.ProviderNames += [ "EventMixer" ]
-                                                                                
-theApp.EvtSel = "EventMixer"
-EventMixer = Algorithm( "EventMixer" )
-EventMixer.OutputRunNumber = $DSET
-include( "$T_JOBOPTFRAG" )
-                                                                                
-#--------------------------------------------------------------
-# Options for writing ByteStream
-#--------------------------------------------------------------
-#
-
-include( "ByteStreamCnvSvc/WriteByteStream_EventStorage_jobOptions.py" )
-
-# Force reading of output stream
-StreamBS = Algorithm( "StreamBS" )
-StreamBS.ForceRead = TRUE
-# Sub-detector BS
-# Inner Detector
-#--------------------------------------------------------------
-# #include "InDetRawDataByteStream/WriteInDetBS_jobOptions.txt"
-theApp.Dlls += [ "InDetRawDataByteStream" ]
-theApp.Dlls += [ "InDetRawUtils" ]
-StreamBS.ItemList += [ "TRT_RDO_Container#*" ]; 
-StreamBS.ItemList += [ "SCT_RDO_Container#*" ]; 
-StreamBS.ItemList += [ "PixelRDO_Container#*" ]
-# Read RDOs
-##include "InDetRawDataByteStream/InDetRawDataReadExample_jobOptions.txt"
-theApp.Dlls += [ "InDetReadExample" ]
-theApp.TopAlg     += [ "ReadInDetRawData/ReadTRT_RDO" ];  # TRT
-ReadTRT_RDO = Algorithm( "ReadTRT_RDO" )
-ReadTRT_RDO.DataObjectName = "TRT_RDOs"
-theApp.TopAlg     += [ "ReadInDetRawData/ReadSCT_RDO" ];  # SCT
-ReadSCT_RDO = Algorithm( "ReadSCT_RDO" )
-ReadSCT_RDO.DataObjectName = "SCT_RDOs"
-theApp.TopAlg      += [ "ReadInDetRawData/ReadPixelRDO" ]; # Pixel
-ReadPixelRDO = Algorithm( "ReadPixelRDO" )
-ReadPixelRDO.DataObjectName = "PixelRDOs"
-# Calorimeters
-#--------------------------------------------------------------
-# LAr
-ToolSvc = Service( "ToolSvc" )
-ToolSvc.LArRoI_Map.Print = FALSE
-theApp.Dlls += [ "LArRawUtils", "LArByteStream" ]
-StreamBS.ItemList   += [ "LArRawChannelContainer#*" ]
-# Tile
-include( "TileConditions/TileConditions_jobOptions.py" )
-
-theApp.Dlls += [ "TileByteStream" ]
-StreamBS.ItemList   += [ "TileRawChannelContainer#*" ]
-# Muons
-#--------------------------------------------------------------
-include( "MuonByteStreamCnvTest/MuonRdoDigit_jobOptions.py" )
-
-# #include "MuonByteStream/WriteMuonByteStream_jobOptions.txt"
-theApp.Dlls   += [ "MuonByteStream" ]
-theApp.TopAlg += [ "ReadMdtRDO" ]
-theApp.TopAlg += [ "ReadRpcRDO" ]; 
-theApp.TopAlg += [ "ReadTgcRDO" ]
-theApp.TopAlg += [ "ReadCscRDO" ]
-StreamBS.ItemList += [ "MdtCsmContainer#*" ]
-StreamBS.ItemList += [ "RpcPadContainer#*" ]
-StreamBS.ItemList += [ "TgcRdoContainer#*" ]
-StreamBS.ItemList += [ "CscRawDataContainer#*" ]
-# LVL1 (not used for DC2 pile-up events)
-#--------------------------------------------------------------
-theApp.Dlls += [ "TrigT1ResultByteStream" ]
-StreamBS.ItemList   += [ "ROIB::RoIBResult#*", "MuCTPI_RDO#*" ]
-
-#--------------------------------------------------------------
-# Use Muon Layout P
-#--------------------------------------------------------------
-RPCcablingSvc = Service ("RPCcablingSvc")
-RPCcablingSvc.ConfFileName    = "P03conf.data"
-RPCcablingSvc.CorrFileName    = "P03conf.corr"
-
-MDTcablingSvc = Service ("MDTcablingSvc")
-MDTcablingSvc.RODfile         = "P03_RODmap.data"
-
-#
-#--------------------------------------------------------------
-# Event-related parameters
-#--------------------------------------------------------------
-# Number of output events to be processed
-theApp.EvtMax = $NEVT
-#--------------------------------------------------------------
-# Monitor and debug printouts
-#--------------------------------------------------------------
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = 4
-MessageSvc.setVerbose += [ "MixingEventSelector::TriggerList" ]
-EventMixer.OutputLevel = 1
-StreamBS.OutputLevel   = 4
-AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
-AthenaEventLoopMgr.OutputLevel = 3;  
-#get event printout
-
-# Write out a summary of the time spent
-#--------------------------------------------------------------
-theApp.Dlls += [ "GaudiAud" ]
-theAuditorSvc = AuditorSvc()
-theAuditorSvc.Auditors += [ "ChronoAuditor" ]
-                                                                                
-ChronoStatSvc = Service( "ChronoStatSvc" )
-ChronoStatSvc.OutputLevel = 3
-                                                                                
-#==============================================================
-                                                                                
-EOF
-
-# If $T_ATLASMYSQLSERVER is set, use the address $T_ATLASMYSQLSERVER for the DB
-# otherwise use the default servers
-if [ "$T_ATLASMYSQLSERVER" != "" ] ; then
-cat >> jobOptions.EvtMix_RDO.py <<EOF
-NovaCnvSvc.Host = "$T_ATLASMYSQLSERVER"
-IOVDbSvc.serverName="$T_ATLASMYSQLSERVER"
-                                                                                
-#==============================================================
-EOF
-
-# Create a conf file for mysql
-cat > my.cnf << EOF
-[client]
-host = $T_ATLASMYSQLSERVER
-database = LArNBDC2
-
-[reader]
-user = reader
-
-EOF
-fi
-
-#--------------------------------------------------------------------------
-
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-else
-  cat PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-export POOL_STORAGESVC_DB_AGE_LIMIT=50
-echo "## ... setting POOL_STORAGESVC_DB_AGE_LIMIT=$POOL_STORAGESVC_DB_AGE_LIMIT"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-#--------------------------------------------------------------------------
-
-time  athena.py -b jobOptions.EvtMix_RDO.py  &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-#PN: rename output file
-echo " "
-ls -l daq_Athena_DC2*.data
-mv    daq_Athena_DC2*.data $OUTFN
-
-echo SIZE: `ls -l $OUTFN`     
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "end of job"
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.eventmixing.trf b/Tools/JobTransforms/share/dc2.eventmixing.trf
deleted file mode 100755
index 5598d9da8502..000000000000
--- a/Tools/JobTransforms/share/dc2.eventmixing.trf
+++ /dev/null
@@ -1,438 +0,0 @@
-#! /usr/bin/env sh
-
-##########################################################
-##  RDO event mixing                                    ##
-##  with ATLAS Release >= 9.0.0                         ##
-##  Writes BS output in EventStorage format.            ##
-##                                                      ##
-##  (C) Armin Nairz, Nectarios Benekos,                 ##
-##      Alessandro De Salvo                             ##
-##########################################################
-
-T_CORETRANSVER=1.1.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="9.0.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-[ "$T_TRFDATAPATH" = "" ] && T_TRFDATAPATH=`dirname $0`
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 8 ; then
-  echo "Event mixing transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <dset> <outfilename> <nevt> <mixing_options>"
-  echo 
-  echo "  <dset> ............ dataset number"
-  echo "  <streamsdef> ...... event ranges for streams (comma separated list). In the form"
-  echo "                      <first [stream 1]>:<last [stream 1]>,<first [stream 2]>:<last [stream 2]>"
-  echo "  <inputfiles> ...... input files for streams (comma separated list). In the form"
-  echo "                      <file 1 [stream 1]>:<file 2 [stream 1]>,<file 1 [stream 2]>,..."
-  echo "  <outfilename> ..... local name of output file"
-  echo "  <nevt> ............ number of output events to be processed" 
-  echo "  <numberofSFO> ..... number of Event Filter Subfarm Output Managers"
-  echo "  <filenum> ......... file number"
-  echo "  <offset> .......... offset for event numbers"
-  echo ""
-  echo "Info: /afs/cern.ch/atlas/project/dc2/preprod805/evtmix805/jobOptionsFragment.txt"
-  echo
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  sigfilename mbfilename outfilename numcolls nevt skip
-#--------------------------------------------------------------------------
-export DSET=$1
-export STREAMS=$2
-export INFN=$3
-export OUTFN=$4
-export NEVT=$5
-export NSFO=$6
-export FNUM=$7
-export OFFS=$8
- 
-#--------------------------------------------------------------------------
-#    set up and run event-mixing job
-#--------------------------------------------------------------------------
-
-echo "#######################   ATLAS Event Mixing   ###################"
-echo "####################### ATLAS RDO-->ByteSTream ###################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-unset LOCALSIM
-unset LOCALRUNDIR
-unset POOL_OUTMSG_LEVEL 
-unset POOL_STORAGESVC_DB_AGE_LIMIT
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-export DATAPATH=$T_TRFDATAPATH:$DATAPATH
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the paches, if needed
-T_PATCHES=EventMixingPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions fragment
-#--------------------------------------------------------------------------
-T_JOBOPTFRAG=jobOptions.EvtMix_fragment.py
-rm -f $T_JOBOPTFRAG
-echo "## ... generating job option fragment $T_JOBOPTFRAG"
-cat > $T_JOBOPTFRAG << EOD
-EventMixer = Algorithm( "EventMixer" )
-EOD
-
-# Event mixer triggers
-let counter=0
-echo $STREAMS | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  FIRST="`echo $stream | cut -d ':' -f 1`"
-  LAST="`echo $stream | cut -d ':' -f 2`"
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-EventMixer.TriggerList += [ "EventSelectorAthenaPool/InputStream${STREAMNUM}Selector:${FIRST}:${LAST}" ];
-EOF
-done
-echo >> $T_JOBOPTFRAG
-
-# Event mixer input streams
-let counter=0
-echo $INFN | awk -F ',' '{ for (i=1; i<=NF; i++) print $i}' | \
-while read stream; do
-  let counter=$counter+1
-  STREAMNUM="`printf "%02d" $counter`"
-cat >> $T_JOBOPTFRAG <<EOF
-InputStream${STREAMNUM}Selector = Algorithm( "InputStream${STREAMNUM}Selector" )
-InputStream${STREAMNUM}Selector.InputCollections = [
-EOF
-  echo $stream | awk -F ':' '{ for (i=1; i<=NF; i++) { \
-                                 if (i<NF) { \
-                                   print "\""$i"\"," \
-                                 } else { \
-                                   print "\""$i"\"" } } }' \
-               >> $T_JOBOPTFRAG
-  echo "]" >> $T_JOBOPTFRAG
-done
-
-# Event mixer events
-cat >> $T_JOBOPTFRAG << EOF
-
-EventMixer.EventNumbers = [
-EOF
-
-# Lookup table for overall ordering for event numbers:
-declare -a lookup=(0 1 2 6 5 4 3 7 8 9)
-
-offset=$(((NSFO*(FNUM/NSFO)*NEVT)+(FNUM%NSFO)))
-let counter=0
-lineout=""
-for i in `seq 0 $((NEVT-1))`; do
-  let counter=$counter+1
-  ibase=$((10*(i/10)))
-  imod=$((i%10))
-  evtno=$((offset+NSFO*(ibase+lookup[imod])+OFFS))
-  lineout="${lineout} ${evtno}"
-  if [ $i -lt $((NEVT-1)) ] ; then
-    lineout="${lineout},"
-  fi
-  if [ $counter -ge 10 -o $i -eq $((NEVT-1)) ] ; then
-    echo $lineout >> $T_JOBOPTFRAG
-    lineout=""
-    let counter=0
-  fi
-done
-
-echo "]" >> $T_JOBOPTFRAG
-
-#--------------------------------------------------------------------------
-echo "## ... whose content is "
-echo "---------------------------------------------------------------------"
-cat $T_JOBOPTFRAG
-echo "---------------------------------------------------------------------"
-echo " "
-
-#--------------------------------------------------------------------------
-#  generate the jobOptions file
-#--------------------------------------------------------------------------
-cat > jobOptions.EvtMix_RDO.py <<EOF
- 
-#==============================================================
-#
-#  JobOptions file for RDO Event Mixing
-#
-#  Authors: Paolo Calafiura
-#           Nectarios Chr. Benekos
-#           Armin Nairz
-#
-#==============================================================
-                                                                                
-include( "AthenaCommon/Atlas.UnixStandardJob.py" )
-                                                                                
-theApp.Dlls += [ "PoolSvc", "AthenaPoolCnvSvc", "AthenaPoolCnvSvcPoolCnv", "EventSelectorAthenaPool" ]
-EventPersistencySvc = Service( "EventPersistencySvc" )
-EventPersistencySvc.CnvServices += [ "AthenaPoolCnvSvc" ]
-theApp.Dlls += [ "McEventSelector" ]
-include( "AthenaSealSvc/AthenaSealSvc_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# POOL Converters
-#--------------------------------------------------------------
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-include( "TrigT1EventAthenaPool/TrigT1EventAthenaPool_joboptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# GeoModel and DetDescr options
-#--------------------------------------------------------------
-include( "AtlasGeoModel/GeoModelCommon.py" )
-                                                                                
-# Inner Detector
-include( "AtlasGeoModel/InDetGeoModel.py" )
-theApp.Dlls += [ "InDetRawUtils" ]
-                                                                                
-# Calorimeters
-include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
-include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" )
-include( "TileDetMgrDetDescrCnv/TileDetMgrDetDescrCnv_jobOptions.py" )
-include( "TileConditions/TileConditions_jobOptions.py" )
-                                                                                
-# Muons
-include( "AtlasGeoModel/MuonGeoModel.py" )
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.Muon_setOn()
-include( "AmdcAth/AmdcAth_jobOptions.py" )
-#include( "AmdbAth/AmdbAth_jobOptions.py" )
-include( "MuonByteStreamCnvTest/MuonRdoDigit_jobOptions.py" )
-                                                                                
-#--------------------------------------------------------------
-# Event-mixing options
-#--------------------------------------------------------------
-ProxyProviderSvc = Service( "ProxyProviderSvc" )
-theApp.ExtSvc += [ "MixingEventSelector/EventMixer" ]
-ProxyProviderSvc.ProviderNames += [ "EventMixer" ]
-                                                                                
-theApp.EvtSel = "EventMixer"
-EventMixer = Algorithm( "EventMixer" )
-EventMixer.OutputRunNumber = $DSET
-include( "$T_JOBOPTFRAG" )
-                                                                                
-#--------------------------------------------------------------
-# Options for writing ByteStream
-#--------------------------------------------------------------
-#
-
-include( "ByteStreamCnvSvc/WriteByteStream_EventStorage_jobOptions.py" )
-
-# Force reading of output stream
-StreamBS = Algorithm( "StreamBS" )
-StreamBS.ForceRead = TRUE
-# Sub-detector BS
-# Inner Detector
-#--------------------------------------------------------------
-# #include "InDetRawDataByteStream/WriteInDetBS_jobOptions.txt"
-theApp.Dlls += [ "InDetRawDataByteStream" ]
-theApp.Dlls += [ "InDetRawUtils" ]
-StreamBS.ItemList += [ "TRT_RDO_Container#*" ]; 
-StreamBS.ItemList += [ "SCT_RDO_Container#*" ]; 
-StreamBS.ItemList += [ "PixelRDO_Container#*" ]
-# Read RDOs
-##include "InDetRawDataByteStream/InDetRawDataReadExample_jobOptions.txt"
-theApp.Dlls += [ "InDetReadExample" ]
-theApp.TopAlg     += [ "ReadInDetRawData/ReadTRT_RDO" ];  # TRT
-ReadTRT_RDO = Algorithm( "ReadTRT_RDO" )
-ReadTRT_RDO.DataObjectName = "TRT_RDOs"
-theApp.TopAlg     += [ "ReadInDetRawData/ReadSCT_RDO" ];  # SCT
-ReadSCT_RDO = Algorithm( "ReadSCT_RDO" )
-ReadSCT_RDO.DataObjectName = "SCT_RDOs"
-theApp.TopAlg      += [ "ReadInDetRawData/ReadPixelRDO" ]; # Pixel
-ReadPixelRDO = Algorithm( "ReadPixelRDO" )
-ReadPixelRDO.DataObjectName = "PixelRDOs"
-# Calorimeters
-#--------------------------------------------------------------
-# LAr
-ToolSvc = Service( "ToolSvc" )
-ToolSvc.LArRoI_Map.Print = FALSE
-theApp.Dlls += [ "LArRawUtils", "LArByteStream" ]
-StreamBS.ItemList   += [ "LArRawChannelContainer#*" ]
-# Tile
-include( "TileConditions/TileConditions_jobOptions.py" )
-
-theApp.Dlls += [ "TileByteStream" ]
-StreamBS.ItemList   += [ "TileRawChannelContainer#*" ]
-# Muons
-#--------------------------------------------------------------
-include( "MuonByteStreamCnvTest/MuonRdoDigit_jobOptions.py" )
-
-# #include "MuonByteStream/WriteMuonByteStream_jobOptions.txt"
-theApp.Dlls   += [ "MuonByteStream" ]
-theApp.TopAlg += [ "ReadMdtRDO" ]
-theApp.TopAlg += [ "ReadRpcRDO" ]; 
-theApp.TopAlg += [ "ReadTgcRDO" ]
-theApp.TopAlg += [ "ReadCscRDO" ]
-StreamBS.ItemList += [ "MdtCsmContainer#*" ]
-StreamBS.ItemList += [ "RpcPadContainer#*" ]
-StreamBS.ItemList += [ "TgcRdoContainer#*" ]
-StreamBS.ItemList += [ "CscRawDataContainer#*" ]
-# LVL1 (not used for DC2 pile-up events)
-#--------------------------------------------------------------
-theApp.Dlls += [ "TrigT1ResultByteStream" ]
-StreamBS.ItemList   += [ "ROIB::RoIBResult#*", "MuCTPI_RDO#*" ]
-#
-#--------------------------------------------------------------
-# Event-related parameters
-#--------------------------------------------------------------
-# Number of output events to be processed
-theApp.EvtMax = $NEVT
-#--------------------------------------------------------------
-# Monitor and debug printouts
-#--------------------------------------------------------------
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = 4
-MessageSvc.setVerbose += [ "MixingEventSelector::TriggerList" ]
-EventMixer.OutputLevel = 1
-StreamBS.OutputLevel   = 4
-AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
-AthenaEventLoopMgr.OutputLevel = 3;  
-#get event printout
-
-# Write out a summary of the time spent
-#--------------------------------------------------------------
-theApp.Dlls += [ "GaudiAud" ]
-theAuditorSvc = AuditorSvc()
-theAuditorSvc.Auditors += [ "ChronoAuditor" ]
-                                                                                
-ChronoStatSvc = Service( "ChronoStatSvc" )
-ChronoStatSvc.OutputLevel = 3
-                                                                                
-#==============================================================
-                                                                                
-EOF
-
-# If $T_ATLASMYSQLSERVER is set, use the address $T_ATLASMYSQLSERVER for the DB
-# otherwise use the default servers
-if [ "$T_ATLASMYSQLSERVER" != "" ] ; then
-cat >> jobOptions.EvtMix_RDO.py <<EOF
-NovaCnvSvc.Host = "$T_ATLASMYSQLSERVER"
-IOVDbSvc.serverName="$T_ATLASMYSQLSERVER"
-                                                                                
-#==============================================================
-EOF
-
-# Create a conf file for mysql
-cat > my.cnf << EOF
-[client]
-host = $T_ATLASMYSQLSERVER
-database = LArNBDC2
-
-[reader]
-user = reader
-
-EOF
-fi
-
-#--------------------------------------------------------------------------
-
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-else
-  cat PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-export POOL_STORAGESVC_DB_AGE_LIMIT=50
-echo "## ... setting POOL_STORAGESVC_DB_AGE_LIMIT=$POOL_STORAGESVC_DB_AGE_LIMIT"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-#--------------------------------------------------------------------------
-
-time  athena.py -b jobOptions.EvtMix_RDO.py  &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-#PN: rename output file
-echo " "
-ls -l daq_Athena_DC2*.data
-mv    daq_Athena_DC2*.data $OUTFN
-
-echo SIZE: `ls -l $OUTFN`     
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "end of job"
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.evgen.herwig.inputA0.trf b/Tools/JobTransforms/share/dc2.evgen.herwig.inputA0.trf
deleted file mode 100755
index eca392fa5f92..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.herwig.inputA0.trf
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia, Tauola, Herwig and Photos             ## 
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Nectarios Ch. Benekos, Armin Nairz, Alessandro De Salvo           ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# meta data writer
-source ${T_INCPATH}/metaData.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# patch engine
-source ${T_INCPATH}/patch.def
-                                                                                
-###########################################################################
-
-if test $# -lt 8; then
-  echo "DC2 event generation A0 transformation v$VERSION"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption>" "<input datacard>"
-  exit 30
-fi
-
-#####################################################
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export INPDATA=$8
-
-#--------------------------------------------------------------------------
-#    set up and run generation job
-#--------------------------------------------------------------------------
-
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-get_files inparmMcAtNloA0.dat 
-ln -s inparmMcAtNloA0.dat inparmMcAtNlo.dat 
-cp $INPDATA tt_dc2_test.events
-
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-                                                                                
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo 
-
-#########################################################################
-##START TRANS 
- 
-cat > job.py << EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include ( "PartPropSvc/PartPropSvc.py" )
-
-# Generator fragement
-theApp.DLLs  += [ "TruthExamples", "Herwig_i", "Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = [  "Herwig", "Tauola", "Photos" ]
-  
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["HERWIG 330020611 $MYRAN", "HERWIG_INIT 824021 3247532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532", 
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
- 
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
- 
-#--------------------------------------------------------------
-# Event-related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax            = $PARTSZ
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber  = $DSET
-EventSelector.FirstEvent = $MYFIRST
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc.OutputLevel = 2
-Stream1.OutputLevel    = 2
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
- 
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep 'NUMBER OF EVENTS' log | tail -n 1 | awk '{print $5}'`"
-  XSECTOT=`grep 'CROSS SECTION' log | tail -n 1 | awk '{print $5*1E-9}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo CROSS: `grep subprocess log | awk '{print $10}'`
-
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
- 
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.herwig.inputA4.trf b/Tools/JobTransforms/share/dc2.evgen.herwig.inputA4.trf
deleted file mode 100755
index c2bdb76257ce..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.herwig.inputA4.trf
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia, Tauola, Herwig and Photos             ## 
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Nectarios Ch. Benekos, Armin Nairz, Alessandro De Salvo           ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# meta data writer
-source ${T_INCPATH}/metaData.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# patch engine
-source ${T_INCPATH}/patch.def
-                                                                                
-###########################################################################
-
-if test $# -lt 8; then
-  echo "DC2 event generation A4 transformation v$VERSION"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption>" "<input datacard>"
-  exit 30
-fi
-
-#####################################################
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export INPDATA=$8
-
-#--------------------------------------------------------------------------
-#    set up and run generation job
-#--------------------------------------------------------------------------
-
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-get_files inparmMcAtNloA4.dat
-ln -s inparmMcAtNloA4.dat inparmMcAtNlo.dat 
-cp $INPDATA wj_dc2_test.events
-                                                                                
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-                                                                                
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo 
-
-#########################################################################
-##START TRANS 
- 
-cat > job.py << EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include( "PartPropSvc/PartPropSvc.py" )
-
-# Generator fragment
-theApp.Dlls  += ["TruthExamples", "Herwig_i", "Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = [ "Herwig", "Tauola", "Photos" ]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["HERWIG 330020611 $MYRAN", "HERWIG_INIT 824021 3247532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532", 
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
- 
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
- 
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ;
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber  = $DSET;
-EventSelector.FirstEvent = $MYFIRST;
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc.OutputLevel = 4;
-Stream1.OutputLevel    = 4;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep 'NUMBER OF EVENTS' log | tail -n 1 | awk '{print $5}'`"
-  XSECTOT=`grep 'CROSS SECTION' log | tail -n 1 | awk '{print $5*1E-9}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo CROSS: `grep subprocess log | awk '{print $10}'`
-
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
- 
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.herwig.trf b/Tools/JobTransforms/share/dc2.evgen.herwig.trf
deleted file mode 100755
index 1f895e758a49..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.herwig.trf
+++ /dev/null
@@ -1,232 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia, Tauola, Herwig and Photos             ## 
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Nectarios Ch. Benekos, Armin Nairz, Alessandro De Salvo           ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# meta data writer
-source ${T_INCPATH}/metaData.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# patch engine
-source ${T_INCPATH}/patch.def
-                                                                                
-###########################################################################
-
-if test $# -lt 7; then
-  echo "DC2 event generation herwig (A9) transformation v$VERSION"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption>"
-  exit 30
-fi
-
-#####################################################
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-
-#--------------------------------------------------------------------------
-#    set up and run generation job
-#--------------------------------------------------------------------------
-
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-get_files mean.isawig  
-                                                                                
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-                                                                                
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo 
-
-#########################################################################
-##START TRANS 
- 
-cat > job.py << EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include( "PartPropSvc/PartPropSvc.py" )
-
-# Generator fragment
-theApp.Dlls  += ["TruthExamples", "Herwig_i", "Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = [ "Herwig", "Tauola", "Photos" ]
-  
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-                                                                                
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["HERWIG 330020611 $MYRAN", "HERWIG_INIT 824021 3247532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532", 
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
- 
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
- 
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ;
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber  = $DSET;
-EventSelector.FirstEvent = $MYFIRST;
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc.OutputLevel = 4;
-Stream1.OutputLevel    = 4;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# ROOT NTuple output file
-#--------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# HBOOK NTuple output file
-#--------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep 'NUMBER OF EVENTS' log | tail -n 1 | awk '{print $5}'`"
-  XSECTOT=`grep 'CROSS SECTION' log | tail -n 1 | awk '{print $5*1E-9}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo CROSS: `grep subprocess log | awk '{print $10}'`
-
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
- 
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.pythia.inputA5.trf b/Tools/JobTransforms/share/dc2.evgen.pythia.inputA5.trf
deleted file mode 100755
index 17f71f95bc19..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.pythia.inputA5.trf
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia                                        ## 
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Nectarios Ch. Benekos, Armin Nairz, Alessandro De Salvo           ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# meta data writer
-source ${T_INCPATH}/metaData.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# patch engine
-source ${T_INCPATH}/patch.def
-                                                                                
-###########################################################################
-
-if test $# -lt 8; then
-  echo "DC2 event generation A5 transformation v$VERSION"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption>" "<input datacard>"
-  exit 30
-fi
-
-#####################################################
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export INPDATA=$8
-
-#--------------------------------------------------------------------------
-#    set up and run generation job
-#--------------------------------------------------------------------------
-
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-cp $INPDATA event_input.dat 
-                                                                                
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-                                                                                
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo 
-
-#########################################################################
-##START TRANS 
- 
-cat > job.py << EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include( "PartPropSvc/PartPropSvc.py" )
-
-# Generator fragment
-theApp.Dlls  += ["TruthExamples", "Herwig_i", "Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = [ "Herwig", "Tauola", "Photos" ]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["HERWIG 330020611 $MYRAN", "HERWIG_INIT 824021 3247532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532", 
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
- 
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
- 
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ;
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber  = $DSET;
-EventSelector.FirstEvent = $MYFIRST;
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc.OutputLevel = 4;
-Stream1.OutputLevel    = 4;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep subprocesses log | cut -d 'I' -f 3 | awk '{print $1}'`"
-  XSECTOT=`grep subprocesses log | cut -d 'I' -f 4 | awk '{print $1}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo CROSS: `grep subprocess log | awk '{print $10}'`
-
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
- 
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.pythia.inputA7.trf b/Tools/JobTransforms/share/dc2.evgen.pythia.inputA7.trf
deleted file mode 100755
index b6000c3d3ff0..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.pythia.inputA7.trf
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia                                        ## 
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Nectarios Ch. Benekos, Armin Nairz, Alessandro De Salvo           ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-                                                                                
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# meta data writer
-source ${T_INCPATH}/metaData.def
-                                                                                
-# colors
-source ${T_INCPATH}/colors.def
-                                                                                
-# patch engine
-source ${T_INCPATH}/patch.def
-                                                                                
-###########################################################################
-
-if test $# -lt 8; then
-  echo "DC2 event generation A7 transformation v$VERSION"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption>" "<input datacard>"
-  exit 30
-fi
-
-#####################################################
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export INPDATA=$8
-
-#--------------------------------------------------------------------------
-#    set up and run generation job
-#--------------------------------------------------------------------------
-
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-cp $INPDATA alpgen.unw_events 
-                                                                                
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-                                                                                
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-                                                                                
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo 
-
-#########################################################################
-##START TRANS 
- 
-cat > job.py << EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-
-include( "PartPropSvc/PartPropSvc.py" )
-
-# Generator fragment
-theApp.Dlls  += ["TruthExamples", "Herwig_i", "Tauola_i" ,"Photos_i" ]
-theApp.TopAlg = [ "Herwig", "Tauola", "Photos" ]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["HERWIG 330020611 $MYRAN", "HERWIG_INIT 824021 3247532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532", 
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
- 
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
- 
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ;
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber  = $DSET;
-EventSelector.FirstEvent = $MYFIRST;
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc.OutputLevel = 4;
-Stream1.OutputLevel    = 4;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep subprocesses log | cut -d 'I' -f 3 | awk '{print $1}'`"
-  XSECTOT=`grep subprocesses log | cut -d 'I' -f 4 | awk '{print $1}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo CROSS: `grep subprocess log | awk '{print $10}'`
-
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
- 
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.pythia.trf b/Tools/JobTransforms/share/dc2.evgen.pythia.trf
deleted file mode 100755
index 0e77dfc4eaaa..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.pythia.trf
+++ /dev/null
@@ -1,221 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia (HepMC data in POOL/ROOT format)       ##
-##                                                                       ##
-## (C) Armin Nairz, Alessandro De Salvo                                  ##
-###########################################################################
-
-T_CORETRANSVER=1.1.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -lt 7; then
-  echo "DC2 event generation transformation v$T_CORETRANSVER"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption> [<pythia cmd - overrides default>]" 
-  exit 30
-fi
-
-#####################################################
-
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export PYTCMD=$8
-
-
-########## START TRANS
-
-cat > job.py <<EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
- 
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-                                                                                
-include( "PartPropSvc/PartPropSvc.py" )
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-include ( "GeneratorOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 $MYRAN", "PYTHIA_INIT 820021 2347532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532",
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
-
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_pool_out_frag.py" )
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber   = $DSET
-EventSelector.FirstEvent  = $MYFIRST
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#--------------------------------------------------------------
-MessageSvc.OutputLevel = 5;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# ROOT NTuple output file
-#--------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# HBOOK NTuple output file
-#--------------------------------------------------------------
-include( "GeneratorOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-if [ "$PYTCMD" != "" ] ; then
-cat >> job.py <<EOF
-Pythia.PythiaCommand = $PYTCMD
-EOF
-fi
-
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-echo "##working directory is:" `pwd`
-grep MHz /var/log/dmesg 
-echo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-get_files -data Bdecays0.dat
-
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep subprocesses log | cut -d 'I' -f 3 | awk '{print $1}'`"
-  XSECTOT=`grep subprocesses log | cut -d 'I' -f 4 | awk '{print $1}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
-
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.evgen.pythiaB.trf b/Tools/JobTransforms/share/dc2.evgen.pythiaB.trf
deleted file mode 100755
index 0912dea7d8e5..000000000000
--- a/Tools/JobTransforms/share/dc2.evgen.pythiaB.trf
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## DC2 event generation transformation                                   ##
-## uses Atlas (version >= 8.0.2)                                         ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia (HepMC data in POOL/ROOT format)       ##
-##                                                                       ##
-## (C) Armin Nairz, Alessandro De Salvo                                  ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ]     && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -lt 7; then
-  echo "DC2 event generation (pythiaB) transformation v$T_CORETRANSVER"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<ntupname>" "<first>" "<total>" "<ran>" "<generation jobOption> [<pythia cmd - overrides default>]" 
-  exit 30
-fi
-
-#####################################################
-
-export DSET=$1
-export OUTFN=$2
-export NTUP=$3
-export MYFIRST=$4
-export PARTSZ=$5
-export MYRAN=$6
-export GENOPTS=$7
-export PYTCMD=$8
-
-
-########## START TRANS
-
-cat > job.py <<EOF
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup ( MONTECARLO )
-include ( "PartPropSvc/PartPropSvc.py" )
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-theApp.ExtSvc += ["AtRndmGenSvc"]
-#
-include ( "PythiaBOptionsDC2/$GENOPTS" )
-
-AtRndmGenSvc.Seeds = ["PYTHIA 4789899 $MYRAN", "PYTHIA_INIT 820021 2347532",
-                      "TAUOLA 1048027510 $MYRAN", "TAUOLA_INIT 920021 3347532",
-                      "PHOTOS 2045027510 $MYRAN", "PHOTOS_INIT 930021 3447532"]
-#
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include ( "PythiaBOptionsDC2/Generator_pool_out_frag.py" )
-#PoolSvc.Output = "$OUTFN"
-Stream1.OutputFile = "$OUTFN"
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ;
-EventSelector = Service ("EventSelector")
-EventSelector.RunNumber   = $DSET;
-EventSelector.FirstEvent  = $MYFIRST;
-
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-MessageSvc.OutputLevel    = 5;
-
-EOF
-
-if [ $T_USEROOTHIST ] ; then
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "GeneratorOptionsDC2/Generator_to_atlfast_root.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='ROOT'" ]
-#
-###############################################################
-EOF
-else
-cat >> job.py << EOF
-#--------------------------------------------------------------
-# NTuple output file
-#--------------------------------------------------------------
-include ( "PythiaBOptionsDC2/Generator_to_atlfast.py" )
-NTupleSvc.Output = [ "FILE1 DATAFILE='$NTUP' OPT='NEW' TYP='HBOOK'" ]
-#
-###############################################################
-EOF
-fi
-
-if [ "$PYTCMD" != "" ] ; then
-cat >> job.py <<EOF
-Pythia.PythiaCommand = $PYTCMD
-EOF
-fi
-
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-echo "##working directory is:" `pwd`
-grep MHz /var/log/dmesg 
-echo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.tab" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/jobOptions/PythiaB -name "*.txt" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-get_files -data Bdecays0.dat
-
-# Start compilation of the patches, if needed
-[ "$T_PATCHES" == "" ] && T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep subprocesses log | cut -d 'I' -f 3 | awk '{print $1}'`"
-  XSECTOT=`grep subprocesses log | cut -d 'I' -f 4 | awk '{print $1}'`
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-fi
-
-echo " "
-echo "End of job."
-
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/dc2.g4digit.trf b/Tools/JobTransforms/share/dc2.g4digit.trf
deleted file mode 100755
index 871aa236ae95..000000000000
--- a/Tools/JobTransforms/share/dc2.g4digit.trf
+++ /dev/null
@@ -1,198 +0,0 @@
-#! /usr/bin/env sh
-
-###############################################################
-##  G4 digitization transformation                           ##
-##                                                           ##
-##  (C) Armin Nairz, Nectarios Benekos,                      ##
-##      Davide Costanzo, Alessandro De Salvo                 ##
-###############################################################
-
-T_CORETRANSVER=1.3.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 4 ; then
-  echo "G4 digitization transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <infilename> <outfilename> <nevt> <skip>"
-  echo 
-  echo "         <infilename> .... name of input file (full path)"
-  echo "         <outfilename> ... local name of output file"
-  echo "         <nevt> .......... number of output events to be processed" 
-  echo "         <skip> .......... number of input events to be skipped"  
-  echo 
-  echo "EXAMPLE: `basename $0` dc2.002676.mu_plus_pt5_eta320.g4sim750._0001.pool.root  dc2.002676.mu_plus_pt5_eta320.g4dig760._0001.pool.root 1000 0"
-  echo 
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename  outfilename  nevt  skip
-#--------------------------------------------------------------------------
-export INFN=$1
-export OUTFN=$2
-export NEVT=$3
-export SKIP=$4
- 
-#--------------------------------------------------------------------------
-#    set up and run digitization job
-#--------------------------------------------------------------------------
-
-echo "############# ATLAS G4 Simulation/ Digitization ##################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-unset LOCALSIM
-unset LOCALRUNDIR
-unset POOL_OUTMSG_LEVEL 
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the paches, if needed
-T_PATCHES=SimulationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#  generate jobOptions file
-#--------------------------------------------------------------------------
-cat > DigitizationConfig.py <<EOF
-include( "AthenaCommon/AthenaCommonFlags.py" )
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolHitsInput = [ "$INFN" ]
-PoolRDOOutput = "$OUTFN"
-
-#--------------------------------------------------------------
-# Write Muon digits instead of RDOs
-#--------------------------------------------------------------
-writeMuonDigit = True
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.writeRDOPool.Muon_setOff()
-EOF
-#--------------------------------------------------------------------------
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-time athena.py DigitizationConfig.py Digitization/AtlasDigitization.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"end of event\" log | wc -l | sed 's/^ *//g'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-# Check the local POOL catalog
-if [[ -n `grep $OUTFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<"'!'"-- Edited By POOL -->"                                      >> NewPoolFileCatalog.xml
-  echo "<"'!'"DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"               >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $OUTFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml  
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-  
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat NewPoolFileCatalog.xml 
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
- 
-echo SIZE: `ls -l $OUTFN`     
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "end of job"
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.g4sim.trf b/Tools/JobTransforms/share/dc2.g4sim.trf
deleted file mode 100755
index 873dde9a3a2d..000000000000
--- a/Tools/JobTransforms/share/dc2.g4sim.trf
+++ /dev/null
@@ -1,408 +0,0 @@
-#! /usr/bin/env sh
-
-###############################################################
-##  G4 simulation transformation using Rel. >= 8.0.3         ##
-##                                                           ##
-##  On-the-fly fixes to some envelopes and macro files to    ##
-##  make muon TrackRecord's (additional truth info at the    ##
-##  entrance of the Muon Spectrometer) work.                 ##
-##                                                           ##
-##  (C) Armin Nairz, Nectarios Benekos, Alessandro De Salvo  ##
-###############################################################
-
-T_CORETRANSVER=1.5.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 8 ; then
-  echo "DC2 G4 simulation transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <infilename> <outfilename> <eta_min> <eta_max> <nevt> <skip> <random seed> <layout>"
-  echo 
-  echo "         <infilename> .... name of input file (full path)"
-  echo "         <outfilename> ... local name of output file"
-  echo "         <eta_min>,        " 
-  echo "         <eta_max> ....... eta range (e.g., -5.0  5.0)"  
-  echo "         <nevt> .......... number of output events to be processed" 
-  echo "         <skip> .......... number of input events to be skipped"
-  echo "         <random seed> ... random seed for this job"
-  echo "         <layout> ........ detector layout flag (DC1, INITIAL)"
-  echo 
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename outfilename etamin etamax nevt skip randomseed
-#--------------------------------------------------------------------------
-export INFN=$1
-export OUTFN=$2
-export ETAMIN=$3
-export ETAMAX=$4
-export NEVT=$5
-export SKIP=$6
-export RNDM=$7
-export LAYOUT=$8
-
-#--------------------------------------------------------------------------
-#    set up and run simulation job
-#--------------------------------------------------------------------------
-
-
-echo "##################### ATLAS G4 Simulation ########################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-unset LOCALSIM
-unset LOCALRUNDIR
-unset GOOFY_BOR_MACRO
-unset GOOFY_EOR_MACRO
-unset POOL_OUTMSG_LEVEL
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-export JOBOPTSEARCHPATH="${T_JOBOPTSPATH},${JOBOPTSEARCHPATH}"
-find ${T_DISTREL}/InstallArea/share -name "*.mac" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/share -name "*.xml" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/share -name "*.dtd" -exec cp -f {} . \;
-cp -f ${T_DISTREL}/InstallArea/share/management .
-cp -f ${T_DISTREL}/InstallArea/share/geometry .
-cp -f ${ATLASCALDATA}/bmagatlas02.data fieldmap.dat
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the paches, if needed
-T_PATCHES=SimulationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-export LOCALRUNDIR=`pwd`
-
-
-#  generate macro file setting the eta cuts
-echo "## ... generating macro file with EtaPhiFilter settings"
-#--------------------------------------------------------------------------
-cat > EtaPhiFilter_settings.mac <<EOF
-
-/Filters/Vertex/toggle ON
-/Filters/Vertex/Spread 0.015 0.015 56. mm
-/Filters/EtaPhiFilter/toggle ON
-/Filters/EtaPhiFilter/EtaInterval $ETAMIN $ETAMAX
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat EtaPhiFilter_settings.mac
-echo "---------------------------------------------------------------------"
-echo " "
- 
-
-#  generate macro file with begin-of-run actions 
-echo "## ... generating macro file bor_actions.mac"
-#--------------------------------------------------------------------------
-cat > bor_actions.mac <<EOF
-
-/control/MemorySnooper "begin of run"
-/Random/SetSeed $RNDM
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat bor_actions.mac
-echo "---------------------------------------------------------------------"
-echo " "
- 
-
-#  modify data file envelopes.xml 
-echo "## ... modifying data file envelopes.xml "
-rm -f envelopes.xml
-#--------------------------------------------------------------------------
-cat > envelopes.xml <<EOF
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE FADS SYSTEM "envelopes.dtd">
-
-<FADS>
-
-<EnvelopeParameters
-        AtlasInnerRadius="0."
-        AtlasOuterRadius="30000."
-        AtlasZMax="30000."
-        MuonInnerRadius="70."
-        MuonOuterRadius="30000."
-        MuonZMax="30000."
-/>
-
-</FADS>
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat envelopes.xml
-echo "---------------------------------------------------------------------"
-echo " " 
-
-
-#  generate macro file Envelopes.mac
-echo "## ... generating macro file Envelopes.mac"
-#--------------------------------------------------------------------------
-rm -f Envelopes.mac
-cat > Envelopes.mac <<EOF
-
-/load G4DetectorEnvelopes
-/control/ReadXML standardmaterials.xml
-/control/ReadXML color.xml
-/control/ReadXML envelopes.xml
-/Geometry/GetFacility AtlasDetector Atlas
-/Geometry/GetFacility BeamPipe BPIPE
-/Geometry/GetFacility InnerDetector IDET
-/Geometry/GetFacility Calorimeter CALO
-/Geometry/GetFacility GenericPCON MUON
-/Geometry/GetFacility MuonSystemEntryLayer MSEL
-/MUON/SetPhiMin 0
-/MUON/SetDeltaPhi 360 deg
-/MUON/SetNSurfaces 6
-/MUON/setZvalues -30000 -6740 -6740 6740 6740 30000
-/MUON/setInnerRadii 70 70 4250 4250 70 70
-/MUON/setOuterRadii 30000 30000 30000 30000 30000 30000
-/MUON/SetMaterial Air
-
-/Atlas/AddDetector BPIPE
-/Atlas/AddDetector IDET
-/Atlas/AddDetector CALO
-/Atlas/AddDetector MUON
-/MUON/AddDetector MSEL
-
-/echo "MUON added"
-/Atlas/SetAsWorld
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat Envelopes.mac
-echo "---------------------------------------------------------------------"
-echo " "
-echo " "
-
-
-#  modify macro file AtlasGeoModel.mac
-echo "## ... mudifying macro file AtlasGeoModel.mac"
-#--------------------------------------------------------------------------
-rm -f AtlasGeoModel.mac
-cat > AtlasGeoModel.mac <<EOF
-
-/echo "Building the envelopes"
-/macro/execute Envelopes.mac
-/load GeoDetectorPlugIns
-
-# Inner detector geometry+SD. comment out following 2 lines for no IDET
-/echo "Building the InnerDetector"
-/macro/execute InnerDetectorGeoGeometry.mac
-/macro/execute InnerDetectorGeoSensitive.mac
-
-# LAr calorimeters. comment out following line  for no LAr
-/echo "Building the LAr calorimeters"
-/macro/execute LArCal.mac
-
-# TileCal geometry+SD.  comment out following 2 lines for no TileCal
-/echo "Building the TileCal"
-/macro/execute TileCalGeoGeometry.mac
-/macro/execute TileCalGeoSensitive.mac
-
-# Muon system geometry+SD.  comment out following 2 lines for no Muon System
-/echo "Building the Muon system"
-/macro/execute MuonGeoGeometry.mac
-/macro/execute MuonGeoSensitive.mac
-
-# Field. comment out following line  for no field
-/echo "Setting up the field"
-/macro/execute AtlasField.mac
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat AtlasGeoModel.mac
-echo "---------------------------------------------------------------------"
-echo " "
-echo " "
-
-
-#  generate jobOptions file
-echo "## ... generating jobOptions file"
-#--------------------------------------------------------------------------
-cat > jobO.py <<EOF
-include ("AthenaCommon/AthenaCommonFlags.py")
-#include ("AtlasGeoModel/$INDETJOPT")
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolEvgenInput  = [ "$INFN" ]
-PoolHitsOutput  = "$OUTFN"
-DetDescrVersion = "$LAYOUT"
-EOF
-
-# If $T_ATLASMYSQLSERVER is set, use the address $T_ATLASMYSQLSERVER for the DB
-# otherwise use the default servers
-if [ "$T_ATLASMYSQLSERVER" != "" ] ; then
-cat >> jobO.py <<EOF
-IOVDbSvc = Service ( "IOVDbSvc" )
-IOVDbSvc.serverName="$T_ATLASMYSQLSERVER"
-
-#==============================================================
-EOF
-
-# Create a conf file for mysql
-cat > my.cnf << EOF
-[client]
-host = $T_ATLASMYSQLSERVER
-database = LArNBDC2
-
-[reader]
-user = reader
-
-EOF
-fi
-
-#--------------------------------------------------------------------------
-
-# overwrite existing jobOptions file 
-mv jobO.py jobOptions.AtlasGeoG4Sim.py
-
-# switch on MemorySnooper at begin-of-run, end-of-run, begin-of-event, end-of-event
-echo "##"  
-echo "## ... enable memory snooping ..."
-export GOOFY_BOR_MACRO=bor_actions.mac
-export GOOFY_EOR_MACRO=memorySnooper_eor.mac
-echo "## ... through GOOFY_BOR_MACRO=$GOOFY_BOR_MACRO"
-echo "## ...         GOOFY_EOR_MACRO=$GOOFY_EOR_MACRO"
-
-# export GOOFY_BOE_MACRO=memorySnooper_boe.mac
-# export GOOFY_EOE_MACRO=memorySnooper_eoe.mac
-# echo "## ...         GOOFY_BOE_MACRO=$GOOFY_BOE_MACRO"
-# echo "## ...         GOOFY_EOE_MACRO=$GOOFY_EOE_MACRO"
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-time athena.py jobOptions.AtlasGeoG4Sim.py G4OptionsDC2/dc2_g4sim.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"End of Event\" log | wc -l | sed 's/^ *//g'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-if [[ -n `grep $OUTFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<"'!'"-- Edited By POOL -->"                                      >> NewPoolFileCatalog.xml
-  echo "<"'!'"DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"               >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $OUTFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml  
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-  
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat NewPoolFileCatalog.xml 
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
- 
-echo SIZE: `ls -l $OUTFN`     
-
-# Check for output pool file integrity
-athenaCheckOutput $OUTFN &> log
-athenaCheckLog log
-checkOutput=$?
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" -o $checkOutput -ne 0 ] && retcode=40
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of job."
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.recon.AOD.trf b/Tools/JobTransforms/share/dc2.recon.AOD.trf
deleted file mode 100755
index 7664b0d6bc0b..000000000000
--- a/Tools/JobTransforms/share/dc2.recon.AOD.trf
+++ /dev/null
@@ -1,212 +0,0 @@
-#! /usr/bin/env sh
-
-#######################################################################
-##  G4 data reconstruction transformation using Rel. >= 8.1.0        ##
-##                                                                   ##
-##  (C) A. De Salvo, RD Schaffer                                     ##
-##      November 18th 2004                                           ##
-#######################################################################
-
-T_CORETRANSVER=1.0.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -lt 4 ; then
-  echo "Recostruction transformation (AOD production) v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <dataset> <jobseq> <infilelist> <nevt> [<customjobopt>]"
-  echo 
-  echo "         <dataset> ........ dataset (run) number"
-  echo "         <jobseq> ......... job sequential number, used to build the"
-  echo "                            output file names."
-  echo "                            Output files will be called:"
-  echo "                   dc2.<dataset>.analysis.<streamname>.<jobseq>.*"
-  echo "         <infilelist> ..... name of the file with the list of inputs"
-  echo "         <nevt> ........... number of output events to be processed" 
-  echo "         <customjobopt> ... custom jobOption filename (optional)" 
-  echo 
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  datasetnum jobseqnum inputfiles nevt
-#--------------------------------------------------------------------------
-export DSET=$1
-export JOBSEQ=$2
-export INFN=$3
-export NEVT=$4
-export CUSTJO=$5
-
-if [ ! -s "$INFN" ] ; then
-  echo "Input file list $INFN not found."
-  exit 30
-fi
- 
-#--------------------------------------------------------------------------
-#    set up and run reconstruction job
-#--------------------------------------------------------------------------
-
-
-echo "##################     ATLAS reconstruction     ##################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-find ${T_DISTREL}/InstallArea/share -name "*.xml" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/share -name "*.dtd" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-(mkdir DetDescrRoot; cd DetDescrRoot; get_files -data DetDescr.root)
-export JOBOPTSEARCHPATH="${JOBOPTSEARCHPATH},${T_JOBOPTSPATH}"
-
-# Start compilation of the paches, if needed
-T_PATCHES=ReconstructionPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#  generate jobOptions file
-echo "## ... generating jobOptions file"
-#--------------------------------------------------------------------------
-if [ "$CUSTJO" != "" ] ; then
-cat $CUSTJO > files.py
-else
-cat > files.py <<EOF
-EvtMax=$NEVT
-EOF
-  echo -n "PoolESDInput=[" >> files.py
-  let counter=0
-  numoflines=`cat $INFN | wc -l`
-  cat $INFN | while read inputfn; do
-    let counter=$counter+1
-    echo -n "'$inputfn'" >> files.py
-    if [ $counter -lt $numoflines ] ; then
-      echo -n ", " >> files.py
-    fi
-  done
-  echo "]" >> files.py
-  # Rename the output pool files
-  egrep 'sPrefix|sSuffix|sName' \
-        ${T_DISTREL}/InstallArea/jobOptions/EventSelection/OutStreams.py | \
-        egrep -v 'Algorithm|theApp|Outfix|Run' | \
-        sed -e "s#^\( *\)##g" -e "s#.AOD#.$JOBSEQ.AOD#g" \
-            -e "s#test_#dc2.$DSET.analysis.#g" > rename.py
-  # Add the streams to the PoolFileCatalog.xml
-  #cat rename.py | sed 's#Stream\(.*\)=#print#' > print_streams.py
-  #python print_streams.py | while read streamname; do
-  #  FCregisterPFN -p $streamname -t ROOT_All
-  #  touch $streamname
-  #done
-  # Rename the output collections
-  egrep 'sPrefix|sSuffix|cName' \
-        ${T_DISTREL}/InstallArea/jobOptions/EventSelection/RegStreams.py | \
-        egrep -v 'Algorithm|theApp|Outfix|Run' | \
-        sed -e "s#^\( *\)##g" -e "s#.coll#.$JOBSEQ.coll#g" \
-            -e "s#test_#dc2.$DSET.analysis.#g" >> rename.py
-  # Add the AOD files to the PoolFileCatalog.xml and touch all files
-  cat rename.py | \
-      sed -e 's#Stream\(.*\)=\(.*\)'\''\(.*\)'\''#print '\''AOD \3'\''#' \
-          -e 's#Coll\(.*\)=#print '\''COLL %s'\'' %#' > print_streams.py
-  python print_streams.py | while read streamline; do
-    streamtype="`echo $streamline | awk '{print $1}'`"
-    streamname="`echo $streamline | awk '{print $2}'`"
-    if [ "$streamtype" == "AOD" ] ; then
-      FCregisterPFN -p $streamname -t ROOT_All
-      touch $streamname
-    else
-      touch ${streamname}.root
-    fi
-  done
-fi
-#--------------------------------------------------------------------------
-
-# print jobOption file
-echo "## ... Printing jobOption file"
-cat files.py
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-time athena.py -b files.py \
-                  EventSelection/EventSplitTest_topOptions.py \
-                  rename.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-# rename AOD and coll files
-#for outputfn in `ls test_*.root`; do
-#  newoutputfn="`echo $outputfn | sed "s#\(test_\)\(.*\)\.\(.*\)\.\(.*\)#dc2.$DSET.analysis.\2.$JOBSEQ.\3.\4#g"`"
-#  mv $outputfn $newoutputfn
-#done
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of job."
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.recon.ESD.trf b/Tools/JobTransforms/share/dc2.recon.ESD.trf
deleted file mode 100755
index bb98513be43f..000000000000
--- a/Tools/JobTransforms/share/dc2.recon.ESD.trf
+++ /dev/null
@@ -1,248 +0,0 @@
-#! /usr/bin/env sh
-
-#######################################################################
-##  G4 data reconstruction transformation using Rel. >= 8.1.0        ##
-##                                                                   ##
-##  (C) A. De Salvo, RD Schaffer                                     ##
-##      November 18th 2004                                           ##
-#######################################################################
-
-T_CORETRANSVER=1.0.1
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -lt 7 ; then
-  echo "Recostruction transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <infilename> <infiletype> <outfilename> <ntuplefilename> <histfilename> <nevt> <skip> [<customjobopt>]"
-  echo 
-  echo "         <infilename> ..... name of input file (full path)"
-  echo "         <infiletype> ..... type of input file ('zebra', 'pool' or 'bytestream')"
-  echo "         <outfilename> .... output filename"
-  echo "         <ntuplefilename> . local name of ntuple file. No ntuple produced if ='NONE'"
-  echo "         <histfilename> ... local name of histogram file. No histogram produced if ='NONE'"
-  echo "         <nevt> ........... number of output events to be processed" 
-  echo "         <skip> ........... number of input events to be skipped" 
-  echo "         <customjobopt> ... custom jobOption filename (optional)" 
-  echo 
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename intype ntuplefilename histfilename nevt skip
-#--------------------------------------------------------------------------
-export INFN=$1
-export INTY=$2
-export OUTFN=$3
-export NTUP="`echo $4 | sed 's/NONE.*/NONE/g'`"
-export HIST="`echo $5 | sed 's/NONE.*/NONE/g'`"
-export NEVT=$6
-export SKIP=$7
-export CUSTJO=$8
-
- 
-#--------------------------------------------------------------------------
-#    set up and run reconstruction job
-#--------------------------------------------------------------------------
-
-
-echo "##################     ATLAS reconstruction     ##################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-find ${T_DISTREL}/InstallArea/share -name "*.xml" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/share -name "*.dtd" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-(mkdir DetDescrRoot; cd DetDescrRoot; get_files -data DetDescr.root)
-export JOBOPTSEARCHPATH="${JOBOPTSEARCHPATH},${T_JOBOPTSPATH}"
-
-# Start compilation of the paches, if needed
-T_PATCHES=ReconstructionPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#  generate jobOptions file
-echo "## ... generating jobOptions file"
-#--------------------------------------------------------------------------
-if [ "$CUSTJO" != "" ] ; then
-cat $CUSTJO > jobO.py
-else
-cat > jobO.py <<EOF
-
-# topOptions prepared for DC2 Tier 0 exercise
-# run reconstruction, write ESD
-
-from AthenaCommon.GlobalFlags import GlobalFlags
-# set the type of input
-GlobalFlags.InputFormat.set_${INTY}()
-
-
-# write ESD
-doWriteESD=True
-doCBNT=True
-doHist=True
-PoolESDOutput="$OUTFN"
-
-# switch off algorithm not useful as it does not create (yet)  any ESD
-doBtagging=False
-doConversion=False
-doStaco=False
-
-
-
-# ####end of mandatory section ########
-
-
-
-# fine tuning: switch off/tune unstable algorithms
-doMuonboyBarrelOnly=True
-
-# switches for debugging info
-if not 'EvtMax' in dir():
-   EvtMax=$NEVT
-
-SkipEvents=$SKIP
-
-#doNameAuditor=True
-#doDetailedAuditor=True
-OutputLevel=INFO
-
-# Output filenames
-if ("$NTUP" != "NONE"):
-   RootNtupleOutput="$NTUP"
-if ("$HIST" != "NONE"):
-   RootHistoOutput="$HIST"
-
-include ("RecExCommon/RecExCommon_flags.py")
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-#should be in the above file
-#NOT NEEDED IN 9.0.3 include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-#NOT NEEDED IN 9.0.3 include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-
-#input filename
-if GlobalFlags.InputFormat.is_bytestream():
-   ByteStreamInputSvc= Service ("ByteStreamInputSvc")
-   ByteStreamInputSvc.FullFileName = ["./$INFN"]
-   # no truth if bytestrea
-   doTruth=False
-   #switch off MissingET if no truth (will be fixed in 9.0.4)
-   doMissingET=False
-elif GlobalFlags.InputFormat.is_pool():
-   EventSelector.InputCollections = ["$INFN"] 
-
-#only audit part of CBNT for memory leak checking
-CBNT_Athena.Members=["CBNT_EventInfo","CBNT_Audit"]
-
-# Must load by hand the muon preprawdata dict
-#NOT NEEDED IN 9.0.3 include( "MuonRIOOnTrack/MuonRIOOnTrackDict_joboptions.py" )
-
-EOF
-fi
-#--------------------------------------------------------------------------
-
-# overwrite existing jobOptions file 
-mv jobO.py myTopOptions.py
-
-# print jobOption file
-echo "## ... Printing jobOption file"
-cat myTopOptions.py
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f "$T_POOLFILE" ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-time athena.py -b myTopOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-#  if [ "$NTUP" != "NONE" ] ; then
-#    [ ! -s "$NTUP" ] && retcode=41
-#    [ ! -s "$OUTFN" -a ! -s "$NTUP" ] && retcode=42
-#  fi
-#  if [ "$HIST" != "NONE" ] ; then
-#    [ ! -s "$HIST" ] && retcode=43
-#  fi
-#  if [ "$NTUP" != "NONE" -a "$HIST" != "NONE" ] ; then
-#    [ ! -s "$NTUP" -a ! -s "$HIST" ] && retcode=44
-#    [ ! -s "$OUTFN" -a ! -s "$HIST" ] && retcode=45
-#    [ ! -s "$OUTFN" -a ! -s "$NTUP" -a ! -s "$HIST" ] && retcode=46
-#  fi
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of job with retcode = " $retcode
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/dc2.recon.trf b/Tools/JobTransforms/share/dc2.recon.trf
deleted file mode 100755
index 3b096e983093..000000000000
--- a/Tools/JobTransforms/share/dc2.recon.trf
+++ /dev/null
@@ -1,175 +0,0 @@
-#! /usr/bin/env sh
-
-#######################################################################
-##  G4 data reconstruction transformation using Rel. >= 8.1.0        ##
-##                                                                   ##
-##  (C) D. Costanzo, A. De Salvo, L. March                           ##
-##      September 17th 2004                                          ##
-#######################################################################
-
-T_CORETRANSVER=1.0.1
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 5 ; then
-  echo "G4 data recostruction transformation v$T_CORETRANSVER"
-  echo "USAGE:   `basename $0` <infilename> <ntuplefilename> <histfilename> <nevt> <skip>"
-  echo 
-  echo "         <infilename> ..... name of input file (full path)"
-  echo "         <ntuplefilename> . local name of ntuple file"
-  echo "         <histfilename> ... local name of histogram file"
-  echo "         <nevt> ........... number of output events to be processed" 
-  echo "         <skip> ........... number of input events to be skipped"  
-  echo 
-  exit 30
-fi
-
-#--------------------------------------------------------------------------
-#    parameter translation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename  ntuplefilename histfilename  nevt  skip
-#--------------------------------------------------------------------------
-export INFN=$1
-export NTUP=$2
-export HIST=$3
-export NEVT=$4
-export SKIP=$5
-
- 
-#--------------------------------------------------------------------------
-#    set up and run reconstruction job
-#--------------------------------------------------------------------------
-
-
-echo "################## ATLAS G4 data reconstruction ##################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-# power of the processor
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set up the run conditions
-find ${T_DISTREL}/InstallArea/share -name "*.xml" -exec cp -f {} . \;
-find ${T_DISTREL}/InstallArea/share -name "*.dtd" -exec cp -f {} . \;
-get_files -data PDGTABLE.MeV
-(mkdir DetDescrRoot; cd DetDescrRoot; get_files -data DetDescr.root)
-export JOBOPTSEARCHPATH="${JOBOPTSEARCHPATH},${T_JOBOPTSPATH}"
-
-# Start compilation of the paches, if needed
-T_PATCHES=ReconstructionPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#  generate jobOptions file
-echo "## ... generating jobOptions file"
-#--------------------------------------------------------------------------
-cat > recon_Config.py <<EOF
-include( "AthenaCommon/AthenaCommonFlags.py" )
-EvtMax       = $NEVT
-PoolRDOInput = [ "$INFN" ]
-SkipEvents   = $SKIP
-doWriteESD   = False
-doWriteAOD   = False
-doCBNT       = True
-
-RootNtupleOutput = "$NTUP"
-RootHistoOutput  = "$HIST"
-
-# Change some output levels
-OutputLevel = WARNING
-AthenaEventLoopMgr = Service("AthenaEventLoopMgr")
-AthenaEventLoopMgr.OutputLevel=INFO
-TrackTool = Algorithm("ToolSvc.Trk::MooreToTrackTool")
-TrackTool.OutputLevel=FATAL
-
-#--------------------------------------------------------------
-# Set some of the global flags. Like eg the DD version:
-#--------------------------------------------------------------
-DetDescrVersion = 'DC2'
-readMuonDigit = True
-
-EOF
-#--------------------------------------------------------------------------
-
-# copy POOL file catalog, set AthenaPOOL output level
-if [ ! -f PoolFileCatalog.xml -a -f $T_POOLFILE ] ; then
-  echo "##"  
-  echo "## ... copying $T_POOLFILE ..."  
-  cp -f $T_POOLFILE PoolFileCatalog.xml
-fi
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: running athena ..." 
-echo "##################################################################"
-
-time athena.py recon_Config.py RecExCommon/RecExCommon_topOptions.py &> log
-athenaCheckLog log
-retcode=$?
-cat log
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$NTUP" ] && retcode=41
-  [ ! -s "$HIST" ] && retcode=43
-  [ ! -s "$NTUP" -a ! -s "$HIST" ] && retcode=44
-fi
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of job."
-
-# Exit with return code
-exit $retcode
diff --git a/Tools/JobTransforms/share/evgen.partgen.trf b/Tools/JobTransforms/share/evgen.partgen.trf
deleted file mode 100755
index ba1ff1aba3e4..000000000000
--- a/Tools/JobTransforms/share/evgen.partgen.trf
+++ /dev/null
@@ -1,206 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## Single particle event generation transformation                       ##
-## uses Atlas (version >= 7.7.0) because of POOL persistency             ##
-## signature: datasetnr outfilename first total ran pdg energy eta phi   ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## uses package ParticleGenerator to generate single particles           ##
-## (HepMC data in POOL/ROOT format)                                      ##
-##                                                                       ##
-## (C) Armin Nairz, Alessandro De Salvo                                  ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-#
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 6; then
-  echo "Single particle event generation transformation v$T_CORETRANSVER"
-  echo "
-  usage:   `basename $0`  "<datasetnr>" "<outfilename>" "<firstevt>" "<totalevts>" "<random>" "<partgencmd>" 
-
-  example: `basename $0` 2045 dc1.002045.evgen.0001.root 1 100 20450001 {"PDGcode: sequence -13 13", "Et: constant 50", "eta: flat -1 1", "phi: flat 0 6.283185"}
-  "      
-  exit 0
-fi
-
-#####################################################
-
-export DSET=$1
-export OUTFN=$2
-export MYFIRST=$3
-export PARTSZ=$4
-export MYRAN=$5
-export GENCMD=$6
-
-########## START TRANS
-
-#--------------------------------------------------------------------------
-#          generate jobOptions file
-#--------------------------------------------------------------------------
-cat > job.py <<EOF
-
-##############################################################
-#
-# Job options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup( MONTECARLO )
-include( "PartPropSvc/PartPropSvc.py" )
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-
-theApp.Dlls       += [ "ParticleGenerator", "TruthExamples" ]
-theApp.TopAlg      = [ "ParticleGenerator" ]
-theApp.ExtSvc     += ["AtRndmGenSvc"]
-AtRndmGenSvc       = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = [ "SINGLE 2040160768 $MYRAN" ];
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-theApp.EvtMax            = $PARTSZ
-EventSelector            = Service( "EventSelector" )
-EventSelector.RunNumber  = $DSET
-EventSelector.FirstEvent = $MYFIRST
-
-#--------------------------------------------------------------
-# ParticleGenerator parameters
-#--------------------------------------------------------------
-
-ParticleGenerator        = Algorithm( "ParticleGenerator" )
-ParticleGenerator.orders = $GENCMD
-Generator                = Algorithm( "Generator" )
-Generator.Members       += [ "EventCounter" ]
-
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include ( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
-theApp.DLLs += [ "GeneratorObjectsAthenaPoolPoolCnv" ]
-
-# output stream objects
-Stream1 = Algorithm( "Stream1" )
-Stream1.ItemList += [ "2101#*", "133273#*" ]
-Stream1.OutputFile = "$OUTFN"
-
-#PoolSvc = Service( "PoolSvc" )
-#PoolSvc.Output = "$OUTFN"
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc              = Service( "MessageSvc" )
-MessageSvc.OutputLevel  = 2
-Stream1.OutputLevel     = 2
- 
-#==============================================================
-#
-# End of job options file
-#
-##############################################################
-
-EOF
-
-cat job.py
-
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-echo "##working directory is:" `pwd`
-grep MHz /var/log/dmesg 
-echo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-# suppress the AthenaPool Output
-export POOL_OUTMSG_LEVEL=5
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  metaDataHeader
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-echo " "
-echo SIZE: `ls -l $OUTFN`     
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-echo " "
-echo "End of job." 
-
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/evgen.pythia.trf b/Tools/JobTransforms/share/evgen.pythia.trf
deleted file mode 100755
index cfeb2d85ef58..000000000000
--- a/Tools/JobTransforms/share/evgen.pythia.trf
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/bin/sh
-
-###########################################################################
-## Pythia event generation transformation                                ##
-## uses Atlas (version >= 7.7.0) because of POOL persistency             ##
-## signature: datasetnr outfilename first total ran pytcmd               ##
-## outputs: datafile                                                     ##
-##                                                                       ##
-## generate particles with Pythia (HepMC data in POOL/ROOT format)       ##
-##                                                                       ##
-## (C) Armin Nairz, Alessandro De Salvo                                  ##
-###########################################################################
-
-T_CORETRANSVER=1.2.0
-
-#######################################################################
-# Defaults are commented out
-# The calling script should set T_RELEASE and T_DISTREL as appropriate
-#
-#[ "$T_RELEASE" = "" ] && T_RELEASE="8.1.0"
-#[ "$T_DISTREL" = "" ] && T_DISTREL=$SITEROOT/dist/$T_RELEASE
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-###########################################################################
-
-if test $# -ne 6; then
-  echo "Pythia event generation transformation v$T_CORETRANSVER"
-  echo usage: `basename $0`  "<datasetnr>" "<outfilename>" "<first>" "<total>" "<ran>" "<pytcmd>" 
-  exit 0
-fi
-
-#####################################################
-
-export DSET=$1
-export OUTFN=$2
-export MYFIRST=$3
-export PARTSZ=$4
-export MYRAN=$5
-export PYTCMD=$6
-
-
-########## START TRANS
-
-cat > job.py <<EOF
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-theApp.setup ( MONTECARLO )
-include  ( "PartPropSvc/PartPropSvc.py" )
-
-theApp.DLLs += [ "GaudiAud" ]
-AuditorSvc = AuditorSvc()
-AuditorSvc.Auditors  = [ "ChronoAuditor" ]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-
-theApp.DLLs  += ["TruthExamples", "Pythia_i"]
-
-theApp.TopAlg = ["Pythia"]
-
-theApp.ExtSvc += ["AtRndmGenSvc"]
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-
-AtRndmGenSvc = Service ( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds = [ "PYTHIA 4789899 $MYRAN", "PYTHIA_INIT 820021 2347532" ]
-
-Pythia = Algorithm( "Pythia" )
-Pythia.PythiaCommand = $PYTCMD
-
-# Number of events to be processed (default is 10)
-theApp.EvtMax = $PARTSZ
-
-EventSelector = Service ( "EventSelector" )
-EventSelector.RunNumber   = $DSET
-EventSelector.FirstEvent  = $MYFIRST
-
-Generator          = Algorithm( "Generator" )
-Generator.Members += [ "EventCounter" ]
-
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-include ( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
-
-theApp.DLLs += [ "GeneratorObjectsAthenaPoolPoolCnv" ]
-
-# output stream objects
-Stream1 = Algorithm ( "Stream1" )
-Stream1.ItemList += [ "EventInfo#*", "McEventCollection#*" ]
-Stream1.OutputFile = "$OUTFN"
-
-#PoolSvc.Output = "$OUTFN"
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#-------------------------------------------------------------- 
-MessageSvc = Service ( "MessageSvc" )
-MessageSvc.OutputLevel  = 4
-Stream1.OutputLevel     = 4
-
-#==============================================================
-#
-# End of job options file
-#
-###############################################################
-
-EOF
-
-
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-echo "##working directory is:" `pwd`
-grep MHz /var/log/dmesg 
-echo
-
-export WORKDIR=`pwd`
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-# Set-up the run conditions
-get_files -data PDGTABLE.MeV
-
-# Start compilation of the patches, if needed
-T_PATCHES=GenerationPatches.tar.gz
-patchRelease &> log
-retcode=$?
-cat log
-if [ $retcode -ne 0 ] ; then
-  compilationCheckLog log
-  exit $retcode
-fi
-
-# Reduce verbosity of POOL
-export POOL_OUTMSG_LEVEL=5
-
-# Print the environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$T_DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-#--------------------------------------------------------------------------
-#          run athena
-#--------------------------------------------------------------------------
-time athena.py job.py &> log
-athenaCheckLog log
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  XSECTOT="`grep subprocesses log | cut -d 'I' -f 4 | awk '{print $1}'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"cross-section\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"cross-section\"" "att_value=\"$XSECTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat log
-
-# Check the local POOL catalog
-if [[ -e PoolFileCatalog.xml ]] ; then
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- echo "   Contents of PoolFileCatalog.xml ..."
- echo 
- cat PoolFileCatalog.xml 
- echo 
- echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-echo " "
-echo "End of job."
-
-# Exit with return code
-exit ${retcode}
diff --git a/Tools/JobTransforms/share/rome.fullchain.trf b/Tools/JobTransforms/share/rome.fullchain.trf
deleted file mode 100755
index 946d918468a1..000000000000
--- a/Tools/JobTransforms/share/rome.fullchain.trf
+++ /dev/null
@@ -1,696 +0,0 @@
-#!/usr/bin/env sh
-######################################################################
-#   Script to run G4 simulation, digitization & reconstruction 
-#   with release > 9.0.2 using "Rome workshop" standard configuration 
-#   eta cut: |eta| < 6
-#
-#   (for submission to LSF batch)
-#   (C) Nektarios.Chr.Benekos, Davide Costanzo, Armin Nairz
-#
-#   Modified into full-chain transformation by 
-#   Doug Schouten <dschoute@sfu.ca>, August 29 2005
-######################################################################
-T_CORETRANSVER=1.0.0
-[ "$T_INCPATH" = "" ] && T_INCPATH=`dirname $0`/../include
-[ "$T_JOBOPTSPATH" = "" ] && T_JOBOPTSPATH=`dirname $0`/../jobOptions
-
-# logfile check functions
-source ${T_INCPATH}/checkLogUtils.def
-
-# meta data writer
-source ${T_INCPATH}/metaData.def
-
-# colors
-source ${T_INCPATH}/colors.def
-
-# patch engine
-source ${T_INCPATH}/patch.def
-
-if [ $# -lt 6 ]; then
-  echo "USAGE:   rome.fullchain.trf  <infilename> <aodfile> <esdfile> <cbntfile> <nevt> <skip>"
-  echo "         [ <hitsfile> <digitsfile> ]"
-  echo 
-  echo "         <infilename> .... name of evgen input file (full path)"
-  echo "         <aodfile> ....... local name of output aod/esd/cbnt file"
-  echo "         <nevt> .......... number of output events to be processed" 
-  echo "         <skip> .......... number of input events to be skipped"  
-  echo "         <hitsfile>....... (optional) name of G4 hits file"
-  echo "         <digitsfile>..... (optional) name of digits output file"
-  echo 
-  echo "EXAMPLE: rome.fullchain.trf  evt.rome.0001.pool.root  aod.rome.0001.pool.root  "
-  echo "         esd.rome.0001.pool.root cbnt.rome.0001.pool.root 100  0"
-  echo 
-  echo "NOTE: if <hitsfile> and <digitsfile> are specified then these intermediate"
-  echo "files exist as named; else default names hits.pool.root and digits.pool.root are used."; exit -1
-fi
-
-if [ $# -eq 8 ]; then
-    HITSFILE=$7
-    DIGITSFILE=$8
-fi
-
-######################################################################
-# SIMULATION
-######################################################################
-
-#--------------------------------------------------------------------------
-#    parameter translation for simulation
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename  nevt  skip
-#--------------------------------------------------------------------------
-export INFN=$1
-export NEVT=$5
-export SKIP=$6
-#--------------------------------------------------------------------------
-#    set up and run simulation job
-#--------------------------------------------------------------------------
-if [ -z "$HITSFILE" ]; then
-    export OUTFN=hits.pool.root
-else
-    export OUTFN=$HITSFILE
-fi
-
-echo "##################### ATLAS G4 Simulation ########################"
-echo "##"
-#  generate macro file with begin-of-run actions
-echo "## ... generating macro file bor_actions.mac"
-#--------------------------------------------------------------------------
-cat > bor_actions.mac <<EOF
-
-/control/MemorySnooper "begin of run"
-/Random/SetSeed $RNDM
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat bor_actions.mac
-echo "---------------------------------------------------------------------"
-echo " "
-
-
-#########################################################################
-# set up run directory and environment ...
-#
-echo "##################################################################"
-echo "## STEP 1: setting up run directory and environment ..."
-echo "##################################################################"
-echo "##"
-
-unset POOL_OUTMSG_LEVEL
-
-
-#--------------------------------------------------------------------------
-#  power of the processor
-#
-echo "## ... processor specifications:"
-grep MHz /var/log/dmesg
-cat /proc/meminfo
-
-export system="`uname -a`"
-export userid="`   id   `"
-export HOSTMACHINE=`hostname -f`
-
-
-#--------------------------------------------------------------------------
-#  print environment
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo " "
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo " "
-
-
-#--------------------------------------------------------------------------
-#  copy files from release area to local run directory
-#  Note for 9.0.3:
-#  The latest mag field is not in 9.0.3, so it is copied from the trf
-
-export DATAPATH=$T_TRFDATAPATH:$DATAPATH
-get_files -data bmagatlas03_test2.data
-mv bmagatlas03_test2.data fieldmap.dat
-
-get_files -data PDGTABLE.MeV
-
-
-
-#########################################################################
-# define the run conditions ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: defining the run conditions ..." 
-echo "##################################################################"
-echo "##"
-
-#--------------------------------------------------------------------------
-#  overwrite configuration file RomeSimulationConfig.py 
-#
-echo "## ... overwriting configuration file RomeSimulationConfig.py"
-rm -f RomeSimulationConfig.py
-#--------------------------------------------------------------------------
-cat > RomeSimulationConfig.py <<EOF
-
-include( "AthenaCommon/AthenaCommonFlags.py" )
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolEvgenInput = [ "$INFN" ]
-PoolHitsOutput = "$OUTFN"
-
-# Set some of the global flags (like the DD version):
-DetDescrVersion = 'Rome-Initial'
-
-EOF
-#--------------------------------------------------------------------------
-echo "## ... whose contents is "
-echo "---------------------------------------------------------------------"
-cat RomeSimulationConfig.py
-echo "---------------------------------------------------------------------"
-echo " " 
-
-#--------------------------------------------------------------------------
-#  Configuration file for Det Descr Database (use with release 9.0.2)
-#
-# cat > RomeRDBConfig.py <<EOF
-#
-# RDBAccessSvc = Service( "RDBAccessSvc" )
-# RDBAccessSvc.HostName = "pdb01"
-#
-# EOF
-
-#--------------------------------------------------------------------------
-# switch on MemorySnooper at begin-of-run, end-of-run; set random-number seed
-echo "##"
-echo "## ... enable memory snooping ..."
-export GOOFY_BOR_MACRO=bor_actions.mac
-export GOOFY_EOR_MACRO=memorySnooper_eor.mac
-echo "## ... through GOOFY_BOR_MACRO=$GOOFY_BOR_MACRO"
-echo "## ...         GOOFY_EOR_MACRO=$GOOFY_EOR_MACRO"
-
-# copy POOL file catalog (defined in wrapper script), set AthenaPOOL output level
-echo "##"
-echo "## ... copying $POOLFILE ..."
-cp -f $POOLFILE PoolFileCatalog.xml
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 3: running athena ..." 
-echo "##################################################################"
-echo "##"
-echo -n "##... use the following athena.py script:"
-which athena.py
-echo "## PATH = $PATH"
-echo "## LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
-
-time athena.py RomeSimulationConfig.py SimulationOptionsRome/RomeGeo2G4.py >& simlog
-
-athenaCheckLog simlog
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"End of Event\" log | wc -l | sed 's/^ *//g'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-
-cat simlog
-
-#--------------------------------------------------------------------------
-#  paste PoolFileCatalog entry to the end of the logfile...
-#
-if [[ -n `grep $OUTFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<!-- Edited By POOL -->"                                       >> NewPoolFileCatalog.xml
-  echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"                >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $OUTFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml  
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-  
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat  NewPoolFileCatalog.xml 
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-   
-
-#--------------------------------------------------------------------------
-#  paste output-file size to the end of the logfile...
-#
-echo SIZE: `ls -l $OUTFN`     
-
-echo " "
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of simulation."
-
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-#--------------------------------------------------------------------------
-# save return code
-sim_retcode=$retcode
-if [ $sim_retcode -ne 0 ]; then
-    echo -e "\n**** Error in simulation (${sim_retcode})! ****\n"; 
-fi
-[ $sim_retcode -eq 40 ] && exit 40
-
-
-######################################################################
-# DIGITIZATION
-######################################################################
-
-#--------------------------------------------------------------------------
-#    parameter translation for digitization
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename 
-#--------------------------------------------------------------------------
-export INFN=$OUTFN
-#--------------------------------------------------------------------------
-#    set up and run digitization job
-#--------------------------------------------------------------------------
-
-echo "####################### ATLAS Digitization #######################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-export SKIP=0
-if [ -z "$DIGITSFILE" ]; then
-    export OUTFN="digits.pool.root"
-else
-    export OUTFN=$DIGITSFILE
-fi
-
-unset POOL_OUTMSG_LEVEL 
-
-#########################################################################
-# double check the environment for digitization
-#
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-  
-#########################################################################
-# set up the run conditions ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: setting up the run conditions ..." 
-echo "##################################################################"
-echo "##"
-
-#  generate global configuration file
-#--------------------------------------------------------------------------
-cat > RomeDigitizationConfig.py << EOF
-
-include( "AthenaCommon/AthenaCommonFlags.py" )
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolHitsInput = [ "$INFN" ]
-PoolRDOOutput = "$OUTFN"
-
-#--------------------------------------------------------------
-# Set some of the global flags. Like eg the DD version:
-#--------------------------------------------------------------
-DetDescrVersion = 'Rome-Initial'
-
-EOF
-
-#--------------------------------------------------------------------------
-#  Configuration file for Det Descr Database (use with release 9.0.2)
-#
-# cat > RomeRDBConfig.py <<EOF
-#
-# RDBAccessSvc = Service ( "RDBAccessSvc" )
-# RDBAccessSvc.HostName   = "pdb01"
-#
-# EOF
-#--------------------------------------------------------------------------
-
-#--------------------------------------------------------------------------
-#  Configuration file for LAr IOV Svc (use with release 9.0.3)
-#  Note This is now a 9.0.3 post-configuration fragment
-#
-cat > RomeIOVConfig.py << EOF_IOV
-IOVDbSvc.GlobalTag = "InitLayout-A"
-RPC_Digitizer.WindowLowerOffset = -70.0
-RPC_Digitizer.WindowUpperOffset =  70.0
-EOF_IOV
-#--------------------------------------------------------------------------
-
-#--------------------------------------------------------------------------
-# copy POOL file catalog, set AthenaPOOL output level
-#--------------------------------------------------------------------------
-echo "##"  
-echo "## ... copying $POOLFILE ..."  
-cp -f $POOLFILE PoolFileCatalog.xml
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 3: running athena ..." 
-echo "##################################################################"
-
-time athena.py -s RomeDigitizationConfig.py Digitization/AtlasDigitization.py RomeIOVConfig.py  >& diglog
-athenaCheckLog diglog
-retcode=$?
-if [ $retcode -eq 0 ] ; then
-  POOLFILELFN=$OUTFN
-  POOLFILEID=`grep $OUTFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"end of event\" log | wc -l | sed 's/^ *//g'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-cat diglog
-
-#--------------------------------------------------------------------------
-# paste PoolFileCatalog entry to the end of the logfile...
-#
-if [[ -n `grep $OUTFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<!-- Edited By POOL -->"                                       >> NewPoolFileCatalog.xml
-  echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"                >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $OUTFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml  
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-  
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat NewPoolFileCatalog.xml 
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
- 
-#--------------------------------------------------------------------------
-# paste output-file size to the end of the logfile...
-#
-echo SIZE: `ls -l $OUTFN`     
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of digitization: $retcode"
-if [ $retcode -eq 0 ] ; then
-  [ ! -s "$OUTFN" ] && retcode=40
-fi
-
-#--------------------------------------------------------------------------
-# save return code
-digit_retcode=$retcode
-if [ $digit_retcode -ne 0 ]; then
-    echo -e "\n**** Error in digitization (${digit_retcode})! ****\n"; 
-fi
-[ $digit_retcode -eq 40 ] && exit 40
-
-######################################################################
-# RECONSTRUCTION
-######################################################################
-
-#--------------------------------------------------------------------------
-#    parameter translation for reconstruction
-#--------------------------------------------------------------------------
-#--------------------------------------------------------------------------
-#    Signature:  infilename  outfilename  ( aod/esd/cbnt )
-#--------------------------------------------------------------------------
-export INFN=$OUTFN
-export AODFN=$2
-export ESDFN=$3
-export CBNTFN=$4
- 
-#--------------------------------------------------------------------------
-#    set up and run reconstruction job
-#--------------------------------------------------------------------------
-echo "####################### ATLAS Reconstruction #####################"
-echo "##"
-echo "##################################################################"
-echo "## STEP 1: setting up environment"
-echo "##################################################################"
-echo "##"
-
-export SKIP=0
-printenv | grep -v 'CONFIG=' | grep -v "ROOT=$DISTREL"
-echo
-echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo
-
-  
-#########################################################################
-# set up the run conditions ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 2: setting up the run conditions ..." 
-echo "##################################################################"
-echo "##"
-
-echo "   -> Get runtime auxilliary files "
-RecExCommon_runTimeFiles_zc.sh
-
-
-#  generate global configuration files
-#--------------------------------------------------------------------------
-cat > RomeReconstructionESD_Config.py << EOF
-
-include( "AthenaCommon/AthenaCommonFlags.py" )
-include( "RecExCommon/RecExCommon_flags.py" )
-
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolRDOInput = [ "$INFN" ]
-PoolESDOutput = "$ESDFN"
-doWriteESD = True
-doCBNT = True
-
-# Change some output levels
-OutputLevel = WARNING
-AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
-AthenaEventLoopMgr.OutputLevel=INFO
-MooreTrackTool = Algorithm("ToolSvc.Trk::MooreToTrackTool")
-MooreTrackTool.OutputLevel=FATAL
-MuidTrackTool = Algorithm("ToolSvc.Trk::MuidToTrackTool")
-MuidTrackTool.OutputLevel=FATAL
-
-#
-# This should not be done when reconstructing events digitizied with release > 10
-# Correct for CSC strip offset
-#CscClusterBuilder = Algorithm( "CscClusterBuilder" )
-#CscClusterBuilder.CSSFudgeFactor = 2.7783*mm
-#CscClusterBuilder.CSLFudgeFactor = 2.6540*mm
-
-#--------------------------------------------------------------
-# Set some of the global flags. Like eg the DD version:
-#--------------------------------------------------------------
-DetDescrVersion = 'Rome-Initial'
-LArCondCnvDbServer = 'atlasdbpro.cern.ch'
-
-EOF
-
-cat > RomeReconstructionAOD_Config.py << EOF
-
-include( "AthenaCommon/AthenaCommonFlags.py" )
-EvtMax = $NEVT
-SkipEvents = $SKIP
-PoolESDInput = [ "$ESDFN" ]
-PoolAODOutput = "$AODFN"
-AllAlgs    = False
-readESD    = True
-doWriteAOD = True
-doCBNT = False
-OutputLevel = WARNING
-AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
-AthenaEventLoopMgr.OutputLevel=INFO
-
-# Detector Flags
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.detdescr.ID_setOn()
-DetFlags.detdescr.Calo_setOn()
-DetFlags.detdescr.Muon_setOn()
-
-# AOD Flags
-from ParticleEventAthenaPool.AODFlags import AODFlags
-AODFlags.Streaming = False
-
-#--------------------------------------------------------------
-# Set some of the global flags. Like eg the DD version:
-#--------------------------------------------------------------
-DetDescrVersion = 'Rome-Initial'
-LArCondCnvDbServer = 'atlasdbpro.cern.ch'
-
-EOF
-
-# copy POOL file catalog, set AthenaPOOL output level
-#--------------------------------------------------------------------------
-echo "##"  
-echo "## ... copying $POOLFILE ..."  
-cp -f $POOLFILE PoolFileCatalog.xml
-export POOL_OUTMSG_LEVEL=5
-echo "## ... setting POOL_OUTMSG_LEVEL=$POOL_OUTMSG_LEVEL"
-
-
-#########################################################################
-# run the job ...
-#
-echo " "
-echo " "
-echo "##################################################################"
-echo "## STEP 3: running athena ..." 
-echo "##################################################################"
-
-time athena.py  RomeReconstructionESD_Config.py RecExCommon/RecExCommon_topOptions.py >& logESD 
-cat logESD
-
-time athena.py  RomeReconstructionAOD_Config.py RecExCommon/RecExCommon_topOptions.py >& logAOD
-mv ntuple.root $CBNTFN 
-echo "#################################################################"
-cat logAOD
-
-athenaCheckLog logESD
-retcodeESD=$?
-athenaCheckLog logAOD
-retcodeAOD=$?
-
-echo "Reconstruction finished with retcodes ESD: $retcodeESD ,   AOD: $retcodeAOD "
-
-if [ $retcodeAOD -eq 0 ] ; then
-
-  POOLFILELFN=$ESDFN
-  POOLFILEID=`grep $ESDFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"end of event\" logESD | wc -l | sed 's/^ *//g'`"
-  metaDataHeader
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-
-  POOLFILELFN=$AODFN
-  POOLFILEID=`grep $AODFN -B 100 PoolFileCatalog.xml \
-                   | grep "File ID" | tail -n 1 | cut -d '"' -f 2`
-  EVNTTOT="`grep \"end of event\" logAOD | wc -l | sed 's/^ *//g'`"
-  metaDataAddTag   "META" "name=\"events\"" "type=\"string\""
-  metaDataOpenTag  "File" "ID=\"$POOLFILEID\""
-  metaDataOpenTag  "logical"
-  metaDataAddTag   "lfn" "name=\"$POOLFILELFN\""
-  metaDataCloseTag "logical"
-  metaDataAddTag   "metadata" \
-                   "att_name=\"events\"" "att_value=\"$EVNTTOT\""
-  metaDataCloseTag "File"
-  metaDataFooter
-fi
-
-#--------------------------------------------------------------------------
-# paste PoolFileCatalog entry to the end of the logfile...
-#
-if [[ -n `grep $ESDFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<!-- Edited By POOL -->"                                       >> NewPoolFileCatalog.xml
-  echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"                >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $ESDFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml  
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-  
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat NewPoolFileCatalog.xml 
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-#--------------------------------------------------------------------------
-# paste PoolFileCatalog entry to the end of the logfile...
-#
-if [[ -n `grep $AODFN PoolFileCatalog.xml` ]]; then
-  # assemble new file catalog containing only the produced datafile
-  rm -f NewPoolFileCatalog.xml
-  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"  > NewPoolFileCatalog.xml
-  echo "<!-- Edited By POOL -->"                                       >> NewPoolFileCatalog.xml
-  echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">"                >> NewPoolFileCatalog.xml
-  echo "<POOLFILECATALOG>"                                             >> NewPoolFileCatalog.xml
-  grep -A4 -B3 $AODFN PoolFileCatalog.xml                              >> NewPoolFileCatalog.xml
-  echo "</POOLFILECATALOG>"                                            >> NewPoolFileCatalog.xml
-
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-  echo "   Contents of PoolFileCatalog.xml ..."
-  echo " "
-  cat NewPoolFileCatalog.xml
-  echo " "
-  echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-fi
-
-#--------------------------------------------------------------------------
-# paste output-file size to the end of the logfile...
-#
-echo SIZE: `ls -l $ESDFN`     
-echo SIZE: `ls -l $AODFN`     
-echo SIZE: `ls -l $CBNTFN`     
-
-echo " "
-echo "##"
-echo "##################################################################"
-echo "End of job complete."
-if [ $retcodeAOD -eq 0 ] ; then
-  [ ! -s "$ESDFN" ] && retcode=40
-  [ ! -s "$AODFN" ] && retcode=40
-fi
-
-exit $retcodeAOD
diff --git a/Tools/JobTransforms/src/MooEvent-00-01-16.tar.gz b/Tools/JobTransforms/src/MooEvent-00-01-16.tar.gz
deleted file mode 100644
index d8b607c7a44fab6d24a2346b86dc3e1e873da98a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 25187
zcmV(|K+(S+iwFR?!aPL)1MEEebK*wQ`>XjY`jV<!@bM5Yldz5}USN0m&e$$PcK5rh
zD@RBJ=vGKX5`H9={Ow<Nj~*is1|0A1)pu4UYZ&#+bWgu~W*978XSfhX;JI@V2(R+u
z=^ssNXsu=w|JLhA)f)cQYK?lG{zlJ>s@ANws`b_pwO8x4X5$4kKLajn&(aTc58#C<
zeBHirH^Tk8_!8KB@n^8g|AFgz;%TK|fBxg!<}?4l#Iu3__;2q<IKh($!e0DuRgwQk
zTC4ud|1a@u<A3y_q-iCsTB;sBLLzqOe?!xV|23`Asy*}nOFaAYzcbUFsW@||JI|q2
zwFmfLJF00-<bR`4Z#7U15Uy6M9ceE>`;2tQ&wn}pYnpac!vCsu=$W^=XO;)<y)S+=
zgy)ovS?=HvCf1$sVd8o)HH><>(SW>enqat&A3)&3jqX|Q(g&2EnQQt5>J#YGspU*T
z_hC(faydC^vsC*YU>Jx6N|b;PmTkMnF963;Q#ovkkU7cG(5h&5eB+%JlxIb19hgD#
z<!Yh48BOJvcJ9EMFKjW#?l91Uz(V|bwk^EirB8G+m4=HjmhKoLcW`S3GjM~Mkj)l?
z`Y^r+_eOZOtD8h4N>1P{jllH?J>N4F%#6D`6}RYXh+XtG#1FqBhQ1J>k8y%6>)4Fe
zu~DiuU^H{*637#99E|7m;YZ)rjWP<jgLIi?VJ=T16yFNn2`tAQ=nI|~E<HCuGXVNj
zw}`QhnCgLbBjBS}gx;C!`_y%`8J|XiPqp?4zVgE9Xo4)=zSKRP&5<vW^TZq%1pMVf
zcoTa`(&me~Ww<s9A?PTEGh8m=nBY!evUH5Vavg|yt@GDNf*Xx3D_d76(f*8tUj1Vz
zri4JposTVt(df8{kL3uj4WvbmxCO)3eW_r77dMszuaRq?UgZuPAxvTNi!rv4#-Z5x
zObeQ8?%V4QNCzzk7t7J@Pyn!X3yrmeM(r_LsB$Zop<UPn$fexDQ?RKTkx(zy>W?Jh
za%P1rk`&C*fH4Mx?x^HC_B||S781cAei7#SC!!CR7y)2r1*jE<?!Z_OH<4M$3nDV?
z0q*$Us8m}B(Go(c4S-V{2fVzvygciTF3yn*YA9d23tXnabu#$iy4Iy0j64()A_MYj
zOQ8)*Uoci<9Y08EGu*{JL^f+PZrb+=Zdz+ED>HCSYjO{&p_vs4J6s|{NN4%=ab8=f
zP~hooZv*5U(5NPQr6S}GCPD;7!0))a-i>95k$a19z92G?GYh}Gg_!Sh2SiO1NnziU
zBIiMRb|(n?%u&)whG@x6J<!p!*aC5*2?e;esg7}YqiN+B%7<GNRXD#Gkw}rt!8c=D
z{ACMeEtRsz*eugEDs!|;3w<ikQ6`E&G<m{CRX2fN`n=$%s9P|SZoWye1-d7ke4;xp
zT)94KIU_^g%kp~~6;vb|6J2I(JwuaOo~e_r&e)7*M2Fa1Ux7Ur!0-gqO!Rl%yZfnd
zz_dITwtJSs2>KzM8VXJ|c&m>+OW3v!9b~I*;zGnt<*?~T6cx*vIAtr4h)JVrN@)@c
zG@rsTEQ-j;2T=Up6#=8w6^7wi3uX?4kF*en-7Xu3c05|jPtogH^h)V!%!7(2epw>f
zZ2y2QVijy_?CH1)7REwL%MKzUYZ#U6z3^EUtPSu6qp^jDe(idWBwmxLWqD+K93Ywa
zukeJ6tUv?u5D%m~M_*3nY<Cm((2%u_VHBY~UQSU-FuKH^^J|nNbBMle>8J46M<X_&
zQKgq`dMIdvtIH0G=#*9pza_3shMbojj4?sMp$QoByJ%cpc<bUyTgda{u%#?p)`W2r
zCR%JDEflWosnJXtu16YV-^W4*5RjswS6ccU??o7D-<9eboO*L4<y^PCU(pZJmok4z
z)+ZW95!+a<74Af_3aNH*zi>ILQDvPdL)24*X{GO*2|BgvUQC;_yP(BNsSwF<=j>hY
zvUGA9peyFjFt?_jzG_uhacM-jv=AM_`uMGIJv3J+UN@e*aF@30Z%&pHgNn-DhEt3_
z!<0>?Jvyp2C>p82OWU!z$I3LEZ0$HjnD}gjCQD0!GDlUVMU)t1rdr`3n?aMjYb$7y
zlWhPEd2vK>(cXrAlX;dwBvJpi&ap#=onD7|z+%_fSfl8p!_d*<CHA_(8F&*0mN7&B
z4zI1LZIRW2<GE}qkE5m^9eoq-D;5xGi1KJ1)qP18Cz-9fztl!4KICQK8aH8F`&NW0
zh3DaX><{T{XiJI|aZxUd2AJ}~$RuO>j^4;D!(Zru4?P&ZyZGs>3s=4O{oV%{z3UH)
z6qp(UZfANx!{C%1IVwysDfY?r1+ELYLS=<MZ8!R|gZ33~S7?Wo7tD!>Dt?U%noLK@
z!uILjxaf3miSTojM;~r5tnQ&aetL<a+!BqRPj<&|Z_?v73~`xdwFld}<X{fT!En=B
z;UiJ$ojNAO)OVDP$WoF&L1=V3!bYj1(0US+Dr4z+=#Yqm8_Py&Yiu8jt6fsXrA(8$
z-UT_C(I+knWOPYYt>V_Ge3b@QQdjwARrk3uqa3xyC>1b5T7^t7UIA9iSZii822AJJ
zn5e`&*XsLQ&g|L)3IOV>y)-eVGtf*3FF1)Ki8{H<z0F*9gohIuTmY9o>fPBW127IY
zvO9!m)zEoxriSdq2+TGox;K`I8n%?9mbCb<GP%7eT4*(ud3G`sr2aR8)M`FwxBFJS
zFT>@<#ThK9?1a|OG44b6qYVBCCd#}<aZ{1!`}t>%XVEauu7vN}H^O`QlBxg!!7+|&
zjK@!JP~FKS`$G4SrzQ?UOQH@#eb;&UsJ<!o?lDNXWYtnl@*P7*ONSxmkdAA+5QUSL
zUXI$<7A;Hk^ORxWmjY#XdRUl8WC6kEkmrJlHJ$4PF1z)R>zp4TcN3TCyGsw<o$ec!
z#m18bKo%SWf*y$Xq2|_0Rm}6MPr!7k7f=d$PmGT_9nYjS_lmk@4q~u}U@{Y%M$5Cn
zJdYR?rOcPEZ?Q88OZ{Ow9W@uDVuUUWIdd@|V+g>Ys1plVgn+q&FtrIIvmvH6x`SCI
zzYK|~a-C9^_o8YZa(&@0ezflv7+z?tYI*<aUL2BM-^fxJE|u-#%2EinaJe*`pit$^
z;UP{TpEDLR@LY3gAbGf^m?Kkx&J7(dOAuQ7ke>*^s7dL<Q0Cf3+i^(n(H8{HuhLb>
zMM!F4WRsEaN!+Boa6E`+RVkBCLnWnZApS4)Bq|pwIcGjq#H+9a%S;w460ry`jRV++
z{Dwr3DgYD)ll-N%H5?1m$=#y2L(V<?z-*I;LsC#7ktC91;U|M(4zf?=sd#zF<A=V9
zawIo)QAvWO=YU513P1NvR7r}YynI2Kv$@-x;kYafA3uKVo9~2;%2PVQFFjfL@0)K>
z8cm9+(;z6@^twy21ipYDD3UA!1|CJgP@_nJd4y4`RNFZ#R%JWd^V5xhDHW1bAEJSe
zII#a8YYsys<rB`})8ANWo8=AJi^BRDSK(zj(W3g5Gxe$RfeL~)J62HIiT!TxpkPA?
z(A1Jq(MxZp;JbQ;*;(~6QxRMnZV=3_$CiWQGDo!G-&Br6dxrKQtlQ@fxNwgRe<f~W
zFYqkRzc@?trSas1Mwp~=225;y8exh_RO<muwWCdIty+^=6myv{rUrq|CVzZVAcTHd
zx&a!E{5RheHUw0Ljh2A?(IR$9@>MxOQmZ|w2Ui*jZ6$4CR1gnx#+(dB7&LhQV!N!b
zOFHl2*OYN~v>bhhf@)0ZFeorPF1i5P(3EjP*Rv+U$eN2z>;x@mQwAk>a8`2=g4TVG
z4=^Dm#@%CFVO!(K8)0NRT+S~h7*1K{5=|fnHfSBt_kpY~c4k(sz{8(+#q>>BAXl?A
znkC$!Q})90QI3NU1x7@vIk8`tejLUkxD}|E6DuGTZOajf_r-B!xDlsIJk}e|MD@u;
zu1h;37fsT*&B^71DP)r5DIM0Uc(aU*Zbtnd&?F3R&(UOcl9ZjLh)S2JyMAVnvb9qz
zeAVWYs?nN>iWTXB4rsyl0msOKz^Ocgwmf&RT$rQ=(SBdA6T6K%>(=AQTk|2xiHKP^
z^Ts0+3BV>-l+j;()1@>b4xd5^_pD!83tqu!W*MIx;ro@38tV$@6uAScFDAe;R77^<
zaa{tvP{f5UUa6~dv}ZLi>o^4qTR)0UF*I|o!_B$7Yo3?nd;24^9n^Gx;c~!Fek&?Q
zM@yACzsw^a#9$W$cE=*CG9Sj9$=X(TiiCz?G^rLSNQfy&VdKVz&MQ+4%4v>n=MLs;
zF6By?@ARNmt}_8?2gAjOjM~eFnoE{PrWE_<pUD*u(UOR_D3>o^${Zk?rAm86`<IeJ
zyvkegN{L~|Tbe?Vg?Mus@$BL>@52KL>XwdbU5BF~!!Go|m??Xj(#JSUN->f7scuOP
zZO{4GBCCBK=oCs9;U~pv2MjYa)L0-N?n}(8aW$d&R3UGznqKYhD0Xyh_$e{fB;jGM
z-xa=*6tI&HT*2O@%i7-c4xLgZ)rWh?RnoqvV-y*I@pzeRS8rfOHgR0Ia_&>gPm}k%
z;2WrUWn4yIZq;rwp%{A+54cR^Fn`0rFj6i((UYUJn=&v8xd&y%hCG~y=Pq#pbk1jG
z5V9n(qwVFDWgwlvwUA~ObF=HI>zerj$a4}hq&u~zK5By;5Ccg4#>Jc_bs7VSM=00B
z>}Kxg*0{jhn#^(ak863j#~RxrYqDHQLL`z;jU_I|LCD&!m{^Xigkh!@&rQd%<P7dI
zz_?q``aKnA6Bd8%L(u=l&;IBC<5xS+vDf{NdX3Nj*PieHe39o*@So$LB<ECujFmYa
zzW<?BtBuABt#wpu*75%;-T!IT=>FI9{g2Q8d}~e6IZR-1anXC<J0D$lu72wFt~<ld
zu=jSr4HxI5)Bbty>iS*oTl6LqN(^=b&wU$h%6>yJCvVkPlIXKM`$mE2ob|iI8>7-W
zI~@+MyS+E**PCi4-{f+#inB=^F^pY~ZOc%?-s995C%NBp5~Pi>&Zc1?Pu{ff3PJwZ
z3iJD`T+VVRh01M2tG#6uoTz=U5$A(^A@|$wJIt~TSso=`^ZX|0A~du{s|eKsauwqV
zYXX(Zj$-h&W&HWs{QOz_pLt4qWsXPK|GL(Cw*Oz^*<k-EN7}>wZvg*X_Ft`Or|o}+
zIBu~231o)-&lqOS{yzk>YX7s)YHt}O!~QEcXW9SES+*gYW&bmv+5R7GvHu&y;A_kH
z^RxN+6ZSuKhT@?)9=8A0TCG9(Uqh=ms*P%s?0=)#YChZlFY#0kpYF*)hb=K598q_W
zcv~Pkn&Ssz5nhX<{aHS#Tcke-w^(@Y0=onPa&(5L5}s&^DtH7*gCW?BWm1vLwRt|>
zFa*sU-nc6RT?pBy1O**;aqn5vSpfM?0ccx+wxCZ(Xc_UHZR=w<tdzqOE?I?q<cbG=
z+dDlU_0KN`r<de%S3Pd}H9nQfF+b2h@0_6-9`3x~lzvY5QJnU%T>TTJ1$m-=oyapR
zYLn%zx5@J^Cxj}fXJ34{b-hniLgqsuQ^Tm0zi%qLNRT%sWtauQqFt%zj&nON+he;t
zb#E$v*kU>rK~UjaG!=v|VTbZ8nA-(fQ(Dq@r|)~$=e-Zt{fpt~s&_gVqEl7SiZBJb
z5+tYxAGAuJ&zav}TOs5tbbYoj(t`wE)-YanZ*rU}%PxO<eb(;)dS3LE`!g<N+3IlU
ze1{{Hl6?o<Fx=>WFCQgTkw8@{l_#$mZ_{U-6X0~k>R5hwR!Mj_XqH?Dbnx_h$ZJK*
znFRNRVtB=q>floE_#jH2wywinY>-0-E(+f)Itxm6C-8K-oi7r*SB9@bx-^#Yc}BW@
z2^iucLrfRLTmjxIl}kvCr<-J^O^ePA8-lg~_}r+{=c6`U&R;2g0yn@e*b{8wOlb{b
z`t<<9pJJd@R|e75F=!C}T?z1QcOf?S8fW*4k2$Y&{GDK>UHm#?H$t%xeAz0Pc>*1h
zHJJ!H#t3NYOrH=n!{f){<#oSJ9i?EE;AM2_J$(BT@}*j>+{9i}IR1h6Q}IvKR7mxu
zOY%v-T1#8$Rj;?Qy7fAv=$I^WHn~=hV;r^Crmj}QxnG6afX@#Zc>j%#!;D;ywxLp^
zCzE%VyjA7j&*{|2J!_ID=xQ~&g@x_~^4^-oM^FtEIfUk(5$-yy%nNydjP-(ukYbE;
z#uJmKlH1&=XLEg_YFac}YPm7=N!WzwCSXd}kaY$4I#xtD%Q>C)BMg57awpx>t8NkA
z^m?Nr40~7a`<>qC;zREWDBE54Y41<3`lqkY_VyeboY0$}&O4(%I<`MK9H+YIaPjZe
z>HY&oK26pfloW_9Y*I$xLqEiB^_MN=uYpK`jxWK{(RB)h_4Mg=9zf}wm$8WqO(ZBC
zEj-uff{PLWf2h!5TZ~4yag54?vGW-9X_B6f?|jU3AI5aR(O+^rJz3iJJ)m)R!mH9_
zjJMH?USJE&kU2UX1*UtSq{$P@qn{EwLr3cKi6XXs^k!{x9*Z}uc?hBb|1cRD(|B~m
zOx(zyH6e#i$5`lEQUpqB#%_&$dFZ0juaPQmdSBwRYf*c20xEH4u~YO0`d!HzSad0b
zFM&E7JFJEY5XTA8n0%Tv>=E$Ah`CF(71XaqLN)u-E8RR}R8JkV$LNu(%ZHxuuf^35
z+x|v8;u*Xr8eA1E76?NYiTul%l}~}B-i~Np@@c%%OeL>KS3V?H)nqW`FQcEgs8mAp
zgprv16w$&qv>;WC1&CDBvu<!GMK`~!J(Y7tXhf&_l4T+-BZW@u`6N_vNUbP}tYFwg
zJtT+aMX<aIZ1K5mH5f#eFCE{SqSO|ZPdu&6_>NWZlS5e0-|)m(+OWi@6IXSTj>uL%
ziF<kGoMm5L6)+(=6d6rU97N%HZ8-oj57F@@9NYvOw>|*Pf`{<R$Xg+I8TaqvKEJ9O
zumya5;S+3f{|R!bTyygiMzd_7r9R$8Uf={^e$56Rg;6d<D!<-+pmv+r=GsETpp*2$
z6o>5Nx6pua->?dCh_hNQ=|%XG<zM{)mash(gE<}j#ur{tl%L;V(CN?Ui-{7ZBuP|z
zn9?zR%aKmS@zVpbNXJ9*H)SvutBkqXm&i~0UHA#5?}KFqGiCOSsluM}v+Ns$vMYP%
zaw|bu|NN|f-g|T~wHif*!wq_a*BAgkcDT%~gmiuDYu88rzduh?|4%MVX3eo>|F_l9
z>MyFa4SZB<HJaF7J9<9<^M#)0`hVyK|0C=FgVRwDv*@!e`v3~q^M1hde!zeFe!yp}
zXK{sX5Z_!wYl6v-mHbFRT$)wOajSI#^_?sd0RL!)a@A8Wj!_mVHZ9P#Ro5_<9w%&;
zlO(Tq7Fj@uu8$_e@?-WY<{kV1r99||J@^}pIoU{_e6^r<8S&3_*h~4Fxjw+kc)k2x
zfrcAbbQ~-XJ&nf1F9kRRakt1rNk6=ULJ{DWmjMCVKVUblP)-llp8!E3!>d%zz`3HI
zxJ{_yg2x&P8m?G~2O)5%hh!bXog}H2BIzo+Sc~oQhfi@5z9t{cJa;*r$vP5k+bkA#
zc<1c1?y5waC-JSySc1|!C{Zbe!}MqeMJ+Y`b3Xr<y7R$TB%`1nJ7mfg=+eL;=U>4;
z^?%_qR{yWPFKut*MiQQ{<gb9W884}W_hCz-Hjbnu-nC<|rQMl#X6NCy$d=Rzuj!^7
z%US2Qzo^390J@u^EZH;cC$ZQ-p-=z{g+ifFU7t>oE%XDCV#qFZWEX(!b@<<aF1<JS
z=QP-gA$A#V@w(c`1-%Vhc}IG-*~YTZ%3?ZzY5lC~yI5w$QI$#S0iBC4Pj(&r3OVpb
zbQ7x6T$ASAT^=Jy7k5cAA4NFrab*_fOsV1NdsNy%(vF#?RCI^}eZeX-j5!|A@3KH0
zEleQx#C<jHJv+qmH*MDv4x$C3sJE%RrkF^V^R|1}ln5HPJ($5W%dWZNH2G|{(9daD
z%e9|niIQYEy-mW&r6vPh1~SLwMiU$5fkFm0S9#mA#;_H!t^FgImb5L?V{gG9^;yII
zV?>U~sw2<-)9!S@{?lpqy3J;z2mYVEMrULHd5GtJ?LTkLP$A;57vqV@UD<0q-Cjw?
zKALfcN~Q69baV)7&r#`{m*agSpxgECd(y1+fuc^m*{nC7k!Ewh(b{h}$d!m>aQb0E
zz5z`9<1G{qEMxojmysx#Z4MHW%Hs}dW`9QG&w8ewdR=^kgrE0{bMs)iPgb_*tZL9H
zYR<{F=WMJw1<?I7>>}-$OO$m4cc9}GOa<~A<w&Zd|LNV!^V3h{<r__MfCgpaqKW!7
zB(64UxdgYKT0+I89PgU-P(lVk1uDndPLju61Q(lKqW-ZP#x6YRwJKD<##DQhN!IR_
zU{t`LE>OlLW>uKYH!m`rlpo{_;@1{{Q*JGdB0$ZY8c%aDDIgnD*}31=yd(H7Qw7Lk
zCmYuh?>Hlv8TXq3Xm-+z)nNEV&6`0K;~~u|${VH-&@PMG=s_w1pBV)NS&F8oBvPoN
z5pNp9#^%zRIDgJZPyf+&zw1mH=QLECHo4pK%pST=11kcwQ_dQ(x&0H&9-W}71@eyS
zO>T(PwwL!OxR}_?iUkbUAP#=I45W`8PXZUNRMNX(9Ni==l^|EEenHd;`c|Nuh3pf#
zZ4{eE#}3uoXV%^ne()|#58(M6`|$wJlE9acvXgKf<_OD*UiL8pXc!^i&4BY@8XRN-
zjKG~D3m~?#IR}3?rpRA`Yg#7689*FQ!XO(F1Di*a#0y5D8d;gm1Dqbd>{fPmI}3Hk
zPy0xCv-lw52DUAu_PCh~(aMEryvnU57owFtoB_lNeFZEt498btHr$yXj`0`yDWTdx
zNOcw`6N=^RSXKDf-rw?Yon_-vME$k<H+GTvOSkkm3_a$i=&|?MU-EMg_8&d+sI!i|
z_z(S77vev3+ue4j2ftgrR<pUW|2)LwH8;Ga`=r;W^!Hho)xm)B?vC`0jh)MM5=S~J
z2*n)TrPe4lZ>plPyH#A1q0fx(L^S1=ms-lLg`Jm}dk-5RoZv3OlhO2{JoOb*xkg#g
zZ&-k0Y!hy`v_=W7ja?>?<ZAx->^RA6O*)&m#hKi6BRh2$(OV(&Xd9y0;$~T&-z@1L
zP;^nlqlGTx2yXGAe#h-d<f#NWJglU1l3np_DO-hnN?yN3Qgp15h4tvDlFEq^r%KB4
z>AMQfQ^Q$^{jZJRQ1-r_Xm-4w!}{DxX<DUEEkLc4ajoVis1@e_I`Y3j=pTIY<bR{p
z`UCx^+i!Fl-3H44cB8kE{}1ul@?XYqks(|h;@<)Epuv7z@oWkO`q4Z+95^c6+~v;E
z!uq%h@9#UyK~-LgAc_z9M6%Jk>EQ*n*gc-GJ$)9ojjPF~p6nRM$L7e*^N`Ov@?U*O
zF}sc&`QK_b`Vjx8-RpKbtp>z@?X=n(|NjShZ2AA@&GFgsk1x-i;okIIpS%{Iy)*<m
zi)hZjp;}j;Q?<dwH$4Fe44_n1<fj#y{8wM3I*?0(U`M$QC}Ok-Z)Kt&NktK|ZG1MC
z5TRTGMX&ewEn>DI);YNOu-%J7DStkN&z<oFMP>5{ab^9RvfCwIH_t9<R|vIp3;fD0
zSEiqm_<BBM6;Ke>A2L=ue%7m0a$?MDTS;8F9gZOeeYBuIU6@QCGrd7BgUxivn|WYT
z%z}_lhY{M3bNd~x)Jdw$Rav8;toUJ{S8KF@E}#7CW{NB#1L~C&c{(E2r#>{4ehouj
zJ9NBx-L2Q6wO!RFctl6);TMHVwS4agcM?>|p(v?>pg<b6CRXDzvT3s5vBlWtx#P3;
z`Y&~Je;qmNe~0e&==x8$e*IRn*Ma?Cx7pnIe?7?KS^q^CPrnYJATlqACE@a@>|5dK
zhQ(gtO<3_M$OO~@@#5bsY9BVs2p-PW6GL&}<#gpiA~OQS8sMdhetTVF-#)^{Uz(^i
z+PBFy{?*img1F#g9bC+R)L*Dz*I(JOxt3sjHjklMfhvB@$xM7o7Ye!*fLosNHFv4%
z$R^34x%^Pg*}(mManvjI259l{BD{)b8jcl<(<Q4&;j|;PLNL+^P?p%cU{bUcz!QfU
zd`4m_A&$6kcX-O1{ZZD!Q*a{ZH+0C5=rpN?v_?XTsErKEkKy7igqUleJhk*hiA8)}
z*{#GvS_vJFhT3fo_Gs<Yz@U{>BhKc21z*a6)zx1JWyW3q!wWRfdqxMeE}(-C0WJ47
zb#+41XT<=OO&PVX4VO<%1dv)1eGHjWCotwtA!k)O=UJ6t=6%$n_|vL`W)-Z#oP+L;
z)0^Yzxm6lfq)OE`Pld%>n4aCv3ggTni&tr0vHCIwFSgp2D@xLJtg=DEIxpk-Y+0%9
z9XU!eT1bi*O(J<~cM7Beb&GPm7rdJ(rBpqX{<og~FTUxUT}O`o-|ac<f8EXZA0Fg!
z>Hn`!&NJ+PGIwSBUvw3zlL=7%F(tzS=-eMDt(|dSwz-ceK&i>{inqxa{+RYYT`v){
z)@>2Ah?5pU0WaJDzz#E9-du!2yH3#~5=?`k08$1+j3&9%u2`npL-iGGQOUOYS=Khq
zLTCXqx;4NvR6_78-vyx2?xbFe!JpIa@#9Wwh_Uzxc<SM5tL0LW^Ekd=z79I;8|gmk
z@))Y985UXN%wP@l!6<11M}#GijNw%|YLwV`F$#5-Robx8-2z4=Don0^6wu3PsyT<)
zT_oT>RP{D}4__Ci3lsYkJbb!RwrxcBp2+qD7F7Tq#UaI%kN`hp3i)vVOp2MZd$2HI
zbCjqrYf_oVcSXy&j7M>CYko+c%x9C^43w|K={&wA(_j`{;aCD<iYX@eapzeQTtt&-
zNm1yV2zx$Hhd861^JY3^bPjPqJs?c@<U@dX%9?QyMvskm@p&+1^$ua|ha<rftCUZW
zO=wxcCq-rrEm<;;2mqP3ttzGZxvbWbeI`J?ws#y1?=gWul6_2oNcN6cMC;32Lo+V1
zp3#x%!q<n=V1!I;Y_j|C=-iTz24!|ODr76`m_o-SWs7cd&=E<#%S7W6JsyNkrp!cc
zODhj*n_snFgfiZNHDohIX^trw5NlA<==jJQ5*!g}gG%w>oBy23o=(Q>So@qRO|=?+
zPWby^auYJbW!`|LX5q<LdNho#p)Z2nyIg6wt+6){ySIE&mwq(;f9?I>`sY8rR-+5&
zKmB&A-|P1}c>dGboc}z?<Jte^oc|aQtDXN8IIOwz5fKH>KOzz~i_}hXmGd73Zk^dM
z?CJ9#jj;4dOL1K4;6@zj2b0Bh;7C95Wn74(p%lC)eSUdKwUyv%J_{y}?BnaGr6uE)
zO!~}D!mIDK^g@j{H^YUFne?8^JZ2L8c*kR=yyBV1Osep@$4rGV6*y*6c<y%0lw1DJ
z$4sIwDl_16s4GU%&14x(f?HZG8#U{oY6S#vF(6%Bk?P)&$l|OOb_4P^CtuSUnQ!X4
z&dA)btL@``M`}EpmWLDdBQ<0EaT_}wYJ;v$-P|O>t&ZuC6LG?}-YcEbX)DRPr*u9p
zPFIsXDfHSjNbdpHU209wBwwA@IgqdC((}yQe>(Qu!%ka}J4bBI!_I=WtZ~@sTM69!
zcQ1#Xt5v!7VW)qMaaOqYVdtv#t#jDv-C;lCVW+e9&wAKt>>wU{6ZB8~thxUeXMLG<
z<lX;hb$XirC&vHlbT;?@9^`TE|NraFPgw`RGTXS&_v7i?I^DM8XB_KXxa8j0@ZHbg
z>0(#tJe755$zzCX#Pj7I(?q3G)N$+kC|-h{@pqM(+EIEHaw#M|XO~RV20au4tSq8z
zIH8%-|Iv-Jv50h~KdY?yoKw22#MJp?R<rW97h0#8S5NThLy(&;w20?Rw7KFit7=h8
z7d2V!nu-`bsnjL=tdf;}eqbZF+H;^Q@a{E{F~a_S?m8%Ox(^W~9%KM}APrRT-Kk70
z8ee#^u%5}r!#Tu@<6JMF-9c98W}vkPB11=zg66TM<Uj7S-ukaua5L)2i~rkfw$kf=
zzr9)iALMbZ|8!Kd&Hp-p5g~SYUAsOirWGh4wSd&sPu)JR+4yzc!DXIjOTNq@M6Khg
zba|6PzeZu)p|DB`OV?Lmes{H4>OV5kXJ1dLL<))Kj3yV|k10<thqn~%+I%4BgtV&S
zhGHk$Sx`8BxwsHYAoD`$qu_^v!SGVgW5w{X$)_ur4P^_wP%;!~4picUlFnFi2(2JK
z`p`Kt%^`E=tHHAK&0+H7%K@_U&7raL%|WsA&EYU2D5XciE^PL{%$HiVl4V4Hgxk+>
zIv?NQ5ZR-`=blqNcPLw41jX<7q*Qb61vVXiJkZ}LGZ^m|h62tL*mxPqDNS9Zq#;EY
zO^5oxy7FOQjfut6aX`(A#3&l6a_mgsScZfR%*zvFi=Z@UDGm4cKYG>Nk8bT-D@*&*
zuO&lA=OKW;_9D3OZU9mk*cfEu8Kzx^+}N-`@3JLH<H#XNXPrEJIv;rv8qAi55k-pc
ztOMCn!$8?HRa}=iJ}iuhbGu3~w!fn!>*wK;)4?AhK~9)_TuCObX04w5JziGm5BN--
zMkYj7R&P~Ob$Mi&v(NUz`k3X;m70Domou7N3<0iv4h)!H90gz9JcxL1F?6gG9hg|g
z3P}7!>Dk2)y4GkNqmf?>C7XjbDoihi!kCA!ifCw9Ucv5Cv(V95lCz5;)25+~OsN|V
zWND2fg*aR1FwRrO+UK{*7@I%sdF-9+=DEwWru}CgjE}Q}KmMUW{Kp2y|7~^KJ&61P
z{-3=~{NIOpoc5nLFHU4UK(7rb1@yVXKSpnZ<#`;8ela~Z4bJmKew0Oz(hi(PY0XCT
zyEjj51<F?K`<_x1;eN?S5(r@`**|5V^-+VRw6KpUD2Vykd4@3`eIh(Hc8|@3o9EG<
zHRb=}KH@+2nqBSwcbnb+-uVAN$m5j%Z?ob*%G@>Ye^cJcyZ=o=vhIH~?kf`RkwFr}
z!Jg^Nf(r1m$BTK%UGIZi#Ae<Hmj-%HnKI5V?AVb4$nWKzZcN%wk6jEmeH)b<!Cf$=
zef;!80UmiURZF>em`cl$+V0#tgs9AFCJ#Z$8n;4xO2?>^^ySn1+pbe#3e_&Dt}-ZP
zH5>N5BW>M5bvb^nTWyx>C$BW^Aep*ED-dR1qRoo6X^)9P=sm^S)N$GjZ(W7W+EKrK
zyeOLMt^em&_ptuA8|eRMuK%0+e-HDx*8lS#veti@yXN{&c_(lEryyDDKjXe4>pz2Z
zt^b0G_1Axk*h1^SpiHj+EWup=1&}&@&uYlJYkxi_d+p~ciMjp@M+FgiSUaIyD_*tT
z(*=})Y(+q|IYSX3;L@0(3phAn9bKSoa?CJT4nbDQ6HoIDH&b))4{2G=qx;t!R;qS=
z%|Rf%yXIhzph4(8Y7PQt=2Wqi2(m38vazNZ#%Jx%Q%t0&f9zFi^L(ynP5lo{nYjl5
z`QLwPr0xIxUU#GaJ;dYG|K7bg{*T-P01N7YPXJ8bTlomUES@?8@MM~Y04W0YedSg@
z21q0JQe+<lm|%Dk@I31zz#7EI=Eu$Ru+M$U|C4Csv<2kIe=7d*{vTZj`fd6zeE+Z8
z*~EW+kSAaMpS(Qw+X7sW9x<NQ6}F^I+W3w<-m~8P*OumtI<n_~v)OKg{@15JTK#6L
zkN1B%8~yJ=9@qST`S!&*&TQYb*8$*jQMm!YwAW=E&901)V3LXImX_za`6Em0bEOYo
z(i)zGGA{vX$<pX1)BF*qbf^jsm4a;{Q%WUlw3j#1c1XC5X%Z#NL%Jh>GsALVWR$VI
zWV99GrGNBPlnlViIAmc>JfJ1GPppB6+dsBBY0P5!WCD$nQ9e+-C;+s)DgXqe3!t}Q
z99@N>`q=U|g3$J{41oDQTK?xv0P%9SO+=T`a`<<a18_h3;I0*%#Ri+f{CWoy;AC8@
zArn55O4<#Wm#8CiJ#H0;lHsc~S>uUyHALpn<7l}<XdxKJ(Yk9LcwHyCnNEZFHXYn9
zCq$WOyuo)oTA3X{Kr*95Ya9Jjs91=pdqL$oM<{|u&6cb~jp9gv4mnh5M+CfMBqpBd
zNcN<wMNl#Q3V<%+a1<qx7;s*|2`c7m0jy%y79oJo-7HYqolHRL64FA7e9W;Ja2f_9
z%3B(_C_B_j8v`oG6T^cW?Bs`2L#;+M_0SrPA+~Rq2{?0n{cz@p`Qgmr^23>9g$^~I
z7<5WK+INWoe-v>8*p8=GvZobsp6vJu;KCz4(K4v;9W<>)1_Z2g%=Zj3tfQwp5Mha}
ztS}(=+y0cWD^jsLMjM-`DeT&0&4|>eCbZ)kj1QYG9avhG>iLG$pnoZ+4wtu!u(X&b
zr9sK4twy&m;|ec})9aE{Ao$5(U}Blk#47m>*I74u0{CNh1zYhv7!SAjI-ODe(o>%P
z8%&BIn0gRQgJo`UC;$yuopLB~nJ!t3W+*aE7uBidBNCG*jv*mWpW?{7bLoJ=hK;W?
z1A=YY-X%-i;feRMV_B)i;bIbuLaccgoIB#3=etB>6hc0caFT?AzROJd+_`D`SdVE0
z@`OAJFOkB_on|AG#Azmp?%XtqFftl}_?k!F6v><JJabd`o3nhdSb&h(+TW^*-)7-5
z{BK>S)kQ^0E%OQ=b8WY;=xR9A`kVJktf>cN;>=g{{FuqkiVaAsir!1+i{cGP>y+L*
z$5$(KN=o_6T9Z;Z-G^DaS?aOvYG2E<hW+>LbyOt!Q~v#rZnq8opPhEU(`*1-tJCRj
z;y*peW7&V-{`fL0`je6E`0|4z+M~;sn+^aet-Fe;40EnZ){MD&VmhENL%V(Sv}Ag9
z8oqyuN`T|uT?&*tWhqk;l|;-%K-FAHMMFXtL1{On1%$4xeM`A)M=}@WT2=}xBDFuR
ze>RT1F9T?OVY_{bt|>rCF+4UkrgbjMV8*>J{Vtt)XIQb}Z8C`-ATmk&vN|3akkZ_O
zb2mK28@R+7%}j@S^arH&4W@zK!yMlD-uF>mdgMH@z1>x1Fo#i77Q?xsN#-?i^?I|K
zscMyNbtojJr2J9?B;3pTpW^|T>;Kp3r2PMS?dHb+<3S$R`acwWo9zSWgZwOhfV#4|
zWh)Dret-(>$fHy^{Q$GFHBUen5&QnKX>UM{xRU7!=tP`BRmvOC0f_#9U9Uf&Z$KZL
zM>o&sd)AQuGQiOBe0l+2JdEZu=K_$w|3m+8%A3tzrvu-A?{&Hx|DOkWEcq|PI~~7y
z{oTu-UYx&t^OIBjdjS1=LOmvx-0!)V$h^Mig0Mc7CxO5#BMGk(`<k2yWqlefVL6%K
z6<ZM#J7u!AIr7j(0=m8>rop97XuYvsr;!%1Gz%{HkOgO-&N|zTpFCv^$oX>G)Ht`y
zz63WN%2woDm!puP9qGf+;)7LoaTgq}d6~id+%E$w@ByVYXvq4ymZZS{X{{XWHt#v{
z+aK4;sX$}etnH$0DCXN}H&&g+y)o<}f80wCR&7Ffu}Wt17@&Rf@XL;lchBp;b0-Mv
ze-HL}p8a2|5Apx$;@|GH;4VO;4KV>W>;FSM#nyjgBUnfg`0N`(xAsZ5h8c=Q<}T4y
z0QQSSZ5T6g>RZQRfZ8T9o7(*%_+Vq1*Bo<$nNw+@R-`taIbB4zo{i_-XU}@iyDfMj
zRVE#aiqp-m^uC`p<bM)QXgQd6AEuM6I`Zy+b$aRhU!8tyWB+@Q=WsH*8b_n$5fvYY
zOmfbGX*k%jZftFlXgt_zpSGTLy3Lcl?>dd+z0S!=Ywy{!ljFT-z2>u%4ovOt=@zM5
z=zRBIU9c(DSpsh}Xa}Vd#Eb4CNTSh@xxE~Yu7lWLv+h0$ZVSBD!@BIMe<0bj`urbF
zm-W@^pffyk{?muf|8BG2>`*}g@t>NlE}j3~&(mb{`6r+McN_oL!7o$^oP@>d$kG4l
z2B4K1|5m@Tk^c|!2*vuF%JJ*-cW>UDSL;bUk^@}34uf$RgUaZH!)<c3yg?hmlot9&
zl8yfi&)w$#Xc7jqn?-Gu<b?jiCvX1u``y(1Z+DvQ&HR6e2mFS~H~+>bHTc9gNEJT3
zH3Q=><%rpPA~Nd<)yRUYu%3+KU^%+32TQ6u)nmF32$C?_n*_@+S=K3d{e3fT_7*Kz
z`JXqMW!&DClle_Nq9Wusj_^}`dKJ@c#FBARnf@ZnaJm4&Gx*;W7-c)M_xGEK!d%=$
zlQBY4a^l+|=x+a8rY-q~`!GL&R;V^8r1j-=0hnsve8XvS)WVsY>`|J?-hyhC12GH8
z9(*01Zg~dQya34M^+5K~m@2$o-b3$$Ni@c-aQ$sOAK&1vseV46Pm=n-&o8LvI!i9+
z@ig^@xZ4yx6Uok*O1{}9N8kJ=TKMUJ$X=Fd<vQJo*W)SKyEKwPRIfMx3r+w0`QK}&
z=YMN+|NmhgI%{Ckk}Wk6w#a~NZ5@aS#FGbip8W?T{6J^wQeY}yM&+7Y3Q!@imH@z}
zJfZT8fCOMoaL)b%LW#(l`(NeMuN9s3>bcwek3%{TF-AyC@_8)B{?lnTI&}WiN#E=?
zI{5wHcE7b*{~zQ59;ZA@#5kAB!Oik|9+!Ry=kZlEPsrIacpuLf^P35MImG0!rYC+o
z3gcOAbbZ8&l4&%$4ktnFBD$K;>AH-*odvaMb~&p>6#q>Uk{2*H@Z-ShJXfUwuW5Jw
zPd`w;oCOms$&Uw&lVF~fDh3(z8RctMP@X(!`7$kCR4=IeASXQENYe|ar<2y)xARFf
zx-Aj&(XwEEZ4)f;mdcZNVKSe*PklX<7+D6{C{wWX55dhidO4%jUk0O4uhGoG3QJZO
z>yht`s#OM7EHh8IKkNyQc?vEZqUX$@&!UK(!<%CD-@iyi;S%wiB<VSfsFHISG%Uvx
zI^|Q{YG$d{+0u~#z6(bZrHEE-6DD%<2vZShtVd=s=1>o%K!m4(1qI+pxjcz3U_q3#
znfySPvt=}!zYeI1{ow=opR!ej2J)IN;c*m9e4rvf1DgO*Away4^Z9Xt;o||o4<Xz>
z{b*i~mjaC!pa2#gx7-h*zILAhv&d@_kC~qVp`vQ}fHZGdABgjO6oJcB#xE9=+ac9j
zVA_+2GEy*^gySLSA9=HaDDic6`r=hd{^C<a$PKbLn-8h<pARF@$(BjE{4XG>5dCs4
z6t?S-fB~J*YHH-a5;_T!Yr2Gt$tVt?wtytj>}nDcZgu(>0xHWsIpnL<5sNTLe!ZqE
z4B;lJgizYaoFb12&4Ut2jhuyac18){J3WVD6xj<RkE{@kOzCtd7a^~HOfGK8bub&(
z$oX}YFc1j(lK|zkJf0NL`k+CS*zuSap}$45C|cTgyM$uk6jD(+8B_XVD7^&bE`lK=
zFPEa>6wl%YzTHl0wYqF3MHeF)N(G(fFp~lKWO7SJI8YRwar#zEjVM2<K(YpQ^iWwA
z)nWq^?|SUT!4@SdFWlo6*;xF(;^%JqzqHvDsw3C`r`=2M|C`Ot{{KOqe<9)MdQP^^
zKu@1tDb2y&<x(N_&|BQCa`{U#P<|;EN~Gv3u}`jRpxiv4^;t*$7Zm^b^1s!w&VM)Y
zpC9J=8sz_%WuSg!3pJPhU#IB5gMoVUeAZ`m`9GeIKCAy%3;n-3jg9};Lp*mI|7j4-
z7F3kvefg0+dH4Sz*iW<3>h<Xl&;{@)XmkGaAWwaJyIlTOj3+t2R!2dEo1<uc!mVZz
z9E-^Om+;1yjB;5fM+q46ZZ7u3+0y(HZDedw;EA>JON68t={AQM(nid(!~sJ@25Xft
zyn!)tOvX1D3=%L3b5|UW=2tWPHY1wNE+eMQ(4oBw6Iy>6pds`ef-1W?m_DO%$jF0i
zeJa$nhKt6X%`cY({`nP*dSyl_)i5HcW`=k!=ab3&SE$}@foNhlE=K@OJAn7cep#8I
zu?^!ej^0DRQ2lH+pUkgr_Yz86bQz7{La4yFtAz>JH7(}5rs;dvFk$aHZ-49>=4WQg
zd>_Qo{6>);mwDBC|D1kU#z7)k0AI;l=zVb4-Xq_};U$6L8_I)5nXDfstL*Z2y<7(F
z{1zG0C=0gZF-4C(mz2M~UQQ>%K@kCYrzSPXNnvtUN8V|v<!=Qt9Tw0$_H4cXXLb1x
z3g2pV6kq?_{XSp+`y2o72YK!`{;6ZdoI0}C|5mfxgz@jtRlnQl^?UgJ=S}>dhj|<~
zEA_#3-@SAl85@wglR{m8F~AN-Q<`;DE^GMq_q7-E(;Qcj0b4}aOcNFcdOD2e-@`c_
z-Ay0hdmIMiGZ}3+m?WW!1TmW5EXm=ayCp`=`{ai?Y8i7fUxfU)kZeI=lMI@GsHqY&
zv0~*TD3JFPfDR1bjs1OygFHmU6$9rk**bY~{^IS6^B=cl!0HsPCtv{)!Kzb@27&>w
zVieIrEt>_ZM26>uROogNOQ@1DPeR0H#`BdWR_@l9)5SbVA_(e0`xYuBmsIpv9V}aF
zb}-UVPQ?{onFzzZW)#f+bx9`k5u8Bhjxdi%Y~cP~XIbD&3UD!>Ply2(C2#1!R2bi?
zAiQ!Q4xkv^sWppXJVcxe@L7P_E2@FPm?0KOft$R?7-oS_fr88~@Y3FZUjR(?bZkGb
z1j-`%L}>6=909E$T;Pz^YPBt^hs^2;hQa&}!~SCc1@?1xMsYBIs=d9VBlf>pLn3qR
zI_Q6w@Zn@~MceQa{CTDkbis6pC_r|}pd66%#K_{&GHAxm4uPA~oS)^jzhA;zKo%|c
zjxM8Ee2Lr$>LGd)+Hpj#;19dtC<-R9)fn@VDg3fW2DHh`xA<0}m5P}s0cDRN;5mQO
zL6I$3XAX2SM92<4Q`sLJ^~(w!ls`u5|E*m{&#tI#mmw5|Sx-Yn5po&*bI9vFpak$f
zq|a|eIHHJ({&-2mfB!Sv+STa$YxK8ToKE<2<LqXdP7EAr7c@<f_er!)&V`*F(K#UQ
z)D$@ys2M~q=-m4SXSDE{S$XQ5(*4mwn?8;Sl4f1!Bwx;#!Q@>qeihEHme((4<5RlN
zy1IQuMP-G^Z-Zn0`JC?LL{bP4m|{BsWj{Qy4jp%ajj@`1i(gYVP%ps;`LZCe@PH5#
z1OZdjpeF@AJb|xWPjoR?bqejGy|GXJ^y1x5FMs-B4^0)*fb}xD4iYk(gEJ3ZtVi>h
zZu6IuTU-jm@e^Bo2noytx}cM9aT7WpD-i3K{NMi(nTT_*f}K>o_ePB8VFJt0Xbwvf
z8V0bYIwb?Vf!H>?NJID_{kcKMuhOVhwJ1ubP`Q>Idl(MO?n>}o#wDCR7++8xI52Aq
zJ~(Sr$r-f)a|!TtZJ5GqtJj5C(Yl%;pd9zd%Uwn~{)V-K3msMiYZd<9!`}?2&cqcn
z*Wl-hAaGCg3zT=xW?xIqiJY3nD^B73`5TO*o5VM1%^91TuKx(rpk9B+R4mY2kO(w2
zUd8C>M>~N`kRmj3g-8?C0clqROA@nn5EezIoGux8WlKSzOY(n&w-t?LC8r7%FJh__
zz>C&}AEE^8Uw+jEKanEVc&4%gh^@mY?cF;DT)_pDNChnBjMM>B_t*=nYS0<bYMui>
zb9>sa6D5X9Bq{$ZrQ&bmJ6BS3Ni4;MFf}jTm2n7mW4gvp`PP#NQ>tVTQjusIRndb_
zcv@9&fyiXDh3GW@mBH^dshWb_OeqOx$xRG1jdBTEcW=-sGlp(H;z(E@F?<6bzCAkO
z8cmH`$@efmz$v)rN+|vr-9&~7YaN>&uw!C~(K!_S_!o0H)&?AxlR5A%CFNC+EK%wz
zE!m^Hq3WizHm>bSL?->9uOV{_y~=1dVV{v11(VSYkVHlCOEAgP@d08{X!3+|*%V@b
zZVa1JAn6%_C;cLwj^so~4N{dmQ~GecdJ~}cQO7(`V1W}VFo7<dKo>gDC%aiKs|U@>
zWjk%azyWvRfMX<B2!r<&5?Z!HDir-5{aM|vu%X%$Oj4~^;HP@GD?~gO3=ge-?_xDP
za<##+*nt(6B7v7xu!uzpnzg;4Xn-!t-6CIV@-PaViv<?=1{D1%ckcGaT-r+v+s&mg
zK#09IGn_DU(_rw^f4zD|-0Pov(;#ZuCtwEfY^S*e<We(!Y_TZ}3N$5)?zf3+_0#NN
zv+!4zdr4ao2Gfc}SHl1}mFh0bkLC&eXGT{n6hO+(B@8n*jT5$TvEC4MKEckY3Msve
zZ$j4F(#*llaGxO5m)-xGkx6y6K(1_D?0xSD!7H3-d|^~`1x4E3Y@*Y~LgFGB>`G<#
zqUs)4N&Y@Lk8iorkkJ(|%4Q*GGr4;a(M`z1&{q!4QW)q+`XhKGkt^ycUpP?OQ;Cc_
zU$o<tEepi1G%)OnMS-n~zg~00<Pu6&wng7j-l=j;l6L6rFiIGg(KUG)zYpR{BDk!|
zr4mjYMHDQ_qC63$$k7q|A_m<f#!L1#rs^mAg(T`Z=Pc-}ZjqE23z=vR9QAXP4E-f-
zF7&tP6b{e3g-BgOEjM~)tS+^DXw_g&P5X%}f_e>%H@?7>OS)laag$sRFW}SFm`Xdk
z#C3~3QKeXmsKOq`OP#c&;u!j;y7@}``Wle~$1Ez4hT}xFl_<GJwN8%O4oAGr#tyX)
zK6o0qHkdn-f^B0^#U{@^-}oHZ2g{Yvk(3?TmZ`7<6s^Ff3G|Y1ZM#Uu;T7&cCB>;M
z<jPbk)S&u7`?=kG)~LT8zI_Rw6w>-_SNpACShw*%GT9(m>pY7xv!l~wpL31hLAXL{
zyrhWN(C->=Mgy=K`9p7n;2b*Ie~QM-YdoE~NGhzk)dR&W4hY1iAz_<*of8fD@o(D8
zz6PaLA~5K^mXbC9X1wkjuo@|7d&nb&W$mjBofM9t2q_Ye%4Aju=ZS-B@>>f)QL}?(
zk}h7<E0ed$LKi%^sQI_phR|YS>YldHs7p|x0rKRQ+=ff30i?FAw2tkCzK&?i_gY$n
zW32Yc$(#TB?$s%?9pD{nkN%)ZG@RlvuPchzb_}^(HAPEGxaj2-kL_53+QMS!FpwY=
z?s8d<sL^6|?x7j8i1@k}uIG@jH;_{vv>CibiTleqq<^CKsIE$pfO?%+q|tmqw~1B!
zwKE{CZ6G)ea>Ua~RaD5~2<|X=!z#3ss$dSQ8)9syQR{L;U~V%F&Xys@RTYq4Z#Ei@
zgG_Yt5Xdn6DTIU@PFV7ux#$|9`nAI));wlx6JsperZ}9#ALNXyqOeGl|0tWBff8ka
z&**7j&OT!kpYY2&U|aGP2YXTw%jXf$t0^yqNVmkUO@OO=vTAhfq%^~=F{i*X1HWi3
zu<52#=+4vY-scy}W`?RFR@6N~Q`Op5T3bqgH!xFmicx-(b+VKrT_bq<R9Hjx#W{xt
z9E`{I<GJgzw*QwNGs06xw*ObN)9&;k{&TC{=r=ok@c-`i8_kXX*F!v?-@8jCMDuAd
zix#HCm#AXf6^LYiKN(JMlW=m$g^#nS;oTz=ZEK#_Z7gL;k=C~ihb^zKR=%z$2qe-G
zoo?yTtY@gxQ2c*pka6YoM6;ii;V|tkgL2aCC?<+YU0FY_H@(7``<K~DATrAL>&ha|
za5Vem9p~R&1I>oC5C#vE(M7rt2U+%D#hvV0`U)z4UhVrN%@K?zj#;P_ylDWQN%i?`
za?3)v%mFnb%H2kI*TR9!wQ1017MP4(9boXqCruF)Wj!`s)wbfcb&)n0Y>}<1WfEPb
zLq(<M^LLaFxxrnY7IL>WhZ)^4@rxn#jVYke#fWCtH>%2G{?BB)mozM5ni(&nFmdix
ziI~%}nU*m+Z;W&7_u5u^1rxrH{?B2<cQnOi%QuHLWz@H4YB3vsM!zzXfRaXX$3O{r
zd9tfQZOI;j9C#C}T(C@=M_3XwjvyL`d4$6hGLA6VzalCyj&K6*e`L(gC~g|bFiY@_
zflnq&r<HWi3#qkw_daoVuXt!TU(Ro4V-hTY>nSBv&||NsCugeTYtrLr?S9r9zAssf
zu+|8_5cUGds_1q1%WVGZY=ueiyw*5<{+vz!e~o6eyQ1aozpgYoFHR@uQ}x9UO@M@c
z9plnCU;u?j;k&P86fVB%QAi&IYulp?Ii*|yC!cFX<ba?{8{T;}M#C$oz$;^NAdyVx
z<LL5MVR;`+ZbEIaNdA*rqm<g=UnUQX(jmB0!3nzZEK9i89}y+e4ZytgI?X#@uEhrh
z2huIl<R}JT${;d{2JSd!2Yxk!s5RhT2hc4I<p5rMDFb*R+JEtt4xrY6`y0TOeQV0P
zqYM$AGDLTkp~IwZ7ny8vkk>7K7aJmdY>0HS(fnv|`C&g&GD}P3b3jW`OJuPQb@_&@
zxKWp`9PHYe=v-r=L>D;Q&%?1l#C_RTy0CfmCW`^&O*@?f3bw?3n@$o*8MxR@xtAwf
z;-|VWp_1ss2F^&jP)Q2Am{2^Fu5bkQ%O3l>oGx&(F3Sn+$9-K6npgW3&PprYYC1#e
zOF*x?P_s=dSBZ-_97Pc4s?ssisr<dHXvUGt=tDTxttIHzj1hT>n~bbI)hcwgGwDi3
z5sRWeT8B8kt5~(m9)h$BH)-}g+LgtH|K45BMEmsB9?yOD=WgeJVoYA&NBoCgzt`m7
z|8Do2%|6C|Xl=g#{UDFy{7)ZTcl-ybwWuKf_i{iug1AEQ@~B*|GrOop3MgZ6Aca>+
z2h66ZWs_|an4M1y8V1n*zV=daoe%Dkmv3~e(VUr5O`|jD<<WdFcz62ZL^?A|Np^U+
zrPHFH^KBg-rcYt+>)<ghN*$+$SqBk@Hk$5k6-fi2#PJFou9!ze&@&Yul4?4<gciZU
z?7hqw5wr_MomOW$0#*<oTR_$)eRCt4^`|&mhO(d8VWNTKcb$o<uCvDszNFiPEFS#H
z&4buYobh-Q292t-^GN;yp@!UMNZ4{{$AUVsl0Zt4(D;EOePRxfQL6r47X~_YerV5h
zgTq{1WL><0hRgG}*Wy;V;GV66G&Gyf>Be&whRMxt`80F~f1@&aNZ8oTs@T!JnlQ1B
z`>fMG{jje}z(b4GhP7z-g3NPAxbad`)yW3!9Yx7-j!{Ue#1^NbfH5&0lSnVA$puG0
zshLWJ4_tpmgD4spoY$Ddq!j;hX7Sa|3em+PlZ)7d_OsC?9u*_hK;*E^nWLGhGc8};
z`kAOW5*4?lBvV<(p>%YQ)oCcdsOuV5&Yw7;KEZIgOxa881QSSvRUIJgL(C^nwrm}}
z%pFI<`Q<=swCo6)?wQ2QhHyH;=y~8?O7MC*{6Ggz_(AtryN*u=VUzzGtWPLj5jPtR
zjZ>k#;UdnjZ0}N}Vl|@3rXWG--vQtpPSc*@xMX3z0>BM#RZIYpjQ-yPNf}>3RObtZ
zF{gw+BwNl?OMGlWVN8HTMF@gsr&pBIWl-VW!P$-V?SP$EL^p}@glFA9U>>nXGVQ+s
z5&@SkAY+fBK-bg8-U4o<G^FxFa}OI;D6of@b`(3nn}<rM&!UpPET;>z-UELN*eb}|
zP+^4?nbkU{kyAr~ywq^4s}e-Z3>XM{YU{PJT+eLy6~qfOE+M<PSDEaUfeR_e;z0S!
zxjMMT2eOuB-(&_NIc3yz5Qd@XNotB5L_0fTn((e0M5YC(vd!H<fcq(vb7qB3RVjiI
zRf;y`JQ2^>)I6-(i-(8;WT}9L$aW5nGW~ijzuW>jP!|l;-AL_b<Zn_mp|C?i7mI}|
zOV9~fL@L78c}PgJRZSUCQZ_z1;3rWs3gU4BECb|_(RC18$OZ!&*%kpGrerx^5R9sT
z5p{)8MaI220X;^ZbV?1!6j*#6mI4pV(HZwbnU-1P?kLMRI-<RKbVPge=!o{_(UI0|
zqH5e_1vB`RN<77=3CzMBK)i?<`62vo5lI2sP&vUNmpm|h-)Pn#Qg8J@Lr53LC9I#X
z!~ZUer2wm~g@C(Ju@b5%h-#vZGCPT`rp#ui7t&MBlA0A>te^%%?P^OT-%X`$@rJre
zhl>Nin=rIr2k%1`GD&T+{9~S8qtf#VE$ha-(k$w~r6{6O0EpUx>y)4gZm}tkX+NQr
zf&D(e{spK1)=4;72J-E6(!gv?<u8!h)Kl>#B_%$GkW2UUXBKjv1r1anua;HSmNyI`
z!B;o9<g!B<Z<_+|;DWZz#T8YHXeM3dp}}Mi3TlInZ!SW9x?qD>jFf?<x=G%a%PrMT
z;bxNAC$$-`psJBWA(0$@(rQq2ejSZ|nT5&PB*}{;6rWAjQdXlAhN)iCR4k;%JrM_y
zjBMJ3aMBeu3Rr-y=I5uYS)8sjl$ZC~Uv9z-!K_nPki2{AwmkBhtCDx$vmx|Mhs3PR
zpi)f=mmC8m!wb6hRUFs-Mm)$FE%=l~g6gN_XZ16pF#1(Gf|*p1>@~TPHA43tZUc;1
zCR9v+LB$os^|QDs$P_7frNWRf3w5PYHE==c(R{hQ#`1#56pDyla%&Rz^MC)REH-#;
zuH7mCiS=Vl4NP-et6&9(9wq#^EDmN@A%T6T=tDqb9-ZTJcnJA?bpjyxIh&J{(-$Xp
z{H-N^!}u~<Ix#s+J)9w$`i@t0Hma;}ArF=*9MdDvU_W;QH7gwq85BE$-sJ<`Y^BU(
zJbh2kF!X`ZJcO^^Asqi$tcdW1{xzy+ody8e9Z&4;Xg+>-G=1IC{5;(uT_o>Sde|ZZ
zcK}y&Di5hnOMCF?K9`9w76U3t7z9bKgV`_NUfk5e@eO++=d=<3elsJaO`6^PW@o?M
zBdtcGtpuP!CQ=~@lcI->QPtm0C2s7-G09^zs9qn37dKb+x-lAm{No?V+jvfkPm_Nm
zy4(V1*26=V!ubJ3V0u_Eu$&=Kg|}M}$Khlcj)vj*DikL!#_X;_7fynh@+NHE#&jD?
z5{#>mu&94m5p4l^Aw*lr#7V3C4ijDtDFK+IvkLN~hUUB7W4^EYt>i^@W}(XHy%Y}G
zMX404xAYDQMk3$>MmZU&8|S|IL<w3^AVwxV9N;l1;11Ii%0;3?`{mbA?2Ta(GDuP`
zDQ=>aF+}z6#wZF(YM@J45f=wFA_W455uiVJ==?9GeFjr7dreci5H4Q6o593@flzo=
znybv=o}<iOx{Ssaq8o6o2$7{QySxANnDY`yQc(=%g-cv<5n^`o>1=!)EE3jx<}`Q(
z)1X|UG(kzWO9kQvRMh-T4hQ6?WD<?S(_>_ISO|XROFsyspXnZzmHf>T>h8v1edG*h
z+x|ZJdDpC97t!w${)+7L*Pr*Ae{-xFvI3bx`-IC31F4WB>ZgUi5OS@nOW2i);Vpz!
zF;G7r6zrKj`V<*m#!{tEoX;tR$rQdsUt|!^?q?9sutL`$o|%Jqb}xf?<{QMb`yRxz
z2OUK0a~w&Wmr}`*BMD>sOSI4hC8}2}*Ah`=2dh5d*%T+2)=F{OGnK2HhD5R<mTFXz
zQAah&hCGBeOxC3lYJ&1hXSC#qYKTmj?Xtr`u8UoOIo2R6C8}JFHAT}7X_^hw6+>q^
z9POP{siNIx>b*WC2{aw5>zu|hohd^5oO9&^CTd#uap}gEHdJt%qn~I?HM+p2t$1Sw
z4N}o{{VKHSb2aG`S5f#@nCq#KCgL>XAo&zmvCCHaxv8n@TDFeWw?i*pk7g@KRY?a0
zH|G$`1|QaCU=(fDM6eoDeWQ5`4)WcY{`(5VaJ^MK&@nEKcySDUvq130o<OM-=-HUa
z7)$_C|Bn9KsfszFRS9*nR|-AeYgV@r)PMtW2;r4sAw@lBhK5$TnR3ZGpaMt^0e2Jb
zz?XPAP7s^Yml{;7s(@MtB@a|v$JO?Nb*d7m!%uj0TMZFS@9g}HN4z@kK>`+_e8EDA
zK_gQhEL;q6I_TCt50Z%=(#wa833NSe9EWsS;uOR1IR?S3JI~wCa|@k8q2oyiE~`+e
z(Qov-1xwANNy17svy0FY4IW=R8wx^VtG2-5d^S8puV&?TNUAych1<Mv%Pb77%A>Qx
zi?$v0X7(KnyBwfaCT!d|;{!^Ww%4omv!R;``dRx~9`2TeZZ`VQYP}pvUP;{DX1mtO
zp+rIVyNy~l<Hjuo{rp)k2X|_Bj-{HlR=W>=6M5y%(&d`{Ubm}HK=a_qP(lVIvyY5z
zLho+_whT0D?dJ36?Op!ztl4fh*-N|DY<HeN7cae5uknn%bZd05TYdJ@uXP&Tey{u~
zm&!9vW#&XQ^x&?dvfuBvTavJ5yWN(AQSNvy32XG8Ny7Tin%xEvmh%5z&;MU@0MEDv
zkn{cLHU#?u|NnlY*XrW;AG^KA#{d689z8l2^Ts$T?(uJ@Di3>=#(boQGyGr%_n;Zd
z<5K=^o)_^%c5bP^G<EP(JzF~y8=!f(AaU$k=X+@*KEM7&{!a9l(@8^R=r5;}rk>F>
zn@e%08cdP8nw*Gq-fCKf-foK6YI!1H^u{L$`N>d<^*)g2=OWUoP@M$H2cOc%hk9}C
zoZCVm^RiK-&ju|#CO|eaakgzCVHpJ|IrU-CatqMV^wH2PN`ni7mP^sp>!z2DYg}R6
zKj8OjBoBU|MZM+JfN~;vVa2eS#Z!YRwjhWk&EhmU3l$$qlMFr^@@Y6VN{@MQeYzB=
zz3HmGS+w@1Ui)w6w8Y9GRM*XNaf4oEbX$#k_C**6%XwVJZ8jIe<f%+QJglU1l3mUx
z4v)g8<n>#2E;vsP59v!yuz|LtCtD)890!qu?FTW(Qh?|XY^X@89t+2*0`uT#7Q?|d
zqkN{!(esvea5P&8|3%tw(Ja-$k=4ORN0n4glsLW8Ro7C8qa&?r*^BJNqa$WUvAc}{
zvW~K#PI<EG2lm_3;wZU?o2_@$|K{`KWb|XSEO7fXSO04^dmYgK+P!Y4(`wN4R=d~P
z=zkCLxO6=^xKza}%Qv|ACVrC&NW*IRw@(Iu{8_5dzsD2Ww_&_ZM(oFKxl}3%!A05b
zhu8c26bvqTQ8~!nT(`l0d3q7X5NKe(L@@#=qU31yju!JIg3r7`G(--)cXTzGU(neq
zv#PYZ>5!KxRRj@)rBhL^Ju-LiC>rAx_*;mrfsm9hMsc*DasrUB+IW0D7Uxg_P$I%5
zgiWOcoKXZ%1{fThZQG{9b8x);d%UD&&bR6Rdl_Z7GxFHoJ2Y^)`(FNhO0J`&-H}AS
zQ~-b&eZ{(jLS4i3W@)lFqH&4m(84dr?p}gycD-dDYdHXn9P`*bzj@TNj{H9huVBjN
zt^qmnzuTh1zR~YDd;Jz&0bu{%>C!(N`TqcqBRaRsB;d3O7)+qn3Z5cF5`U!<1+^^x
z85k*}wvSLsNtKqSz8wD;P8P6oT;pFU!QTCaBP$UUV)C7dmNGwc_tb+Q21u4e@cswA
zkAMLVs#c+Iu0dvF5)XQ_vvXbL;v19Ir?>EOv_M|j-oCDiuSHCU)A{&j5@Jjo)&ja_
z1u>=b<w*t6Q0)|m-aFz_lz%~Ft^R}6wIu8iAI;bJdTu7Lqd_C-_&RFwl<bi(dR{G|
z#&~?(#X4C%RT*{tn4JN@pM%FAt<N`B6|UvziBCxqUfCU3O7$E7-IbYX*&5J19GQKj
z((l$$c5{DE^Cs5^bE!7y<+Yo{^29Wy<8VUPC$fDl?;53P!rMl}h1{>{MA>18l8~xX
z$>k)tN-C+SQI0_VjLDDBj%jWC<S)DA9dP$(zO0;IQ!VuTnx>r5eQJqsR7DlPR-RY&
zcRdsn3!e0ml=vQZ^|Ew|Wt8sal%~`VwQoP)1qBxOQ}E1FyvvIVIbe@Y9A=G=S(Oa#
z=4T4vs8S_EtXVw5M?4}YA(L@*z*!R9SYyv$*dO+3J$zoW-9r?{TP_-j{0?*TPU5f7
ze2I2p&bWfx7UFwXKWv%9%0?eQ4K74x!gePRI-x=;RBAv}1HN@IH&q6+t;FvPt=jz6
zXw7i7Fau$~2tvw)i>SgJKg6K<5c)XUL*Yk;_6`(wG=w<I8bG6)JUIy0^IwO{`H<aR
z7ULi{YL3w@JlAYa{**c6awl6_SXb0{E|H%r9C#DF?eji&-v7NGFYn3z*J?F%`(Fp`
ze-wPP|9gPPy|3eg%lCBbjVXQXcgp@J0OU_G{ps6DbVb)QGKN381@Omk@pevUd;8=m
z5fam7A*3ig7D5Is?jeFR<ZyX&5i%7U4eQd(rDVI<stEg+tUAMzC~RENgp$I7?>vu1
zLLH9d=yItb;ARA7GwQN)fp(Rt(l`*6($V-Pm=OKZkRbBmGMa`|v5RAjEu-frA??>O
z&6~&LXa*6&Qst$c&cOc#T0H&SCK6V&d-8GRc1w7XW=&&Q8NeAPoj{5N(}$Nqp>J*~
z9|u^=KBw;z#2j7*CDN3Y)jh@liv*q1oMVxp8exq*ZwaO!%jCNmbJ?+|8kNy}af@@F
zz=ydA?_Lp2j?06}Ht%Puv2ND)$9&dV|L@8E+wb;Uu>N=2{Z6ydW%l20YqS18#Iv6L
zS7QRDE9f>c^=jKMnZ!uje`#s~t79d@L?-aw)q*IOFSluop;s1PG$P(imeC}*1;02J
zwWlI?Wh$@2He_7%>D%I}_(s7R24r58ZlT^&VSd7;ZbMoty(5!1FuF~cX<JW8Fj-s&
z&YTl})`hY;r^<M9=9iar0ST_=vtZ%`u&ma2#e+Vxlkn<$Bc~{58Rl5l8qq4&1WvC>
z9HWF)D-5{xIynoM<Rb}YW3Y#lV2QV^KEg#E_|c?fEkFy#q5BATK(;G7i&iar!U2K;
zGW@W2Fyl77ZA7p`|GnTL`8LzTu-V^jau7qe%r)iH^t(!?`!n9Bhrl%e1Zk~l8AD#}
zu9d;RII~J0{+^co+2;eQWA1W3Ai}BQ=ENWmuW|B|1B1H`(q{@OgO=Ww;^zu?I8xZ+
zpHR>SD2YCX+^o4br5l3RC+GfC2PSpk-#Ut(%^AcU&LI4i7b#tz4zcS$!%2qChWbf{
zb3t3@B!e8!m*>}noW$qwb`qb^f9Zx73Wdxybo~>KOd+`L3CF!2Zfvo<j57|$TJ@!$
zaFF~%junZ_Kjg?hHEGuBRE?>m&pN8vIJ+L4O^rx7Jj?MYm&j~6!w{OrpB#if3U!3S
zPLww!MQ~~6B0}86J^o3NCDC$)S?);@hbC1m3aMF<X_K<Fn8Dp-l}lN3D{A~eR8Ud*
zf=;#WZvSD1)FKB!dH&z+Zto8O(r)#8{azRBKaGBKWB+-GN7;4M%3fDLeIEc)<1g$!
z?3HW&{M03NN+duGr*8jYkmI0e3~?QJKC|yn<vUpL#cyuNJ}0h6fr<51n7z4`TVkvj
z72>z=g!rJUQ)y6Ah_0iG{A4G~KE$IC_IqbQw4e`MXQc>;!hlIS4iOE9VPS6+4?~jM
zqbfx^3^6+kEc<F1=bb>QEy+xwH?S<GXp2m>Q0H_u0H4!(GW*#$WzdO2=284;v>Mkd
zuF^18EAglv;);waSlOI3IG;Pqe`)o|UjcIOfA``1ztL^<Tg_evzyH?m_BZnXAs%Jy
zhmWz<uHCo4_2K3MUnZdR(d?&8=7Vi)I{e6v%f&G>{6>p`BNeQco@91@YUeS5<Vlx>
z%sky@o6bX1fF`;0JZ4-`d3#N*K4FA)&>{^SJP%{6*N9vcz1=7sxpg0I!+qQ8<d3dC
z2K&s~os1%u<+1lKrmtb=sGQ6VixR{PscR)*0m$fbv2uQ8M;ryG+J!M{8XwphIwzc5
z*rTm619pU;8BS99X@)S~y{v)nUglu$x_e5d;$-j;fxt4rK^%-*%M}X|n~BOf^H!=~
zGEF-z(1r<&>>rs<lpZU{qHlVpHeir@fx4o9*aQqq(;?F%2#{R$^pB$ivhk&d6hQSf
z9X36%01Ih4OnP_$2Gb1sQbGXf6KOhNTKWQ@Ow$47iIP^Wu<7wksg0VW|GR7T`%MNP
z({?YZf|k1L)nXNnN~5+**#D@{mc=)?Q@EKKVtykjA}N#&p$*?%|6APK{qIh%W%+;h
zHvS(E@_4kpg?|5=y>V7wIPQN70Qu8&DPS{!<}hE-qo>SuGP#R8D8*9P9W>hma8=LG
zq{Ll56VDy;%63J7>c{s5Z<H%XK@BB)|AKrk9V4w4yv6Ew&ey$9?(8+g0h7u+ZpdET
zR-}igcG|6_q1|?uz*+i`9g~N#98>12_>Xpb{m%0L{ObPXf8Un>-A(+D2YKA`pARmV
z|Ll#)fA%{i{{?{j>5~66=N{xg#j=tAk0<{fBQ51WOZY<MKXbVcmP44{%g?b8Joe1J
zpXbi<KYAN1&*6hl>)L-?4RH3R@}K_gwR?SL|Ltw;zYp>h^#88cb-OU-8F5yh)b%(2
zaiL-tzNp9q6ejX5wX%4jq|}jVPucg!n4twz#BHilh2_Z2KBaibKB;X0)U*r?AjQGQ
z%+Y{vs6oVVa3e!2F-k`65@v>0B3^h(m>F7$<&~#|nW2?{fcVZ5W(F<64>?&+luCmV
zbj$&BXg;Rm6MdJtJJgVQErRQnEToc^w<)X2%vG}2nJfKH&5D8CRHZ5@U7^ZRmDyRc
zrcAD@7@vmLn1!hxguBeZceW4da`tA1r9j_Nj`R|Wl71+xH%CtyADZpYf@iF)S|DMC
zZP<DQv*tqzCe4Qw%$W}<m@*$yFr$Qg8^+O97^*mo+X9khNWkx-<$vA;lW2LnZKAx4
zmczfZ90~lR5BOREYodfG&!M#R7!aKm4)mF$Ws7JtDOoa51H*04DbX=d<H0@u7Z!j>
z;@0ge3qT|tlwERQpgNsj8(3qSr_z;AxtYG+)Yj5u1zMU1IW$mQyol$)n27=5`32*C
zpAm=1_BG+>37k=N7xF=gCo%|)LqXhXuPp!C%)i$2H!_QCWR?vqnQh2+;fiwFRhXG<
z<l9ERefjc@)35kB)rtfR9fGA*Qxd#8CDUbl649RY1ku{Io$w%U!fRO*uBOwnw)b&)
zE#t&-yDnoEvT1TNod)r(Gt=SR?4m~%$fwMGIYizLDR4bR+zb(SL*(s{J6sO&v*i%h
zq@l%{ELpMVE?fxFuYhrHYq5=k53MDmU`eq<H_DH#t$1%_)te({tV-GsrTe-7BA#_|
zeiR7*+^}&Kxdjmi<A_PSrTKw(yI+gk8Yrc?1niCSqhOBVjAkGvA8aUJVs)F5TxTSW
zp<>EtsRYi|%iBdLD#YOyS5%?|Q~`b~DAN3Rt2pwqFs|=g<lP<!sV(tkV*I2s=bQ+1
z7drdrP!`;Rx}-|1;vns|1SLBEX#`O{qcB0|d++W_Pzg#Gp@(Wth3Pq7i=N{`^iWl=
zFg>qN&KW%%W10V82RJ46X+C=v2|s(mFUr$iezKA5kV=bvby0`pge5GB4v<BOT0wM_
zR*@Q_v1L%k??G&o)Mc(T!t5J>cu|3PA0N^?2%=I3jVoLL)Ua|dt?KG+Z)s%eF`S0u
z2);Bw3h&mXDYVl7o4qC?b#1TY8yC;DJ;zi_vuQE0Z7XVq=>A$}Nomz#kW-{o`WzGD
zZnMFKt6o^0_%b+|(PQI#Bt|Zae?R4KqTF#F*h&{9j=gTBDpgUwcD)CVk~?4nwB}yR
z0R4Nll)Yzb*?ZSww$^=jj34n9zJ&ajJKg=xZ4zItGHx<w&qZu9V;=vaWzN)lZ^TD+
zftt@R_;&R8<2b%k3}1J3F!n3mmCrz?do=UDCyV83SMggJv@W#{Vd&A5d$pVDtOCvQ
z1B72k!-T%Z5Uuc@FP-cA4s#Mbp%1ru(iu&DdLx>xY^DhTpe-9~F(ZsH>D*JK819Ti
zUZMGKf6KhBZW!6Ei|P{$s^PX;9?;w;j%;aMnN%I!$JX=hi6f%TIc^dhVN^t{7Sl8<
zrZ|>`{XkYx)3R(7Jw7|mENUOe%c5t@&aFxt_V4?O=z_My$M*DaKX>#0q2pZm_GhmD
zXRqDqrQ<(t?*Bi~Q_%m%z9w2;EpkAn%aHHRsl0`d=cStW6}!AB*N%LR#eqWgy1%b}
z>)uK}h;&F1<^;Jd&QD94FRTu#dh+OLNq9dpFn%!*ZUj<+Dz5fRm=cRyz+O_<`a!+Q
z2*W05bH+O{U0b<Do+sMT*yQ+am*Q)T6gR$|1=DCW90kepP-P#1_OI077`;P<z0eop
zj+L!!BXreiYLpDJO_pu~c(z6WBVox&DEVq<1uNT2t#*CCEO`%{lbuzI&wQ||(IhuA
z8lKsD@pYb&QNK<BQE>pb$<$4Q2yVk^;2y>{75RY%r<{%wXh@|`?roPoKYq8SP^tV|
z9!uUSG@uIcM}+F86Ow<LCvMJpPR=N@J<$@-CV4zRq(ckjC*}!x@t!u~D#XLJ0W*Kv
z8b+3WVX8QOBfqB6;Ks6$@?t5xt|spleryHWg^xYr*ioK3ibF>NQO((}lW+;q*Wjmi
z)R?NIR6@R6UA`5MHt9VeS^4nEHFEw_DtxSio@WJO#}W7GP%1v02i8-8Jbl_a5Iv$s
zg}sligV`*cyc`>C;?78XG!K-#UU|VVmyD9EjuwVQ8Pbe$g}gdXVBBZp@B<-Q{8&A>
zpF{)Y1kX7^&zSv6V02rpj6SR|y3D%=a7_fF`fCO~hY5}inV^RQ=9$*?wm6n4z66#E
zt&k;Sanwc^ZqcW@n~=M9xSHlgyWBTbSl{ILq6Sx>7fY#CmM`U{Vk<r4*pcc)vl~ZN
zH?Gr>cj?N!&Me-Yg*!B*HI(l4{JH#(cW3iHpS$h<WvGGU`Sb!l9s&`}yq18x`=5<A
zP3!l%?QXl%YeD?KUZc19{?mgzj-9V_aJ`#oGcc5^?Ebzh)l$wR5NwT;@G21-+k_=E
zZ`2BD@GY%j(NoFONCkJncuV2~N7LYgp0U?tVVFEyVT~F~Sxi{8cFWlik~BX<c@<MM
zAnjqua<z8sfX72Zl>z-WjtrtN8#Z7<jwVzXI5+<9>QJhjY_}*Ed~lQ#P*q{)er(R%
zJP+~QP5zJO)5UxSJY6qPN2AfnlK=4hq1os*`^|R0-*3VF|4y&-2h#oQt^dP6z5HK$
z`~|>}{vStS;!p!}*8fJc)r0lF)os)No3Q@(JN?c2{~(WA)PD$W#?gO-F;&a!C*f!k
z#Nqb=EQhzJd}LvPKRG>q_2S*>@cS3X=WpKqzv1am=kH#go>c@Jz^b=dJHDRh{^tK=
z9*o_4fZX}t?4;&@uit5G=Kn)H?)m?Uj-_Mrzk2iH#6R;lvwrhzp3Sp)HqYkSJez0p
iY@W@tc{b1H**u$P^K72Yvw6Ot=l=tOT3`eKfC2zqzM=jA

diff --git a/Tools/JobTransforms/templates/Transformation.template.trf b/Tools/JobTransforms/templates/Transformation.template.trf
deleted file mode 100755
index 46633c1ce027..000000000000
--- a/Tools/JobTransforms/templates/Transformation.template.trf
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="8.0.1"
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-export T_INCPATH="$T_SCRIPTPATH/../include"
-export T_SRCPATH="$T_SCRIPTPATH/../src"
-T_DATAPATH=${PWD}/data
-T_INDESC="InputTransformation"
-T_OUTDESC="OutputTransformation"
-T_PREFIX="KitValidation"
-T_TRANSVER=1.0.0
-T_TRANSDESC="Template for high-level transformations"
-T_TRANSAUTH="Alessandro De Salvo <Alessandro.De.Salvo@roma1.infn.it>"
-T_NUMEVENTS=10
-T_PARAMS="0"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# athena logfile check function
-source ${T_INCPATH}/checkLogUtils.def
-                                                                                
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Input/Output paths
-[ "$T_INPATH" == "" ] && T_INPATH=${T_DATAPATH}/${T_INDESC}-${T_RELEASE}
-[ "$T_OUTPATH" == "" ] && T_OUTPATH=${T_DATAPATH}/${T_OUTDESC}-${T_RELEASE}
-[ "$T_INFILE" == "" ] && T_INFILE="${T_PREFIX}-${T_INDESC}-${T_RELEASE}.pool.root"
-[ "$T_OUTFILE" == "" ] && T_OUTFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.pool.root"
-[ "$T_LOGFILE" == "" ] && T_LOGFILE="${T_PREFIX}-${T_OUTDESC}-${T_RELEASE}.log"
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the release
-export T_DISTREL=${ATLAS_ROOT}/dist/${T_RELEASE}
-export T_POOLFILE=${T_INPATH}/PoolFileCatalog.xml
-source ${T_DISTREL}/AtlasRelease/*/cmt/setup.sh
-
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-
-######################################################
-#    YOU SHOULD CALL HERE YOUR CORE TRANSFORMATION   #
-#    Transformations should be in the same dir       #
-#    as the KitValidation transformations            #
-######################################################
-
-# Example
-#${T_SCRIPTPATH}/test.trf >& "${T_TMPDIR}/${T_LOGFILE}"
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy the specified files to ${T_OUTPATH}
-# Syntax: copyFiles <file1> <file2> ... <file n>
-copyFiles ${T_TMPDIR}/${T_LOGFILE} PoolFileCatalog.xml ${T_OUTFILE}
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd /tmp; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# End-Of-Job tasks
-# Check if one or more files have been produced and register them to the GRID
-
-# Syntax: checkFiles <SFN 1>[,<LFN 1>] ... <SFN n>[,<LFN n>]
-# where SFN=Site File Name (=Physical File Name) and LFN=Logical File Name
-# Note that GRID registration is enabled only if a LFN is specified for that SFN
-# and if a grid is specified
-checkFiles ${T_OUTPATH}/${T_OUTFILE},${T_OUTFILE} \
-           ${T_OUTPATH}/PoolFileCatalog.xml
-retcode=$?
-
-# Clean up
-cd /tmp
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/KitValidation/CMakeLists.txt b/Tools/KitValidation/CMakeLists.txt
deleted file mode 100644
index 279e9b465d16..000000000000
--- a/Tools/KitValidation/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-################################################################################
-# Package: KitValidation
-################################################################################
-
-# Declare the package name:
-atlas_subdir( KitValidation )
-
-# Install files from the package:
-atlas_install_joboptions( share/kv_perfmon.py share/kv_reflex.py )
-atlas_install_scripts( share/kvpost.py )
-
diff --git a/Tools/KitValidation/doc/README b/Tools/KitValidation/doc/README
deleted file mode 100755
index 6250c3908034..000000000000
--- a/Tools/KitValidation/doc/README
+++ /dev/null
@@ -1,97 +0,0 @@
-Atlas Distribution Kit Validation Suite
-V 1.1.0-1
-=======================================
-
-
-Index
-=====
-
-1. General informations
-2. How to use the validation suite
-3. How to add a validation test
-
-
-
-1. GENERAL INFORMATIONS
-
-This suite is intended for users who want to validate an installation of the SIT
-pacman distribution kit. Only atlas releases >= 7.5.0 are supported in this
-validation suite.
-
-
-
-2. HOW TO USE THE VALIDATION SUITE
-
-Provided with the suite there is a script called "KitValidation". To start a
-validation session you simply invoke this script. The syntax is
-
-$> ./KitValidation [OPTIONS]
-
-Please use the -h option to get the most updated list of possible options.
-
-$> ./KitValidation -h
-Usage: KitValidation [option]
-       OPTIONS:
-            --bw
-                 Don't display colors
-            -c|--compiler-path <path>
-                 Specify the path of the compiler root directory
-            -d|--data-path <path>
-                 Force creating the output files in <path>/<subdir>
-                 where <subdir> is created automatically
-            -k|--keep-data
-                 Do not delete the produced data/logfiles at the end
-            --lcg|-L
-                 Enable LCG specific features
-            -p|--path <path>
-                 Specify the path to the SITEROOT of the installation
-            -r|--release <release version>
-                 Specify the release version of the software to use
-            -s|--scripts <path>
-                 Specify the path to the scripts directory
-            -v|--verbose
-                 Be verbose
-            -h|-help
-                 Print this help
-
-In general, if you want to start validating the Atlas release 7.5.0, installed
-in /opt/atlas, you should type:
-
-$> ./KitValidation -r 7.5.0 -p /opt/atlas
-
-The validation suite will then perform all the predefined tests for that release
-of the software and will report the final result.
-
-
-
-3. HOW TO ADD A VALIDATION TEST
-
-Several validation tests may be defined for each release.
-The "KitValidation.conf" configuration file holds all the information about the
-different test to be performed against the software releases. The syntax of the
-configuration file is:
-
-<version>:<script name>:[<test description>]
-
-For example, if we need to perform the simple checks against the 7.6.0 release
-of the distribution kit, we need to write
-
-7.5.0:KitValidation-SimpleChecks-1.0.0-1:Release Simple Checks
-
-The validation suite will execute the test in the order they are defined in the
-configuration file, for each <version>.
-
-Users may add other test simply adding a line in to the configuration
-file and building a test script. For convenience a test script template,
-called KitValidation-Template.trf, is provided in the suite. Please refer
-to this template of to other predefined test scripts for other details. 
-
-
-
-
-
-
-
-=====================
-Alessandro De Salvo <Alessandro.DeSalvo@roma1.infn.it>
-1-4-2004
diff --git a/Tools/KitValidation/etc/KitValidation.conf b/Tools/KitValidation/etc/KitValidation.conf
deleted file mode 100755
index 1d287435b8b7..000000000000
--- a/Tools/KitValidation/etc/KitValidation.conf
+++ /dev/null
@@ -1,67 +0,0 @@
-##########################################################
-# KitValidation configuration script v2.0.0 r1           #
-# Alessandro De Salvo <Alessandro.DeSalvo@roma1.infn.it> #
-# Date: 09-11-2004                                       #
-##########################################################
-
-###########################################################
-#
-#
-# Syntax: <release>:<suite name>:<test script name>[:<test description>[:<test options>]]
-#     Example
-# 7.5.0:consistency:SimpleChecks-1.0.0-1:
-# 7.5.0:basic:AthExHelloWorld-1.0.0-1.kvt:Athena Hello World
-#
-# Please note that lines beginning with '#' are comments
-#
-#
-###########################################################
-
-# Path to search for transformations
-# The special variable %ROOT is the root directory of the package
-# The special variable %VER is set from the release version
-# For example, if version 8.0.0 is taken %VER will be 08-00-00
-# Wildcards allowed.
-
-
-SEARCHPATH=$JOBTRANSFORMSROOT/share:%ROOT/../../../JobTransforms/JobTransforms-%VER-*/share:%ROOT/../../../JobTransforms/JobTransforms-*/share:%ROOT/../../../JobTransforms/share:%ROOT/../../../JobTransforms/JobTransforms-*:$JOBTRANSFORMSROOT:$SITEROOT/Tools/JobTransforms:$T_KVWD/InstallArea/share
-
-
-ALL:consistency:SimpleChecks.kvt:Release Simple Checks
-ALL:basic:AthExHelloWorld.kvt:Athena Hello World
-#ALL:pool:AthenaPoolTest.kvt:Athena POOL Test
-#ALL:pool:AthenaPoolNavigation.kvt:Athena POOL Test (Navigation)
-#ALL:pool:AthenaPoolCaloCluster.kvt:Athena POOL Test (CaloCluster)
-#ALL:pool:AthenaPoolElementLinks.kvt:Athena POOL Test (ElementLinks)
-ALL:inner_detector:InDetDetDescrExample.kvt:InDetDetDescr Example
-ALL:compilation:MooEventCompile.kvt:MooEvent compilation
-ALL:generation:Pythia_i.kvt:Pythia Event generation
-#ALL:muon:EvgenMuon.kvt:Athena Muon Generation
-#ALL:higgs:EvgenHiggs.kvt:Athena Higgs Generation
-#ALL:dc2_zee:DC2EvgenZee.kvt:DC2 Z -> e e Event Generation
-#ALL:dc2_zmm:DC2EvgenZmm.kvt:DC2 Z -> mu mu Event Generation
-#ALL:dc2_ztt:DC2EvgenZtt.kvt:DC2 Z -> tau tau Event Generation
-#ALL:dc2_jj:DC2EvgenJJ.kvt:DC2 DiJet Event Generation
-#ALL:dc2_minbias:DC2EvgenMinBias.kvt:DC2 Minimum Bias Event Generation
-#ALL:dc2_susy:DC2EvgenSusy.kvt:DC2 Susy Event Generation
-#ALL:dc2_top:DC2EvgenTop.kvt:DC2 Top Event Generation
-#ALL:dc2_w4jet:DC2EvgenW4Jet.kvt:DC2 W -> 4 jets Event Generation
-#ALL:dc2_wmine:DC2EvgenWminE.kvt:DC2 Wmin E Event Generation
-#ALL:dc2_zjj:DC2EvgenZjj.kvt:DC2 Zjj Event Generation
-#ALL:dc2_bjet:DC2EvgenB.kvt:DC2 b-jet Event Generation
-#ALL:dc2_bmm:DC2EvgenBmm.kvt:DC2 bb->B->(mu6mu6) Event Generation
-#ALL:dc2_jetcalib:DC2EvgenJetCalib.kvt:DC2 Jet Calibration Event Generation
-#ALL:dc2_jetfilter:DC2EvgenJetFilter.kvt:DC2 Jet (pt>17) Event Generation
-#ALL:dc2_zee:DC2AtlfastZee.kvt:DC2 atlfast Z -> e e Ntuple/Histo production
-#ALL:muon:G4simMuon.kvt:Athena Muon Simulation
-#ALL:higgs:G4simHiggs.kvt:Athena Higgs Simulation
-#ALL:dc2_zee:DC2G4simZee.kvt:DC2 Z -> e e G4 Simulation
-#ALL:muon:G4digitMuon.kvt:Athena Muon Digitization
-#ALL:higgs:G4digitHiggs.kvt:Athena Higgs Digitization
-#ALL:dc2_zee:DC2G4digitZee.kvt:DC2 Z -> e e Digitization
-#ALL:muon:G4reconMuon.kvt:Athena Muon Reconstruction
-#ALL:dc2_zee:DC2reconZee.kvt:DC2 Z -> e e Reconstruction
-#ALL:higgs:G4reconHiggs.kvt:Athena Higgs Reconstruction
-#ALL:recon:RecExCommon.kvt:Reconstruction Example (RecExCommon)
-#ALL:recon:RecExToESD.kvt:RecExToESD
-#ALL:recon:ESDtoAOD.kvt:ESDtoAOD
diff --git a/Tools/KitValidation/include/KitValidationHelp.def b/Tools/KitValidation/include/KitValidationHelp.def
deleted file mode 100755
index 837c8fe92da2..000000000000
--- a/Tools/KitValidation/include/KitValidationHelp.def
+++ /dev/null
@@ -1,86 +0,0 @@
-help ()
-{
-  echo "Usage: `basename $0` [option]"
-  echo "       OPTIONS:"
-  echo "            -b|--release-base <release base name>"
-  echo "                 Specify the release base name to use"
-  echo "            --bw"
-  echo "                 Don't display colors"
-  echo "            -C|--save-core"
-  echo "                 Save coredumps, if available"
-  echo "            -c|--compiler-path <path>"
-  echo "                 Specify the path of the compiler root directory"
-  echo "            --conf <configuration filename>"
-  echo "                 Specify the full path of the configuration file"
-  echo "            -d|--data-path <path>"
-  echo "                 Force creating the output files in <path>/<subdir>"
-  echo "                 where <subdir> is created automatically"
-  echo "            --disable <list>"
-  echo "                 Disable the tests or suites specified"
-  echo "                 in the comma-separated list <list>"
-  echo "                 or use ALL to disable all tests"
-  echo "            --enable <list>"
-  echo "                 Enable the tests or suites specified"
-  echo "                 in the comma-separated list <list>"
-  echo "            -e|--err-log <filename>"
-  echo "                 Use <filename> to write the error messages"
-  echo "            -G|--grid <GRID flavour>"
-  echo "                 Enable GRID specific features"
-  echo "            -g|--guess-problem"
-  echo "                 Try to guess which kind of problem occurred if failing"
-  echo "            -k|--keep-data"
-  echo "                 Do not delete the produced data/logfiles at the end"
-  echo "            --kvt <kvt file name (full path)>"
-  echo "                 Execute a specific kvt file"
-  echo "            --kvpost-tag <tag>"
-  echo "                 Use the user tag <tag> when posting to GKV"
-  echo "            -I|--include <include-path>"
-  echo "                 Force the transformations to use the include files"
-  echo "                 from <include-path>"
-  echo "            --mark"
-  echo "                 Mark the start and stop of a test"
-  echo "            --no-auto"
-  echo "                 Don't perform the test auto discovery"
-  echo "            --no-stop|-n"
-  echo "                 Don't stop testing when the first test fails"
-  echo "            -p|--path <path>"
-  echo "                 Specify the path to the SITEROOT of the installation"
-  echo "            -P|--prefix <prefix>"
-  echo "                 Prefix each output line by <prefix>."
-  echo "                 Use @NAME to include the transformation name"
-  echo "                 in the prefix (example: --prefix \"KV @NAME\")"
-  echo "            --project <project name>"
-  echo "                 ATLAS project name to use."
-  echo "            -r|--release <release version>"
-  echo "                 Specify the release version of the software to use"
-  echo "            -s|--scripts <path>"
-  echo "                 Specify the path to the scripts directory"
-  echo "            --search <package>"
-  echo "                 Search for dynamic test in <package> too"
-  echo "            -S|--setup-only"
-  echo "                 Setup the kit environment and exit immediately"
-  echo "            --show-suites"
-  echo "                 List the available suites"
-  echo "            --show-tests"
-  echo "                 List the available tests"
-  echo "            --suite <suitename>"
-  echo "                 Execute <suitename> only (a given set of tests)"
-  echo "            -t|--temp-path <path>"
-  echo "                 Path to the temp space, where to create a temp dir"
-  echo "            --test <testname>"
-  echo "                 Execute <testname> only"
-  echo "            --testconfig <URL>"
-  echo "                 URL of the KV test configurations (ovverride defaults)"
-  echo "            --use-root"
-  echo "                 Use ROOT for histograms and ntuples"
-  echo "            -v|--verbose"
-  echo "                 Be verbose"
-  echo "            -V|--version"
-  echo "                 Show the package version"
-  echo "            -x|--context"
-  echo "                 Set the testing context ('kit' or 'dist')."
-  echo "                 Default is 'kit'"
-  echo "            -h|-help"
-  echo "                 Print this help"
-  exit 2
-}
diff --git a/Tools/KitValidation/include/KitValidationOptions.def b/Tools/KitValidation/include/KitValidationOptions.def
deleted file mode 100755
index 2c7211d6d588..000000000000
--- a/Tools/KitValidation/include/KitValidationOptions.def
+++ /dev/null
@@ -1,88 +0,0 @@
-# Defaults
-T_COLOR="yes"
-T_CONTEXT="kit"
-T_GUESSPROBLEM="no"
-T_KEEPDATA="no"
-T_AUTODISCOVERY="yes"
-T_GRID=""
-T_NOSTOP="no"
-T_KVPREFIX=""
-T_KVPOSTTAG=""
-T_MARK="no"
-T_SAVECORE="no"
-T_SETUPONLY="no"
-T_SUITE=""
-T_TEMPPATH=/tmp
-T_TEST=""
-T_USEROOTHIST=
-T_RELEASEBASE=dist
-VERBOSE="no"
-T_SHOWCONF=""
-T_KVT=""
-#T_XMLCONF=""
-
-# Read options from the command line
-OPTS=`getopt -o Cc:d:e:gG:I:kLnp:P:r:b:s:St:vVx:h -l bw,compiler-path:,conf:,context:,data-path:,disable:,enable:,err-log:,grid:,guess-problem,include:,keep-data,kvpost-tag:,kvt:,lcg,mark,no-auto,no-stop,path:,prefix:,project:,release:,release-base:,save-core,scripts:,search:,setup-only,show-suites,show-tests,suite:,temp-path:,test:,test-config:,use-root,verbose,version,help -- "$@"`
-                                                                                
-if [ $? != 0 ] ; then echo "Terminating..."; exit -1 ; fi
-                                                                                
-eval set -- "$OPTS"
-                                                                                
-while true ; do
-        case "$1" in
-		--bw)               T_COLOR="no"; shift;;
-                --compiler-path|-c) GCC_SITE=$2; shift 2;;
-                --conf)             T_CONF=$2; shift 2;;
-                --context|-x)       T_CONTEXT=$2; shift 2;;
-		--data-path|-d)     T_DATAPATH=$2; shift 2;;
-		--disable)          T_DISABLE="$2"; shift 2;;
-		--enable)           T_ENABLE="$2"; shift 2;;
-		--err-log|-e)       T_ERRLOG=$2; shift 2;;
-		--keep-data|-k)     T_KEEPDATA="yes"; shift;;
-		--grid|-G)          T_GRID="$2"; shift 2;;
-                --guess-problem|-g) T_GUESSPROBLEM="yes"; shift;;
-                --include|-I)       export T_INCPATH="$2"; shift 2;;
-                --kvt)              T_KVT="$2"; shift 2;;
-                --kvpost-tag)       T_KVPOSTTAG="$2"; shift 2;;
-		--lcg|-L)           T_LCGMODE="yes"; shift;;
-		--mark)             T_MARK="yes"; shift;;
-		--no-auto)          T_AUTODISCOVERY="no"; shift;;
-		--no-stop|-n)       T_NOSTOP="yes"; shift;;
-		--path|-p)          ATLAS_ROOT=$2; shift 2;;
-		--prefix|-P)        T_KVPREFIX=$2; shift 2;;
-		--project)          T_KVPROJECT=$2; shift 2;;
-		--release|-r)       T_RELEASE=$2; shift 2;;
-		--release-base|-b)  T_RELEASEBASE=$2; shift 2;;
-		--save-core|-C)     T_SAVECORE="yes"; shift;;
-		--scripts|-s)       T_SCRIPTPATH=$2; shift 2;;
-		--search)           T_ADDSEARCH=$2; shift 2;;
-		--setup-only|-S)    T_SETUPONLY="yes"; shift;;
-		--show-suites)      T_SHOWCONF="suite"; shift;;
-		--show-tests)       T_SHOWCONF="test"; shift;;
-		--suite)            T_SUITE="$2"; shift 2;;
-		--temp-path|-t)     T_TEMPPATH="$2"; shift 2;;
-		--test)             T_TEST="$2"; shift 2;;
-		--test-config)      T_XMLCONF="$2"; shift 2;;
-		--use-root)         T_USEROOTHIST="yes"; shift;;
-		--verbose|-v)       VERBOSE="yes"; shift;;
-		--version|-V)       showVersion; exit;;
-		--help|-h)          help;shift;;
-                --)                 shift ; break ;;
-                \?)                 break ;
-                exit ;;
-        esac
-done
-
-export T_USEROOTHIST
-export T_CONTEXT
-[ "$T_XMLCONF" != "" ] && T_XMLCONF="`echo $T_XMLCONF | sed -e 's/^\"//' -e 's/\"$//'`"
-
-# Check if a release number has been specified, otherwise die
-if [ "$T_RELEASE" == "" ] ; then
-  echo "No release number specified"
-  help
-  exit -1
-else
-  T_RELTYPE="`echo $T_RELEASE | awk -F':' '{if ($2) print "-"$2}' | sed 's/^-*/-/g'`"
-  T_RELEASE="`echo $T_RELEASE | cut -d':' -f 1`"
-fi
diff --git a/Tools/KitValidation/include/colors.def b/Tools/KitValidation/include/colors.def
deleted file mode 100755
index 720a27cae72b..000000000000
--- a/Tools/KitValidation/include/colors.def
+++ /dev/null
@@ -1,11 +0,0 @@
-# Colors
-if [ "$T_COLOR" = "yes" ] ; then
-  C_BANNER="\\033[1;31m"
-  C_FAILURE="\\033[1;31m"
-  C_HIGHLIGHT="\\033[1;31m"
-  C_SUCCESS="\\033[1;32m"
-  C_PASSED="\\033[1;33m"
-  C_RESULT="\\033[1;34m"
-  C_SPECIAL="\\033[1;34m"
-  C_NORMAL="\\033[0;39m"
-fi
diff --git a/Tools/KitValidation/include/confUtils.def b/Tools/KitValidation/include/confUtils.def
deleted file mode 100755
index 7cd6b57c67ed..000000000000
--- a/Tools/KitValidation/include/confUtils.def
+++ /dev/null
@@ -1,313 +0,0 @@
-# Configuration file utility functions
-
-# List all available items in the conf file
-showConf ()
-{
-  T_TARGET=$1
-  TMPSHOW=show.tmp.$$
-
-  # Parse the logfile
-  if [ "$T_RELEASE" ] ; then
-    egrep "(${T_RELEASE}|ALL)" $T_CONF | grep -v "^#"
-  else
-    grep ":" $T_CONF | grep -v "^#"
-  fi | while read line ; do
-    TEST_SUITE=`echo $line | cut -d: -f2`
-    if [ "$T_TARGET" == "suite" ] ; then
-      if [ "$T_SUITE" == "" -o "$T_SUITE" == "$TEST_SUITE" ] ; then
-        echo $TEST_SUITE >> $TMPSHOW
-      fi
-    else
-      TEST_NAME=`echo $line | cut -d: -f3`
-      TEST_DESC=`echo $line | cut -d: -f4`
-      if [ "$T_SUITE" == "" -o "$T_SUITE" == "$TEST_SUITE" ] ; then
-        if [ "$T_TEST" == "" -o "$T_TEST" == "$TEST_NAME" ] ; then
-          printf "%-30s --> %s\n" "$TEST_NAME" "$TEST_DESC" >> $TMPSHOW
-        fi
-      fi
-    fi
-  done
-
-  # Print the result
-  cat $TMPSHOW | sort | uniq
-
-  # Remove the temporary file
-  rm -f $TMPSHOW
-
-  return 0
-}
-
-
-testStatus() {
-  TESTNAME="`basename ${1}`"
-  SUITENAME="${2}"
-
-  STAT="enabled"
-  for TN in `echo $T_DISABLE | sed 's#,# #g' 2>/dev/null`; do
-    [ "$TN" == "ALL" -o "$TN" == "$TESTNAME" -o "$TN" == "$SUITENAME" ] && STAT="disabled"
-  done
-  for TN in `echo $T_ENABLE | sed 's#,# #g' 2>/dev/null`; do
-    [ "$TN" == "$TESTNAME" -o "$TN" == "$SUITENAME" ] && STAT="enabled"
-  done
-  echo $STAT
-
-  return 0
-}
-
-KVInstallFiles() {
-  export CMTPATH=$T_KVWD:$CMTPATH
-  if [ "$T_KVPROJECT" == "" ] ; then
-    T_KVRT="${SITEROOT}/${T_RELEASEBASE}/${T_RELEASE}/Control/AthenaRunTime/*/cmt"
-  else
-    T_KVRT="${SITEROOT}/${T_KVPROJECT}/${T_RELEASE}/${T_KVPROJECT}Release/cmt"
-    [ "${T_ADDSEARCH}" != "" ] && T_KVADDRT="`/bin/ls -d ${SITEROOT}/${T_ADDSEARCH}/*/${T_ADDSEARCH}Release/cmt 2>/dev/null | tail -n 1`"
-  fi
-  # Install the relevant files
-  (cd $T_KVCMTPATH;cmt config &> /dev/null)
-  (cd $T_KVCMTPATH;make install &> /dev/null)
-  (cd $T_KVCMTPATH;cmt broadcast cmt config &> /dev/null)
-  (cd $T_KVCMTPATH;cmt broadcast make install &> /dev/null)
-  if [ "$T_KVPROJECT" == "" ] ; then
-    (cd $T_KVRT; cmt broadcast make install &> /dev/null)
-  fi
-}
-
-testAutoDiscovery() {
-  CMTTESTCONF=cmttestconf.tmp.$$
-  rm -f $RTPKGFILE
-
-  # Install the relevant files
-  KVInstallFiles
-
-  # Get the name of the test configuration files
-  (cd $T_KVCMTPATH;cmt show macro_names 2>/dev/null | grep TestConfiguration) \
-    >> $CMTTESTCONF
-  if [ "$SITEROOT" != "" ] ; then
-    # Search in all packages
-    for RTPKG in `\find $SITEROOT -maxdepth 4 -type d -path "*Release/cmt" 2>/dev/null`; do
-      [ "$VERBOSE" == "yes" ] && echo "Searching ${RTPKG}..." > /dev/stderr
-      (cd ${RTPKG}; cmt show macro_names 2>/dev/null | grep TestConfiguration | sed "s#\$#,${RTPKG}#") \
-        >> $CMTTESTCONF
-    done
-  else
-    # Search in selected packages
-    (cd $T_KVRT; cmt show macro_names 2>/dev/null | grep TestConfiguration | sed "s#\$#,${T_KVRT}#") \
-      >> $CMTTESTCONF
-    if [ "$T_KVADDRT" != "" ] ; then
-      (cd $T_KVADDRT;cmt show macro_names 2>/dev/null | grep TestConfiguration | sed "s#\$#,${T_KVADDRT}#") \
-      >>  $CMTTESTCONF
-    fi
-  fi
-  cat $CMTTESTCONF | cut -d ',' -f 1 | sort | uniq | \
-  while read XML; do
-    XMLPATH="`grep $XML $CMTTESTCONF | tail -n 1 | cut -d',' -f 2`"
-    T_XML="`(cd ${XMLPATH};cmt show macro_value ${XML})`"
-    #T_XML="`(cd $T_KVCMTPATH;cmt show macro_value ${XML})`"
-    if [ "$T_XML" == "" ] ; then
-      T_XML="`(cd $T_KVRT; cmt show macro_value ${XML})`"
-      if [ "$T_XML" == "" -a "$T_KVADDRT" != "" ] ; then
-        T_XML="`(cd $T_KVADDRT; cmt show macro_value ${XML})`"
-      fi
-    fi
-    T_XML="`basename $T_XML`"
-    echo $T_XML
-  done
-
-  # Clean up
-  rm -fr $CMTTESTCONF
-
-  return 0
-}
-
-
-buildKVT() {
-  KVTTEMPLATE="${1}"
-  REL="${2}"
-  KVTDESC="${3}"
-  KVTAUTHOR="${4}"
-  KVTVERSION="${5}"
-  KVPRESTAGE="${6}"
-  INPATH="${7}"
-  INFILE="${8}"
-  INPOOL="${9}"
-  OUTDESC="${10}"
-  OUTFILE="${11}"
-  OUTNTUPLE="${12}"
-  TRF="${13}"
-  SIGNATURE="${14}"
-  LOGFILE="${15}"
-
-  RELN="`echo $REL | cut -d':' -f 1`"
-  RELT="`echo $REL | awk -F':' '{if ($2) print "-"$2}' | sed 's/^-*/-/g'`"
-
-  sed -e "s#@RELEASE@#$RELN#g" \
-      -e "s#@RELTYPE@#$RELT#g" \
-      -e "s#@KVTDESC@#$KVTDESC#g" \
-      -e "s#@KVTAUTHOR@#$KVTAUTHOR#g" \
-      -e "s#@KVTVERSION@#$KVTVERSION#g" \
-      -e "s#@KVPRESTAGE@#$KVPRESTAGE#g" \
-      -e "s#@KVPOSTTAG@#$T_KVPOSTTAG#g" \
-      -e "s#@KVPOSTURL@#$T_KVPOSTURL#g" \
-      -e "s#@KVPATH@#$T_CURPATH#g" \
-      -e "s#@INPATH@#$INPATH#g" \
-      -e "s#@INFILE@#$INFILE#g" \
-      -e "s#@INPOOL@#$INPOOL#g" \
-      -e "s#@OUTPATH@#$OUTPATH#g" \
-      -e "s#@OUTFILE@#$OUTFILE#g" \
-      -e "s#@OUTNTUPLE@#$OUTNTUPLE#g" \
-      -e "s#@TRF@#$TRF#g" \
-      -e "s#@SIGNATURE@#$SIGNATURE#g" \
-      -e "s#@LOGFILE@#$LOGFILE#g" \
-      -e "s#@COPYFILES@#$COPYFILES#g" \
-      -e "s#@CHECKFILES@#$CHECKFILES#g" \
-      ${KVTTEMPLATE}
-
-  return 0
-}
-
-
-parseXML() {
-
-  CONF="${1}"
-  NUM="${2}"
-
-  /usr/bin/env python <<EOF
-import sys, string
-from xml.dom import minidom, Node
-
-
-class KVCommonConfParser:
-    testNum = 0
-    kvnode  = None
-
-    def getKVnode(self,node):
-        kvnode = None
-        for child in node.childNodes:
-            if child.nodeType == Node.ELEMENT_NODE:
-                if child.nodeName == 'kv':
-                    self.kvnode = child
-                else:
-                    self.getKVnode(child)
-
-    def showTest(self,node, num):
-        for child in node.childNodes:
-            content = []
-            if child.nodeType == Node.ELEMENT_NODE:
-                if (child.nodeName == 'kvtest' or child.nodeName == 'test'):
-                    self.testNum = self.testNum + 1
-                    for (name,value) in child.attributes.items():
-                        if (self.testNum == num):
-                            if (name=='name'): print 'TESTNAME: %s' % value
-                            if (name=='enabled'): print 'ENABLED: %s' % value
-                self.showTest(child, num)
-            elif child.nodeType == Node.TEXT_NODE:
-                val = string.strip(child.nodeValue)
-                if (val != ''): content.append(val)
-            if ((node.parentNode.nodeName == 'kvtest' or node.parentNode.nodeName == 'test') and content):
-                if (self.testNum == num):
-                    tag = string.upper(node.nodeName)
-                    val = string.strip(string.join(content))
-                    print '%s: %s' % (tag, val)
-
-    def parse(self,conf,num):
-        try:
-            doc = minidom.parse(conf)
-            self.getKVnode(doc)
-            if self.kvnode:
-                self.showTest(self.kvnode,num)
-        except:
-            print >> sys.stderr, "Cannot parse conf file %s" % conf
-
-    def tests(self):
-        return self.testNum
-
-if __name__ == '__main__':
-    kvcfg = KVCommonConfParser()
-    kvcfg.parse("$CONF",$NUM)
-    if ($NUM == 0): print kvcfg.tests()
-EOF
-
-  return 0
-}
-
-createTest() {
-  XMLCONF="${1}"
-  KVTTEMPLATE="${2}"
-  TMPTESTDEF=kv.testdef.tmp.$$
-  rm -f $TMPTESTDEF
-
-  NUMTESTS=`parseXML $XMLCONF 0`
-  for TESTINDX in `seq 1 $NUMTESTS`; do
-    # Create the configuration line
-    parseXML $XMLCONF $TESTINDX > $TMPTESTDEF
-    TESTNAME="`grep ^TESTNAME $TMPTESTDEF     | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    REL="`grep ^RELEASE $TMPTESTDEF           | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    SUITE="`grep ^KVSUITE $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    PRESTAGE="`grep ^KVPRESTAGE $TMPTESTDEF   | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    if [ "$SUITE" == "" ] ; then
-      SUITE="`grep ^SUITE $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    fi
-    AUTHOR="`grep ^AUTHOR $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    VERSION="`grep ^VERSION $TMPTESTDEF       | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    INPATH="`grep ^INPATH $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    INFILE="`grep ^INFILE $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    INPOOL="`grep ^INPOOL $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    OUTPATH="`grep ^OUTPATH $TMPTESTDEF       | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    OUTFILE="`grep ^OUTFILE $TMPTESTDEF       | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    OUTNTUPLE="`grep ^OUTNTUPLE $TMPTESTDEF   | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    LOGFILE="`grep ^LOGFILE $TMPTESTDEF       | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    TRF="`grep ^TRF $TMPTESTDEF               | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    SIGNATURE="`grep ^SIGNATURE $TMPTESTDEF   | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    DESC="`grep ^DESC $TMPTESTDEF             | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    COPYFILES="`grep ^COPYFILES $TMPTESTDEF   | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    CHECKFILES="`grep ^CHECKFILES $TMPTESTDEF | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    PRIO="`grep ^PRIORITY $TMPTESTDEF         | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g'`"
-    ENABLED="`grep ^ENABLED $TMPTESTDEF       | tail -n 1 | cut -d':' -f 2- \
-                                              | sed 's/^ *//g' \
-                                              | tr '[:lower:]' '[:upper:]'`"
-    for TN in `echo $T_ENABLE | sed 's#,# #g' 2>/dev/null`; do
-      [ "$TN" == "${TESTNAME}.kvt" -o "$TN" == "$SUITE" ] && ENABLED="TRUE"
-    done
-    if [ "$ENABLED" == "TRUE" ] ; then
-      [ "$TESTNAME" == "" ] && TESTNAME="KV_${TRF}_dynamic"
-      TESTNAME="${TESTNAME}.kvt"
-      TESTDIR="$T_KVWD/InstallArea/share"
-      [ ! -d "$TESTDIR" ] && mkdir -p $TESTDIR
-      echo "${PRIO}:${REL}:${SUITE}:${TESTNAME}:${DESC}"
-      rm -fr $T_KVWD/InstallArea/share/$TESTNAME
-      RELNAMETYPE="${T_RELEASE}`echo ${T_RELTYPE} | sed 's/^-/:/g'`"
-      buildKVT "$KVTTEMPLATE" "${RELNAMETYPE}" "$DESC" "$AUTHOR" \
-               "$VERSION" "$PRESTAGE" "$INPATH" "$INFILE" "$INPOOL" "$OUTPATH" \
-               "$OUTFILE" "$OUTNTUPLE" "$TRF" "$SIGNATURE" \
-               "$LOGFILE" "$COPYFILES" "$CHECKFILES" \
-               > $TESTDIR/$TESTNAME
-      chmod +x $TESTDIR/$TESTNAME
-    fi
-    rm -f $TMPTESTDEF
-  done
-}
-
-prepareConf() {
-  TMPTESTCONF=${1}
-  [ -s "$TMPTESTCONF" ] && cat $TMPTESTCONF | sort -t ':' -n | cut -d ':' -f 2-
-}
diff --git a/Tools/KitValidation/include/pathUtils.def b/Tools/KitValidation/include/pathUtils.def
deleted file mode 100755
index fc188b24b8f9..000000000000
--- a/Tools/KitValidation/include/pathUtils.def
+++ /dev/null
@@ -1,92 +0,0 @@
-# Utility functions
-
-# Find a path starting from a string = path1:path2:path3:...:pathn
-pathFinder ()
-{
-  CHECK_FILE="$1"
-  FILE_TYPE="$2"
-  if [ "$SEARCHPATH" = "" ] ; then
-    return -1
-  fi
-
-  echo "$SEARCHPATH" \
-  | awk -F ':' '{ for (i=1; i<=NF; i++) print $i }' 2> /dev/null \
-  | while read current_path; do
-    FINDPATH=`eval \ls -d $current_path/$CHECK_FILE 2> /dev/null`
-    if [ "$FINDPATH" != "" ] ; then
-      for item in $FINDPATH ; do
-        if [ "$FILE_TYPE" != "" ] ; then
-          FTLIST="`echo $FILE_TYPE | sed 's/:/ /g'`"
-          for ftype in $FTLIST; do
-            if [ "$FTOPT" != "" ] ; then
-              FTOPT="$FTOPT -o -type $ftype"
-            else
-              FTOPT="-type $ftype"
-            fi
-          done
-          find $current_path/${CHECK_FILE}* -path "*${CHECK_FILE}" $FTOPT
-        else
-          echo $item
-        fi
-      done
-      return 0
-    fi
-  done
-
-  return 1
-}
-
-# Build a full path starting from a releative one
-pathBuilder ()
-{
-  PATHSTRING=$1
-  TMPFILE=/tmp/tmp-path.$$
-  if [ "$PATHSTRING" = "" ] ; then
-    return -1
-  fi
-
-  NEWPATH=""
-  SKIPNEXT=0
-  PATHSTRING="`echo $PATHSTRING | sed -e "s#^\./##g"`"
-  FIRSTCHAR="`echo $PATHSTRING | cut -b 1`"
-  [ "$FIRSTCHAR" != "/" ] && PATHSTRING="$PWD/$PATHSTRING"
-  echo $PATHSTRING \
-  | awk -F '/' '{ for (i=NF; i>1; i--) print $i }' \
-  | while read line ; do
-    if [ "$line" != "." -a "$line" != ".." -a "$line" != "" -a $SKIPNEXT -eq 0 ]
-    then
-      NEWPATH="`cat $TMPFILE 2>/dev/null`"
-      if [ "$NEWPATH" != "" ] ; then
-        echo -n $line/$NEWPATH > $TMPFILE
-      else
-        echo -n $line > $TMPFILE
-      fi
-    fi
-    if [ "$line" = ".." ] ; then
-      let SKIPNEXT+=1
-    else
-      [ $SKIPNEXT -ne 0 ] && let SKIPNEXT-=1
-    fi
-  done
-
-  echo "/"`cat $TMPFILE`
-  rm -fr $TMPFILE
-
-  return 0
-}
-
-KVcleanup() {
-  # Remove the the produced data, if needed
-  if [ "$T_KEEPDATA" != "yes" ] ; then
-     [ -d "$T_DATAPATH" ] && rm -fr $T_DATAPATH
-  fi
-
-  # Remove the temporary, custom configuration file, if needed
-  [ "`basename $T_CONF`" == "KitValidation.autoconf" ] && rm -f $T_CONF
-
-  # Remove the temporary, autodiscovery tests list, if needed
-  [ -s "$T_AUTODISCOVERYTESTS" ] && rm -f $T_AUTODISCOVERYTESTS
-
-  # Remove the output file, if needed
-  [ -s "$T_KVOUT" ] && rm -f $T_KVOUT
-}
diff --git a/Tools/KitValidation/include/version.def b/Tools/KitValidation/include/version.def
deleted file mode 100755
index b457940d919c..000000000000
--- a/Tools/KitValidation/include/version.def
+++ /dev/null
@@ -1,16 +0,0 @@
-# Function to show the version of the package
-
-# Version
-KVDATE="03-06-2009"
-KVVER="1.9.21"
-KVREV="1"
-KVAUTHOR="Alessandro De Salvo <Alessandro.DeSalvo@roma1.infn.it>"
-
-showVersion ()
-{
-  echo
-  echo ">>> KitValidation version $KVVER-$KVREV ($KVDATE)."
-  echo ">>> $KVAUTHOR"
-  echo
-  return
-}
diff --git a/Tools/KitValidation/run/KVtest.sh b/Tools/KitValidation/run/KVtest.sh
deleted file mode 100755
index 0aea506027fc..000000000000
--- a/Tools/KitValidation/run/KVtest.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-########################################################
-# Set this to the appropriate values on your system
-########################################################
-
-TEMPDIR=$PWD
-
-# Set this to the path of your pacman installation
-PACMANDIR=/afs/cern.ch/project/gd/apps/atlas/slc3/pacman-3.15
-
-# Set this to the release or patch number you need
-RELEASE=12.0.6.5
-
-# Set this to the SITEROOT of your installation
-ATLAS_ROOT=/afs/cern.ch/atlas/software/unvalidated/proj
-
-# Set this to something like AtlasProduction for Project Builds
-# or leave it blank for Monolithic releases
-KVPROJECT=AtlasProduction
-
-# Set this to the base project. Normally the default AtlasOffline is OK
-KVBASEPROJECT=AtlasOffline
-
-# Set this to "no" if you don't want to post
-# your result to the central KV server
-T_POST="yes"
-
-########################################################
-#   You shouln't need to touch any of the lines below
-########################################################
-KVCACHE="http://classis01.roma1.infn.it/pacman/cache"
-KVRELEASE="`echo $RELEASE | cut -d "." -f 1-3`"
-export T_POST
-
-# Prepare pacman, download KV and the patches
-cd $TEMPDIR
-cd $PACMANDIR; source setup.sh; cd -
-pacman -trust-all-caches \
-        -get $KVCACHE:$KVRELEASE/KitValidation
-pacman -trust-all-caches \
-        -get $KVCACHE:$KVRELEASE/KitValidationPatches
-[ $? -eq 0 ] && source setup.sh
-if [ "$KVPROJECT" != "" ] ; then
-  echo source $ATLAS_ROOT/cmtsite/setup.sh -tag=$KVPROJECT,$KVRELEASE,opt
-  source $ATLAS_ROOT/cmtsite/setup.sh -tag=$KVPROJECT,$KVRELEASE,opt
-  # Use the specified patch, if available
-  if [ "$KVRELEASE" != "$RELEASE" ] ; then
-    echo "Using patch release $RELEASE"
-    unset CMTPATH
-    cd ${SITEROOT}/${KVPROJECT}/${RELEASE}/${KVPROJECT}RunTime/cmt
-    source setup.sh
-    cd -
-  else
-    echo "Using plain release $RELEASE"
-    # Setup the AtlasProduction patches
-    pacman -trust-all-caches \
-           -get $KVCACHE:$KVRELEASE/KitValidationPyJTPatches \
-           2> /dev/null
-    if [ -d $PWD/AtlasProduction ] ; then
-      unset CMTPATH
-      cd $PWD/AtlasProduction/*/AtlasProductionRunTime/cmt
-      source setup.sh 2>/dev/null
-      cd -
-    fi
-  fi
-fi
-
-# Run the tests
-[ "$KVDISABLE" != "" ] && KVDISABLE_OPTS="--disable $KVDISABLE"
-[ "$KVPROJECT" != "" ] && KVPROJECT_OPTS="--project $KVPROJECT"
-KVVER="`./KitValidation/*/share/KitValidation -V | grep version | awk '{print $4'} | awk -F. '{printf "%d",$1; for(i=2;i<=NF;i++) printf "%03d", $i;}'`"
-if [ $KVVER -ge 1009015 -a "$KVBASEPROJECT" != "" ] ; then
-  # This switch is supported only since release 1.9.15 of KV
-  KVADDSEARCH=" --search $KVBASEPROJECT"
-fi
-./KitValidation/*/share/KitValidation -r $RELEASE -p $ATLAS_ROOT -kng  -t $PWD --bw $KVPROJECT_OPTS $KVDISABLE_OPTS $KVADDSEARCH
diff --git a/Tools/KitValidation/run/run.sh b/Tools/KitValidation/run/run.sh
deleted file mode 100755
index c203205c2dee..000000000000
--- a/Tools/KitValidation/run/run.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-ATLAS_ROOT=/afs/cern.ch/atlas/software
-releasebase=dist/nightlies/rel
-release=latest
-
-here=`dirname $0`
-cd ${here}
-
-#export JOBTRANSFORMSROOT=${here}/../../../JobTransforms/JobTransforms-00-00-00
-
-#ls $JOBTRANSFORMSROOT/share
-
-../share/KitValidation \
-  -p ${ATLAS_ROOT} -b ${releasebase} -r ${release} -x dist --bw -gkn
-
diff --git a/Tools/KitValidation/run/testdist.sh b/Tools/KitValidation/run/testdist.sh
deleted file mode 100755
index 7a8c76a3dac2..000000000000
--- a/Tools/KitValidation/run/testdist.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#############################################################
-#               Run tests against release                   #
-#############################################################
-
-ATLAS_ROOT=/afs/cern.ch/atlas/software
-# uncomment to use with nightlies
-#releasebase=dist/nightlies/rel
-# uncomment to use with release
-releasebase=dist
-# set release number
-#release=latest
-release=9.0.2
-
-here=`dirname $0`
-cd ${here}
-
-#export JOBTRANSFORMSROOT=${here}/../../../JobTransforms/JobTransforms-*
-export JOBTRANSFORMSROOT=${here}/../../JobTransforms
-
-../share/KitValidation \
-  -p ${ATLAS_ROOT} -b ${releasebase} -r ${release} -x dist --bw -kn -t $HOME/scratch0/tmp
-
diff --git a/Tools/KitValidation/run/testkit.sh b/Tools/KitValidation/run/testkit.sh
deleted file mode 100755
index 54637719060a..000000000000
--- a/Tools/KitValidation/run/testkit.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-#############################################################
-#                 Run tests against kit                     #
-#############################################################
-
-# set path to kit installation
-ATLAS_ROOT=$HOME/scratch0/sw/9.0.2-0
-# set release number
-release=9.0.2
-
-here=`dirname $0`
-cd ${here}
-
-#export JOBTRANSFORMSROOT=${here}/../../../JobTransforms/JobTransforms-*
-export JOBTRANSFORMSROOT=${here}/../../JobTransforms
-
-../share/KitValidation \
-  -p ${ATLAS_ROOT} -b dist -r ${release} --bw -kn -t $HOME/scratch0/tmp
-
-#  -p ${ATLAS_ROOT} -b ${releasebase} -r ${release} --bw -kn -t $HOME/scratch0/tmp
-
diff --git a/Tools/KitValidation/share/KitValidation b/Tools/KitValidation/share/KitValidation
deleted file mode 100755
index 981f232e08d8..000000000000
--- a/Tools/KitValidation/share/KitValidation
+++ /dev/null
@@ -1,348 +0,0 @@
-#!/bin/sh
-
-# KV working directory
-export T_KVWD="$PWD"
-
-# Defaults
-ATLAS_ROOT=$ATLAS_VO_SW_DIR/software
-T_CURPATH=`dirname $0`
-T_KVINCPATH=${T_CURPATH}/../include
-T_KVTTEMPLATEPATH=${T_CURPATH}/../templates
-T_KVCMTPATH=${T_CURPATH}/../cmt
-[ "$T_CONF" == "" ] && T_CONF=${T_CURPATH}/../etc/KitValidation.conf
-T_TMPFILE=/tmp/KitValidation.$$
-T_DATAPATH=$T_KVWD/data
-T_ERRLOG=$T_KVWD/KitValidation.err
-export T_SID="0"
-T_KVOUT=$T_KVWD/KitValidation.out
-
-# help
-source ${T_KVINCPATH}/KitValidationHelp.def
-
-# version
-source ${T_KVINCPATH}/version.def
-
-# Conf file utilities
-source ${T_KVINCPATH}/confUtils.def
-
-# Get the command line options
-source ${T_KVINCPATH}/KitValidationOptions.def
-
-# Colors
-source ${T_KVINCPATH}/colors.def
-
-# Path utilities
-source ${T_KVINCPATH}/pathUtils.def
-
-# Options to pass to the test scripts
-[ "$VERBOSE" = "yes" ] && VERBOSE_OPT="-v"
-[ "$T_GRID" != "" ] && T_GRID_OPT="-G ${T_GRID}"
-[ "$T_COLOR" = "no" ] && T_COLOR_OPT="--bw"
-[ "$T_NOSTOP" = "yes" ] && T_NOSTOP_OPT="-n"
-[ "$T_GUESSPROBLEM" = "yes" ] && T_GUESSPROBLEM_OPT="-g"
-[ "$T_SAVECORE" = "yes" ] && T_SAVECORE_OPT="-C"
-[ "$T_RELEASEBASE" != "" ] && T_RELEASEBASE_OPT="-b ${T_RELEASEBASE}"
-[ "$T_KVPROJECT" != "" ] && T_KVPROJECT_OPT="--project ${T_KVPROJECT}"
-
-
-if [ "$T_CONTEXT" = "kit" ] ; then
-  if [ "$T_KVPROJECT" == "" ] ; then
-    # Monolithic releases
-    # Setup the kit
-    if [ ! -f $ATLAS_ROOT/setup.sh ] ; then
-      echo "Cannot find $ATLAS_ROOT/setup.sh"
-      KVcleanup                          # Perform a full cleanup
-      exit 1
-    fi
-    source $ATLAS_ROOT/setup.sh
-  else
-    # Project builds
-    # Setup the kit
-    if [ ! -f $ATLAS_ROOT/cmtsite/setup.sh ] ; then
-      echo "Cannot find $ATLAS_ROOT/cmtsite/setup.sh"
-      KVcleanup                          # Perform a full cleanup
-      exit 1
-    fi
-    [ "$SITEROOT" == "" ] && \
-       source $ATLAS_ROOT/cmtsite/setup.sh -tag=${T_KVPROJECT},${T_RELEASE}
-  fi
-  [ "$SITEROOT" != "" ] && ATLAS_ROOT=$SITEROOT
-  if [ "$GCC_SITE" = "" ] ; then
-    GCC_DIR_GCC3=gcc-alt-3.2
-    GCC_DIR="${GCC_DIR_GCC3}"
-    GCC_SITE="/usr/local/$GCC_DIR"
-  fi
-  eval GCC_SITE=$GCC_SITE
-  export PATH="${GCC_SITE}/bin":${PATH}
-  export LD_LIBRARY_PATH="${GCC_SITE}/lib":${LD_LIBRARY_PATH}
-fi
-
-[ "$SITEROOT" == "" ] && SITEROOT=$ATLAS_ROOT
-
-if [ "$T_SETUPONLY" = "yes" ] ; then
-  echo export RELEASE=$T_RELEASE > setup-${T_RELEASE}.sh
-  echo source $ATLAS_ROOT/setup.sh >> setup-${T_RELEASE}.sh
-  echo export GCC_SITE=$GCC_SITE >> setup-${T_RELEASE}.sh
-  echo export PATH="\${GCC_SITE}/bin":\${PATH} >> setup-${T_RELEASE}.sh
-  echo export LD_LIBRARY_PATH="\${GCC_SITE}/lib":\${LD_LIBRARY_PATH} >> setup-${T_RELEASE}.sh
-  chmod +x setup-${T_RELEASE}.sh
-  echo -e "${C_SPECIAL}Configuration script ${C_HIGHLIGHT}setup-${T_RELEASE}.sh${C_SPECIAL} created${C_NORMAL}"
-  KVcleanup                          # Perform a full cleanup
-  exit 0
-fi
-
-if [ "$VERBOSE" == "yes" ] ; then
-  echo "Getting compiler from $GCC_SITE"
-  gcc -v 2>&1
-fi
-
-# Autodiscovery the tests
-if [ "$T_AUTODISCOVERY" == "yes" ] ; then
-  [ "$VERBOSE" == "yes" ] && echo "Autodiscovering tests. Please wait..."
-  T_AUTODISCOVERYTESTS=autodiscovery.tmp.$$
-  TMPTESTCONF=kv.testconf.tmp.$$
-  rm -f $TMPTESTCONF
-  # Perform the AutoDiscovery only we did not ask for a custom conf
-  if [ "$T_XMLCONF" == "" ] ; then
-    testAutoDiscovery > $T_AUTODISCOVERYTESTS
-    if [ -s "$T_AUTODISCOVERYTESTS" ] ; then     # Add the autodiscovered tests
-      rm -f $T_KVWD/KitValidation.autoconf       # to a custom configuration file
-      cp $T_CONF $T_KVWD/KitValidation.autoconf
-      T_CONF=$T_KVWD/KitValidation.autoconf
-      if [ "$T_KVPROJECT" == "" ] ; then
-        SEARCHPATH="`(cd ${ATLAS_ROOT}/${T_RELEASEBASE}/${T_RELEASE}/Control/AthenaRunTime/*/cmt;source setup.sh;echo ${DATAPATH})`"
-      else
-        SEARCHPATH="`(cd ${ATLAS_ROOT}/${T_KVPROJECT}/${T_RELEASE}/${T_KVPROJECT}RunTime/cmt;source setup.sh;echo ${DATAPATH})`"
-      fi
-      cat $T_AUTODISCOVERYTESTS | while read testconf; do
-        T_XMLCFG="`pathFinder $testconf f:l | tail -n 1 2> /dev/null`"
-        T_XMLCFG="`pathBuilder $T_XMLCFG`"
-        createTest $T_XMLCFG $T_KVTTEMPLATEPATH/template.kvt >> $TMPTESTCONF
-      done
-      prepareConf $TMPTESTCONF >> $T_CONF
-      rm -f $TMPTESTCONF
-    fi
-  else
-    # get the configuration from a URL
-    echo "[KV-TESTCONF] Getting test definitions from ${T_XMLCONF}"
-    if [ "`echo ${T_XMLCONF} | sed 's#\(.*\)://\(.*\)#\1#g'`" == "file" ] ; then
-        COPYFROM="`echo ${T_XMLCONF} | sed 's#\(.*\):/\(.*\)#\2#g'`"
-        COPYTO="`basename $COPYFROM`"
-        cp "${COPYFROM}" "${COPYTO}" &> xmlcopy.log
-        COPYRC=$?
-    else
-        eval wget -o xmlcopy.log "${T_XMLCONF}"
-        COPYRC=$?
-    fi
-    [ $COPYRC -ne 0 ] && echo "[KV-WGET] `cat xmlcopy.log`"
-    T_XMLCFG="$PWD/`basename ${T_XMLCONF}`"
-    if [ -s "$T_XMLCFG" ] ; then
-      rm -f $T_KVWD/KitValidation.autoconf       # use a custom configuration file
-      cp $T_CONF $T_KVWD/KitValidation.autoconf
-      T_CONF=$T_KVWD/KitValidation.autoconf
-      KVInstallFiles
-      createTest $T_XMLCFG $T_KVTTEMPLATEPATH/template.kvt >> $TMPTESTCONF
-      prepareConf $TMPTESTCONF >> $T_CONF
-      rm -f $TMPTESTCONF
-    else
-      echo "[KV-TESTCONF] Unable to process $T_XMLCFG"
-    fi
-  fi
-fi
-
-# Check if we need to print the configuration file only
-if [ "$T_SHOWCONF" != "" ] ; then
-  showConf $T_SHOWCONF
-  KVcleanup                          # Perform a full cleanup
-  exit 0
-fi
-
-# Build the file prefix
-# Special cases for the supported GRIDs
-if [ "${T_GRID}" == "lcg" -o "${T_GRID}" == "LCG" ] ; then
-  prefix=`edg-rm --vo atlas pi | grep "^default CE" | cut -d ':' -f 2 | sed 's/ //g'`
-  [ "${prefix}" = "" ] && prefix=`hostname`
-  T_PREFIX_OPT="--prefix KitValidation-${prefix}"
-else
-  T_PREFIX_OPT="--prefix KitValidation"
-fi
-
-# Adapt the KV prefix, if required
-if [ "$T_KVPREFIX" != "" ] ; then
-  T_KVTAG="[`echo $T_KVPREFIX | sed -e "s#@.*##g" -e 's# $##g'`] "
-fi
-
-# Extend the PATH
-export PATH=$T_CURPATH:$PATH
-
-# Run some tests
-
-printf "\n" | tee -a $T_KVOUT
-printf \
-"${C_BANNER}" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}############################################################\n" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}##        Atlas Distribution Kit Validation Suite         ##\n" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}##                 %-10s  v%-10s                ##\n" \
-"$KVDATE" "$KVVER-$KVREV" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}##                                                        ##\n" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}## ${C_SPECIAL}%30s${C_BANNER} ##\n" "$KVAUTHOR" | tee -a $T_KVOUT
-printf \
-"${T_KVTAG}############################################################" | tee -a $T_KVOUT
-printf "${C_NORMAL}" | tee -a $T_KVOUT
-printf "\n" | tee -a $T_KVOUT
-
-let counter=0
-echo 0 > $T_TMPFILE
-T_KVTESTRELNAME="AtlasRelease"
-[ "$T_KVPROJECT" != "" ] && T_KVTESTRELNAME="$T_KVPROJECT"
-if [ "$T_RELEASE" ] ; then
-  echo -e "${C_SPECIAL}${T_KVTAG}Testing ${T_KVTESTRELNAME} ${C_BANNER}${T_RELEASE}${T_RELTYPE}${C_NORMAL}" | tee -a $T_KVOUT
-else
-  echo -e "${C_SPECIAL}${T_KVTAG}Testing all ${T_KVTESTRELNAME} releases${C_NORMAL}" | tee -a $T_KVOUT
-fi
-
-# If a specific kvt file has been specified build a temporary, custom conf file
-if [ "$T_KVT" != "" ] ; then
-  T_CONF="$T_KVWD/KitValidation.autoconf"
-  rm -f $T_CONF
-  SEARCHPATH="$JOBTRANSFORMSROOT/share:$T_CURPATH/../../../JobTransforms/JobTransforms-$T_TRANSTAG-*/share:$T_CURPATH/../../../JobTransforms/JobTransforms-*/share:$T_CURPATH/../../../JobTransforms/share:$T_CURPATH/../../../JobTransforms/JobTransforms-*:$JOBTRANSFORMSROOT:$SITEROOT/Tools/JobTransforms:$T_KVWD/InstallArea/share"
-  T_INCPATH="`pathFinder include | grep JobTransforms | tail -n 1 2>/dev/null`"
-  export T_INCPATH="`pathBuilder $T_INCPATH`"
-  T_KVTFILE="`pathFinder $T_KVT | tail -n 1 2>/dev/null`"
-  T_KVTFILE="`pathBuilder $T_KVTFILE`"
-  T_KVTDESC="`$T_KVTFILE -V 2> /dev/null | grep Info | cut -d ':' -f 2 | sed -e 's/^ //g' -e 's/ v$//g'`"
-  [ "$T_KVTDESC" == "" ] && T_KVTDESC="Custom test"
-  cat > $T_CONF <<EOF
-SEARCHPATH=$SEARCHPATH
-$T_RELEASE:custom:$T_KVT:$T_KVTDESC
-EOF
-fi
-
-if [ "$T_RELEASE" != "" ] ; then
-  egrep "(${T_RELEASE}|ALL)" $T_CONF | grep -v "^#" | grep -v SEARCHPATH
-else
-  grep ":" $T_CONF | grep -v "^#" | grep -v SEARCHPATH
-fi | while read line ; do
-  let counter+=1
-  if [ "$T_RELEASE" != "" ] ; then
-    release=$T_RELEASE
-  else
-    release=`echo $line | cut -d: -f1`
-  fi
-  TEST_SUITE=`echo $line | cut -d: -f2`
-  TEST_NAME=`echo $line | cut -d: -f3`
-  TEST_DESC=`echo $line | cut -d: -f4`
-  TEST_OPTS=`echo $line | cut -d: -f5`
-  if [ -z "$TEST_DESC" ] ; then
-    TEST_DESC=`basename $TEST_NAME`
-  fi
-
-  # Guess where the tranformation is
-  T_TRANSTAG=`echo $T_RELEASE|awk -F '.' '{ printf "%02d-%02d-%02d",$1,$2,$3}'`
-  SEARCHPATH="`grep ^SEARCHPATH $T_CONF | cut -d '=' -f 2 \
-             | sed -e "s#%ROOT#$T_CURPATH#g" -e "s#%VER#$T_TRANSTAG#g"`:$SEARCHPATH"
-  T_STATUS="`testStatus $TEST_NAME $TEST_SUITE`"
-  if [ "$T_STATUS" == "enabled" ] ; then
-    if [ "$T_SCRIPTPATH" == "" ] ; then
-      T_TRANSFORM="`pathFinder $TEST_NAME | tail -n 1 2>/dev/null`"
-      T_TRANSFORM="`pathBuilder $T_TRANSFORM`"
-    else
-      T_TRANSFORM=$T_SCRIPTPATH/$TEST_NAME
-    fi
-    T_INCPATH="`pathFinder include | grep JobTransforms | tail -n 1 2>/dev/null`"
-    export T_INCPATH="`pathBuilder $T_INCPATH`"
-
-    # Check if we have to execute this transformation
-    if [ "$T_SUITE" == "" -o "$T_SUITE" == "$TEST_SUITE" ] ; then
-      if [ "$T_TEST" == "" -o "$T_TEST" == "$TEST_NAME" ] ; then
-        if [ -f "$T_TRANSFORM" -a "$T_STATUS" == "enabled" ] ; then
-          [ "$VERBOSE" == "yes" ] && echo "${T_KVTAG}Calling $T_TRANSFORM"
-          [ "$T_MARK" == "yes" ] && \
-             echo -e "${T_KVTAG}${C_SPECIAL}<$TEST_NAME BEGIN>${C_NORMAL}"
-          KVTESTOUT=tmp.kv.out.$$
-          T_TRANSFORMERR="`basename $T_TRANSFORM`.err.$$"
-          if [ "$T_KVPREFIX" != "" ] ; then
-            T_KVTESTTAG="[`echo $T_KVPREFIX \
-                         | sed -e "s#@NAME#$TEST_NAME#g" -e "s#\.kvt##g"`] "
-          fi
-          ($T_TRANSFORM -r $release $T_RELEASEBASE_OPT -p $ATLAS_ROOT \
-                        -d $T_DATAPATH -t $T_TEMPPATH \
-                           $VERBOSE_OPT $T_GRID_OPT $T_COLOR_OPT \
-                           $T_NOSTOP_OPT $T_GUESSPROBLEM_OPT \
-                           $T_SAVECORE_OPT $T_PREFIX_OPT \
-                           $T_KVPROJECT_OPT $TEST_OPTS \
-                           2>$T_TRANSFORMERR; echo $? > $KVTESTOUT) \
-                           | sed "s#^#${T_KVTESTTAG}#"
-          let KVTESTRES=`cat $KVTESTOUT`
-          rm -f $KVTESTOUT
-          [ "$T_MARK" == "yes" ] && \
-             echo -e "${T_KVTAG}${C_SPECIAL}<$TEST_NAME END>${C_NORMAL}"
-          if [ $KVTESTRES != 0 ] ; then
-            printf "${T_KVTESTTAG}%-45s [${C_FAILURE}FAILED${C_NORMAL}][${C_FAILURE}ERR=%3d${C_NORMAL}]\n" \
-                   "$TEST_DESC" "$KVTESTRES"| tee -a $T_KVOUT
-            let failure_code=`cat ${T_TMPFILE}`+1
-            echo $failure_code > $T_TMPFILE
-            [ "$T_NOSTOP" == "no" ] && break
-          else
-            printf "${T_KVTESTTAG}%-45s [  ${C_SUCCESS}OK${C_NORMAL}  ]\n" \
-                   "$TEST_DESC" | tee -a $T_KVOUT
-          fi
-          # Check the session ID
-          [ -s "$T_KVWD/KV.sid" ] && export T_SID="`cat $T_KVWD/KV.sid | tail -n 1`"
-          # Check if a trf error occurred
-          if [ -s $T_TRANSFORMERR ] ; then
-            echo "============================" >> $T_ERRLOG
-            echo "$T_TRANSFORM"                 >> $T_ERRLOG
-            cat $T_TRANSFORMERR                 >> $T_ERRLOG
-          fi
-          rm -fr $T_TRANSFORMERR
-        else
-          T_ERRMSG="${T_KVTAG}Cannot find $TEST_NAME (not in $SEARCHPATH)"
-          [ "$VERBOSE" = "yes" ] && echo "$T_ERRMSG"
-        fi
-      fi
-    fi
-  fi
-done
-
-let retcode=`cat $T_TMPFILE`
-rm -fr $T_TMPFILE
-echo 
-echo -ne "${C_RESULT}" | tee -a $T_KVOUT
-echo -e "${T_KVTAG}##################################################" | tee -a $T_KVOUT
-T_KVRESULT="FAILED"
-if [ $retcode == 0 ] ; then
-  echo -e \
-   "${T_KVTAG}##   $T_KVTESTRELNAME ${T_RELEASE}${T_RELTYPE} Validation [  ${C_SUCCESS}OK${C_RESULT}  ]" | tee -a $T_KVOUT
-  T_KVRESULT="OK"
-else
-  echo -e \
-   "${T_KVTAG}##   $T_KVTESTRELNAME ${T_RELEASE}${T_RELTYPE} Validation [${C_FAILURE}FAILED${C_RESULT}]" | tee -a $T_KVOUT
-fi
-echo -e "${T_KVTAG}##################################################" | tee -a $T_KVOUT
-echo -e "${C_NORMAL}" | tee -a $T_KVOUT
-
-# Send the output file, if requested
-[ -s "$T_KVWD/KV.sid" ] && export T_SID="`cat $T_KVWD/KV.sid | tail -n 1`"
-if [ "$T_POST" == "yes" -o "$T_POST" == "YES" ] ; then
-  [ "$T_KVPOSTTAG" != "" ] && T_KVPOSTTAG_OPT="--tag \"$T_KVPOSTTAG\""
-  if [ "$T_KVPOSTURL" != "" ] ; then
-    KVPOSTHOST="`echo $T_KVPOSTURL | cut -d: -f 2- | sed 's#^/*##g' | cut -d '/' -f 1`"
-    KVPOSTSEL="/`echo $T_KVPOSTURL | cut -d: -f 2- | sed 's#^/*##g' | cut -d '/' -f 2-`"
-    T_KVPOSTURL_OPT="--host $KVPOSTHOST --sel $KVPOSTSEL"
-  fi
-  eval kvpost.py --sid=\"${T_SID}\" --rel=\"${T_RELEASE}${T_RELTYPE}\" --test=\"${T_KVTESTRELNAME}\" \
-                 --desc=\"${T_KVTESTRELNAME} ${T_RELEASE} Validation\" --log=\"${T_KVOUT}\" \
-                 --res=\"${T_KVRESULT}\" ${T_KVPOSTURL_OPT} ${T_KVPOSTTAG_OPT} > /dev/null
-fi
-[ -f "$T_KVWD/KV.sid" ] && rm -f $T_KVWD/KV.sid
-
-# Perform a full cleanup
-KVcleanup
-
-exit $retcode
diff --git a/Tools/KitValidation/share/kv_perfmon.py b/Tools/KitValidation/share/kv_perfmon.py
deleted file mode 100755
index 4e2010f9d536..000000000000
--- a/Tools/KitValidation/share/kv_perfmon.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# @file: KitValidation/KitValidation_jobOptions.py
-# @author: Alessandro De Salvo
-# $Id: KitValidation_jobOptions.py,v 1.0 2008/05/22 00:46:00 desalvzp Exp $
-
-###############################
-# Load PerfMonSvc
-###############################
-try:
-    from PerfMonComps.PerfMonFlags import jobproperties
-    jobproperties.PerfMonFlags.doMonitoring = True
-    jobproperties.PerfMonFlags.doFastMon = False
-    include( "PerfMonComps/PerfMonSvc_jobOptions.py" )
-
-except Exception:
-    treatException("Could not load PerfMon" )
-
-###############################
-# Enable library debug
-###############################
-#try:
-#    theApp.ReflexPluginDebugLevel = 1000
-#except Exception:
-#    treatException("Could not set the Reflex Plugin debug level" )
diff --git a/Tools/KitValidation/share/kv_reflex.py b/Tools/KitValidation/share/kv_reflex.py
deleted file mode 100755
index 8235e59a32e6..000000000000
--- a/Tools/KitValidation/share/kv_reflex.py
+++ /dev/null
@@ -1 +0,0 @@
-theApp.ReflexPluginDebugLevel = 1000
diff --git a/Tools/KitValidation/share/kvpost.py b/Tools/KitValidation/share/kvpost.py
deleted file mode 100755
index 3055b43d7c5b..000000000000
--- a/Tools/KitValidation/share/kvpost.py
+++ /dev/null
@@ -1,384 +0,0 @@
-#!/usr/bin/env python
-import re, httplib, mimetypes
-import base64, socket
-import os, sys, time, socket
-import getopt
-import commands
-import socket
-from xml.dom import minidom
-
-try:
-    socket.setdefaulttimeout(3)
-except:
-    pass
-
-__version__ = "$Revision: 1.3 $"[11:-1]
-
-HELP="""KV collector post interface %s.
-Usage: kvpost.py --rel=<num> --test=<test name> --desc=<test desc> --res=<result> [OPTION]...
-
-Options:
-  --help                      display this help and exit.
-  --host=<hostname>           hostname of the KV collector
-                              (current: %s)
-  --sel=<selection>           selection (page) of the KV collector
-                              (current: %s)
-  --sid=<session id>          session ID (if zero it will be assigned)
-  --test=<test name>          KV test name
-  --desc=<test description>   KV test description
-  --res=<test result>         KV test result
-  --info=<test info>          KV test info
-  --log=<log filename>        KV log file name
-  --tag=<tag name>            KV tag
-  --rand=<random seeds>       Random seeds, implies the --info option
-  --user=<username>           Username
-                              (default: %s)
-  --ip=<ip number>            IP number of this machine
-                              (current: %s)
-  --hname=<host name>         Host name of this machine
-                              (current: %s)
-
-Alessandro De Salvo <Alessandro.DeSalvo@roma1.infn.it>.
-"""
-
-__CURLPOST__   = 'curl -s -k --connect-timeout 10 https://%s%s'
-__CURLCERT__   = ' --cert %s --key %s'
-__CURLFIELD__  = ' -F "%s=%s"'
-__CURLFILE__   = ' -F "%s=@%s;filename=%s"'
-
-class Fields:
-  _fields = []
-
-  def add(self, field, value):
-    if not self.index(field): self._fields.append(field)
-    setattr(self, field, value)
-
-  def remove(self, field):
-    if self.index(field): self._fields.remove(field)
-
-  def index(self, field):
-    return field in self._fields
-
-  def get(self, field):
-    return getattr(self,field)
-
-  def getall(self):
-    list = []
-    for field in self._fields:
-       list.append((field, getattr(self,field)))
-    return list
-
-
-class KVpost:
-
-    # Options
-    short_options = ""
-    long_options  = ["help", "host=", "sel=",  "sid=", "test=", "desc="
-                    ,"res=", "info=", "user=", "ip=",  "hname=", "rel="
-                    ,"log=", "rand=", "tag=",  "debug"]
-
-    # Defaults
-    debug    = False
-    pars     = Fields()
-    if (os.environ.has_key('KVHOST')):
-        host = os.environ['KVHOST'];
-    else:
-        host = "kv.roma1.infn.it"
-    sel      = "/KV/kvcollect.php"
-    ip       = socket.getaddrinfo(socket.gethostname(), None)[0][4][0]
-    #hname    = socket.gethostname()
-    hname    = socket.getfqdn()
-    date     = time.strftime('%Y-%m-%d %H:%M:%S')
-    sid      = '0'
-    if (os.environ.has_key('USER')):
-        user = os.environ['USER']
-    else:
-        user = 'NONE'
-    
-    def main(self):
-        try:
-            opts, args = getopt.getopt(sys.argv[1:],
-                         self.short_options,
-                         self.long_options,
-                       )
-        except getopt.GetoptError:
-            # Print help
-            print "GetOpt Error"
-            self.help()
-            sys.exit(-1)
-
-        for cmd, arg in opts:
-            if cmd in ('--help',):
-                self.help()
-                sys.exit()
-            elif cmd in ('--debug',):
-                self.debug = True
-            elif cmd in ('--host',):
-                self.host = arg
-            elif cmd in ('--sel',):
-                self.sel = arg
-            elif cmd in ('--user',):
-                self.user = arg
-            elif cmd in ('--ip',):
-                self.ip = arg
-            elif cmd in ('--hname',):
-                self.hname = arg
-            elif cmd in ('--sid',):
-                self.sid = arg
-            elif cmd in ('--tag',):
-                self.pars.add('tag', ("%s" % arg))
-            elif cmd in ('--test',):
-                self.pars.add('testname', ("%s" % arg))
-            elif cmd in ('--desc',):
-                self.pars.add('testdesc', ("%s" % arg))
-            elif cmd in ('--res',):
-                self.pars.add('testres', ("%s" % arg))
-            elif cmd in ('--rand',):
-                self.pars.add('rand', ("%s" % arg))
-            elif cmd in ('--info',):
-                self.pars.add('testinfo', ("%s" % arg))
-            elif cmd in ('--rel',):
-                self.pars.add('rel', ("%s" % arg))
-            elif cmd in ('--log',):
-                self.pars.add('log', ("%s" % arg))
-        if (not self.pars.index('testdata')):
-            self.pars.add('testdata', '')
-
-        if (    not self.pars.index('testname')
-            or  not self.pars.index('testdesc')
-            or  not self.pars.index('testres')
-            or  not self.pars.index('rel')
-           ):
-            print "Missing arguments. Exiting..."
-            self.help();
-            sys.exit(-1);
-        if (self.pars.index('rand') and not self.pars.index('testinfo')):
-            print "No --info specified when using --rand"
-            self.help();
-            sys.exit(-1);
-
-        try:    osdist   = commands.getoutput("lsb_release -d 2>/dev/null").split(":")[1][1:]
-        except: osdist   = "none"
-        try:    compver  = commands.getoutput("gcc -v 2>&1 | grep '^gcc'")
-        except: compver  = "none"
-        try:    pyver    = sys.version.split()[0]
-        except: pyver    = "none"
-        try:    cpuname  = commands.getoutput("cat /proc/cpuinfo | grep '^model name' | tail -n 1").split(':')[1].lstrip()
-        except: cpuname  = "none"
-        try:    cpunum   = commands.getoutput("cat /proc/cpuinfo | grep '^processor' | wc -l")
-        except: cpunum   = 0
-        try:    bogomips = commands.getoutput("cat /proc/cpuinfo | grep '^bogomips' | tail -n 1").split(':')[1].lstrip()
-        except: bogomips = 0
-        try:    meminfo  = commands.getoutput("cat /proc/meminfo | grep '^Mem:'").split()[1]
-        except: meminfo  = 0
-        # Add the random seeds to the info data
-        if (self.pars.index('rand')):
-            try:
-                xmlfile=open(self.pars.get('testinfo'))
-                xmldata=xmlfile.read()
-                xmlfile.close()
-                try:
-                    randfile=open(self.pars.get('rand'))
-                    randdata=randfile.read()
-                    randfile.close()
-                except:
-                    randdata=self.pars.get('rand')
-                xmlout=self.xml_add(xmldata, "rndmseed", randdata, "   ")
-                xmlfile=open(self.pars.get('testinfo'),'w')
-                xmlfile.write(xmlout)
-                xmlfile.close()
-            except:
-                pass
-        # Prepare the info data
-        infodata = ''
-        if (self.pars.index('testinfo')):
-            try:
-                infofile = open(self.pars.get('testinfo'))
-                infodata = " "+infofile.read()
-                infodata = infodata.replace('"','\\"')
-                infofile.close()
-            except:
-                pass
-
-        # Prepare the data to send
-        data = (
-                ('submit','yes')
-               ,('ip',self.ip)
-               ,('hn',self.hname)
-               ,('user',self.user)
-               ,('date',self.date)
-               ,('testname',self.pars.get('testname'))
-               ,('testdesc',self.pars.get('testdesc'))
-               ,('testres',self.pars.get('testres'))
-               ,('testinfo',infodata)
-               ,('rel',self.pars.get('rel'))
-               ,('osname',os.uname()[0])
-               ,('osvers',os.uname()[2])
-               ,('osarch',os.uname()[4])
-               ,('osdist',osdist)
-               ,('compver',compver)
-               ,('pyver',pyver)
-               ,('cpunum',cpunum)
-               ,('cpuname',cpuname)
-               ,('bogomips',bogomips)
-               ,('meminfo',meminfo)
-               ,('sid',self.sid)
-               )
-        # Tag
-        if (self.pars.index('tag')):
-            data += (('tag',self.pars.get('tag')),)
-        # Files
-        files  = ()
-        fnames = ()
-        # Logfile
-        if (self.pars.index('log')):
-            try:
-                logfile = open(self.pars.get('log'))
-                logdata = logfile.read()
-                logfile.close()
-                files = (('upfile',os.path.basename(self.pars.get('log')),logdata),)
-                fnames = (('upfile',self.pars.get('log'),os.path.basename(self.pars.get('log'))),)
-            except:
-                pass
-        if (self.debug):
-            print "DEBUG> host: %s" % self.host
-            print "DEBUG> sel: %s" % self.sel
-            print "DEBUG> data:"
-            print data
-            print "DEBUG> files:"
-            print files
-        # Send the data
-        curlcmd = __CURLPOST__ % (self.host, self.sel)
-        if (os.environ.has_key('X509_USER_PROXY')):
-            curlcmd += __CURLCERT__ % (os.environ['X509_USER_PROXY'],os.environ['X509_USER_PROXY'])
-        for field in data:
-            curlcmd += __CURLFIELD__ % (field[0],field[1])
-        for fname in fnames:
-            curlcmd += __CURLFILE__ % (fname[0],fname[1],fname[2])
-        (s,reply) = commands.getstatusoutput(curlcmd)
-        if (s == 0):
-            if (len(reply) > 2): print reply
-        else:
-            # Curl failed. Try with the embedded engine
-            print "[KVPOST] Last command failed: %s" % curlcmd
-            print "[KVPOST] %s" % reply
-            print "[KVPOST] Failed to send data with curl. Trying with the embedded engine";
-            try:
-                reply = self.post_multipart(self.host, self.sel, data, files)
-                if (len(reply) > 2): print reply
-            except:
-                print "Cannot send KV data";
-                raise
-                sys.exit(-1)
-
-    def xml_add(self, xmldata, tagname, value, sep):
-        xmldoc = minidom.parseString(xmldata)
-        maintag = xmldoc.firstChild
-        tag = xmldoc.createElement(tagname)
-        maintag.appendChild(tag)
-        tagtxt = xmldoc.createTextNode(value)
-        tag.appendChild(tagtxt)
-        xmlout=xmldoc.toxml()
-        xmlout=xmlout.replace(("<%s>" % tagname),("%s<%s>" % (sep,tagname)))
-        xmlout=xmlout.replace(("</%s>" % tagname),("</%s>\n" % tagname))
-        return xmlout
-
-    def post_multipart(self, host, selector, fields, files):
-        """
-        Post fields to an https host as multipart/form-data.
-        fields is a sequence of (name, value) elements for regular form fields.
-        files is a sequence of (name, filename, value) elements for data to be uploaded as files.
-        Return the server's response page.
-        """
-
-        # HTTPS standard port to connect to the server
-        port = 443
-        if (os.environ.has_key('https_proxy')):
-            # Get the proxy details
-            p = re.compile("(\S+)://(\S+):(\d+)")
-            match = p.match(os.environ['https_proxy'])
-            if (match):
-                phost = match.group(2)
-                pport = int(match.group(3))
-            #setup basic authentication
-            user=self.user
-            passwd=""
-            user_pass=base64.encodestring(user+':'+passwd)
-            proxy_authorization='Proxy-authorization: Basic '+user_pass+'\r\n'
-            proxy_connect='CONNECT %s:%s HTTP/1.0\r\n'%(host,port)
-            user_agent='User-Agent: python\r\n'
-            proxy_pieces=proxy_connect+proxy_authorization+user_agent+'\r\n'
-
-            #now connect, very simple recv and error checking
-            proxy=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
-            proxy.connect((phost,pport))
-            proxy.sendall(proxy_pieces)
-            response=proxy.recv(8192)
-            status=response.split()[1]
-            if status!=str(200):  raise 'Error status=',str(status)
-
-            try:
-                # trivial setup for ssl socket
-                ssl = socket.ssl(proxy, None, None)
-                sock = httplib.FakeSocket(proxy, ssl)
-
-                #initalize httplib and replace with your socket
-                h=httplib.HTTPConnection('localhost')
-                h.sock=sock
-            except:
-                # revert back to standard socket
-                port = 80
-                h=httplib.HTTPConnection(phost,pport)
-                selector = "http://%s:%d%s" % (host,port,selector)
-        else:
-            if (hasattr(socket,"ssl")):
-                h = httplib.HTTPSConnection(host=host, port=port)
-            else:
-                port = 80
-                h = httplib.HTTPConnection(host=host, port=port)
-        content_type, body = self.encode_multipart_formdata(fields, files)
-        h.putrequest('POST', selector)
-        h.putheader('content-type', content_type)
-        h.putheader('content-length', str(len(body)))
-        h.endheaders()
-        h.send(body)
-        response = h.getresponse()
-        return response.read()
-
-    def encode_multipart_formdata(self, fields, files):
-        """
-        fields is a sequence of (name, value) elements for regular form fields.
-        files is a sequence of (name, filename, value) elements for data to be uploaded as files.
-        Return (content_type, body) ready for httplib.HTTP instance
-        """
-        BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
-        CRLF = '\r\n'
-        L = []
-        for (key, value) in fields:
-            L.append('--' + BOUNDARY)
-            L.append('Content-Disposition: form-data; name="%s"' % key)
-            L.append('')
-            L.append(("%s" % value))
-        for (key, filename, value) in files:
-            L.append('--' + BOUNDARY)
-            L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))
-            L.append('Content-Type: %s' % self.get_content_type(filename))
-            L.append('')
-            L.append(("%s" % value))
-        L.append('--' + BOUNDARY + '--')
-        L.append('')
-        body = CRLF.join(L)
-        content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
-        return content_type, body
-
-    def get_content_type(self, filename):
-        return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
-
-    def help(self):
-        print HELP % (__version__.strip(),self.host,self.sel,self.user,self.ip,self.hname)
-
-
-# main class
-if __name__ == '__main__':
-    kvpost=KVpost()
-    kvpost.main()
diff --git a/Tools/KitValidation/templates/template.kvt b/Tools/KitValidation/templates/template.kvt
deleted file mode 100755
index 0072e461025b..000000000000
--- a/Tools/KitValidation/templates/template.kvt
+++ /dev/null
@@ -1,169 +0,0 @@
-#! /usr/bin/env sh
-
-# Defaults
-T_RELEASE="@RELEASE@"
-T_RELTYPE="@RELTYPE@"
-T_RELEASEBASE=dist
-ATLAS_ROOT=$SITEROOT
-T_SCRIPTPATH=`dirname $0`
-T_SCRIPTPATH=`echo $T_SCRIPTPATH|sed -e "s#^./#$PWD/#"`
-[ "$T_INCPATH" == "" ] && export T_INCPATH="$T_SCRIPTPATH/../include"
-T_DATAPATH=${PWD}/data
-T_PREFIX="KitValidation"
-T_TRANSVER="@KVTVERSION@"
-T_TRANSDESC="@KVTDESC@"
-T_KVPOSTTAG="@KVPOSTTAG@"
-T_TRANSAUTH="@KVTAUTHOR@"
-T_KVPOSTURL="@KVPOSTURL@"
-
-# help
-source ${T_INCPATH}/transformHelp.def
-
-# copy files
-source ${T_INCPATH}/copy.def
-
-# End-Of-Job tasks
-source ${T_INCPATH}/checkfiles.def
-
-# Path utils
-source ${T_INCPATH}/JTPathUtils.def
-
-# Get the command line options
-source ${T_INCPATH}/transformOptions.def
-
-# Colors
-source ${T_INCPATH}/colors.def
-
-# Parameters
-T_INPATH="@INPATH@"
-T_INFILE="@INFILE@"
-T_INPOOL="@INPOOL@"
-T_OUTPATH="@OUTPATH@"
-T_OUTFILE="@OUTFILE@"
-T_OUTNTUPLE="@OUTNTUPLE@"
-T_LOGFILE="@LOGFILE@"
-
-# Output directory
-mkdir -p ${T_OUTPATH}
-
-# Working directory
-T_TMPDIR=${T_TEMPPATH}/atlas.tmp$$
-mkdir -p ${T_TMPDIR}
-cd ${T_TMPDIR}
-
-# Setup the runtime environment
-kvtSetup
-export T_POOLFILE=${T_INPOOL}
-JT_SEARCHPATH="${T_INPATH}"
-
-# Prepare the input files
-unset T_INFILELIST
-for infile in `echo ${T_INFILE}`; do
-  infiletype=`echo ${infile} | cut -d : -f 1`
-  infilename=`echo ${infile} | cut -d : -f 2`
-  if [ "${infiletype}" == "filelist" ] ; then
-    T_INFILELIST="${infilename}"
-  else
-    INPUTFILE=`JTPathFinder $infilename`
-    [ "$T_INFILELIST" != "" ] && echo "${INPUTFILE}" >> ${T_INFILELIST}
-    ln -fs `JTPathBuilder $INPUTFILE` .
-  fi
-done
-[ -s "$T_INPATH/$T_POOLFILE" ] && cp $T_INPATH/$T_POOLFILE .
-if [ "$T_INFILELIST" != "" ] ; then
-  T_INFILE="${T_INFILELIST}"
-  echo "Input file list contents:" >> ${T_LOGFILE}
-  echo "=========================" >> ${T_LOGFILE}
-  cat ${T_INFILE}                  >> ${T_LOGFILE}
-  echo "=========================" >> ${T_LOGFILE}
-fi
-
-# Prestage files
-PRESTAGE="@KVPRESTAGE@"
-if [ "$PRESTAGE" != "" ] ; then
-  echo "[KVT] Prestaging $PRESTAGE"
-  wget -o kvprestage.out -N $PRESTAGE
-  [ $? -ne 0 ] && cat kvprestage.out
-fi
-
-#--------------------------------------------------------------------------
-#          transformation script call
-#--------------------------------------------------------------------------
-#if [ "`echo @TRF@ | grep \.py$`" == "" ] ; then
-#  get_files @TRF@ &> /dev/null
-#  EXEPATH="${PWD}/"
-#else
-#  EXEPATH=""
-#fi
-EXEPATH=""
-if [ ! -s "@TRF@" ] ; then
-  get_files @TRF@ &> /dev/null
-  [ -s "@TRF@" ] && EXEPATH="${PWD}/"
-fi
-if [ "${VERBOSE}" == "yes" ] ; then
-  ${EXEPATH}@TRF@ @SIGNATURE@ 2>&1 | tee -a ${T_LOGFILE}
-  retcode=$?
-  #VERBOSE="no"
-else
-  ${EXEPATH}@TRF@ @SIGNATURE@ >> ${T_LOGFILE} 2>&1 
-  retcode=$?
-fi
-
-# Error report
-[ "$T_GUESSPROBLEM" = "yes" -a -f checklog.txt ] && cat checklog.txt
-
-# Copy files
-copyFiles @COPYFILES@ 
-
-# End-Of-Job tasks
-if [ $retcode -eq 0 ] ; then
-  checkFiles @CHECKFILES@
-  retcode=$?
-fi
-
-# Post KV results to the central server
-if [ "$T_POST" == "yes" -o "$T_POST" == "YES" ] ; then
-  [ -s ${T_OUTPATH}/AtRndmGenSvc.out ] && \
-    T_RNDSEED_OPT="--rand=\"${T_OUTPATH}/AtRndmGenSvc.out\""
-  [ "${T_KVPOSTTAG}" != "" ] && \
-    T_KVPOSTTAG_OPT="--tag=\"${T_KVPOSTTAG}\""
-  gzip -c ${T_OUTPATH}/${T_LOGFILE} > ${T_LOGFILE}.gz
-  [ -f "KV.sid.tmp" ] && rm -f KV.sid.tmp
-  if [ "$T_KVPOSTURL" != "" ] ; then
-    KVPOSTHOST="`echo $T_KVPOSTURL | cut -d: -f 2- | sed 's#^/*##g' | cut -d '/' -f 1`"
-    KVPOSTSEL="/`echo $T_KVPOSTURL | cut -d: -f 2- | sed 's#^/*##g' | cut -d '/' -f 2-`"
-    T_KVPOSTURL_OPT="--host $KVPOSTHOST --sel $KVPOSTSEL"
-  fi
-  if [ $retcode -eq 0 ] ; then
-    [ "${VERBOSE}" == "yes" ] && echo "@KVPATH@/kvpost.py --sid=\"${T_SID}\" --rel=\"${T_RELEASE}${T_RELTYPE}\" --test=\"`basename $0`\" --desc=\"${T_TRANSDESC}\" --info=\"${T_OUTPATH}/jobInfo.xml\" --log=\"$PWD/${T_LOGFILE}.gz\" ${T_KVPOSTURL_OPT} ${T_KVPOSTTAG_OPT} ${T_RNDSEED_OPT} --res=\"OK\""
-    eval @KVPATH@/kvpost.py --sid=\"${T_SID}\" \
-                   --rel=\"${T_RELEASE}${T_RELTYPE}\" \
-                   --test=\"`basename $0`\" --desc=\"${T_TRANSDESC}\" \
-                   --info=\"${T_OUTPATH}/jobInfo.xml\" \
-                   --log=\"$PWD/${T_LOGFILE}.gz\" ${T_KVPOSTURL_OPT} ${T_KVPOSTTAG_OPT} ${T_RNDSEED_OPT} \
-                   --res=\"OK\" > KV.sid.tmp
-    [ $? -eq 0 ] && mv -f KV.sid.tmp $T_KVWD/KV.sid || mv -f KV.sid.tmp KV.sid.err
-  else
-    [ "${VERBOSE}" == "yes" ] && echo "@KVPATH@/kvpost.py --sid=\"${T_SID}\" --rel=\"${T_RELEASE}${T_RELTYPE}\" --test=\"`basename $0`\" --desc=\"${T_TRANSDESC}\" --info=\"${T_OUTPATH}/jobInfo.xml\" --log=\"$PWD/${T_LOGFILE}.gz\" ${T_KVPOSTURL_OPT} ${T_KVPOSTTAG_OPT} ${T_RNDSEED_OPT} --res=\"FAILED\""
-    eval @KVPATH@/kvpost.py --sid=\"${T_SID}\" \
-                   --rel=\"${T_RELEASE}${T_RELTYPE}\" \
-                   --test=\"`basename $0`\" --desc=\"${T_TRANSDESC}\" \
-                   --info=\"${T_OUTPATH}/jobInfo.xml\" \
-                   --log=\"$PWD/${T_LOGFILE}.gz\" ${T_KVPOSTURL_OPT} ${T_KVPOSTTAG_OPT} ${T_RNDSEED_OPT} \
-                   --res=\"FAILED\" > KV.sid.tmp
-    [ $? -eq 0 ] && mv -f KV.sid.tmp $T_KVWD/KV.sid || mv -f KV.sid.tmp KV.sid.err
-  fi
-  rm -f ${T_LOGFILE}.gz
-fi
-
-# Check if an error occurred
-if [ $retcode -ne 0 ] ; then
-  cd -; rm -fr ${T_TMPDIR}
-  exit ${retcode}
-fi
-                                                                                
-# Clean up
-cd -
-rm -fr ${T_TMPDIR}
-
-exit ${retcode}
diff --git a/Tools/PyJobTransforms/scripts/TransformTestRunner.py b/Tools/PyJobTransforms/scripts/TransformTestRunner.py
deleted file mode 100755
index 43ea85d24c38..000000000000
--- a/Tools/PyJobTransforms/scripts/TransformTestRunner.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-## @note Find a named test in the DATAPATH and execute it with all arguments
-#  @version $Id: TransformTestRunner.py 551981 2013-06-21 10:16:16Z graemes $
-
-import os
-import os.path
-import sys
-
-from PyJobTransforms.trfUtils import findFile
-from PyJobTransforms.trfLogger import msg
-
-def main():
-    if len(sys.argv) < 2:
-        msg.error('No test argument was given')
-        sys.exit(1)
-        
-    if 'DATAPATH' not in os.environ:
-        msg.error('There is no DATAPATH to search along - is the release setup?')
-        sys.exit(1)
-    
-    testScript = os.path.join('JobTransforms/test', sys.argv[1])
-    
-    pathToTestScript = findFile(os.environ['DATAPATH'], testScript)
-    if pathToTestScript is None:
-        msg.error('Test {0} was not found along DATAPATH'.format(testScript))
-        sys.exit(1)
-    
-    msg.info('Found test {0} here: {1}'.format(sys.argv[1], pathToTestScript))
-    os.execv(pathToTestScript, sys.argv[1:])
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file
-- 
GitLab


From d0c0d4efafdfccb085d0b33d755b9cc2fb223373 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 5 Jun 2020 11:56:24 +0200
Subject: [PATCH 009/266] TrkSegmentConverter: Delete obsolete package

---
 Projects/Athena/package_filters.txt           |   4 -
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 -
 .../TrkSegmentConverter/CMakeLists.txt        |  33 ---
 .../TrkSegmentConverter/TrkSegmentConverter.h |  67 ------
 .../TrkSegmentConverter/doc/packagedoc.h      |  16 --
 .../src/TrkSegmentConverter.cxx               | 215 ------------------
 .../TrkSegmentConverter_entries.cxx           |   5 -
 7 files changed, 341 deletions(-)
 delete mode 100644 Tracking/TrkTools/TrkSegmentConverter/ATLAS_CHECK_THREAD_SAFETY
 delete mode 100644 Tracking/TrkTools/TrkSegmentConverter/CMakeLists.txt
 delete mode 100755 Tracking/TrkTools/TrkSegmentConverter/TrkSegmentConverter/TrkSegmentConverter.h
 delete mode 100644 Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
 delete mode 100755 Tracking/TrkTools/TrkSegmentConverter/src/TrkSegmentConverter.cxx
 delete mode 100644 Tracking/TrkTools/TrkSegmentConverter/src/components/TrkSegmentConverter_entries.cxx

diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index f16426834fe1..4b3e7b0a29ba 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -41,7 +41,6 @@
 - PhysicsAnalysis/JetPhys/SemileptonicCorr
 - PhysicsAnalysis/SUSYPhys/SUSYTools
 - PhysicsAnalysis/TauID/DiTauMassTools
-#- PhysicsAnalysis/TauID/TauCorrUncert  #no CMakeLists.txt file
 - PhysicsAnalysis/TopPhys/TopPhysUtils/.*
 - PhysicsAnalysis/TopPhys/xAOD/.*
 - PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools
@@ -55,9 +54,6 @@
 #- DataQuality/DataQualityConfigurations
 #- DataQuality/DCSCalculator2
 
-# obsolete packages to be removed in a second step
-- Tracking/TrkTools/TrkSegmentConverter
-
 # Huge D3PD librarys not really useful any more
 - PhysicsAnalysis/D3PDMaker/InDetD3PDMaker
 - PhysicsAnalysis/D3PDMaker/CaloSysD3PDMaker
diff --git a/Tracking/TrkTools/TrkSegmentConverter/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkTools/TrkSegmentConverter/ATLAS_CHECK_THREAD_SAFETY
deleted file mode 100644
index afb4f86ccc2c..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/ATLAS_CHECK_THREAD_SAFETY
+++ /dev/null
@@ -1 +0,0 @@
-Tracking/TrkTools/TrkSegmentConverter
diff --git a/Tracking/TrkTools/TrkSegmentConverter/CMakeLists.txt b/Tracking/TrkTools/TrkSegmentConverter/CMakeLists.txt
deleted file mode 100644
index 86a4d62e1610..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Package: TrkSegmentConverter
-################################################################################
-
-# Declare the package name:
-atlas_subdir( TrkSegmentConverter )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Tracking/TrkTools/TrkToolInterfaces
-                          PRIVATE
-                          Event/EventPrimitives
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkPseudoMeasurementOnTrack
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkEvent/TrkSegment
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          Tracking/TrkFitter/TrkFitterInterfaces )
-
-# Component(s) in the package:
-atlas_add_component( TrkSegmentConverter
-                     src/*.cxx
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel TrkToolInterfaces EventPrimitives TrkSurfaces TrkEventPrimitives TrkParameters TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkSegment TrkTrack TrkExInterfaces TrkFitterInterfaces )
-
-# Install files from the package:
-atlas_install_headers( TrkSegmentConverter )
-
diff --git a/Tracking/TrkTools/TrkSegmentConverter/TrkSegmentConverter/TrkSegmentConverter.h b/Tracking/TrkTools/TrkSegmentConverter/TrkSegmentConverter/TrkSegmentConverter.h
deleted file mode 100755
index b827bb0925b2..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/TrkSegmentConverter/TrkSegmentConverter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// TrkSegmentConverter.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef TRKTRKSEGMENTCONVERTER_H
-#define TRKTRKSEGMENTCONVERTER_H
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "TrkToolInterfaces/ISegmentConverterTool.h"
-
-class AtlasDetectorID;
-class Identifier;
-
-namespace Trk 
-{
-
-  class Track;
-  class Segment;
-  class ITrackFitter;
-  class IExtrapolator;
-
-  /** @class TrkSegmentConverter 
-
-      Implementation of the ISegmentConverterTool interface
-      
-      @author  Christian Schmitt <Christian.Schmitt@cern.ch>
-  */  
-
-  class TrkSegmentConverter : virtual public ISegmentConverterTool, public AthAlgTool
-    {
-    public:
-      TrkSegmentConverter(const std::string&,const std::string&,const IInterface*);
-
-       /** default destructor */
-      virtual ~TrkSegmentConverter ();
-      
-       /** standard Athena-Algorithm method */
-      virtual StatusCode initialize();
-       /** standard Athena-Algorithm method */
-      virtual StatusCode finalize  ();
-
-      Track* convert(const Segment&);
-      
-    private:
-      
-      /** Convert the segment using a TrackFitter */
-      Track* convertWithFitter(const Segment&);
-
-      /** Convert the segment by hand  */
-      Track* convertBruteForce(const Segment&);
-
-      /** member variables for algorithm properties: */
-      bool m_useFitter;                         //!< Use a Fitter to do the conversion?
-      std::string m_trackFitterName;            //!< Name of the TrackFitter
-      std::string m_trackFitterInstance;        //!< Instance of the TrackFitter
-      ToolHandle<ITrackFitter> m_trackFitter;   //!< The TrackFitter
-      ToolHandle<Trk::IExtrapolator> m_extrapolator  ;  //!< Track extrapolator tool.
-
-    }; 
-} // end of namespace
-
-#endif 
diff --git a/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h b/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
deleted file mode 100644
index ba76b97171a4..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page TrkSegmentConverter_page TrkSegmentConverter Package
-
->> Please enter an overview of the created package here: What does it contain?
-This package implements the SegmentConverter interface. It uses a TrackFitter to convert the Segments into full Tracks.
-
-@author Christian Schmitt <Christian.Schmitt@cern.ch>
-
-
-
-
-*/
diff --git a/Tracking/TrkTools/TrkSegmentConverter/src/TrkSegmentConverter.cxx b/Tracking/TrkTools/TrkSegmentConverter/src/TrkSegmentConverter.cxx
deleted file mode 100755
index 092910d52b65..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/src/TrkSegmentConverter.cxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// TrkSegmentConverter.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#include "TrkFitterInterfaces/ITrackFitter.h"
-#include "TrkExInterfaces/IExtrapolator.h"
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "TrkSurfaces/StraightLineSurface.h"
-#include "TrkSegment/Segment.h"
-#include "TrkParameters/TrackParameters.h"
-//#include "TrkParameters/AtaStraightLine.h"
-#include "TrkSegmentConverter/TrkSegmentConverter.h"
-#include "TrkEventPrimitives/FitQuality.h"
-//#include "TrkParameters/MeasuredAtaStraightLine.h"
-#include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
-//#include "TrkParameters/MeasuredPerigee.h"
-#include "TrkTrack/TrackStateOnSurface.h"
-#include "TrkTrack/TrackInfo.h"
-#include "TrkTrack/Track.h"
-
-// Amg
-#include "EventPrimitives/EventPrimitives.h"
-
-//================ Constructor =================================================
-
-Trk::TrkSegmentConverter::TrkSegmentConverter(const std::string& t,
-			  const std::string& n,
-			  const IInterface*  p )
-  :
-  AthAlgTool(t,n,p),
-  m_useFitter(0),
-  m_trackFitter("Trk::KalmanFitter/TrkKalmanFitter"),
-  m_extrapolator ("Trk::Extrapolator/InDetExtrapolator")
-{
-  declareInterface<ISegmentConverterTool>(this);
-  
-  declareProperty("UseFitter",    m_useFitter = true);  
-  declareProperty("TrackFitter",  m_trackFitter ); 
-  declareProperty("Extrapolator", m_extrapolator); //Extrapolator tool
-}
-
-//================ Destructor =================================================
-
-Trk::TrkSegmentConverter::~TrkSegmentConverter()
-{}
-
-
-//================ Initialisation =================================================
-
-StatusCode Trk::TrkSegmentConverter::initialize()
-{
-  
-  StatusCode sc = AthAlgTool::initialize();
-  if (sc.isFailure()) return sc;
-  
-  sc = m_extrapolator.retrieve();
-  if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg;
-    return StatusCode::FAILURE;
-  }else{
-    msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg;
-  }
-
-  if(m_useFitter){
-    sc = m_trackFitter.retrieve();
-    if (sc.isFailure())
-      {
-	ATH_MSG_FATAL ("Could not find tool " << m_trackFitter<<". Exiting.");
-	return sc;
-      }
-    else{
-      ATH_MSG_INFO (" Got " << m_trackFitter << " as TrackFitter. ");
-    }
-  }
-
-  ATH_MSG_INFO ("initialize() successful in " << name() );
-
-  return StatusCode::SUCCESS;
-}
-
-//================ Finalisation =================================================
-
-StatusCode Trk::TrkSegmentConverter::finalize()
-{
-  StatusCode sc = AlgTool::finalize();
-  return sc;
-}
-
-//================ The conversion routine from the interface ======================
-
-Trk::Track* Trk::TrkSegmentConverter::convert(const Trk::Segment& segment)
-{
-  Track* track=nullptr;
-  if(m_useFitter)
-    track=convertWithFitter(segment);
-  else
-    track=convertBruteForce(segment);
-
-  return track;
-}
-
-//================ Convert with a TrackFitter ======================================
-Trk::Track* Trk::TrkSegmentConverter::convertWithFitter(const Trk::Segment& segment)
-{
-  Track* track=nullptr;
-  MeasurementSet myset;
-
-  int nROTs=segment.numberOfMeasurementBases();
-
-  if(nROTs>0){
-
-    for(int i=0;i<nROTs;++i)
-      myset.push_back(segment.measurement(i));
-    
-    ATH_MSG_DEBUG (" numberOfContainedRots: " << nROTs );
-    
-    const Amg::Vector3D& inputMatchingPos(segment.globalPosition());
- 
-    ATH_MSG_DEBUG (" created inputMatchingPos " );
-    
-    Amg::Vector3D inputMatchingMom(segment.globalPosition().x(),
-				   segment.globalPosition().y(),
-				   segment.globalPosition().z());
-    
-    ATH_MSG_DEBUG (" created inputMatchingMom ");
-    
-    const StraightLineSurface* testSf
-      = dynamic_cast<const Trk::StraightLineSurface*>(&(segment.associatedSurface()));
-    if(!testSf) { ATH_MSG_DEBUG (" Cannot dynamic cast segment surface to straight-line ! " ); return track;}
-    
-    ATH_MSG_DEBUG (" created testSf ");
-    
-    
-    const AtaStraightLine* inputMatchingPar
-      = new AtaStraightLine(inputMatchingPos,inputMatchingMom,
-			    1., *testSf);
-    
-    ATH_MSG_DEBUG ( " created inputMatchingPar " );
-    
-    Amg::Vector3D startMomentum( 0., 0., 1.);
-    track=m_trackFitter->fit(myset,
-			     *inputMatchingPar,
-			     false,
-			     Trk::nonInteracting
-			     );
-    if(track)
-      ATH_MSG_DEBUG (" Successfull fit of track. ");
-  }
-
-  return track;
-}
-//================ Convert using brute force =======================================
-Trk::Track* Trk::TrkSegmentConverter::convertBruteForce(const Trk::Segment& tS)
-{
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Transforming the TRT segment into a track..." << endmsg;
-
-  DataVector<const Trk::TrackStateOnSurface>* ntsos = new DataVector<const Trk::TrackStateOnSurface>;
-
-  //Get the track segment fit quality. If not there drop segment
-  const Trk::FitQuality* fq = tS.fitQuality() ? tS.fitQuality()->clone() : nullptr;
-  //if(!fq) {if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Segment has no fit quality!Discard..." << endmsg; return 0;}
-
-  //Get the track segment information and build the initial track parameters
-  const Amg::VectorX& p = tS.localParameters();
-  AmgSymMatrix(5)* ep = new AmgSymMatrix(5);
-  *ep = tS.localCovariance();
-  const Trk::TrackParameters* segPar = tS.associatedSurface().createTrackParameters(p(0),p(1),p(2),p(3),p(4),ep);
-  if(segPar){
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initial TRT Segment Parameters for refitting " << (*segPar) << endmsg;
-  }else{
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Could not get initial TRT segment parameters! " << endmsg;
-    return nullptr;
-  }
-
-  for(int it=0; it<int(tS.numberOfMeasurementBases()); it++){
-    // on first measurement add parameters
-    const Trk::TrackStateOnSurface* seg_tsos = nullptr;
-    
-    if ( dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(tS.measurement(it)) ) {
-      Amg::Vector3D perigeePosition(0.,0.,0.);
-      // --- create surface at perigee
-      Trk::PerigeeSurface perigeeSurface(perigeePosition);
-      const Trk::TrackParameters* parm = m_extrapolator->extrapolate(*segPar, perigeeSurface);
-      const Trk::Perigee* perParm = dynamic_cast<const Trk::Perigee*>(parm); 
-      if(!perParm) {if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Failed to build perigee parameters.Discard..." << endmsg; delete ntsos; return nullptr;}
-      std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
-      typePattern.set(Trk::TrackStateOnSurface::Perigee);
-      seg_tsos = new Trk::TrackStateOnSurface(nullptr,perParm,nullptr,nullptr,typePattern);
-    }
-    if(it>=1){
-      std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
-      typePattern.set(Trk::TrackStateOnSurface::Measurement);
-      if(it==1) {
-	seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->clone(),segPar,nullptr,nullptr,typePattern);
-      }else{
-	seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->clone(),nullptr,nullptr,nullptr,typePattern);
-      }
-    }
-    ntsos->push_back(seg_tsos);
-  }  
-
-  ///Construct the new track
-  Trk::TrackInfo info;
-  info.setPatternRecognitionInfo(Trk::TrackInfo::TRTStandalone);
-  
-  Trk::Track* newTrack = new Trk::Track(info, ntsos, fq);
-
-  return newTrack;
-}
-//============================================================================================
-
diff --git a/Tracking/TrkTools/TrkSegmentConverter/src/components/TrkSegmentConverter_entries.cxx b/Tracking/TrkTools/TrkSegmentConverter/src/components/TrkSegmentConverter_entries.cxx
deleted file mode 100644
index 8e452094fc91..000000000000
--- a/Tracking/TrkTools/TrkSegmentConverter/src/components/TrkSegmentConverter_entries.cxx
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "TrkSegmentConverter/TrkSegmentConverter.h"
-
-using namespace Trk;
-DECLARE_COMPONENT( TrkSegmentConverter )
-
-- 
GitLab


From cd6baf6960fac63c2dce5a41aac26662e4a118c6 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 5 Jun 2020 14:29:49 +0200
Subject: [PATCH 010/266] minor: removing extra spaces

---
 Tools/PyJobTransforms/test/test_trfValidation.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Tools/PyJobTransforms/test/test_trfValidation.py b/Tools/PyJobTransforms/test/test_trfValidation.py
index de66245e3dbe..f9d23820a3f9 100755
--- a/Tools/PyJobTransforms/test/test_trfValidation.py
+++ b/Tools/PyJobTransforms/test/test_trfValidation.py
@@ -732,8 +732,7 @@ ManagedAthenaTileMon reported an ERROR, but returned a StatusCode "SUCCESS"'''
 
     def test_knowledgeFile(self):
         self.assertEqual(self.myFileReport13.worstError(), {'level': 'FATAL', 'nLevel': logging.FATAL,
-                                                           'firstError': {'count': 1, 'firstLine': 13,
-                                                               'message': 'Pythia8             FATAL /build/atnight/localbuilds/nightlies/21.6/athena/Generators/GeneratorModules/src/GenModule.cxx:56 (StatusCode GenModule::execute()): code 0: this->callGenerator(); PYTHIA Abort from Pythia::next: reached end of Les Houches Events File'}})
+                                                            'firstError': {'count': 1, 'firstLine': 13, 'message': 'Pythia8             FATAL /build/atnight/localbuilds/nightlies/21.6/athena/Generators/GeneratorModules/src/GenModule.cxx:56 (StatusCode GenModule::execute()): code 0: this->callGenerator(); PYTHIA Abort from Pythia::next: reached end of Les Houches Events File'}})
 
     def test_dbMonitor(self):
         print(self.myFileReport9) 
-- 
GitLab


From 7e85cc1d7fca6e7b0a9fda4e6ff35c34fc8cf114 Mon Sep 17 00:00:00 2001
From: Rupert Tombs <rt500@cam.ac.uk>
Date: Fri, 5 Jun 2020 13:48:59 +0100
Subject: [PATCH 011/266] Create sim comparison test for art. Link test and
 increase to 4 events.

---
 Simulation/G4Atlas/G4AtlasAlg/CMakeLists.txt  |  8 +---
 .../test/G4AtlasAlgConfigNew_Test.py          |  2 +-
 .../SimCoreTests/test/test_Sim_Comparison.sh  | 43 +++++++++++++++++++
 3 files changed, 45 insertions(+), 8 deletions(-)
 create mode 100755 Simulation/Tests/SimCoreTests/test/test_Sim_Comparison.sh

diff --git a/Simulation/G4Atlas/G4AtlasAlg/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasAlg/CMakeLists.txt
index c49cd430ed4d..3a0b865f076d 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/CMakeLists.txt
+++ b/Simulation/G4Atlas/G4AtlasAlg/CMakeLists.txt
@@ -44,13 +44,7 @@ atlas_add_component( G4AtlasAlg
                      INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                      LINK_LIBRARIES ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel G4AtlasInterfaces G4AtlasAlgLib SGTools StoreGateLib SGtests EventInfo GeneratorObjects MCTruthBaseLib )
 
-#Test G4AtlasAlg
-#atlas_add_test( G4AtlasAlgConfigNew_Test
-#                SCRIPT test/G4AtlasAlgConfigNew_Test.py
-#                PROPERTIES TIMEOUT 300 )
-
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
-
+atlas_install_scripts( test/*.py )
diff --git a/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py b/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py
index f28fab90b4d8..5fba79a6e60c 100755
--- a/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py
+++ b/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py
@@ -139,7 +139,7 @@ if __name__ == '__main__':
     myRunNumber = 284500
     myFirstLB = 1
     myInitialTimeStamp = 1446539185
-    evtMax = 1
+    evtMax = 4
     from AthenaConfiguration.ComponentFactory import CompFactory
     evtIdModifierSvc = CompFactory.EvtIdModifierSvc(EvtStoreName="StoreGateSvc")
     iovDbMetaDataTool = CompFactory.IOVDbMetaDataTool()
diff --git a/Simulation/Tests/SimCoreTests/test/test_Sim_Comparison.sh b/Simulation/Tests/SimCoreTests/test/test_Sim_Comparison.sh
new file mode 100755
index 000000000000..69ddd827f5ce
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_Sim_Comparison.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# art-description: Simulation example to test agreement between ConfGetter and ComponentAccumulator configurations.
+# art-include: master/Athena
+# art-type: grid
+# art-output: test.HITS.pool.root
+# art-output: myHITSnew.pool.root
+
+# ComponentAccumulator
+G4AtlasAlgConfigNew_Test.py
+rc=$?
+echo "art-result: $rc CAsim"
+
+# ConfGetter
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    AtlasG4_tf.py \
+    --conditionsTag 'default:OFLCOND-MC16-SDR-14' \
+    --physicsList 'FTFP_BERT_ATL' \
+    --truthStrategy 'MC15aPlus' \
+    --postInclude 'default:PyJobTransforms/UseFrontier.py' \
+    --preInclude 'AtlasG4Tf:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
+    --preExec 'AtlasG4Tf:simFlags.TightMuonStepping=True' \
+    --DataRunNumber '284500' \
+    --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
+    --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1" \
+    --outputHITSFile "test.HITS.pool.root" \
+    --maxEvents 4 \
+    --imf False \
+    --postExec 'topSeq+=CfgMgr.JobOptsDumperAlg(FileName="G4AtlasTestConfigOld.txt")'
+    rc2=$?
+fi
+
+rc3=-9999
+echo "art-result: $rc simulation"
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root test.HITS.pool.root myHITSnew.pool.root --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings index_ref --error-mode resilient
+    rc3=$?
+fi
+
+echo "art-result: $rc2 regression"
-- 
GitLab


From 03e9dc59e91d912b86fc984faa892889cc1d5cbe Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 5 Jun 2020 15:28:45 +0200
Subject: [PATCH 012/266] Remove new and delete from SCT_DetectorManager using
 std::unique_ptr.

---
 .../SCT_ReadoutGeometry/SCT_DetectorManager.h | 10 +++---
 .../src/SCT_DetectorManager.cxx               | 34 ++++++-------------
 2 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h
index 3110729c13c0..528cca2fcd7b 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -18,6 +18,8 @@
 #include "InDetReadoutGeometry/InDetDD_Defs.h"
 
 #include "InDetIdentifier/SCT_ID.h"
+
+#include <memory>
   
 class StoreGateSvc;
 class Identifier;
@@ -158,10 +160,10 @@ namespace InDetDD {
     //@{
     std::vector<PVLink>                                         m_volume;
     SiDetectorElementCollection                                 m_elementCollection;
-    typedef std::map<Identifier, ExtendedAlignableTransform*>   AlignableTransformMap;
+    typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
     std::vector<AlignableTransformMap>                          m_higherAlignableTransforms;
-    std::vector<ExtendedAlignableTransform*>                    m_alignableTransforms;
-    std::vector<ExtendedAlignableTransform*>                    m_moduleAlignableTransforms;
+    std::vector<std::unique_ptr<ExtendedAlignableTransform>>    m_alignableTransforms;
+    std::vector<std::unique_ptr<ExtendedAlignableTransform>>    m_moduleAlignableTransforms;
     const SCT_ID*                                               m_idHelper;
       
     /**
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_DetectorManager.cxx
index 45cfb85fce66..f624231129b4 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_DetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_DetectorManager.cxx
@@ -50,20 +50,6 @@ namespace InDetDD {
     for (auto vol : m_volume) {
       vol->unref();
     }
-
-    for (auto higherAlignableTransform : m_higherAlignableTransforms){
-      for (auto iterMap : higherAlignableTransform) {
-        delete iterMap.second;
-      }
-    }
-
-    for (auto alignableTransform : m_alignableTransforms){
-      delete alignableTransform;
-    }
-
-    for (auto moduleAlignableTransform : m_moduleAlignableTransforms){
-      delete moduleAlignableTransform;
-    }
   }
 
   unsigned int SCT_DetectorManager::getNumTreeTops() const
@@ -185,7 +171,7 @@ namespace InDetDD {
 
       if (frame == InDetDD::global) { // global shift
         // Its a global transform
-        return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash], delta, alignStore);
+        return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash].get(), delta, alignStore);
 
       } else if (frame == InDetDD::local) { // local shift
 
@@ -198,10 +184,10 @@ namespace InDetDD {
         if( m_isLogical ){
           //Ensure cache is up to date and use the alignment corrected local to global transform
           element->setCache();
-          return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->transform(), delta, alignStore);
+          return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->transform(), delta, alignStore);
         } else 
           //Use default local to global transform
-          return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->defTransform(), delta, alignStore);
+          return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->defTransform(), delta, alignStore);
 
       } else {   
         // other not supported
@@ -224,7 +210,7 @@ namespace InDetDD {
 
       if (frame == InDetDD::global) { // global shift
         // Its a global transform
-        return setAlignableTransformGlobalDelta(m_moduleAlignableTransforms[idModuleHash], delta, alignStore);
+        return setAlignableTransformGlobalDelta(m_moduleAlignableTransforms[idModuleHash].get(), delta, alignStore);
       } else if (frame == InDetDD::local) { // local shift
         SiDetectorElement * element =  m_elementCollection[idHash];
         if (!element) return false;
@@ -234,10 +220,10 @@ namespace InDetDD {
         if( m_isLogical ){
           //Ensure cache is up to date and use the alignment corrected local to global transform
           element->setCache();
-          return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash], element->moduleTransform(), delta, alignStore);
+          return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash].get(), element->moduleTransform(), delta, alignStore);
         } else 
           //Use default local to global transform
-          return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash],element->defModuleTransform(), delta, alignStore);
+          return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash].get(), element->defModuleTransform(), delta, alignStore);
 
       } else {
         // other not supported
@@ -261,7 +247,7 @@ namespace InDetDD {
       if (iter == m_higherAlignableTransforms[index].end()) return false;      
 
       // Its a global transform
-      return setAlignableTransformGlobalDelta(iter->second, delta, alignStore);
+      return setAlignableTransformGlobalDelta((iter->second).get(), delta, alignStore);
     }
 
   }
@@ -292,13 +278,13 @@ namespace InDetDD {
         // Element
         IdentifierHash idHash = m_idHelper->wafer_hash(id);
         if (idHash.is_valid()) {
-          m_alignableTransforms[idHash]= new ExtendedAlignableTransform(transform, child);
+          m_alignableTransforms[idHash] = std::make_unique<ExtendedAlignableTransform>(transform, child);
         } 
       } else if (level == 1) {
         // Module
         IdentifierHash idHash = m_idHelper->wafer_hash(id);
         if (idHash.is_valid()) {
-          m_moduleAlignableTransforms[idHash/2]=new ExtendedAlignableTransform(transform, child);
+          m_moduleAlignableTransforms[idHash/2] = std::make_unique<ExtendedAlignableTransform>(transform, child);
         } 
 
       } else {
@@ -306,7 +292,7 @@ namespace InDetDD {
         // Higher levels are saved in a map. NB level=0,1 is treated above.   
         int index = level - FIRST_HIGHER_LEVEL; // level 0 and 1 is treated separately.
         if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1); 
-        m_higherAlignableTransforms[index][id] = new ExtendedAlignableTransform(transform, child);
+        m_higherAlignableTransforms[index][id] = std::make_unique<ExtendedAlignableTransform>(transform, child);
       }  
     }
   }
-- 
GitLab


From 186c697e1aa7a1a2e5ac80470a0c7b3537f43485 Mon Sep 17 00:00:00 2001
From: amete <serhanmete@gmail.com>
Date: Fri, 5 Jun 2020 15:43:49 +0200
Subject: [PATCH 013/266] Avoid unnecessary loss of precision

---
 .../PerfMonComps/src/PerfMonMTUtils.h          | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
index 6781bd045a1c..1436fbf007cc 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
@@ -58,7 +58,7 @@ struct Measurement {
   // Variables to store measurements
   double cpu_time, wall_time; // Timing
   memory_map_t mem_stats; // Memory: Vmem, Rss, Pss, Swap
-  int vmem, malloc; // Memory: Vmem, Malloc (faster than above)
+  double vmem, malloc; // Memory: Vmem, Malloc (faster than above)
 
   // Event level measurements
   event_meas_map_t eventLevel_meas_map;  // [Event count so far]: Measurement
@@ -119,7 +119,7 @@ struct Measurement {
     eventLevel_meas_map[eventCount] = meas;
   }
 
-  Measurement() : cpu_time{0.}, wall_time{0.}, vmem{0}, malloc{0} {
+  Measurement() : cpu_time{0.}, wall_time{0.}, vmem{0.}, malloc{0.} {
     mem_stats["vmem"] = 0; mem_stats["pss"] = 0; mem_stats["rss"] = 0; mem_stats["swap"] = 0;
   }
 };
@@ -134,8 +134,8 @@ struct MeasurementData {
   double m_tmp_wall, m_delta_wall;
   memory_map_t m_memMon_tmp_map;
   memory_map_t m_memMon_delta_map;
-  int m_tmp_vmem, m_delta_vmem;
-  int m_tmp_malloc, m_delta_malloc;
+  double m_tmp_vmem, m_delta_vmem;
+  double m_tmp_malloc, m_delta_malloc;
 
   // This map is used to store the event level measurements
   event_meas_map_t m_eventLevel_delta_map;
@@ -243,16 +243,16 @@ struct MeasurementData {
   double getDeltaWall() const { return m_delta_wall; }
   void add2DeltaWall(double val) { m_delta_wall += val; }
 
-  int getDeltaVmem() const { return m_delta_vmem; }
-  void add2DeltaVmem(int val) { m_delta_vmem += val; }
+  double getDeltaVmem() const { return m_delta_vmem; }
+  void add2DeltaVmem(double val) { m_delta_vmem += val; }
 
-  int getDeltaMalloc() const { return m_delta_malloc; }
-  void add2DeltaMalloc(int val) { m_delta_malloc += val; }
+  double getDeltaMalloc() const { return m_delta_malloc; }
+  void add2DeltaMalloc(double val) { m_delta_malloc += val; }
 
   long getMemMonDeltaMap(std::string mem_stat) const { return m_memMon_delta_map.at(mem_stat); }
 
   MeasurementData() : m_call_count{0}, m_tmp_cpu{0.}, m_delta_cpu{0.}, m_tmp_wall{0.}, m_delta_wall{0.},
-   m_tmp_vmem{0}, m_delta_vmem{0}, m_tmp_malloc{0}, m_delta_malloc{0}, m_offset_wall{0.} {
+    m_tmp_vmem{0.}, m_delta_vmem{0.}, m_tmp_malloc{0.}, m_delta_malloc{0.}, m_offset_wall{0.} {
     m_memMon_tmp_map["vmem"] = 0; m_memMon_tmp_map["pss"] = 0; m_memMon_tmp_map["rss"] = 0; m_memMon_tmp_map["swap"] = 0;
     m_memMon_delta_map["vmem"] = 0; m_memMon_delta_map["pss"] = 0; m_memMon_delta_map["rss"] = 0; m_memMon_delta_map["swap"] = 0;
   }
-- 
GitLab


From 3013482a4e8f47f392786d7d99726c406fffca53 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 5 Jun 2020 16:11:18 +0200
Subject: [PATCH 014/266] trigbs_modifyEvent: add option to remove some ROBs

---
 .../TrigByteStreamTools/python/trigbs_modifyEvent.py       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigTools/TrigByteStreamTools/python/trigbs_modifyEvent.py b/Trigger/TrigTools/TrigByteStreamTools/python/trigbs_modifyEvent.py
index 93400fd257ce..c0b114922232 100755
--- a/Trigger/TrigTools/TrigByteStreamTools/python/trigbs_modifyEvent.py
+++ b/Trigger/TrigTools/TrigByteStreamTools/python/trigbs_modifyEvent.py
@@ -7,6 +7,7 @@ import eformat
 from eformat import helper
 import logging
 import sys
+import re
 
 class Config:
   """Configuration options for this module"""
@@ -75,6 +76,7 @@ def main():
   parser.add_argument('--firstLB', type=int, default=1, help='first lumiblock number [%(default)s]')
   parser.add_argument('--incLB', type=int, default=1, help='increment steps for lumiblock number [%(default)s]')
   parser.add_argument('-t', '--timestamp', type=int, help='set timestamp in seconds [%(default)s]')
+  parser.add_argument('--removeRobs', metavar='PATTERN', type=str, help='regex for removing specific ROB IDs')
 
   args = parser.parse_args()
 
@@ -100,7 +102,10 @@ def main():
     if args.events>0 and i>args.events:
       break
     ro_event = modify(event)
-    rw_event = eformat.write.FullEventFragment(ro_event)
+    if args.removeRobs:
+      rw_event = eformat.write.FullEventFragment(ro_event, re.compile(args.removeRobs))
+    else:
+      rw_event = eformat.write.FullEventFragment(ro_event)
     ostr.write(rw_event)
 
   return
-- 
GitLab


From 630040ad67004c8a76874cc68eabda01db8baa16 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 5 Jun 2020 15:31:00 +0100
Subject: [PATCH 015/266] BinningData add default ctor,copy,move

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

diff --git a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinningData.h b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinningData.h
index d6a7ea43fcf6..28546b291e81 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinningData.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinningData.h
@@ -3,7 +3,7 @@
 */
 
 ///////////////////////////////////////////////////////////////////
-// BinUtility.h, (c) ATLAS Detector software
+// BinningData.h, (c) ATLAS Detector software
 ///////////////////////////////////////////////////////////////////
 
 #ifndef TRKDETDESCRUTILS_BINNINGDATA_H
@@ -55,11 +55,18 @@ public:
   float max;
   float step;
   float subStep;
-  std::vector<float> boundaries;
   float refphi;                               // ref Phi for binH
+  std::vector<float> boundaries;
   std::vector<std::pair<int, float>> hbounds; // boundary for binH
 
-  /** Constructor */
+  /* Default ctor,copy,move assignment,dtor*/
+  BinningData(const BinningData&) = default;
+  BinningData(BinningData&&) = default;
+  BinningData& operator=(const BinningData&) = default;
+  BinningData& operator=(BinningData&&) = default;
+  ~BinningData() = default;
+  
+  /** Constructor with arguments*/
   BinningData(BinningType bType,
               BinningOption bOption,
               BinningValue bValue,
@@ -77,8 +84,8 @@ public:
     , max(bMax)
     , step(bStep != 0. ? bStep : 1.)
     , subStep(bSubStep)
-    , boundaries(std::move(bBoundaries))
     , refphi(0.)
+    , boundaries(std::move(bBoundaries))
     , hbounds(std::vector<std::pair<int, float>>())
     , m_mixPtr(nullptr)
   {
@@ -91,7 +98,9 @@ public:
   }
 
   /** Constructor for binH type : non-equidistant binning assumed */
-  BinningData(BinningOption bOption, float bRefPhi, const std::vector<std::pair<int, float>>& bBoundaries)
+  BinningData(BinningOption bOption,
+              float bRefPhi,
+              const std::vector<std::pair<int, float>>& bBoundaries)
     : type(Trk::arbitrary)
     , option(bOption)
     , binvalue(Trk::binH)
@@ -99,10 +108,9 @@ public:
     , min(bBoundaries.front().second)
     , max(bBoundaries.back().second)
     , step(1.)
-    , // non-zero value needed for next()
-    subStep(0.)
-    , boundaries(std::vector<float>())
+    , subStep(0.) // non-zero value needed for next()
     , refphi(bRefPhi)
+    , boundaries(std::vector<float>())
     , hbounds(bBoundaries)
     , m_functionPtr(nullptr)
     , m_mixPtr(&searchInVectorWithMixedBoundary)
-- 
GitLab


From ee083667255c9f910797c132f9426617471fe821 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 5 Jun 2020 16:44:21 +0200
Subject: [PATCH 016/266] Fix MaxFrameWorkErrors check and increase the default
 value

---
 .../TrigControl/TrigServices/src/HltEventLoopMgr.cxx       | 7 +++----
 HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
index bfda0598dd3d..e0574703faf0 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
@@ -943,13 +943,12 @@ StatusCode HltEventLoopMgr::failedEvent(HLT::OnlineErrorCode errorCode, const Ev
 
   auto drainAllAndProceed = [&]() -> StatusCode {
     ATH_CHECK(drainAllSlots()); // break the event loop on failure
-    if ( m_maxFrameworkErrors.value()>=0 && ((++m_nFrameworkErrors)<=m_maxFrameworkErrors.value()) )
-      return StatusCode::SUCCESS; // continue the event loop
-    else {
+    if ( m_maxFrameworkErrors.value()>=0 && ((++m_nFrameworkErrors)>m_maxFrameworkErrors.value()) ) {
       ATH_MSG_ERROR("The number of tolerable framework errors for this HltEventLoopMgr instance, which is "
                     << m_maxFrameworkErrors.value() << ", was exceeded. Exiting the event loop.");
       return StatusCode::FAILURE; // break the event loop
     }
+    else return StatusCode::SUCCESS; // continue the event loop
   };
 
   //----------------------------------------------------------------------------
@@ -1125,7 +1124,7 @@ StatusCode HltEventLoopMgr::failedEvent(HLT::OnlineErrorCode errorCode, const Ev
   if (errorCode != HLT::OnlineErrorCode::TIMEOUT
       && errorCode != HLT::OnlineErrorCode::RESULT_TRUNCATION
       && errorCode != HLT::OnlineErrorCode::PROCESSING_FAILURE) {
-    if ( (++m_nFrameworkErrors)>m_maxFrameworkErrors.value() ) {
+    if ( m_maxFrameworkErrors.value()>=0 && ((++m_nFrameworkErrors)>m_maxFrameworkErrors.value()) ) {
       ATH_MSG_ERROR("Failure with OnlineErrorCode=" << errorCode
         << " was successfully handled, but the number of tolerable framework errors for this HltEventLoopMgr instance,"
         << " which is " << m_maxFrameworkErrors.value() << ", was exceeded. Current local event number is "
diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
index 71fc905bfe40..0285b2c569bc 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
@@ -205,7 +205,7 @@ private:
     this, "SoftTimeoutFraction", 0.8, "Fraction of the hard timeout to be set as the soft timeout"};
 
   Gaudi::Property<int> m_maxFrameworkErrors{
-    this, "MaxFrameworkErrors", 0,
+    this, "MaxFrameworkErrors", 10,
     "Tolerable number of recovered framework errors before exiting (<0 means all are tolerated)"};
 
   Gaudi::Property<std::string> m_fwkErrorDebugStreamName{
-- 
GitLab


From 9665ff558e0bd09f07ac768e005d02b34cc9c575 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 5 Jun 2020 17:29:49 +0200
Subject: [PATCH 017/266] TrigServices: Improve exception handling

---
 .../TrigServices/src/HltEventLoopMgr.cxx         | 16 ++++++++++++----
 .../TrigServices/src/TrigCOOLUpdateHelper.cxx    | 16 +++++++++++-----
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
index e0574703faf0..c5a86cd84e74 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
@@ -407,10 +407,18 @@ StatusCode HltEventLoopMgr::hltUpdateAfterFork(const ptree& /*pt*/)
 StatusCode HltEventLoopMgr::executeRun(int maxevt)
 {
   ATH_MSG_VERBOSE("start of " << __FUNCTION__);
-  StatusCode sc = nextEvent(maxevt);
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR("Event loop failed");
-    // Extra clean-up may be needed here after the failure
+  StatusCode sc = StatusCode::SUCCESS;
+  try {
+    sc = nextEvent(maxevt);
+    if (sc.isFailure()) ATH_MSG_FATAL("Event loop failed");
+  }
+  catch (const std::exception& e) {
+    ATH_MSG_FATAL("Event loop failed, std::exception caught: " << e.what());
+    sc = StatusCode::FAILURE;
+  }
+  catch (...) {
+    ATH_MSG_FATAL("Event loop failed, unknown exception caught");
+    sc = StatusCode::FAILURE;
   }
 
   // Stop the timer thread
diff --git a/HLT/Trigger/TrigControl/TrigServices/src/TrigCOOLUpdateHelper.cxx b/HLT/Trigger/TrigControl/TrigServices/src/TrigCOOLUpdateHelper.cxx
index 42204dc475bc..5f64cc28d463 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/TrigCOOLUpdateHelper.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/TrigCOOLUpdateHelper.cxx
@@ -206,7 +206,7 @@ StatusCode TrigCOOLUpdateHelper::hltCoolUpdate(const EventContext& ctx)
                    << ". Current event: "  << ctx.eventID());
               
       if ( hltCoolUpdate(folderName, ctx).isFailure() ) {
-        ATH_MSG_FATAL("COOL update failed for " << folderName << ". Aborting.");
+        ATH_MSG_ERROR("COOL update failed for " << folderName << ". Aborting.");
         return StatusCode::FAILURE;
       }
       // All OK
@@ -272,11 +272,17 @@ StatusCode TrigCOOLUpdateHelper::scheduleFolderUpdates(const EventContext& ctx)
   // Fetch CTP fragment ROB
   const std::vector<uint32_t> robs{m_ctpRobId};
   IROBDataProviderSvc::VROBFRAG ctpRobs;
-  m_robDataProviderSvc->addROBData(ctx, robs, name());
-  m_robDataProviderSvc->getROBData(ctx, robs, ctpRobs, name());
+  try {
+    m_robDataProviderSvc->addROBData(ctx, robs, name());
+    m_robDataProviderSvc->getROBData(ctx, robs, ctpRobs, name());
+  }
+  catch (const std::exception& ex) {
+    ATH_MSG_ERROR("Cannot retrieve CTP ROB 0x" << MSG::hex << m_ctpRobId.value() << MSG::dec << " due to exception: " << ex.what());
+    return StatusCode::FAILURE;
+  }
 
   if ( ctpRobs.empty() ) {
-    ATH_MSG_FATAL("Cannot retrieve CTP ROB " << m_ctpRobId.value());
+    ATH_MSG_ERROR("Cannot retrieve CTP ROB 0x" << MSG::hex << m_ctpRobId.value() << MSG::dec);
     return StatusCode::FAILURE;
   }
 
@@ -287,7 +293,7 @@ StatusCode TrigCOOLUpdateHelper::scheduleFolderUpdates(const EventContext& ctx)
     ctp_payload = CTPfragment::ExtraPayload(l1_extraPayload);
   }
   catch (CTPfragment::ExtraPayloadTooLong& ex) {
-    ATH_MSG_FATAL("Invalid CTP fragment. Exception = " << ex.what());
+    ATH_MSG_ERROR("Invalid CTP fragment. Exception = " << ex.what());
     return StatusCode::FAILURE;
   }
 
-- 
GitLab


From 2b3d8d72aeda013dc4d13b2d13ec0f2b6571ecaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Fri, 5 Jun 2020 18:09:12 +0200
Subject: [PATCH 018/266] cleanup MuonIdHelperSvc calls

---
 .../src/MuonSegmentToCalibSegment.cxx         | 22 ++++-----
 .../HistogramManager.h                        |  7 +--
 .../src/HistogramManager.cxx                  | 31 ++++++------
 .../src/CscStripPrepDataContainerCnv.cxx      | 17 +------
 .../src/MMPrepDataContainerCnv.cxx            |  8 +---
 .../src/sTgcPrepDataContainerCnv.cxx          |  9 +---
 .../MuonCondSvc/CSC_DCSConditionsSvc.h        | 15 ++----
 .../MuonCondSvc/MDT_DCSConditionsRun2Svc.h    | 16 +++----
 .../MuonCondSvc/MDT_DCSConditionsSvc.h        | 15 ++----
 .../MuonCondSvc/MDT_DQConditionsSvc.h         |  5 +-
 .../MuonCondSvc/MDT_DeadTubeConditionsSvc.h   |  9 +---
 .../MuonCondSvc/MuonDetectorStatusDbSvc.h     | 47 ++-----------------
 .../MuonCondSvc/RPC_DCSConditionsSvc.h        | 15 ++----
 .../MuonCondSvc/RPC_STATUSConditionsSvc.h     | 20 ++------
 .../MuonCondSvc/RPC_TriggerSvc_test.h         | 16 +++----
 .../RT_Relation_DB_DigiTool.h                 |  9 +---
 .../src/MM_DigitizationTool.cxx               | 12 ++---
 ...lusterTimeProjectionMMClusterBuilderTool.h |  2 -
 .../src/CscClusterOnTrackCreator.cxx          | 35 +++++---------
 .../src/CSCSegmValAlg.cxx                     |  4 +-
 .../src/MdtRawDataMonAlg.cxx                  |  4 +-
 .../src/MdtRawDataValAlg.cxx                  |  7 ++-
 .../src/MdtVsTgcRawData_maptgchits.cxx        |  4 +-
 .../functions/MdtVsTgcRawData_SegmSorting.cxx |  4 +-
 .../src/TrigMuonEFStandaloneTrackTool.cxx     |  2 +-
 .../TrigT1RPCsteering/src/TrigT1RPC.cxx       |  2 +-
 26 files changed, 99 insertions(+), 238 deletions(-)

diff --git a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/src/MuonSegmentToCalibSegment.cxx b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/src/MuonSegmentToCalibSegment.cxx
index c631fbd251a6..9b7b1b55c9e5 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/src/MuonSegmentToCalibSegment.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/src/MuonSegmentToCalibSegment.cxx
@@ -340,9 +340,9 @@ namespace MuonCalib {
       // use pointer to rot
       const Trk::RIO_OnTrack* rot = seg.rioOnTrack(irot);
       
-      if( m_idHelperSvc->mdtIdHelper().is_mdt( rot->identify() ) ){
+      if( m_idHelperSvc->isMdt( rot->identify() ) ){
 	return rot->identify();
-      }else if( m_idHelperSvc->cscIdHelper().is_csc( rot->identify() ) ){
+      }else if( m_idHelperSvc->isCsc( rot->identify() ) ){
 	return rot->identify();
       }
     }
@@ -354,28 +354,28 @@ namespace MuonCalib {
   Amg::Transform3D MuonSegmentToCalibSegment::getGlobalToStation( const Identifier& id, const MuonGM::MuonDetectorManager* MuonDetMgr  ) const
   {
     
-    if( m_idHelperSvc->mdtIdHelper().is_mdt( id ) ){
+    if( m_idHelperSvc->isMdt( id ) ){
       const MuonGM::MdtReadoutElement* detEl = MuonDetMgr->getMdtReadoutElement(id);
       if( !detEl ) {
 	ATH_MSG_WARNING( "getGlobalToStation failed to retrieve detEL byebye"  );
       }else{
 	return detEl->GlobalToAmdbLRSTransform();
       }
-    }else if( m_idHelperSvc->cscIdHelper().is_csc( id ) ){
+    }else if( m_idHelperSvc->isCsc( id ) ){
       const MuonGM::CscReadoutElement* detEl = MuonDetMgr->getCscReadoutElement(id);
       if( !detEl ) {
 	ATH_MSG_WARNING( "getGlobalToStation failed to retrieve detEL byebye"  );
       }else{
 	return detEl->transform().inverse();
       }
-    }else if( m_idHelperSvc->tgcIdHelper().is_tgc( id ) ){
+    }else if( m_idHelperSvc->isTgc( id ) ){
       const MuonGM::TgcReadoutElement* detEl = MuonDetMgr->getTgcReadoutElement(id);
       if( !detEl ) {
 	ATH_MSG_WARNING( "getGlobalToStation failed to retrieve detEL byebye"  );
       }else{
 	return detEl->transform().inverse();
       }
-    }else if( m_idHelperSvc->rpcIdHelper().is_rpc( id ) ){
+    }else if( m_idHelperSvc->isRpc( id ) ){
       const MuonGM::RpcReadoutElement* detEl = MuonDetMgr->getRpcReadoutElement(id);
       if( !detEl ) {
 	ATH_MSG_WARNING( "getGlobalToStation failed to retrieve detEL byebye"  );
@@ -521,7 +521,7 @@ namespace MuonCalib {
           } else { continue;}
       }
       
-      if( m_idHelperSvc->mdtIdHelper().is_mdt(id)) {
+      if( m_idHelperSvc->isMdt(id)) {
         if (competingRio) {
           ATH_MSG_WARNING( "  MDT hit is competing Rio !!! "  );
          continue;
@@ -757,7 +757,7 @@ namespace MuonCalib {
 	basehit->setSegmentT0Applied(apply_t0);
 	mdtSeg->addHitOnTrack(basehit);
 
-      }else if( m_idHelperSvc->rpcIdHelper().is_rpc( id ) ){
+      }else if( m_idHelperSvc->isRpc( id ) ){
 	// rpc ROT
 	++nr;
 
@@ -812,7 +812,7 @@ namespace MuonCalib {
 	
 	  mdtSeg->addHitOnTrack( rpcCH );
         }
-      }else if( m_idHelperSvc->tgcIdHelper().is_tgc( id ) ){
+      }else if( m_idHelperSvc->isTgc( id ) ){
 	++nt;
 
         int nRios = 1;
@@ -863,7 +863,7 @@ namespace MuonCalib {
 
 	  mdtSeg->addHitOnTrack( tgcCH );
         }
-      }else if( m_idHelperSvc->cscIdHelper().is_csc( id ) ){
+      }else if( m_idHelperSvc->isCsc( id ) ){
 	++nc;
 
         int nRios = 1;
@@ -972,7 +972,7 @@ namespace MuonCalib {
 	  std::vector< const Trk::PrepRawData* >::const_iterator prd_it = prdvec.begin();
 	  for( ; prd_it!= prdvec.end() ;++prd_it ) {
 	    Identifier id = (*prd_it)->identify();
-	    if( m_idHelperSvc->mdtIdHelper().is_mdt(id) ) {
+	    if( m_idHelperSvc->isMdt(id) ) {
 	      nmdt += 1000; //a mdt is always an eta-hit.
 	    } else if ( m_idHelperSvc->isRpc(id) ) {
 	      if      ( m_idHelperSvc->rpcIdHelper().measuresPhi(id) ) nrpc += 1;
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/HistogramManager.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/HistogramManager.h
index 1c4f49282f9f..df57373bb447 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/HistogramManager.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/HistogramManager.h
@@ -22,13 +22,10 @@
 
 #include "MuonCalibStandAloneExtraTools/StringUtil.h"
 #include "MuonCalibStandAloneExtraTools/MDTName.h"
+#include "MuonIdHelpers/MdtIdHelper.h"
 
 #define UPDATETIME 2000
 
-namespace Muon {
-  class IMuonIdHelperSvc;
-}
-
 class MdtChamber {
 public:
   std::string m_region;
@@ -132,7 +129,7 @@ public:
 
  private:
   TObjArray m_hList;
-  const Muon::IMuonIdHelperSvc* m_idHelper;
+  const MdtIdHelper* m_mdtIdHelper;
 
   bool m_doTracks;
   
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/src/HistogramManager.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/src/HistogramManager.cxx
index 57b869d003a8..91c2ab6259c1 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/src/HistogramManager.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/src/HistogramManager.cxx
@@ -5,7 +5,6 @@
 #include "MuonCalibStandAloneExtraTools/HistogramManager.h"
 #include "MuonCalibStandAloneExtraTools/MDTName.h"
 
-#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
 #include <array>
 
@@ -1354,16 +1353,16 @@ void HistogramManager::buildChamberHistos(MDTName chamb) {
   tubeNumberOffsetML[1] = 0;
 
   if ( m_idHelper ) {
-    Identifier  station_id = m_idHelper->mdtIdHelper().elementID(chamberType, eta_id, phi_id);
-    numML = m_idHelper->mdtIdHelper().numberOfMultilayers(station_id);
-    Identifier  MdtML1_id = m_idHelper->mdtIdHelper().multilayerID(station_id,1);
+    Identifier  station_id = m_mdtIdHelper->elementID(chamberType, eta_id, phi_id);
+    numML = m_mdtIdHelper->numberOfMultilayers(station_id);
+    Identifier  MdtML1_id = m_mdtIdHelper->multilayerID(station_id,1);
     Identifier  MdtML2_id;
-    if ( numML>1) MdtML2_id = m_idHelper->mdtIdHelper().multilayerID(station_id,2);
-    numLayersPerML = m_idHelper->mdtIdHelper().tubeLayerMax(MdtML1_id) - m_idHelper->mdtIdHelper().tubeLayerMin(MdtML1_id) + 1; 
+    if ( numML>1) MdtML2_id = m_mdtIdHelper->multilayerID(station_id,2);
+    numLayersPerML = m_mdtIdHelper->tubeLayerMax(MdtML1_id) - m_mdtIdHelper->tubeLayerMin(MdtML1_id) + 1; 
     if (chamberName.substr(0,4)=="BIS8") numLayersPerML=3; // PATCH TO MdtIdHelper BUG (should be fixed in next release)
-    numTubesPerLayer[0] = m_idHelper->mdtIdHelper().tubeMax(MdtML1_id) - m_idHelper->mdtIdHelper().tubeMin(MdtML1_id) + 1;
+    numTubesPerLayer[0] = m_mdtIdHelper->tubeMax(MdtML1_id) - m_mdtIdHelper->tubeMin(MdtML1_id) + 1;
 
-    if ( numML>1 ) numTubesPerLayer[1] = m_idHelper->mdtIdHelper().tubeMax(MdtML2_id) - m_idHelper->mdtIdHelper().tubeMin(MdtML2_id) + 1;
+    if ( numML>1 ) numTubesPerLayer[1] = m_mdtIdHelper->tubeMax(MdtML2_id) - m_mdtIdHelper->tubeMin(MdtML2_id) + 1;
 
     numMaxTubesPerLayer = numTubesPerLayer[0];
     if (numTubesPerLayer[1]>numTubesPerLayer[0]) numMaxTubesPerLayer = numTubesPerLayer[1];
@@ -1909,16 +1908,16 @@ std::vector<MDTName> HistogramManager::GetChamberList(std::string region, std::s
   //ToString ts;
   std::vector<MDTName> chamberList;
 
-    if ( m_idHelper ) {
-      MdtIdHelper::const_id_iterator it     = m_idHelper->mdtIdHelper().module_begin();
-      MdtIdHelper::const_id_iterator it_end = m_idHelper->mdtIdHelper().module_end();
+    if ( m_mdtIdHelper ) {
+      MdtIdHelper::const_id_iterator it     = m_mdtIdHelper->module_begin();
+      MdtIdHelper::const_id_iterator it_end = m_mdtIdHelper->module_end();
       for(; it!=it_end;++it ) {
 
-	if  ( !m_idHelper->mdtIdHelper().is_mdt(*it) ) continue;
-	int station_index = m_idHelper->mdtIdHelper().stationName(*it);
-	std::string stationName = m_idHelper->mdtIdHelper().stationNameString(station_index);
-	int phi_id = m_idHelper->mdtIdHelper().stationPhi(*it);
-	int eta_id = m_idHelper->mdtIdHelper().stationEta(*it);
+	if  ( !m_mdtIdHelper->is_mdt(*it) ) continue;
+	int station_index = m_mdtIdHelper->stationName(*it);
+	std::string stationName = m_mdtIdHelper->stationNameString(station_index);
+	int phi_id = m_mdtIdHelper->stationPhi(*it);
+	int eta_id = m_mdtIdHelper->stationEta(*it);
                 
 	MDTName chamber(stationName,phi_id,eta_id);
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
index 3814cbc1a82a..c4dd7f9bf3b3 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
@@ -1,26 +1,18 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "CscStripPrepDataContainerCnv.h"
 
-// Gaudi
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/MsgStream.h"
-
-// Athena
 #include "StoreGate/StoreGateSvc.h"
-
-// Id includes
-// #include "MuonIdHelpers/CscIdHelper.h"
 #include "MuonPrepRawData/CscStripPrepDataContainer.h"
 
 CscStripPrepDataContainerCnv::CscStripPrepDataContainerCnv(ISvcLocator* svcloc) :
 CscStripPrepDataContainerCnvBase(svcloc),
     // Must create DataVector that does NOT own elements
-    //m_prdCollVec(CscStripPrepDataCollVec(SG::VIEW_ELEMENTS)),
     m_storeGate(0)
-    //m_cscId(0) 
 {
 }
 
@@ -32,8 +24,6 @@ StatusCode CscStripPrepDataContainerCnv::initialize() {
     if( !CscStripPrepDataContainerCnvBase::initialize().isSuccess() )
        return StatusCode::FAILURE;
 
-//    msgSvc()->setOutputLevel( "CscStripPrepDataContainerCnv", MSG::DEBUG );
-
    // Get the messaging service, print where you are
     MsgStream log(msgSvc(), "CscStripPrepDataContainerCnv");
     log << MSG::INFO << "CscStripPrepDataContainerCnv::initialize()" << endmsg;
@@ -55,9 +45,6 @@ StatusCode CscStripPrepDataContainerCnv::initialize() {
         log << MSG::DEBUG << "Found DetectorStore." << endmsg;
     }
 
-
-    //m_converter_p0.initialize(log);
-
     if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converter initialized." << endmsg;
 
     return StatusCode::SUCCESS;
@@ -85,8 +72,6 @@ Muon::CscStripPrepDataContainer* CscStripPrepDataContainerCnv::createTransient()
     else if( compareClassGuid(p0_guid) ) {
         if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): Old input file"<<std::endl;
         throw std::runtime_error("Not currently supporting reading non TP-split PRDs");
-        //std::unique_ptr< CscStripPrepDataContainer_p0 >   col_vect( poolReadObject< CscStripPrepDataContainer_p0 >() );
-        //p_collection = m_converter_p0.createTransient( col_vect.get(), log );
     }
     else {
         throw std::runtime_error("Unsupported persistent version of CscStripPrepDataContainer");
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MMPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MMPrepDataContainerCnv.cxx
index cb8ed53a05e0..b931911863fc 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MMPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MMPrepDataContainerCnv.cxx
@@ -1,18 +1,12 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MMPrepDataContainerCnv.h"
 
-// Gaudi
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/MsgStream.h"
-
-// Athena
 #include "StoreGate/StoreGateSvc.h"
-
-// Id includes
-// #include "MuonIdHelpers/MMIdHelper.h"
 #include "MuonPrepRawData/MMPrepDataContainer.h"
 
 MMPrepDataContainerCnv::MMPrepDataContainerCnv(ISvcLocator* svcloc) :
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
index abedc62819b4..57fb392d1887 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
@@ -1,18 +1,12 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "sTgcPrepDataContainerCnv.h"
 
-// Gaudi
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/MsgStream.h"
-
-// Athena
 #include "StoreGate/StoreGateSvc.h"
-
-// Id includes
-// #include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonPrepRawData/sTgcPrepDataContainer.h"
 
 sTgcPrepDataContainerCnv::sTgcPrepDataContainerCnv(ISvcLocator* svcloc) :
@@ -39,7 +33,6 @@ sTgcPrepDataContainer_PERS*    sTgcPrepDataContainerCnv::createPersistent (Muon:
     MsgStream log(msgSvc(), "sTgcPrepDataContainerCnv" );
     if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createPersistent(): main converter"<<endmsg;
     sTgcPrepDataContainer_PERS *pers= m_converter_p1.createPersistent( transCont, log );
-    // COMPRESS sTgcPrepDataContainer_PERS *pers= m_converter_p1.createPersistent( transCont, log );
     return pers;
 }
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h
index e4939e0b5209..c53cda4c93b6 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_CSC_DCSCONDITIONSSVC_H
@@ -10,25 +10,20 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/ICSC_DCSConditionsSvc.h"
 #include "MuonCondInterface/ICSC_DCSConditionsTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
 
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsRun2Svc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsRun2Svc.h
index 769aa4e3aa71..74e287b81514 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsRun2Svc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsRun2Svc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_MDT_DCSCONDITIONSRUN2SVC_H
@@ -10,25 +10,21 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/IMDT_DCSConditionsRun2Svc.h"
 #include "MuonCondInterface/IMDT_DCSConditionsRun2Tool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
+
 
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsSvc.h
index 12941a12db8e..1ea00c5723ff 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DCSConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_MDT_DCSCONDITIONSSVC_H
@@ -10,25 +10,20 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/IMDT_DCSConditionsSvc.h"
 #include "MuonCondInterface/IMDT_DCSConditionsTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
 
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DQConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DQConditionsSvc.h
index bbf5519b8654..873698f92e3f 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DQConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DQConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_MDT_DQCONDITIONSSVC_H
@@ -10,8 +10,6 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "MuonCondInterface/IMDT_DQConditionsSvc.h"
 #include "MuonCondInterface/IMDT_DQConditionsTool.h"
@@ -22,7 +20,6 @@ class IMDT_DQConditionsTool;
 class IIOVSvc;
 class Identifier;
 
-
 class MDT_DQConditionsSvc : public AthService, virtual public IMDT_DQConditionsSvc {
 friend class SvcFactory<MDT_DQConditionsSvc>;    
  public:
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DeadTubeConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DeadTubeConditionsSvc.h
index c0b4123b38a5..a02726c1c0f9 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DeadTubeConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MDT_DeadTubeConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_MDT_DEADTUBECONDITIONSSVC_H
@@ -10,8 +10,6 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "MuonCondInterface/IMDT_DeadTubeConditionsSvc.h"
 #include "MuonCondInterface/IMDT_DeadTubeConditionsTool.h"
@@ -22,11 +20,6 @@ class IMDT_DeadTubeConditionsTool;
 class IIOVSvc;
 class Identifier;
 
-//const InterfaceID InterfaceID_IMDT_DeadTubeConditionsSvc("MDT_DeadTubeConditionsSvc", 1, 0);
-
-//class IMDT_DeadTubeConditionsSvc;
-
-
 class MDT_DeadTubeConditionsSvc : public AthService, virtual public IMDT_DeadTubeConditionsSvc {
 friend class SvcFactory<MDT_DeadTubeConditionsSvc>;    
  public:
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonDetectorStatusDbSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonDetectorStatusDbSvc.h
index 8871259952bd..ab6178fcddf3 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonDetectorStatusDbSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonDetectorStatusDbSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_MUONDETECTORSTATUSDBSVC_H
@@ -10,16 +10,13 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-//#include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonCondInterface/IMuonDetectorStatusDbTool.h"
 #include "MuonCondData/MdtDeadTubeStatusContainer.h"
 #include "MuonCondData/MdtDeadTubeStatus.h"
 
-
 class IIOVSvc;
 template <class TYPE> class SvcFactory;
-//namespace MuonCalib 
-//{  
+
 const InterfaceID InterfaceID_IMuonDetectorStatusDbSvc("MuonDetectorStatusDbSvc", 1, 0);
 class IMuonDetectorStatusDBTool;
 
@@ -29,60 +26,22 @@ class MuonDetectorStatusDbSvc : public AthService, virtual public IInterface {
  public:
    MuonDetectorStatusDbSvc (const std::string& name, ISvcLocator* pSvcLocator);
 
-  
-  
   static const InterfaceID& interfaceID() { return InterfaceID_IMuonDetectorStatusDbSvc; }
   virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
-  
-  
- public:
-  
+
   virtual StatusCode initialize(void);
 
   virtual StatusCode finalize(void);
 
-  //virtual StatusCode loadParameterStatus(IOVSVC_CALLBACK_ARGS);
-  //virtual StatusCode loadTubeStatus(IOVSVC_CALLBACK_ARGS);
- 
  private:
-  
-
-  
-  // Pointer to storegate svc
-  //StoreGateSvc* m_storeGate;
-  // Pointer to the detector store
-  //StoreGateSvc* m_detStore;
-  // Pointer to IOVSvc
-  //IIOVSvc *p_IOVSvc;
-
-
-  //const MdtIdHelper* m_mdtIdHelper;
-
- 
-  //MuonDetectorStatusDbTool* m_MuonDetectorStatusDbTool;
-    
-  // Pointer to data containers for the detector store
- 
-  //mutable MdtDeadTubeStatusContainer * m_tubeStatusData; 
-   
-//    // Pointer to MuonDetectorManager (imt addition)
-//   const MuonGM::MuonDetectorManager* m_MuonDetectorManager;
-  
-  
-
 
    /** Tool handling the DB access */
   IMuonDetectorStatusDbTool * m_dbTool;
 
-/** Indexed with MdtRegionHash for rt-regions. */ 
-/** Properties: */
-
-
  std::string         m_tubeStatusDataLocation;
  std::string         m_dbToolType;
  std::string         m_dbToolName;
 
- 
 };
 //}
 #endif
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h
index c9a1a73fe32d..ed944a6c07e4 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_RPC_DCSCONDITIONSSVC_H
@@ -10,25 +10,20 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/IRPC_DCSConditionsSvc.h"
 #include "MuonCondInterface/IRPC_DCSConditionsTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
 
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h
index c681786d1ded..c6455825d4de 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_RPC_STATUSCONDITIONSSVC_H
@@ -10,25 +10,20 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/IRPC_STATUSConditionsSvc.h"
 #include "MuonCondInterface/IRpcDetectorStatusDbTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
 
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
@@ -42,9 +37,6 @@ friend class SvcFactory<RPC_STATUSConditionsSvc>;
  public:
   RPC_STATUSConditionsSvc (const std::string& name, ISvcLocator* pSvcLocator);
   virtual ~RPC_STATUSConditionsSvc();
-  
-  //static const InterfaceID& interfaceID() { return InterfaceID_IRPC_STATUSConditionsSvc; }
-  //virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
 
   virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
 
@@ -57,9 +49,7 @@ friend class SvcFactory<RPC_STATUSConditionsSvc>;
 
   virtual StatusCode finalize(void);
 
-
   ///Return whether this service can report on the hierarchy level (e.g. module, chip...)
-  //virtual bool canReportAbout(MuonConditions::Hierarchy h);
     
   virtual bool isGoodPanel(const Identifier & Id) const;
   virtual bool isGoodStrip(const Identifier & Id) const;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_TriggerSvc_test.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_TriggerSvc_test.h
index dd4bb1f789b9..e582c4e3f3a5 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_TriggerSvc_test.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_TriggerSvc_test.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCONDSVC_RPC_TRIGGERSVC_TEST_H
@@ -10,25 +10,21 @@
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/IInterface.h"
 #include "AthenaBaseComps/AthService.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "MuonCondInterface/IRPCTriggerDbTool.h"
 #include "MuonCondInterface/IRPC_TriggerSvc_test.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
-#include <vector>
-#include <list>
-#include <string>
-#include <map>
-//
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonCondSvc/MuonHierarchy.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/IIOVDbSvc.h" 
 
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
+
 class ISvcLocator;
 class IdentifierHash;
 class StatusCode;
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h
index ba33696978e0..b384bfdc4e3f 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MDT_DIGITIZATION_RT_RELATION_DB_DIGITOOL_H
@@ -14,21 +14,14 @@ Adopted from RT_Relation_DigiTool
 #include "MDT_Digitization/MdtDigiToolOutput.h"
 #include "MDT_Digitization/IMDT_DigitizationTool.h"
 #include "Identifier/Identifier.h"
-
 #include "MdtCalibData/TrRelation.h"
 #include "MdtCalibData/IRtRelation.h"
 #include "MdtCalibData/IRtResolution.h"
-
 #include "MdtCalibData/MdtRtRelation.h"
 #include "MdtCalibSvc/MdtCalibrationDbTool.h"
 #include "MdtCalibData/MdtFullCalibData.h"
-
 #include "CLHEP/Random/RandFlat.h"
-//#include "CLHEP/Random/RandGauss.h"
 #include "CLHEP/Random/RandGaussZiggurat.h"
-
-//#include "MuonIdHelpers/MdtIdHelper.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
 
 namespace MuonGM{
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
index f0cc707c63e0..06233836b501 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
@@ -730,7 +730,7 @@ StatusCode MM_DigitizationTool::doDigitization(const EventContext& ctx) {
       //
       // Sanity Checks
       //      
-      if( !m_idHelperSvc->mmIdHelper().is_mm(layerID) ){
+      if( !m_idHelperSvc->isMM(layerID) ){
 	ATH_MSG_WARNING("layerID does not represent a valid MM layer: "
 			<< m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(layerID)) );
 	continue;
@@ -739,11 +739,11 @@ StatusCode MM_DigitizationTool::doDigitization(const EventContext& ctx) {
       std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(layerID));
       int isSmall = stName[2] == 'S';
       
-      if( m_idHelperSvc->mmIdHelper().is_mdt(layerID)
-	  || m_idHelperSvc->mmIdHelper().is_rpc(layerID)
-	  || m_idHelperSvc->mmIdHelper().is_tgc(layerID)
-	  || m_idHelperSvc->mmIdHelper().is_csc(layerID)
-	  || m_idHelperSvc->mmIdHelper().is_stgc(layerID)
+      if( m_idHelperSvc->isMdt(layerID)
+	  || m_idHelperSvc->isRpc(layerID)
+	  || m_idHelperSvc->isTgc(layerID)
+	  || m_idHelperSvc->isCsc(layerID)
+	  || m_idHelperSvc->issTgc(layerID)
 	  ){
 	ATH_MSG_WARNING("MM id has wrong technology type! ");
 	m_exitcode = 9;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
index cfac1fa4a748..87d31193e67f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
@@ -14,8 +14,6 @@
 #include "MuonPrepRawData/MMPrepData.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
-#include "MuonIdHelpers/MuonIdHelperSvc.h"
-
 namespace Muon {
 class ClusterTimeProjectionMMClusterBuilderTool :
   virtual public IMMClusterBuilderTool,
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx
index f4f6172b2121..7e41616579bf 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx
@@ -1,11 +1,7 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// AlgTool used for MuonClusterOnTrack object production
-///////////////////////////////////////////////////////////////////
-
 #include "CscClusterOnTrackCreator.h"
 #include "TrkEventPrimitives/LocalParameters.h"
 #include "TrkEventPrimitives/LocalDirection.h"
@@ -175,28 +171,28 @@ namespace Muon {
     Amg::MatrixX  loce = RIO.localCovariance();
 
     if ( m_doCsc
-         && m_idHelperSvc->cscIdHelper().is_csc(RIO.identify())
+         && m_idHelperSvc->isCsc(RIO.identify())
          && !m_cscErrorScalingKey.key().empty()) {
       SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey );
       loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi);
       ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << loce(0,0) );
     }
     if ( m_doRpc
-	 && m_idHelperSvc->rpcIdHelper().is_rpc(RIO.identify())
+	 && m_idHelperSvc->isRpc(RIO.identify())
 	 && !m_rpcErrorScalingKey.key().empty()) {
       SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_rpcErrorScalingKey );
       loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi);
       ATH_MSG_VERBOSE ( "RPC: new cov(0,0) is " << loce(0,0) );
     }
     if ( m_doTgc
-	 && m_idHelperSvc->tgcIdHelper().is_tgc(RIO.identify())
+	 && m_idHelperSvc->isTgc(RIO.identify())
 	 && !m_tgcErrorScalingKey.key().empty() ) {
       SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_tgcErrorScalingKey );
       loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi);
       ATH_MSG_VERBOSE ( "TGC: new cov(1,1) is " << loce(0,0) );
     }
 
-    if(  m_doRpc && m_idHelperSvc->rpcIdHelper().is_rpc(RIO.identify()) ){
+    if(  m_doRpc && m_idHelperSvc->isRpc(RIO.identify()) ){
       // cast to RpcPrepData
       const RpcPrepData* MClus   = dynamic_cast<const RpcPrepData*> (&RIO);
       if (!MClus) {
@@ -205,7 +201,7 @@ namespace Muon {
       }
       MClT = new RpcClusterOnTrack(MClus,locpar,loce,positionAlongStrip);
 
-    }else if( m_doTgc && m_idHelperSvc->tgcIdHelper().is_tgc(RIO.identify()) ){
+    }else if( m_doTgc && m_idHelperSvc->isTgc(RIO.identify()) ){
       
       // cast to TgcPrepData
       const TgcPrepData* MClus   = dynamic_cast<const TgcPrepData*> (&RIO);
@@ -249,7 +245,7 @@ namespace Muon {
           
       MClT = new TgcClusterOnTrack(MClus,locpar,loce,positionAlongStrip);
 
-    } else if ( m_doCsc && m_idHelperSvc->cscIdHelper().is_csc(RIO.identify()) ){
+    } else if ( m_doCsc && m_idHelperSvc->isCsc(RIO.identify()) ){
       
       // cast to CscPrepData
       const CscPrepData* MClus   = dynamic_cast<const CscPrepData*> (&RIO);
@@ -272,7 +268,7 @@ namespace Muon {
   createRIO_OnTrack(const Trk::PrepRawData& RIO, const Amg::Vector3D& GP,
                     const Amg::Vector3D& GD) const {
 
-    if ( ! ( m_doCsc && m_idHelperSvc->cscIdHelper().is_csc(RIO.identify()) ) ) {
+    if ( ! ( m_doCsc && m_idHelperSvc->isCsc(RIO.identify()) ) ) {
       ATH_MSG_WARNING ( "CscClusterOnTrackCreator::createRIO_OnTrack is called by the other muon tech" );
       return 0;
     }
@@ -296,7 +292,7 @@ namespace Muon {
     // in RIO_OnTrack the local param and cov should have the same dimension
     Trk::LocalParameters locpar = Trk::LocalParameters (RIO.localPosition ());
     if (RIO.localCovariance().cols() > 1 || 
-	(m_idHelperSvc->tgcIdHelper().is_tgc(RIO.identify()) && m_idHelperSvc->tgcIdHelper().isStrip(RIO.identify()))) {
+	(m_idHelperSvc->isTgc(RIO.identify()) && m_idHelperSvc->tgcIdHelper().isStrip(RIO.identify()))) {
       ATH_MSG_VERBOSE ( "Making 2-dim local parameters" );
     } else {
       Trk::DefinedParameter  radiusPar(RIO.localPosition().x(),Trk::locX);
@@ -320,7 +316,7 @@ namespace Muon {
     Amg::MatrixX  loce = RIO.localCovariance();
     
     if ( m_doCsc 
-	 && m_idHelperSvc->cscIdHelper().is_csc(RIO.identify())
+	 && m_idHelperSvc->isCsc(RIO.identify())
          && !m_cscErrorScalingKey.key().empty()) {
       SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey );
       loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi);
@@ -340,15 +336,10 @@ namespace Muon {
       Transform3D globalToLocal = ele->transform(MClus->identify()).inverse();
       Vector3D d(globalToLocal*GD);
       double tantheta = d.x()/d.z();
-      
-      //        ICscClusterFitter::StripFitList sfits;
-      //        sfits.erase(sfits.begin(), sfits.end());
-      //        m_clusterUtilTool->getStripFits(MClus,sfits);
-      
+
       std::vector<ICscClusterFitter::Result> results, results0;
       results = m_clusterUtilTool->getRefitCluster(MClus,tantheta);
       results0 = m_clusterUtilTool->getRefitCluster(MClus,0);
-      //        results = m_clusterFitter->fit(sfits,tantheta);
       
       ICscClusterFitter::Result res, res0;
       res = results[0];
@@ -375,15 +366,11 @@ namespace Muon {
 
       Amg::MatrixX newloce( Amg::MatrixX(1,1) );
       newloce.setIdentity();
-      //        mat *= res.dposition*res.dposition;
       newloce *= errorCorrected*errorCorrected;
       if (!m_cscErrorScalingKey.key().empty()) {
         SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey );
         newloce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( newloce, Trk::distPhi);
       }
-
-      //        pcov = pcov_beforeScale;
-      //        Trk::ErrorMatrix* newloce = new Trk::ErrorMatrix(pcov);
       
       ATH_MSG_VERBOSE ( "All: new err matrix is " << newloce );
       ATH_MSG_VERBOSE ( "  dpos changed ====> " << Amg::error(newloce,Trk::loc1) ); 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValAlg.cxx
index 609dc1436d75..1ee57d837ba0 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValAlg.cxx
@@ -770,7 +770,7 @@ bool CSCSegmValAlg::isCscSegment( const Muon::MuonSegment* seg ) const {
     if( !rot ) {
       continue;
     }
-    if( m_idHelperSvc->cscIdHelper().is_csc( rot->identify() ) ) isCsc=true;
+    if( m_idHelperSvc->isCsc( rot->identify() ) ) isCsc=true;
   }
 
   return isCsc;
@@ -793,7 +793,7 @@ unsigned int CSCSegmValAlg::cscHits( const Muon::MuonSegment* seg ) const {
     if( !rot ) {
       continue;
     }
-    if( m_idHelperSvc->cscIdHelper().is_csc( rot->identify() ) ) ++nrHits;
+    if( m_idHelperSvc->isCsc( rot->identify() ) ) ++nrHits;
   }
 
   return nrHits ;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
index d2d33d881c8d..b0e3fde3bf7e 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
@@ -1169,8 +1169,8 @@ StatusCode MdtRawDataMonAlg::handleEvent_effCalc_fillVects(const Trk::SegmentCol
       std::vector<float> traversed_distance;    
       for( unsigned i_chamber=0; i_chamber<unique_chambers.size(); i_chamber++) {
         Identifier station_id = unique_chambers.at(i_chamber);
-        if( !m_idHelperSvc->mdtIdHelper().is_mdt( station_id ) ) {
-          ATH_MSG_DEBUG("is_mdt() returned false in segm-based mdt eff calc" );
+        if( !m_idHelperSvc->isMdt( station_id ) ) {
+          ATH_MSG_DEBUG("Non-MDT station Identifier in segm-based mdt eff calc" );
         }
         std::string hardware_name = getChamberName(station_id); 
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
index 66be19e7ae9c..39aa54d3a6b3 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
@@ -445,9 +445,8 @@ StatusCode MdtRawDataValAlg::fillHistograms()
           for (const Trk::MeasurementBase* hit : *trk->measurementsOnTrack()) {
 	    const Trk::RIO_OnTrack* rot_from_track = dynamic_cast<const Trk::RIO_OnTrack*>(hit);
 	    if(!rot_from_track) continue;
-	    //              rot_from_track->dump(msg());
 	    Identifier rotId = rot_from_track->identify();
-	    if(!m_idHelperSvc->mdtIdHelper().is_mdt(rotId)) continue;
+	    if(!m_idHelperSvc->isMdt(rotId)) continue;
 	    IdentifierHash mdt_idHash;
 	    MDTChamber* mdt_chamber = 0;
 	    m_idHelperSvc->mdtIdHelper().get_module_hash( rotId, mdt_idHash );
@@ -1878,8 +1877,8 @@ StatusCode MdtRawDataValAlg::handleEvent_effCalc(const Trk::SegmentCollection* s
       std::vector<float> traversed_distance;    
       for( unsigned i_chamber=0; i_chamber<unique_chambers.size(); i_chamber++) {
         Identifier station_id = unique_chambers.at(i_chamber);
-        if( !m_idHelperSvc->mdtIdHelper().is_mdt( station_id ) ) {
-          ATH_MSG_DEBUG("is_mdt() returned false in segm-based mdt eff calc" );
+        if( !m_idHelperSvc->isMdt( station_id ) ) {
+          ATH_MSG_DEBUG("Found non-MDT station identifier in segm-based mdt eff calc" );
         }
         std::string hardware_name = getChamberName(station_id); 
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/MdtVsTgcRawData_maptgchits.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/MdtVsTgcRawData_maptgchits.cxx
index 7f93ee50b68e..619eb00e39c9 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/MdtVsTgcRawData_maptgchits.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/MdtVsTgcRawData_maptgchits.cxx
@@ -64,8 +64,8 @@ MdtVsTgcRawDataValAlg::maphists(const xAOD::MuonSegmentContainer *newsegment,
       Identifier id = rio->identify();
       stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
       // Flag Segments with ROTs in the MDT & Endcap
-      if(m_idHelperSvc->mdtIdHelper().is_mdt(id))isMdt=true;
-      if(m_idHelperSvc->mdtIdHelper().isEndcap(id))isEndcap=true;
+      if(m_idHelperSvc->isMdt(id))isMdt=true;
+      if(m_idHelperSvc->isEndcap(id))isEndcap=true;
       // If ROT is MDT
       if((stationName==13)||(stationName==49)){nMdtMeas[0]++;}
       if((stationName==14)||(stationName==15)){nMdtMeas[1]++;}
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/functions/MdtVsTgcRawData_SegmSorting.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/functions/MdtVsTgcRawData_SegmSorting.cxx
index f9a1afb12831..8087e4bd2cf7 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/functions/MdtVsTgcRawData_SegmSorting.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsTgcRawDataMonitoring/src/functions/MdtVsTgcRawData_SegmSorting.cxx
@@ -54,8 +54,8 @@ MdtVsTgcRawDataValAlg::SortMDTSegments(const xAOD::MuonSegmentContainer *newsegm
       Identifier id = rio->identify();
       
       // Identify MDT Endcap Segments
-      if(m_idHelperSvc->mdtIdHelper().is_mdt(id))isMdt=true;
-      if(m_idHelperSvc->mdtIdHelper().isEndcap(id))isEndcap=true;
+      if(m_idHelperSvc->isMdt(id))isMdt=true;
+      if(m_idHelperSvc->isEndcap(id))isEndcap=true;
       
       int stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
       // Large (L) = odd, greater r, Small (S) = even, lower r
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
index 813fcaefbc77..d775ea4ceed1 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
@@ -2548,7 +2548,7 @@ int TrigMuonEFStandaloneTrackTool::segmentMonitoring(const std::vector< const Mu
       Trk::RIO_OnTrack* rio = const_cast<Trk::RIO_OnTrack*> ((*segment)->rioOnTrack(irio));
       if(!rio) continue;
       Identifier rioId = rio->identify();
-      if(m_idHelperSvc->mdtIdHelper().is_mdt(rioId)) {
+      if(m_idHelperSvc->isMdt(rioId)) {
 	nMdt++;
 	const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(rio);
 	if(mdt!=0){
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx b/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
index cc9fadfa6e14..7db2f2d96118 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
+++ b/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
@@ -290,7 +290,7 @@ StatusCode TrigT1RPC::fill_RPCdata(RPCsimuData& data, const RpcCablingCondData*
  
         Identifier moduleId = rpcCollection->identify();
 
-	if (m_idHelperSvc->rpcIdHelper().is_rpc(moduleId))
+	if (m_idHelperSvc->isRpc(moduleId))
         {
             digit_iterator it1_digit = rpcCollection->begin();
             digit_iterator it2_digit = rpcCollection->end();
-- 
GitLab


From 71e89fa6f6a90868636ceb6c080ba1d52ad2a6bc Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 5 Jun 2020 19:30:37 +0200
Subject: [PATCH 019/266] Add option to select chains for testing

---
 .../TriggerJobOpts/share/runHLT_standalone.py          |  4 ++++
 .../python/HLTMenuConfig/Menu/GenerateMenuMT.py        | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
index b2e87311ae2a..55dcf2d24558 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
@@ -61,6 +61,7 @@ class opt:
     filterViews       = False
     enabledSignatures = []
     disabledSignatures = []
+    selectChains      = []
 
 
 #
@@ -491,6 +492,9 @@ if not opt.createHLTMenuExternally:
 
     menu.overwriteSignaturesWith(signaturesToGenerate)
 
+    if (opt.selectChains):
+        menu.selectChainsForTesting = opt.selectChains
+
     # generating the HLT structure requires 
     # the L1Decoder to be defined in the topSequence
     menu.generateMT()
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
index 740b3f98c1ae..cc9977e247f1 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
@@ -53,6 +53,7 @@ class GenerateMenuMT(object):
         self.chains = []
         self.chainDefs = []
         self.listOfErrorChainDefs = []
+        self.selectChainsForTesting = []
         self.signaturesOverwritten = False
         self.L1Prescales = None
         self.HLTPrescales = None
@@ -209,6 +210,15 @@ class GenerateMenuMT(object):
 
         log.info("The following signature(s) is (are) enabled: %s", self.signaturesToGenerate)
 
+        if self.selectChainsForTesting:
+            log.info("Narrowing down the list of chains with the selectChainsForTesting list")
+            selectedChains = [ch for ch in chains if ch.name in self.selectChainsForTesting]
+            if len(selectedChains) < len(self.selectChainsForTesting):
+                selectedNames = [ch.name for ch in selectedChains]
+                missingNames = [name for name in self.selectChainsForTesting if name not in selectedNames]
+                log.warning("The following chains were specified in selectChainsForTesting but were not found in the menu: %s", str(missingNames))
+            chains = selectedChains
+
         if len(chains) == 0:
             log.warning("There seem to be no chains in the menu - please check")
         else:
-- 
GitLab


From 53c5b07660f02bcff3de8bd10f38ecfbc480cf66 Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Fri, 5 Jun 2020 12:03:59 +0200
Subject: [PATCH 020/266] Declare undeclared tool handles
 (InDetVKalVxInJetTool).

---
 .../InDetVKalVxInJetTool/InDetTrkInJetType.h                 | 5 +++--
 .../InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx           | 5 ++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h
index 5a78a28cd76f..cd8d96797cd8 100644
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 //
 // InDetTrkInJetType.h - Description
@@ -88,7 +88,8 @@ namespace InDet {
     float m_Z0_limLow{};
     float m_Z0_limUpp{};
     std::string m_calibFileName;
-    ToolHandle < Trk::IVertexFitter >  m_fitterSvc;
+    ToolHandle < Trk::IVertexFitter >  m_fitterSvc
+       {this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool",""};
     Trk::TrkVKalVrtFitter*   m_fitSvc{};
 
     int m_initialised{};
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx
index 7f07f8823df5..5dc403055364 100644
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetVKalVxInJetTool/InDetTrkInJetType.h"
@@ -34,8 +34,7 @@ InDetTrkInJetType::InDetTrkInJetType(const std::string& type,
   m_d0_limUpp( 5.),
   m_Z0_limLow(-8.),
   m_Z0_limUpp(12.),
-  m_calibFileName("TrackClassif_3cl.v02.xml"),
-  m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this)
+  m_calibFileName("TrackClassif_3cl.v02.xml")
   {
      declareProperty("trkSctHits",   m_trkSctHitsCut   ,  "Cut on track SCT hits number" );
      declareProperty("trkPixelHits", m_trkPixelHitsCut ,  "Cut on track Pixel hits number" );
-- 
GitLab


From 7f733fea6265b718d1c6e0367675cc14d7b7145a Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Fri, 5 Jun 2020 12:27:35 +0200
Subject: [PATCH 021/266] Declare undeclared tool handles
 (InDetPerformanceMonitoring).

---
 .../InDetPerformanceMonitoring/IDPerfMonEoverP.h             | 5 +++--
 .../InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx       | 3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h
index 537e6c69908a..06d98ff9872a 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IDPerfMonEoverP_H
@@ -161,7 +161,8 @@ class IDPerfMonEoverP : public AthAlgorithm
   ToolHandle<Trig::TrigDecisionTool> m_trigDec;
 
   /** @brief jet selector tool */
-  ToolHandle< IJetSelector > m_jetCleaningTool;
+  ToolHandle< IJetSelector > m_jetCleaningTool
+     {this,"JetCleaningTool","JetCleaningTool/JetCleaningTool",""};
 
   /* Flag for refitting*/
   bool                            m_refitEverything;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
index 2bc93401bc94..c7b75cbfd7e9 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
@@ -1,5 +1,5 @@
  /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -152,7 +152,6 @@ StatusCode IDPerfMonEoverP::initialize()
   ATH_CHECK( m_evt.initialize() );
 
   // Retrieve Jet selector tool
-  m_jetCleaningTool.setTypeAndName("JetCleaningTool/JetCleaningTool");
   CHECK( m_jetCleaningTool.retrieve() );
 
   // Retrieve fitter
-- 
GitLab


From b4da9b8d40bb38dcdb4d5fddfaeff79dfdb0c41a Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Fri, 5 Jun 2020 12:50:10 +0200
Subject: [PATCH 022/266] Declare undeclared tool handles (InDetJiveXML).

---
 .../InDetJiveXML/InDetJiveXML/PixelClusterRetriever.h      | 5 +++--
 .../InDetJiveXML/InDetJiveXML/PixelRDORetriever.h          | 5 +++--
 .../InDetJiveXML/InDetJiveXML/SCTRDORetriever.h            | 5 +++--
 .../InDetJiveXML/InDetJiveXML/SiClusterRetriever.h         | 7 ++++---
 .../InDetJiveXML/InDetJiveXML/SiSpacePointRetriever.h      | 7 ++++---
 .../InDetEventCnv/InDetJiveXML/InDetJiveXML/TRTRetriever.h | 5 +++--
 .../InDetJiveXML/src/PixelClusterRetriever.cxx             | 6 +++---
 .../InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx   | 7 +++----
 .../InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx     | 5 ++---
 .../InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx  | 6 +++---
 .../InDetJiveXML/src/SiSpacePointRetriever.cxx             | 6 +++---
 .../InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx        | 7 +++----
 12 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelClusterRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelClusterRetriever.h
index 1eaeea533f7e..766008654bdd 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelClusterRetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelClusterRetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_PIXELCLUSTERRETRIEVER_H
@@ -58,7 +58,8 @@ namespace JiveXML
       const std::string m_typeName;
 
       /// A tool handle to the geo model tool
-      const ToolHandle<IInDetGeoModelTool> m_geo;
+      const ToolHandle<IInDetGeoModelTool> m_geo
+         {this, "GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""};
 
       /// The StoreGate key for the SiClusterCollection to retrieve
       std::string m_PixelClusterCollName;
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
index c802fcf7bbf8..c70befa4d9a8 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_PIXELRDORETRIEVER_H
@@ -50,7 +50,8 @@ namespace JiveXML {
       const std::string m_typeName;
 
       /// A tool handle to the geo model tool
-      const ToolHandle<IInDetGeoModelTool> m_geo;
+      const ToolHandle<IInDetGeoModelTool> m_geo
+         {this,"GeoModelTool", "JiveXML::InDetGeoModelTool/InDetGeoModelTool","" };
 
       /// A tool handle to the SiLorentzAngleTool
       ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
index 46f0de3eeac5..95f3790007f2 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_SCTRDORETRIEVER_H
@@ -56,7 +56,8 @@ namespace JiveXML {
     const std::string m_typeName;
     
     /// A tool handle to the geo model tool
-    const ToolHandle<IInDetGeoModelTool> m_geo;
+    const ToolHandle<IInDetGeoModelTool> m_geo
+       {this, "GeoModelTool", "JiveXML::InDetGeoModelTool/InDetGeoModelTool",""};
 
     /// A tool handle to the SiLorentzAngleTool
     ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
index d99377f3cf22..ac9d06269f8c 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_SICLUSTERRETRIEVER_H
@@ -59,8 +59,9 @@ namespace JiveXML
       const std::string m_typeName;
 
       /// A tool handle to the geo model tool
-      const ToolHandle<IInDetGeoModelTool> m_geo;
-   
+      const ToolHandle<IInDetGeoModelTool> m_geo
+         {this,"GeoModelTool", "JiveXML::InDetGeoModelTool/InDetGeoModelTool",""};
+
       /// The StoreGate key for the SiClusterCollection to retrieve
       std::string m_SiClusterCollName;
       /// The StoreGate key for the PRD MultiTruthMap with the track associations
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiSpacePointRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiSpacePointRetriever.h
index 490107368015..90da7f24f5a9 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiSpacePointRetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiSpacePointRetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_SISPACEPOINTRETRIEVER_H
@@ -55,8 +55,9 @@ namespace JiveXML{
       const std::string m_typeName;
 
       /// A tool handle to the geo model tool
-      const ToolHandle<IInDetGeoModelTool> m_geo;
-     
+      const ToolHandle<IInDetGeoModelTool> m_geo
+         {this,"GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""};
+
       /** StoreGate key for Pixel space points*/
       SG::ReadHandleKey<SpacePointContainer> m_PixelSPContainerName;
       /** StoreGate key for SCT space points*/
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/TRTRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/TRTRetriever.h
index c4e82d105883..691c77a2ebf4 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/TRTRetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/TRTRetriever.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JIVEXML_TRTRETRIEVER_H
@@ -63,7 +63,8 @@ namespace JiveXML{
       const std::string m_typeName;
       
       /// A tool handle to the geo model tool
-      const ToolHandle<IInDetGeoModelTool> m_geo;
+      const ToolHandle<IInDetGeoModelTool> m_geo
+         {this,"GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""};
 
       /// The StoreGate key for the TRT Cluster collection to retrieve
       SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> m_TRTDriftCircleCollKey{ this, "TRTClusters", "TRT_DriftCircles", "Container name for TRT Drift Circles" }; 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx
index 10c9ac7e4376..114370e3175c 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetJiveXML/PixelClusterRetriever.h"
@@ -27,8 +27,8 @@ namespace JiveXML {
    **/
   PixelClusterRetriever::PixelClusterRetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("PixCluster"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
+    m_typeName("PixCluster")
+  {
 
     //Only declare the interface
     declareInterface<IDataRetriever>(this);
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
index fc67a45376fb..254345bbd151 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetJiveXML/PixelRDORetriever.h"
@@ -23,9 +23,8 @@ namespace JiveXML {
    **/
   PixelRDORetriever::PixelRDORetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("PixelRDO"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
-    
+    m_typeName("PixelRDO")
+  {
     //Declare the interface
     declareInterface<IDataRetriever>(this);
 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
index 6b70be5054a6..1c69277b23e6 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
@@ -24,9 +24,8 @@ namespace JiveXML {
    **/
   SCTRDORetriever::SCTRDORetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("SCTRDO"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
-
+    m_typeName("SCTRDO")
+  {
     //Declare the interface
     declareInterface<IDataRetriever>(this);
 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
index 0f8a3c0cf60f..acc3b69e8ef5 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetJiveXML/SiClusterRetriever.h"
@@ -27,8 +27,8 @@ namespace JiveXML {
    **/
   SiClusterRetriever::SiClusterRetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("STC"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
+    m_typeName("STC")
+  {
 
     //Only declare the interface
     declareInterface<IDataRetriever>(this);
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
index 4d2baf2946cf..f2f539b18f10 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetJiveXML/SiSpacePointRetriever.h"
@@ -28,8 +28,8 @@ namespace JiveXML
    **/
   SiSpacePointRetriever::SiSpacePointRetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("S3D"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
+    m_typeName("S3D")
+  {
 
     //Declare the interface
     declareInterface<IDataRetriever>(this);
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx
index 7786ce960e51..9ff0c7d6eeba 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetJiveXML/TRTRetriever.h"
@@ -24,9 +24,8 @@ namespace JiveXML {
    **/
   TRTRetriever::TRTRetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_typeName("TRT"),
-    m_geo("JiveXML::InDetGeoModelTool/InDetGeoModelTool",this){
-
+    m_typeName("TRT")
+  {
     //Only declare the interface
     declareInterface<IDataRetriever>(this);
   }
-- 
GitLab


From 3f0b954cedde6770e17e42f4d8988a51dc2302d5 Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Fri, 5 Jun 2020 13:49:30 +0200
Subject: [PATCH 023/266] Declare undeclared tool handles
 (InDetRegionSelector).

---
 .../InDetRegionSelector/SiRegionSelectorTable.h      |  5 +++--
 .../InDetRegionSelector/TRT_RegionSelectorTable.h    |  3 +--
 .../src/SiRegionSelectorTable.cxx                    | 12 +++---------
 .../InDetRegionSelector/src/TRT_RegSelCondAlg.h      |  1 -
 4 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
index ab1d346ae043..4d3b1cbccc2b 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
  
 #ifndef InDetRegionSelector_SiRegionSelectorTable_h
@@ -48,7 +48,8 @@ private:
   bool m_noDBM;
 
   // cablings
-  ToolHandle<ISCT_CablingTool>  m_sctCablingToolInc; // This class accesses SCT cabling during initialization.
+  PublicToolHandle<ISCT_CablingTool>  m_sctCablingToolInc // This class accesses SCT cabling during initialization.
+    {this, "SCT_CablingTool", "SCT_CablingToolInc", "Tool to retrieve SCT Cabling"};
 
   SG::ReadCondHandleKey<PixelCablingCondData> m_condCablingKey
     {this, "PixelCablingCondData", "PixelCablingCondData", "Pixel cabling key"};
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/TRT_RegionSelectorTable.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/TRT_RegionSelectorTable.h
index 3b8b4cd14e84..24218c9ffcb4 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/TRT_RegionSelectorTable.h
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/TRT_RegionSelectorTable.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef InDetRegionSelector_TRT_RegionSelectorTable_h
@@ -9,7 +9,6 @@
 
 
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
 #include <string>
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
index 3b15c6c51b1a..0e774353f57d 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
   
 #include "InDetRegionSelector/SiRegionSelectorTable.h"
@@ -38,8 +38,7 @@ SiRegionSelectorTable::SiRegionSelectorTable(const std::string& type,
      m_roiFileName("RoITable.txt"),
      m_printHashId(true),
      m_printTable(false),
-     m_noDBM(true),
-     m_sctCablingToolInc("SCT_CablingToolInc")
+     m_noDBM(true)
 {
   declareInterface<IRegionIDLUT_Creator>(this);
   declareProperty("ManagerName", m_managerName);
@@ -121,12 +120,7 @@ SiRegionSelectorTable::createTable()
     if ( msgLvl(MSG::DEBUG) )  msg(MSG::DEBUG) << "Manager found" << endmsg;
   }
 
-  if (!manager->isPixel()) { // SCT
-    if (m_sctCablingToolInc.retrieve().isFailure()) {
-      msg(MSG::ERROR) << "Can't get the SCT_CablingToolInc." << endmsg;
-      return StatusCode::FAILURE;
-    }
-  }
+  ATH_CHECK(m_sctCablingToolInc.retrieve( DisableTool{manager->isPixel()} ));
 
   // Create RegionSelectorLUT pointers for Pixel or Sct
   //  RegionSelectorLUT*  rslut = new RegionSelectorLUT;
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.h
index a403458913a2..c86a0f719621 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.h
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.h
@@ -16,7 +16,6 @@
 
 #include "GaudiKernel/ISvcLocator.h"
 
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/EventIDRange.h"
 
 #include "TRT_Cabling/ITRT_CablingSvc.h"
-- 
GitLab


From 398d0923760bd504e7f6394645db4004de63fa7d Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Fri, 5 Jun 2020 20:52:42 +0200
Subject: [PATCH 024/266] Use private tools in TileCellMaker

Configuration of TileCellMaker has been updated to use private tools
and the corresponding JO have been update accordingly.
---
 .../share/jobOptions_TileCalibRec.py          |  14 +--
 .../TileSimEx/share/jobOptions_Tile_Dig.py    |   2 +-
 .../share/jobOptions_TileTBMon.py             |   6 +-
 .../TileRec/share/TileCellMaker_jobOptions.py |  40 +++---
 .../TileCellMaker_jobOptions_doublegain.py    | 118 ++++++------------
 .../share/LArL1CaloRampMaker.py               |   2 +-
 .../share/TileL1CaloRampMaker.py              |   2 +-
 7 files changed, 67 insertions(+), 117 deletions(-)

diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
index 1fdf48a9284d..32663d765300 100644
--- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
+++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
@@ -979,20 +979,18 @@ if doCaloCell:
    # create TileCell from TileRawChannel and store it in CaloCellContainer
    if TileBiGainRun: 
        include( "TileRec/TileCellMaker_jobOptions_doublegain.py" )
-       ToolSvc.TileCellBuilderLG.SkipGain = 1
-       ToolSvc.TileCellBuilderHG.SkipGain = 0
        if OldRun: # disable masking on the fly
-           ToolSvc.TileCellBuilderLG.TileDSPRawChannelContainer=""
-           ToolSvc.TileCellBuilderHG.TileDSPRawChannelContainer=""
+           topSequence.CaloCellMakerLG.CaloCellMakerToolNames["TileCellBuilderLG"].TileDSPRawChannelContainer=""
+           topSequence.CaloCellMakerHG.CaloCellMakerToolNames["TileCellBuilderHG"].TileDSPRawChannelContainer=""
    else: 
        include( "TileRec/TileCellMaker_jobOptions.py" )
        if OldRun: # disable masking on the fly
-           ToolSvc.TileCellBuilder.TileDSPRawChannelContainer=""
+           topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].TileDSPRawChannelContainer=""
        if doRecoESD:
            topSequence.CaloCellMaker.CaloCellsOutputName = "AllCaloNewReco"
-           ToolSvc.TileCellBuilder.MBTSContainer = "MBTSContainerNewReco"
-           ToolSvc.TileCellBuilder.E4prContainer = "E4prContainerNewReco"
-           ToolSvc.TileCellBuilder.TileDSPRawChannelContainer=""
+           topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].MBTSContainer = "MBTSContainerNewReco"
+           topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].E4prContainer = "E4prContainerNewReco"
+           topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].TileDSPRawChannelContainer=""
 
 if doTileTower:
     include( "CaloRec/CaloCombinedTower_jobOptions.py" )
diff --git a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py b/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py
index 4ecb91a80fe0..c002faa95e2c 100755
--- a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py
+++ b/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py
@@ -280,7 +280,7 @@ else:
 if doD3PDCell or doD3PDCellInfo or doD3PDMBTS :
     # create TileCell from TileRawChannel and store it in CaloCellContainer
     include( 'TileRec/TileCellMaker_jobOptions.py' )
-    ToolSvc.TileCellBuilder.maskBadChannels = False
+    topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].maskBadChannels = False
 
 # write all digits
 #if DetFlags.writeRDOPool.Tile_on():
diff --git a/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py b/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
index 0bc93c7dd42f..6054ff12fe7e 100644
--- a/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
+++ b/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
@@ -295,12 +295,10 @@ if doTileCells:
     doCaloNeighborsCorr = False
     if TileBiGainRun:
         include( "TileRec/TileCellMaker_jobOptions_doublegain.py" )
-        ToolSvc.TileCellBuilderLG.SkipGain = 1
-        ToolSvc.TileCellBuilderHG.SkipGain = 0
     else:
         include('TileRec/TileCellMaker_jobOptions.py')
-        ToolSvc.TileCellBuilder.UseDemoCabling = UseDemoCabling
-        ToolSvc.TileCellBuilder.maskBadChannels = False
+        topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].UseDemoCabling = UseDemoCabling
+        topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].maskBadChannels = False
 
 from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault
 TileDQstatusAlgDefault()
diff --git a/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions.py b/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions.py
index 57e8f5b1d102..37ef3595917f 100755
--- a/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions.py
+++ b/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions.py
@@ -14,18 +14,14 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 topSequence += theCaloCellMaker
  
-from AthenaCommon.AppMgr import ToolSvc
-
-if not hasattr( ToolSvc, "TileCellBuilder" ):
-    from TileRecUtils.TileRecUtilsConf import TileCellBuilder
-    theTileCellBuilder=TileCellBuilder()
-    ToolSvc += theTileCellBuilder
+from TileRecUtils.TileRecUtilsConf import TileCellBuilder
+theTileCellBuilder=TileCellBuilder()
 
 from TileRecUtils.TileRecFlags import jobproperties
-ToolSvc.TileCellBuilder.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
-ToolSvc.TileCellBuilder.maskBadChannels = True
+theTileCellBuilder.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
+theTileCellBuilder.maskBadChannels = True
 
-theCaloCellMaker.CaloCellMakerToolNames += [ ToolSvc.TileCellBuilder.getFullName() ]
+theCaloCellMaker.CaloCellMakerToolNames += [ theTileCellBuilder ]
 
 nf = jobproperties.TileRecFlags.noiseFilter()
 n3 = nf - nf%100
@@ -34,33 +30,29 @@ n2 = nf - n3 - nf%10
 if n2 == 10:
     from TileRecUtils.TileRecUtilsConf import TileRawChannelNoiseFilter
     theTileRawChannelNoiseFilter = TileRawChannelNoiseFilter()
-    ToolSvc += theTileRawChannelNoiseFilter
-    ToolSvc.TileCellBuilder.NoiseFilterTools = [theTileRawChannelNoiseFilter]
+    theTileCellBuilder.NoiseFilterTools = [theTileRawChannelNoiseFilter]
 
 if n3 == 100:
     from TileRecUtils.TileRecUtilsConf import TileCellNoiseFilter
     theTileCellNoiseFilter = TileCellNoiseFilter()
-    ToolSvc += theTileCellNoiseFilter
-    theCaloCellMaker.CaloCellMakerToolNames += [ ToolSvc.TileCellNoiseFilter.getFullName() ]
+    theCaloCellMaker.CaloCellMakerToolNames += [theTileCellNoiseFilter]
 
 from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
-theCaloCellMaker.CaloCellMakerToolNames += [ CaloCellContainerFinalizerTool() ]
+theCaloCellContainerFinalizerTool = CaloCellContainerFinalizerTool()
+theCaloCellMaker.CaloCellMakerToolNames += [theCaloCellContainerFinalizerTool]
 
 if ('doCaloNeighborsCorr' in dir()) and doCaloNeighborsCorr:
-    if not hasattr( ToolSvc, "CaloCellNeighborsAverageCorr" ):
-        from CaloCellCorrection.CaloCellCorrectionConf import CaloCellNeighborsAverageCorr
-        theCaloCellNeighborsAverageCorr = CaloCellNeighborsAverageCorr("CaloCellNeighborsAverageCorr")
-        theCaloCellNeighborsAverageCorr.testMode=False
-        ToolSvc +=  theCaloCellNeighborsAverageCorr
-        theCaloCellMaker.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
-    else:
-        theCaloCellMaker.CaloCellMakerToolNames += ["CaloCellNeighborsAverageCorr"]
+    from CaloCellCorrection.CaloCellCorrectionConf import CaloCellNeighborsAverageCorr
+    theCaloCellNeighborsAverageCorr = CaloCellNeighborsAverageCorr("CaloCellNeighborsAverageCorr")
+    theCaloCellNeighborsAverageCorr.testMode=False
+    theCaloCellMaker.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
 else:
     doCaloNeighborsCorr=False
 
 from CaloRec.CaloRecConf import CaloCellContainerCheckerTool
-theCaloCellMaker.CaloCellMakerToolNames += [CaloCellContainerCheckerTool()]
+theCaloCellContainerCheckerTool = CaloCellContainerCheckerTool()
+theCaloCellMaker.CaloCellMakerToolNames += [theCaloCellContainerCheckerTool]
 
 
 printfunc (theCaloCellMaker)
-printfunc (ToolSvc.TileCellBuilder)
+printfunc (theTileCellBuilder)
diff --git a/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions_doublegain.py b/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions_doublegain.py
index a945942d2c89..df20f349a3aa 100755
--- a/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions_doublegain.py
+++ b/TileCalorimeter/TileRec/share/TileCellMaker_jobOptions_doublegain.py
@@ -1,12 +1,11 @@
 from AthenaCommon.Logging import logging
 mlog = logging.getLogger('TileRecLogger')
-
-try:        
-    from CaloRec.CaloRecConf import CaloCellMaker                
+try:
+    from CaloRec.CaloRecConf import CaloCellMaker
 except:
     mlog.error("could not import CaloRec.CaloCellMaker")
     mlog.error (traceback.format_exc())
-   
+
 theCaloCellMakerLG=CaloCellMaker("CaloCellMakerLG")
 theCaloCellMakerLG.CaloCellsOutputName = "AllCaloLG"
 
@@ -17,35 +16,31 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 topSequence += theCaloCellMakerLG
 topSequence += theCaloCellMakerHG
- 
+
 from AthenaCommon.AppMgr import ToolSvc
 
-if not hasattr( ToolSvc, "TileCellBuilderLG" ):
-    from TileRecUtils.TileRecUtilsConf import TileCellBuilder
-    theTileCellBuilderLG=TileCellBuilder("TileCellBuilderLG")
-    theTileCellBuilderLG.MBTSContainer = "MBTSContainerLG"
-    theTileCellBuilderLG.E4prContainer = "E4prContainerLG"
-    ToolSvc += theTileCellBuilderLG
+from TileRecUtils.TileRecUtilsConf import TileCellBuilder
+theTileCellBuilderLG=TileCellBuilder("TileCellBuilderLG")
+theTileCellBuilderLG.MBTSContainer = "MBTSContainerLG"
+theTileCellBuilderLG.E4prContainer = "E4prContainerLG"
 
-if not hasattr( ToolSvc, "TileCellBuilderHG" ):
-    from TileRecUtils.TileRecUtilsConf import TileCellBuilder
-    theTileCellBuilderHG=TileCellBuilder("TileCellBuilderHG")
-    theTileCellBuilderHG.MBTSContainer = "MBTSContainerHG"
-    theTileCellBuilderHG.E4prContainer = "E4prContainerHG"
-    ToolSvc += theTileCellBuilderHG
+from TileRecUtils.TileRecUtilsConf import TileCellBuilder
+theTileCellBuilderHG=TileCellBuilder("TileCellBuilderHG")
+theTileCellBuilderHG.MBTSContainer = "MBTSContainerHG"
+theTileCellBuilderHG.E4prContainer = "E4prContainerHG"
 
 
 from TileRecUtils.TileRecFlags import jobproperties
-ToolSvc.TileCellBuilderLG.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
-ToolSvc.TileCellBuilderLG.maskBadChannels = True
-ToolSvc.TileCellBuilderLG.SkipGain = 1
+theTileCellBuilderLG.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
+theTileCellBuilderLG.maskBadChannels = True
+theTileCellBuilderLG.SkipGain = 1
 
-ToolSvc.TileCellBuilderHG.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
-ToolSvc.TileCellBuilderHG.maskBadChannels = True
-ToolSvc.TileCellBuilderHG.SkipGain = 0
+theTileCellBuilderHG.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer()
+theTileCellBuilderHG.maskBadChannels = True
+theTileCellBuilderHG.SkipGain = 0
 
-theCaloCellMakerLG.CaloCellMakerToolNames += [ ToolSvc.TileCellBuilderLG.getFullName() ]
-theCaloCellMakerHG.CaloCellMakerToolNames += [ ToolSvc.TileCellBuilderHG.getFullName() ]
+theCaloCellMakerLG.CaloCellMakerToolNames += [theTileCellBuilderLG]
+theCaloCellMakerHG.CaloCellMakerToolNames += [theTileCellBuilderHG]
 
 
 nf = jobproperties.TileRecFlags.noiseFilter()
@@ -55,72 +50,39 @@ n2 = nf - n3 - nf%10
 if n2 == 10:
     from TileRecUtils.TileRecUtilsConf import TileRawChannelNoiseFilter
     theTileRawChannelNoiseFilter = TileRawChannelNoiseFilter()
-    ToolSvc += theTileRawChannelNoiseFilter
-    ToolSvc.TileCellBuilder.NoiseFilterTools = [theTileRawChannelNoiseFilter]
+    theTileCellBuilderLG.NoiseFilterTools = [theTileRawChannelNoiseFilter]
+    theTileCellBuilderHG.NoiseFilterTools = [theTileRawChannelNoiseFilter]
 
 if n3 == 100:
     from TileRecUtils.TileRecUtilsConf import TileCellNoiseFilter
     theTileCellNoiseFilter = TileCellNoiseFilter()
-    ToolSvc += theTileCellNoiseFilter
-    theCaloCellMakerLG.CaloCellMakerToolNames += [ ToolSvc.TileCellNoiseFilterLG.getFullName() ]
-    theCaloCellMakerHG.CaloCellMakerToolNames += [ ToolSvc.TileCellNoiseFilterHG.getFullName() ]
-
-if not hasattr( ToolSvc, "CaloCellContainerFinalizerToolLG" ):
-    from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
-    theCaloCellContainerFinalizerToolLG=CaloCellContainerFinalizerTool("theCaloCellContainerFinalizerToolLG")
-    ToolSvc += theCaloCellContainerFinalizerToolLG
-    theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellContainerFinalizerToolLG ]
-else:
-    theCaloCellMakerLG.CaloCellMakerToolNames += ["CaloCellContainerFinalizerToolLG"]
-
-
-if not hasattr( ToolSvc, "CaloCellContainerFinalizerToolHG" ):
-    from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
-    theCaloCellContainerFinalizerToolHG=CaloCellContainerFinalizerTool("theCaloCellContainerFinalizerToolHG")
-    ToolSvc += theCaloCellContainerFinalizerToolHG
-    theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellContainerFinalizerToolHG ]
-else:
-    theCaloCellMakerHG.CaloCellMakerToolNames += ["CaloCellContainerFinalizerToolHG"]
-
-
+    theCaloCellMakerLG.CaloCellMakerToolNames += [theTileCellNoiseFilter]
+    theCaloCellMakerHG.CaloCellMakerToolNames += [theTileCellNoiseFilter]
 
+from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
+theCaloCellContainerFinalizerTool = CaloCellContainerFinalizerTool()
+theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellContainerFinalizerTool]
+theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellContainerFinalizerTool]
 
 if ('doCaloNeighborsCorr' in dir()) and doCaloNeighborsCorr:
-    if not hasattr( ToolSvc, "CaloCellNeighborsAverageCorr" ):
-        from CaloCellCorrection.CaloCellCorrectionConf import CaloCellNeighborsAverageCorr
-        theCaloCellNeighborsAverageCorr = CaloCellNeighborsAverageCorr("CaloCellNeighborsAverageCorr")
-        theCaloCellNeighborsAverageCorr.testMode=False
-        ToolSvc +=  theCaloCellNeighborsAverageCorr
-        theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
-        theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
-    else:
-        theCaloCellMakerLG.CaloCellMakerToolNames += ["CaloCellNeighborsAverageCorr"]
-        theCaloCellMakerHG.CaloCellMakerToolNames += ["CaloCellNeighborsAverageCorr"]
+    from CaloCellCorrection.CaloCellCorrectionConf import CaloCellNeighborsAverageCorr
+    theCaloCellNeighborsAverageCorr = CaloCellNeighborsAverageCorr("CaloCellNeighborsAverageCorr")
+    theCaloCellNeighborsAverageCorr.testMode=False
+    theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
+    theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellNeighborsAverageCorr]
 else:
     doCaloNeighborsCorr=False
 
-if not hasattr( ToolSvc, "CaloCellContainerCheckerToolLG" ):
-    from CaloRec.CaloRecConf import CaloCellContainerCheckerTool
-    theCaloCellContainerCheckerToolLG=CaloCellContainerCheckerTool("CaloCellContainerCheckerToolLG")
-    ToolSvc += theCaloCellContainerCheckerToolLG
-    theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellContainerCheckerToolLG]
-else:
-    theCaloCellMakerLG.CaloCellMakerToolNames += ["CaloCellContainerCheckerToolLG"]
-
-
-
-if not hasattr( ToolSvc, "CaloCellContainerCheckerToolHG" ):
-    from CaloRec.CaloRecConf import CaloCellContainerCheckerTool
-    theCaloCellContainerCheckerToolHG=CaloCellContainerCheckerTool("CaloCellContainerCheckerToolHG")
-    ToolSvc += theCaloCellContainerCheckerToolHG
-    theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellContainerCheckerToolHG]
-else:
-    theCaloCellMakerHG.CaloCellMakerToolNames += ["CaloCellContainerCheckerToolHG"]
+from CaloRec.CaloRecConf import CaloCellContainerCheckerTool
+theCaloCellContainerCheckerTool = CaloCellContainerCheckerTool()
+theCaloCellMakerLG.CaloCellMakerToolNames += [theCaloCellContainerCheckerTool]
+theCaloCellMakerHG.CaloCellMakerToolNames += [theCaloCellContainerCheckerTool]
 
 printfunc (theCaloCellMakerLG)
-printfunc (ToolSvc.TileCellBuilderLG)
+printfunc (theTileCellBuilderLG)
 
 printfunc ("####################################################################################")
 
 printfunc (theCaloCellMakerHG)
-printfunc (ToolSvc.TileCellBuilderHG)
+printfunc (theTileCellBuilderHG)
+
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
index 5a4b97b87086..667e6896d932 100755
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
@@ -129,7 +129,7 @@ else:
     include( "TileRec/TileRec_jobOptions.py" )
     include( "TileRec/TileCellMaker_jobOptions.py" )
     # turn off masking of bad channels
-    ToolSvc.TileCellBuilder.maskBadChannels = False
+    topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].maskBadChannels = False
 
 # setup l1calo database
 include('TrigT1CaloCalibConditions/L1CaloCalibConditions_jobOptions.py')
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
index 5f9eb2afc43c..651056ef73b0 100755
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
@@ -121,7 +121,7 @@ else:
     include( "TileRec/TileRec_jobOptions.py" )
     include( "TileRec/TileCellMaker_jobOptions.py" )
     # turn off masking of bad channels
-    ToolSvc.TileCellBuilder.maskBadChannels = False
+    topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].maskBadChannels = False
 
 # setup l1calo database
 include('TrigT1CaloCalibConditions/L1CaloCalibConditions_jobOptions.py')
-- 
GitLab


From a97864394ca8dc5e2bd718a5806f121c628224e2 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 6 Jun 2020 18:59:37 +0200
Subject: [PATCH 025/266] GlobalChi2 EventContext aware

---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h    |  53 ++-
 .../TrkGlobalChi2Fitter/src/GXFTrackState.cxx |   2 +-
 .../src/GlobalChi2Fitter.cxx                  | 376 +++++++++++-------
 3 files changed, 269 insertions(+), 162 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 4298bfdabba3..22954464ea26 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -9,6 +9,7 @@
 #include "TrkDetDescrInterfaces/IMaterialEffectsOnTrackProvider.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkFitterInterfaces/IGlobalTrackFitter.h"
 #include "TrkGlobalChi2Fitter/GXFTrajectory.h"
 #include "TrkMaterialOnTrack/MaterialEffectsOnTrack.h"
@@ -17,6 +18,7 @@
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "MagFieldElements/AtlasFieldCache.h"
 
+#include <memory>
 #include <mutex>
 
 class AtlasDetectorID;
@@ -155,47 +157,53 @@ namespace Trk {
      * EventContext for now
      */
     using ITrackFitter::fit;
-  
-    virtual Track *fit(
-      const PrepRawDataSet &,
-      const TrackParameters &,
+
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const PrepRawDataSet&,
+      const TrackParameters&,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override;
+      ) const override final;
 
-    virtual Track *fit(
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
       const Track &,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override;
+    ) const override final;
 
-    virtual Track *fit(
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
       const MeasurementSet &,
       const TrackParameters &,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override                         ;
+    ) const override final;
 
-    virtual Track *fit(
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
       const Track &,
       const PrepRawDataSet &,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override;
+    ) const override final;
 
-    virtual Track *fit(
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
       const Track &,
       const Track &,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override;
+    ) const override final;
 
-    virtual Track *fit(
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
       const Track &,
       const MeasurementSet &,
       const RunOutlierRemoval runOutlier = false,
       const ParticleHypothesis matEffects = nonInteracting
-    ) const override;
+    ) const override final;
 
     virtual Track* alignmentFit(
       AlignmentCache&,
@@ -220,6 +228,7 @@ namespace Trk {
     ) const;
 
     Track * fitIm(
+      const EventContext& ctx,
       Cache & cache,
       const Track & inputTrack,
       const RunOutlierRemoval runOutlier,
@@ -227,6 +236,7 @@ namespace Trk {
     ) const;
 
     Track *myfit(
+      const EventContext& ctx,
       Cache &,
       GXFTrajectory &,
       const TrackParameters &,
@@ -243,6 +253,7 @@ namespace Trk {
     ) const;
 
     Track *mainCombinationStrategy(
+      const EventContext& ctx,
       Cache &,
       const Track &,
       const Track &,
@@ -251,6 +262,7 @@ namespace Trk {
     ) const;
 
     Track *backupCombinationStrategy(
+      const EventContext& ctx,
       Cache &,
       const Track &,
       const Track &,
@@ -415,6 +427,7 @@ namespace Trk {
      * determine the behaviour of the particle as it traverses materials.
      */
     void addIDMaterialFast(
+      const EventContext& ctx,
       Cache & cache,
       GXFTrajectory & track,
       const TrackParameters * parameters,
@@ -435,6 +448,7 @@ namespace Trk {
     ) const;
 
     Track *makeTrack(
+      const EventContext& ctx,
       Cache &,
       GXFTrajectory &,
       const ParticleHypothesis
@@ -461,6 +475,7 @@ namespace Trk {
     ) const;
 
     FitterStatusCode runIteration(
+      const EventContext& ctx,
       Cache &,
       GXFTrajectory &,
       int,
@@ -477,6 +492,7 @@ namespace Trk {
     ) const;
 
     GXFTrajectory *runTrackCleanerSilicon(
+      const EventContext& ctx,
       Cache &,
       GXFTrajectory &,
       Amg::SymMatrixX &,
@@ -494,13 +510,17 @@ namespace Trk {
       bool, bool, int
     ) const;
 
-    FitterStatusCode calculateTrackParameters(GXFTrajectory &, bool) const;
+    FitterStatusCode calculateTrackParameters(
+      const EventContext& ctx,
+      GXFTrajectory&,
+      bool) const;
 
     void calculateDerivatives(GXFTrajectory &) const;
 
     void calculateTrackErrors(GXFTrajectory &, Amg::SymMatrixX &, bool) const;
 
     TransportJacobian *numericalDerivatives(
+      const EventContext& ctx,
       const TrackParameters *,
       const Surface *,
       PropDirection,
@@ -547,6 +567,7 @@ namespace Trk {
      * field cache.
      */
     void initFieldCache(
+      const EventContext& ctx,
       Cache & cache
     ) const;
 
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
index 73093240403c..7d887de825e3 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
@@ -299,7 +299,7 @@ namespace Trk {
       return &m_measurement->associatedSurface();
     } if (m_trackpar != nullptr) {
       return &m_trackpar->associatedSurface();
-    } else if (m_materialEffects != nullptr) {
+    } if (m_materialEffects != nullptr) {
       return m_materialEffects->surface();
     } else {
       return nullptr;
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 8f8fa3cca2ae..b3562ac57f24 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -277,16 +277,18 @@ namespace Trk {
 
   // combined fit of two tracks
   // --------------------------------
-  Track *GlobalChi2Fitter::fit(
-    const Track & intrk1,
-    const Track & intrk2,
+  std::unique_ptr<Track>
+  GlobalChi2Fitter::fit(
+    const EventContext& ctx,
+    const Track& intrk1,
+    const Track& intrk2,
     const RunOutlierRemoval,
-    const ParticleHypothesis
-  ) const {
+    const ParticleHypothesis) const
+  {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Track,Track,)");
 
     Cache cache(this);
-    initFieldCache(cache);
+    initFieldCache(ctx,cache);
 
     GXFTrajectory trajectory;
     if (!m_straightlineprop) {
@@ -319,8 +321,10 @@ namespace Trk {
         Amg::Vector3D measdir = surf->transform().rotation().col(0);
         
         double dotprod1 = measdir.dot(Amg::Vector3D(0, 0, 1));
-        double dotprod2 = measdir.dot(Amg::Vector3D(surf->center().x(), surf->center().y(), 0) / surf->center().perp());
-        
+        double dotprod2 = measdir.dot(
+          Amg::Vector3D(surf->center().x(), surf->center().y(), 0) /
+          surf->center().perp());
+
         if (std::abs(dotprod1) < .5 && std::abs(dotprod2) < .5) {
           measphi = true;
           break;
@@ -460,7 +464,7 @@ namespace Trk {
         qoverpid * qoverpmuon > 0
       )
     ) {
-      track = mainCombinationStrategy(cache, intrk1, intrk2, trajectory, calomeots);
+      track = mainCombinationStrategy(ctx,cache, intrk1, intrk2, trajectory, calomeots);
       
       if (m_fit_status[S_FITS] == (unsigned int) (nfits + 1)) {
         firstfitwasattempted = true;
@@ -477,7 +481,7 @@ namespace Trk {
       trajectory2.m_straightline = trajectory.m_straightline;
       trajectory2.m_fieldprop = trajectory.m_fieldprop;
       trajectory = trajectory2;
-      track = backupCombinationStrategy(cache, intrk1, intrk2, trajectory, calomeots);
+      track = backupCombinationStrategy(ctx,cache, intrk1, intrk2, trajectory, calomeots);
     }
 
     bool pseudoupdated = false;
@@ -536,6 +540,7 @@ namespace Trk {
         cache.m_matfilled = true;
         
         track = myfit(
+          ctx,
           cache, 
           trajectory, 
           *oldtrack->perigeeParameters(), 
@@ -559,10 +564,11 @@ namespace Trk {
     cache.m_calomat = tmp;
     cache.m_extmat = tmp2;
     cache.m_idmat = tmp4;
-    return track;
+    return std::unique_ptr<Track>(track);
   }
 
   Track *GlobalChi2Fitter::mainCombinationStrategy(
+    const EventContext& ctx,
     Cache & cache,
     const Track & intrk1,
     const Track & intrk2,
@@ -715,6 +721,7 @@ namespace Trk {
         
         const Surface *matsurf = &meff->associatedSurface();
         tmppar = m_propagator->propagateParameters(
+          ctx,
           *tp_closestmuon, 
           *matsurf,
           propdir, 
@@ -726,6 +733,7 @@ namespace Trk {
         if (tmppar == nullptr) {
           propdir = !firstismuon ? Trk::alongMomentum : oppositeMomentum;
           tmppar = m_propagator->propagateParameters(
+            ctx,
             *tp_closestmuon, 
             *matsurf,
             propdir, 
@@ -850,6 +858,7 @@ namespace Trk {
     }
     
     firstscatpar = m_propagator->propagateParameters(
+      ctx,
       *(firstismuon ? tp_closestmuon : lastidpar),
       calomeots[0].associatedSurface(),
       Trk::alongMomentum, 
@@ -872,6 +881,7 @@ namespace Trk {
     }
     
     lastscatpar = m_propagator->propagateParameters(
+      ctx,
       *(firstismuon ? firstidpar : tp_closestmuon),
       calomeots[2].associatedSurface(),
       Trk::oppositeMomentum, 
@@ -932,6 +942,7 @@ namespace Trk {
       PropDirection propdir = !firstismuon ? oppositeMomentum : alongMomentum;
       
       tmpelosspar = m_propagator->propagateParameters(
+        ctx,
         *tmppar1,
         calomeots[1].
         associatedSurface(),
@@ -945,6 +956,7 @@ namespace Trk {
       if (m_numderiv) {
         delete jac1;
         jac1 = numericalDerivatives(
+          ctx,
           firstscatpar,
           &calomeots[1].associatedSurface(), 
           propdir,
@@ -981,6 +993,7 @@ namespace Trk {
       }
       
       const TrackParameters *scat2 = m_propagator->propagateParameters(
+        ctx,
         *elosspar2,
         !firstismuon ? 
         calomeots[0].associatedSurface() : 
@@ -995,6 +1008,7 @@ namespace Trk {
       if (m_numderiv) {
         delete jac2;
         jac2 = numericalDerivatives(
+          ctx,
           elosspar2,
           !firstismuon ? 
           &calomeots[0].associatedSurface() : 
@@ -1306,6 +1320,7 @@ namespace Trk {
     }
     
     Track *track = myfit(
+      ctx,
       cache, 
       trajectory, 
       *startPar, 
@@ -1321,6 +1336,7 @@ namespace Trk {
   }
 
   Track *GlobalChi2Fitter::backupCombinationStrategy(
+    const EventContext& ctx,
     Cache & cache,
     const Track & intrk1,
     const Track & intrk2,
@@ -1408,31 +1424,30 @@ namespace Trk {
 
     if (!firstismuon) {
       firstscatpar.reset(m_propagator->propagateParameters(
+        ctx,
         *lastidpar,
         calomeots[0].associatedSurface(),
-        Trk::alongMomentum, 
+        Trk::alongMomentum,
         false,
         *trajectory.m_fieldprop,
-        Trk::nonInteracting
-      ));
-      
+        Trk::nonInteracting));
+
       delete lastidpar;
       
       if (!firstscatpar) {
         return nullptr;
       }
-      
+
       std::unique_ptr<const TrackParameters> tmppar(
         m_propagator->propagateParameters(
+          ctx,
           *firstscatpar,
           calomeots[1].associatedSurface(),
-          Trk::alongMomentum, 
+          Trk::alongMomentum,
           false,
           *trajectory.m_fieldprop,
-          Trk::nonInteracting
-        )
-      );
-      
+          Trk::nonInteracting));
+
       if (!tmppar) {
         return nullptr;
       }
@@ -1458,24 +1473,23 @@ namespace Trk {
           pars[0], pars[1], pars[2], pars[3], newqoverp, nullptr
         )
       );
-        
-      lastscatpar.reset(
-        m_propagator->propagateParameters(
-          *elosspar,
-          calomeots[2].associatedSurface(),
-          Trk::alongMomentum, 
-          false,
-          *trajectory.m_fieldprop,
-          Trk::nonInteracting
-        )
-      );
-      
+
+      lastscatpar.reset(m_propagator->propagateParameters(
+        ctx,
+        *elosspar,
+        calomeots[2].associatedSurface(),
+        Trk::alongMomentum,
+        false,
+        *trajectory.m_fieldprop,
+        Trk::nonInteracting));
+
       if (!lastscatpar) {
         return nullptr;
       }
     } else {
       lastscatpar.reset(
         m_propagator->propagateParameters(
+          ctx,
           *firstidpar,
           calomeots[2].associatedSurface(),
           Trk::oppositeMomentum, 
@@ -1491,6 +1505,7 @@ namespace Trk {
       
       elosspar.reset(
         m_propagator->propagateParameters(
+          ctx,
           *lastscatpar,
           calomeots[1].associatedSurface(),
           Trk::oppositeMomentum, 
@@ -1519,6 +1534,7 @@ namespace Trk {
       
       firstscatpar.reset(
         m_propagator->propagateParameters(
+          ctx,
           *tmppar,
           calomeots[0].associatedSurface(),
           Trk::oppositeMomentum, 
@@ -1723,17 +1739,17 @@ namespace Trk {
           std::abs((*itStates2)->measurementOnTrack()->globalPosition().z()) < 10000
         )
       ) {
-        const TrackParameters *par2 = 
-          (((*itStates2)->trackParameters() != nullptr) && nphi > 99) ? 
-          (*itStates2)->trackParameters()->clone() : 
-          m_propagator->propagateParameters(
-            *secondscatstate->trackParameters(),
-            (*itStates2)->measurementOnTrack()->associatedSurface(),
-            alongMomentum, 
-            false,
-            *trajectory.m_fieldprop,
-            Trk::nonInteracting
-          );
+        const TrackParameters* par2 =
+          (((*itStates2)->trackParameters() != nullptr) && nphi > 99)
+            ? (*itStates2)->trackParameters()->clone()
+            : m_propagator->propagateParameters(
+                ctx,
+                *secondscatstate->trackParameters(),
+                (*itStates2)->measurementOnTrack()->associatedSurface(),
+                alongMomentum,
+                false,
+                *trajectory.m_fieldprop,
+                Trk::nonInteracting);
         if (par2 == nullptr) {
           continue;
         }
@@ -1858,7 +1874,8 @@ namespace Trk {
     bool tmpacc = cache.m_acceleration;
     cache.m_acceleration = false;
     // @TODO eventually track created but not used why ?
-    std::unique_ptr<Trk::Track> tmp_track ( myfit(cache, trajectory, *startpar2, false, muon) );
+    std::unique_ptr<Trk::Track> tmp_track(
+      myfit(ctx, cache, trajectory, *startpar2, false, muon));
     cache.m_acceleration = tmpacc;
 
     cache.m_matfilled = false;
@@ -1914,32 +1931,36 @@ namespace Trk {
       trajectory.reset();
       trajectory.setPrefit(0);
       trajectory.setNumberOfPerigeeParameters(5);
-      track = myfit(cache, trajectory, *firstidpar, false, muon);
+      track = myfit(ctx, cache, trajectory, *firstidpar, false, muon);
       cache.m_matfilled = false;
     }
     
     return track;
   }
 
-  Track *GlobalChi2Fitter::fit(
-    const Track & inputTrack,
+  std::unique_ptr<Track>
+  GlobalChi2Fitter::fit(
+    const EventContext& ctx,
+    const Track& inputTrack,
     const RunOutlierRemoval runOutlier,
-    const ParticleHypothesis matEffects
-  ) const {
+    const ParticleHypothesis matEffects) const
+  {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Track,)");
     
     Cache cache(this);
-    initFieldCache(cache);
+    initFieldCache(ctx,cache);
 
     GXFTrajectory trajectory;
     
     if (!m_straightlineprop) {
       trajectory.m_straightline = (!cache.m_field_cache.solenoidOn() && !cache.m_field_cache.toroidOn());
     }
-    
-    trajectory.m_fieldprop = trajectory.m_straightline ? m_fieldpropnofield : m_fieldpropfullfield;
 
-    return fitIm(cache, inputTrack, runOutlier, matEffects);
+    trajectory.m_fieldprop =
+      trajectory.m_straightline ? m_fieldpropnofield : m_fieldpropfullfield;
+
+    return std::unique_ptr<Track>(
+      fitIm(ctx, cache, inputTrack, runOutlier, matEffects));
   }
 
   Track *
@@ -1949,19 +1970,19 @@ namespace Trk {
                         const ParticleHypothesis matEffects) const {
 
 
+    const EventContext& ctx = Gaudi::Hive::currentContext();
     Cache cache(this);
-    initFieldCache(cache);
+    initFieldCache(ctx, cache);
 
-    
-  	  delete alignCache.m_derivMatrix;
-  	alignCache.m_derivMatrix = nullptr;
+    delete alignCache.m_derivMatrix;
+    alignCache.m_derivMatrix = nullptr;
 
-  	
-  	 delete alignCache.m_fullCovarianceMatrix;
-  	alignCache.m_fullCovarianceMatrix =  nullptr;
+    delete alignCache.m_fullCovarianceMatrix;
+    alignCache.m_fullCovarianceMatrix = nullptr;
     alignCache.m_iterationsOfLastFit = 0;
 
-    Trk::Track* newTrack = fitIm( cache, inputTrack, runOutlier, matEffects );
+    Trk::Track* newTrack =
+      fitIm(ctx, cache, inputTrack, runOutlier, matEffects);
     if(newTrack != nullptr){
       if(cache.m_derivmat.size() != 0)
         alignCache.m_derivMatrix = new Amg::MatrixX(cache.m_derivmat);
@@ -1969,15 +1990,17 @@ namespace Trk {
         alignCache.m_fullCovarianceMatrix = new Amg::MatrixX(cache.m_fullcovmat);
       alignCache.m_iterationsOfLastFit = cache.m_lastiter;
     }
-
     return newTrack;
   }
 
-  Track *
-  GlobalChi2Fitter::fitIm(Cache& cache,
-                        const Track &inputTrack,
-                        const RunOutlierRemoval runOutlier,
-                        const ParticleHypothesis matEffects) const {
+  Track*
+  GlobalChi2Fitter::fitIm(
+    const EventContext& ctx,
+    Cache& cache,
+    const Track& inputTrack,
+    const RunOutlierRemoval runOutlier,
+    const ParticleHypothesis matEffects) const
+  {
 
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Track,,)");
 
@@ -2151,8 +2174,8 @@ namespace Trk {
       if (matEffects == Trk::electron) {
         cache.m_asymeloss = true;
       }
-      
-      tmptrack = myfit(cache, trajectory, *minpar, false, matEffects);
+
+      tmptrack = myfit(ctx, cache, trajectory, *minpar, false, matEffects);
       cache.m_sirecal = tmpsirecal;
       
       if (tmptrack == nullptr) {
@@ -2252,8 +2275,9 @@ namespace Trk {
       }
     }
 
-    Track *track = myfit(cache, trajectory, *minpar, runOutlier, matEffects);
-    
+    Track* track =
+      myfit(ctx, cache, trajectory, *minpar, runOutlier, matEffects);
+
     if (deleteminpar) {
       delete minpar;
     }
@@ -2303,7 +2327,8 @@ namespace Trk {
         Track *oldtrack = track;
         trajectory.setConverged(false);
         cache.m_matfilled = true;
-        track = myfit(cache, trajectory, *oldtrack->perigeeParameters(), false, muon);
+        track = myfit(
+          ctx, cache, trajectory, *oldtrack->perigeeParameters(), false, muon);
         cache.m_matfilled = false;
         delete oldtrack;
       }
@@ -2327,12 +2352,14 @@ namespace Trk {
     return track;
   }
 
-  Track *GlobalChi2Fitter::fit(
-    const PrepRawDataSet & prds,
-    const TrackParameters & param,
+  std::unique_ptr<Track>
+  GlobalChi2Fitter::fit(
+    const EventContext& ctx,
+    const PrepRawDataSet& prds,
+    const TrackParameters& param,
     const RunOutlierRemoval runOutlier,
-    const ParticleHypothesis matEffects
-  ) const {
+    const ParticleHypothesis matEffects) const
+  {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(PRDS,TP,)");
     MeasurementSet rots;
 
@@ -2391,9 +2418,10 @@ namespace Trk {
         rots.push_back(rot);
       }
     }
-    
-    Track *track = fit(rots, param, runOutlier, matEffects);
-    
+
+    std::unique_ptr<Track> track =
+      fit(ctx, rots, param, runOutlier, matEffects);
+
     for (MeasurementSet::const_iterator it = rots.begin(); it != rots.end(); it++) {
       delete *it;
     }
@@ -2401,16 +2429,18 @@ namespace Trk {
     return track;
   }
 
-  Track *GlobalChi2Fitter::fit(
-    const Track & inputTrack,
-    const MeasurementSet & addMeasColl,
+  std::unique_ptr<Track>
+  GlobalChi2Fitter::fit(
+    const EventContext& ctx,
+    const Track& inputTrack,
+    const MeasurementSet& addMeasColl,
     const RunOutlierRemoval runOutlier,
-    const ParticleHypothesis matEffects
-  ) const {
+    const ParticleHypothesis matEffects) const
+  {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Track,Meas'BaseSet,,)");
 
     Cache cache(this);
-    initFieldCache(cache);
+    initFieldCache(ctx,cache);
 
     GXFTrajectory trajectory;
     
@@ -2467,7 +2497,8 @@ namespace Trk {
 
     // fit set of MeasurementBase using main method, start with first TrkParameter in inputTrack
     ATH_MSG_VERBOSE("call myfit(GXFTrajectory,TP,,)");
-    Track *track = myfit(cache, trajectory, *minpar, runOutlier, matEffects);
+    Track* track =
+      myfit(ctx, cache, trajectory, *minpar, runOutlier, matEffects);
     cache.m_asymeloss = tmpasymeloss;
     
     if (track != nullptr) {
@@ -2494,17 +2525,19 @@ namespace Trk {
       incrementFitStatus(S_SUCCESSFUL_FITS);
     }
     
-    return track;
+    return std::unique_ptr<Track>(track);
   }
 
   // extend a track fit to include an additional set of PrepRawData objects
   // --------------------------------
-  Track *GlobalChi2Fitter::fit(
-    const Track & intrk,
-    const PrepRawDataSet & prds,
+  std::unique_ptr<Track>
+  GlobalChi2Fitter::fit(
+    const EventContext& ctx,
+    const Track& intrk,
+    const PrepRawDataSet& prds,
     const RunOutlierRemoval runOutlier,
-    const ParticleHypothesis matEffects
-  ) const {
+    const ParticleHypothesis matEffects) const
+  {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Track,PRDS,)");
     MeasurementSet rots;
     const TrackParameters *hitparam = intrk.trackParameters()->back();
@@ -2537,7 +2570,7 @@ namespace Trk {
       }
     }
     
-    Track *track = fit(intrk, rots, runOutlier, matEffects);
+    std::unique_ptr<Track> track = fit(ctx,intrk, rots, runOutlier, matEffects);
     
     for (MeasurementSet::const_iterator it = rots.begin(); it != rots.end(); it++) {
       delete *it;
@@ -2546,7 +2579,8 @@ namespace Trk {
     return track;
   }
 
-  Track *GlobalChi2Fitter::fit(
+  std::unique_ptr<Track> GlobalChi2Fitter::fit(
+    const EventContext& ctx,
     const MeasurementSet & rots_in,
     const TrackParameters & param,
     const RunOutlierRemoval runOutlier,
@@ -2555,7 +2589,7 @@ namespace Trk {
     ATH_MSG_DEBUG("--> entering GlobalChi2Fitter::fit(Meas'BaseSet,,)");
 
     Cache cache(this);
-    initFieldCache(cache);
+    initFieldCache(ctx,cache);
 
     GXFTrajectory trajectory;
     
@@ -2637,7 +2671,7 @@ namespace Trk {
       cache.m_matfilled = true;
       trajectory.setPrefit(2);
       
-      myfit(cache, trajectory, *startpar, runOutlier, matEffects);
+      myfit(ctx,cache, trajectory, *startpar, runOutlier, matEffects);
       
       cache.m_matfilled = false;
       
@@ -2686,7 +2720,7 @@ namespace Trk {
 
         trajectory.reset();
         
-        myfit(cache, trajectory, *startpar, runOutlier, matEffects);
+        myfit(ctx,cache, trajectory, *startpar, runOutlier, matEffects);
         
         cache.m_matfilled = true;
         delete startpar;
@@ -2744,10 +2778,10 @@ namespace Trk {
       }
     }
     
-    Track *track = nullptr;
+    Track* track = nullptr;
     
     if (startpar != nullptr) {
-      track = myfit(cache, trajectory, *startpar, runOutlier, matEffects);
+      track = myfit(ctx,cache, trajectory, *startpar, runOutlier, matEffects);
     }
     
     if (deletestartpar) {
@@ -2757,10 +2791,9 @@ namespace Trk {
     if (track != nullptr) {
       incrementFitStatus(S_SUCCESSFUL_FITS);
     }
-    
     cache.m_matfilled = false;
     
-    return track;
+    return std::unique_ptr<Track> (track);
   }
 
   void GlobalChi2Fitter::makeProtoState(
@@ -3839,6 +3872,7 @@ namespace Trk {
   }
 
   void GlobalChi2Fitter::addIDMaterialFast(
+    const EventContext& ctx,
     Cache & cache,
     GXFTrajectory & trajectory,
     const TrackParameters * refpar2,
@@ -3930,15 +3964,15 @@ namespace Trk {
       ) {
         if (firstsistate == nullptr) {
           if (oldstates[i]->trackParameters() == nullptr) {
-            const TrackParameters *tmppar = m_propagator->propagateParameters(
-              *refpar, 
-              *oldstates[i]->surface(), 
-              alongMomentum, 
-              false, 
-              *trajectory.m_fieldprop, 
-              Trk::nonInteracting
-            );
-            
+            const TrackParameters* tmppar = m_propagator->propagateParameters(
+              ctx,
+              *refpar,
+              *oldstates[i]->surface(),
+              alongMomentum,
+              false,
+              *trajectory.m_fieldprop,
+              Trk::nonInteracting);
+
             if (tmppar == nullptr) return;
             
             oldstates[i]->setTrackParameters(tmppar);
@@ -4941,6 +4975,7 @@ namespace Trk {
   }
 
   Track *GlobalChi2Fitter::myfit(
+    const EventContext& ctx,
     Cache & cache,
     GXFTrajectory & trajectory,
     const TrackParameters & param,
@@ -5028,7 +5063,8 @@ namespace Trk {
       ) {
         addMaterial(cache, trajectory, per != nullptr ? per : &param, matEffects);
       } else {
-        addIDMaterialFast(cache, trajectory, per != nullptr ? per : &param, matEffects);
+        addIDMaterialFast(
+          ctx, cache, trajectory, per != nullptr ? per : &param, matEffects);
       }
     }
 
@@ -5080,9 +5116,13 @@ namespace Trk {
         if ((*it).trackParameters() == nullptr) {
           continue;
         }
-        
-        double distance = persurf.straightLineDistanceEstimate((*it).trackParameters()->position(),(*it).trackParameters()->momentum().unit()).first();
-        
+
+        double distance = persurf
+                            .straightLineDistanceEstimate(
+                              (*it).trackParameters()->position(),
+                              (*it).trackParameters()->momentum().unit())
+                            .first();
+
         bool insideid = (
           (cache.m_caloEntrance == nullptr) || 
           cache.m_caloEntrance->inside((*it).trackParameters()->position())
@@ -5120,8 +5160,9 @@ namespace Trk {
       for (int i = 0; i < (int) mymatvec.size(); i++) {
         Trk::PropDirection propdir = Trk::alongMomentum;
         const Surface *matsurf = mymatvec[i]->surface();
-        DistanceSolution distsol = matsurf->straightLineDistanceEstimate(nearestpar->position(), nearestpar->momentum().unit());
-        
+        DistanceSolution distsol = matsurf->straightLineDistanceEstimate(
+          nearestpar->position(), nearestpar->momentum().unit());
+
         double distance = getDistance(distsol);
         
         if (distance < 0 && distsol.numberOfSolutions() > 0) {
@@ -5129,6 +5170,7 @@ namespace Trk {
         }
         
         const TrackParameters *tmppar = m_propagator->propagateParameters(
+          ctx,
           *nearestpar, 
           *matsurf, 
           propdir,
@@ -5140,6 +5182,7 @@ namespace Trk {
         if (tmppar == nullptr) {
           propdir = (propdir == oppositeMomentum) ? alongMomentum : oppositeMomentum;
           tmppar = m_propagator->propagateParameters(
+            ctx,
             *nearestpar, 
             *matsurf, 
             propdir,
@@ -5188,6 +5231,7 @@ namespace Trk {
       }
       
       const Trk::TrackParameters * tmpPars = m_propagator->propagateParameters(
+        ctx,
         *nearestpar, 
         persurf,
         Trk::anyDirection, 
@@ -5310,7 +5354,8 @@ namespace Trk {
       }
       
       if (!trajectory.converged()) {
-        cache.m_fittercode = runIteration(cache, trajectory, it, a, b, lu, doderiv);
+        cache.m_fittercode =
+          runIteration(ctx, cache, trajectory, it, a, b, lu, doderiv);
         if (cache.m_fittercode != FitterStatusCode::Success) {
           if (cache.m_fittercode == FitterStatusCode::ExtrapolationFailure) {
             incrementFitStatus(S_PROPAGATION_FAIL);
@@ -5393,7 +5438,7 @@ namespace Trk {
       trajectory.numberOfSiliconHits() == trajectory.numberOfHits()
     ) {
       calculateTrackErrors(trajectory, a_inv, true);
-      finaltrajectory = runTrackCleanerSilicon(cache, trajectory, a, a_inv, b, runOutlier);
+      finaltrajectory = runTrackCleanerSilicon(ctx,cache, trajectory, a, a_inv, b, runOutlier);
     }
 
     if (cache.m_fittercode != FitterStatusCode::Success) {
@@ -5457,7 +5502,7 @@ namespace Trk {
     }
     
     if (finaltrajectory->numberOfOutliers() <= m_maxoutliers || !runOutlier) {
-      track = makeTrack(cache, *finaltrajectory, matEffects);
+      track = makeTrack(ctx,cache, *finaltrajectory, matEffects);
     } else {
       incrementFitStatus(S_NOT_ENOUGH_MEAS);
       cache.m_fittercode = FitterStatusCode::OutlierLogicFailure;
@@ -5993,6 +6038,7 @@ namespace Trk {
   }
 
   FitterStatusCode GlobalChi2Fitter::runIteration(
+    const EventContext& ctx,
     Cache & cache,
     GXFTrajectory & trajectory, 
     int it,
@@ -6017,7 +6063,7 @@ namespace Trk {
       cache.m_phiweight.assign(trajectory.trackStates().size(), 1);
     }
     
-    FitterStatusCode fsc = calculateTrackParameters(trajectory, doderiv);
+    FitterStatusCode fsc = calculateTrackParameters(ctx,trajectory, doderiv);
     
     if (fsc != FitterStatusCode::Success) {
       return fsc;
@@ -6540,6 +6586,7 @@ namespace Trk {
   }
 
   GXFTrajectory *GlobalChi2Fitter::runTrackCleanerSilicon(
+    const EventContext& ctx,
     Cache & cache,
     GXFTrajectory &
     trajectory,
@@ -6932,7 +6979,8 @@ namespace Trk {
           }
           
           if (!newtrajectory->converged()) {
-            cache.m_fittercode = runIteration(cache, *newtrajectory, it, *newap, *newbp, lu_m, doderiv);
+            cache.m_fittercode = runIteration(
+              ctx, cache, *newtrajectory, it, *newap, *newbp, lu_m, doderiv);
 
             if (cache.m_fittercode != FitterStatusCode::Success) {
               incrementFitStatus(S_NOT_ENOUGH_MEAS);
@@ -7090,6 +7138,7 @@ namespace Trk {
   }
 
   Track *GlobalChi2Fitter::makeTrack(
+    const EventContext& ctx,
     Cache & cache,
     GXFTrajectory & oldtrajectory,
     ParticleHypothesis matEffects
@@ -7245,6 +7294,7 @@ namespace Trk {
         }
 
         const TrackParameters *layerpar = m_propagator->propagate(
+          ctx,
           *prevpar,
           layer->surfaceRepresentation(), 
           propdir,
@@ -7313,6 +7363,7 @@ namespace Trk {
       
       if (prevpar != nullptr) {
         per = m_propagator->propagate(
+          ctx,
           *prevpar,
           PerigeeSurface(Amg::Vector3D(0, 0, 0)),
           oppositeMomentum, 
@@ -7372,6 +7423,7 @@ namespace Trk {
   }
 
   FitterStatusCode GlobalChi2Fitter::calculateTrackParameters(
+    const EventContext& ctx,
     GXFTrajectory & trajectory,
     bool calcderiv
   ) const {
@@ -7408,6 +7460,7 @@ namespace Trk {
       bool curvpar = false;
       if (calcderiv && !m_numderiv) {
         currenttrackpar = m_propagator->propagateParameters(
+          ctx,
           *prevtrackpar, 
           *surf, 
           propdir,
@@ -7419,6 +7472,7 @@ namespace Trk {
         );
       } else {
         currenttrackpar = m_propagator->propagateParameters(
+          ctx,
           *prevtrackpar, 
           *surf, 
           propdir,
@@ -7443,6 +7497,7 @@ namespace Trk {
         
         if (calcderiv && !m_numderiv) {
           currenttrackpar = m_propagator->propagateParameters(
+            ctx,
             *prevtrackpar, 
             *surf, 
             propdir,
@@ -7454,6 +7509,7 @@ namespace Trk {
           );
         } else {
           currenttrackpar = m_propagator->propagateParameters(
+            ctx,
             *prevtrackpar, 
             *surf, 
             propdir,
@@ -7467,7 +7523,8 @@ namespace Trk {
 
       if ((currenttrackpar != nullptr) && m_numderiv && calcderiv) {
         delete jac;
-        jac = numericalDerivatives(prevtrackpar, surf, propdir, trajectory.m_fieldprop);
+        jac = numericalDerivatives(
+          ctx, prevtrackpar, surf, propdir, trajectory.m_fieldprop);
       }
 
       if (
@@ -7589,6 +7646,7 @@ namespace Trk {
 
       if (calcderiv && !m_numderiv) {
         currenttrackpar = m_propagator->propagateParameters(
+          ctx,
           *prevtrackpar, 
           *surf, 
           propdir,
@@ -7600,6 +7658,7 @@ namespace Trk {
         );
       } else {
         currenttrackpar = m_propagator->propagateParameters(
+          ctx,
           *prevtrackpar, 
           *surf, 
           propdir,
@@ -7624,6 +7683,7 @@ namespace Trk {
         
         if (calcderiv && !m_numderiv) {
           currenttrackpar = m_propagator->propagateParameters(
+            ctx,
             *prevtrackpar, 
             *surf, 
             propdir,
@@ -7635,6 +7695,7 @@ namespace Trk {
           );
         } else {
           currenttrackpar = m_propagator->propagateParameters(
+            ctx,
             *prevtrackpar, 
             *surf, 
             propdir,
@@ -7648,7 +7709,7 @@ namespace Trk {
       
       if ((currenttrackpar != nullptr) && m_numderiv && calcderiv) {
         delete jac;
-        jac = numericalDerivatives(prevtrackpar, surf, propdir, trajectory.m_fieldprop);
+        jac = numericalDerivatives(ctx, prevtrackpar, surf, propdir, trajectory.m_fieldprop);
       }
 
       if (
@@ -8285,10 +8346,14 @@ namespace Trk {
     }
   }
 
-  TransportJacobian *GlobalChi2Fitter::
-    numericalDerivatives(const TrackParameters * prevpar,
-                         const Surface * surf, PropDirection propdir,
-                         const MagneticFieldProperties * fieldprop) const {
+  TransportJacobian*
+  GlobalChi2Fitter::numericalDerivatives(
+    const EventContext& ctx,
+    const TrackParameters* prevpar,
+    const Surface* surf,
+    PropDirection propdir,
+    const MagneticFieldProperties* fieldprop) const
+  {
     ParamDefsAccessor paraccessor;
     double J[25] = {
       1, 0, 0, 0, 0,
@@ -8353,26 +8418,44 @@ namespace Trk {
                                                               vecminuseps[3],
                                                               vecminuseps[4],
                                                               nullptr);
-      const TrackParameters *newparpluseps =
-        m_propagator->propagateParameters(*parpluseps, *surf, propdir, false,
-                                          *fieldprop, Trk::nonInteracting);
-      const TrackParameters *newparminuseps =
-        m_propagator->propagateParameters(*parminuseps, *surf, propdir, false,
-                                          *fieldprop, Trk::nonInteracting);
+      const TrackParameters* newparpluseps = m_propagator->propagateParameters(
+        ctx,
+        *parpluseps,
+        *surf,
+        propdir,
+        false,
+        *fieldprop,
+        Trk::nonInteracting);
+      const TrackParameters* newparminuseps = m_propagator->propagateParameters(
+        ctx,
+        *parminuseps,
+        *surf,
+        propdir,
+        false,
+        *fieldprop,
+        Trk::nonInteracting);
       PropDirection propdir2 =
         (propdir ==
          Trk::alongMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
       if (newparpluseps == nullptr) {
-        newparpluseps =
-          m_propagator->propagateParameters(*parpluseps, *surf, propdir2,
-                                            false, *fieldprop,
-                                            Trk::nonInteracting);
+        newparpluseps = m_propagator->propagateParameters(
+          ctx,
+          *parpluseps,
+          *surf,
+          propdir2,
+          false,
+          *fieldprop,
+          Trk::nonInteracting);
       }
       if (newparminuseps == nullptr) {
-        newparminuseps =
-          m_propagator->propagateParameters(*parminuseps, *surf, propdir2,
-                                            false, *fieldprop,
-                                            Trk::nonInteracting);
+        newparminuseps = m_propagator->propagateParameters(
+          ctx,
+          *parminuseps,
+          *surf,
+          propdir2,
+          false,
+          *fieldprop,
+          Trk::nonInteracting);
       }
       delete parpluseps;
       delete parminuseps;
@@ -8579,10 +8662,13 @@ namespace Trk {
     m_fit_status[status]++;
   }
 
-  void Trk::GlobalChi2Fitter::initFieldCache(Cache & cache) const {
+  void
+  Trk::GlobalChi2Fitter::initFieldCache(const EventContext& ctx, Cache& cache)
+    const
+  {
     SG::ReadCondHandle<AtlasFieldCacheCondObj> rh(
       m_field_cache_key,
-      Gaudi::Hive::currentContext()
+      ctx
     );
 
     const AtlasFieldCacheCondObj * cond_obj(*rh);
-- 
GitLab


From 217a093028e8b1a2b38da9a32da14c33d5164e29 Mon Sep 17 00:00:00 2001
From: Shota Hayashida <shota.hayashida@cern.ch>
Date: Sun, 7 Jun 2020 10:02:39 +0200
Subject: [PATCH 026/266] Add an option to fill FS RoIs for full scan FTF

---
 .../TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h         |  3 +++
 .../TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx | 10 ++++++++++
 .../python/HLTMenuConfig/Muon/MuonSequenceSetup.py     |  2 +-
 .../python/HLTMenuConfig/Muon/MuonSetup.py             |  3 ++-
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
index dc9f6e096f56..976dd37da4c2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
@@ -237,6 +237,9 @@ class MuFastSteering : public HLT::FexAlgo,
   Gaudi::Property< std::string > m_calBufferName { this, "MuonCalBufferName", "/tmp/testOutput", ""};
   Gaudi::Property< int > m_calBufferSize { this, "MuonCalBufferSize", 1024*1024, ""};
 
+  // Enable to fill FS RoI for ID (cosmic run)
+  Gaudi::Property< bool > m_fill_FSIDRoI { this, "FILL_FSIDRoI", false, "Fill FS RoI for ID (will be used in cosmic run)"};
+
   //adding a part of DataHandle for AthenaMT
   //ReadHandle xAOD::EventInfo
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
index b503e077090c..c94c89a170fe 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
@@ -219,6 +219,10 @@ HLT::ErrorCode MuFastSteering::hltInitialize()
   } 
   ATH_MSG_DEBUG( "topoRoad = " << m_topoRoad);
 
+  if (m_fill_FSIDRoI) {
+    ATH_MSG_INFO("will fill " << m_muIdContainerKey.key() << " in Full Scan mode. Please check if it's correct.");
+  }
+
   return HLT::OK;
 }
 
@@ -1387,6 +1391,12 @@ bool MuFastSteering::storeIDRoiDescriptor(const TrigRoiDescriptor*
 		                          TrigRoiDescriptorCollection&	 	    outputID)
 {
 
+  if (m_fill_FSIDRoI) {  // this mode will be used in cosmic run, if ID expert want to run full scan FTF.
+    TrigRoiDescriptor* IDroiDescriptor = new TrigRoiDescriptor(true);
+    outputID.push_back(IDroiDescriptor);
+    return true;
+  }
+
   const float ZERO_LIMIT = 1.e-5;
 
   const double scalePhiWidthForFailure = 2;
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
index 1d49eeb29e5e..f802ff065099 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
@@ -50,7 +50,7 @@ def muFastAlgSequence(ConfigFlags):
     ### get muFast reco sequence ###    
     from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muFastRecoSequence, makeMuonPrepDataAlgs
     viewAlgs_MuonPRD = makeMuonPrepDataAlgs(RoIs=l2MuViewsMaker.InViewRoIs)
-    muFastRecoSequence, sequenceOut = muFastRecoSequence( l2MuViewsMaker.InViewRoIs )
+    muFastRecoSequence, sequenceOut = muFastRecoSequence( l2MuViewsMaker.InViewRoIs, doFullScanID=False )
     muFastSequence = parOR("muFastRecoSequence", [viewAlgs_MuonPRD, muFastRecoSequence])
     l2MuViewsMaker.ViewNodeName = muFastSequence.name() 
     
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index 3cd860a18b78..0166a57e49a1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -322,7 +322,7 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
   return muDecodeRecoSequence
 
 
-def muFastRecoSequence( RoIs ):
+def muFastRecoSequence( RoIs, doFullScanID = False ):
 
   from AthenaCommon.AppMgr import ToolSvc
   from AthenaCommon.CFElements import parOR
@@ -404,6 +404,7 @@ def muFastRecoSequence( RoIs ):
   muFastAlg.MuonCalibrationStream = "MuonCalibrationStream"
   muFastAlg.forID = muNames.L2forIDName
   muFastAlg.forMS = "forMS" 
+  muFastAlg.FILL_FSIDRoI = doFullScanID
 
   muFastRecoSequence += muFastAlg
   sequenceOut = muFastAlg.MuonL2SAInfo
-- 
GitLab


From a62264856f490ee3d70dd75b1c89502926520c65 Mon Sep 17 00:00:00 2001
From: Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>
Date: Sun, 7 Jun 2020 15:25:01 +0200
Subject: [PATCH 027/266] fix regression step of jobs in SimExoticsTests

---
 .../SimExoticsTests/test/test_FullG4_DecayingCharginos.sh      | 3 ++-
 .../SimExoticsTests/test/test_FullG4_DecayingCharginos_busy.sh | 3 ++-
 .../SimExoticsTests/test/test_FullG4_DecayingLightSleptons.sh  | 3 ++-
 .../SimExoticsTests/test/test_FullG4_DecayingNeutralinos.sh    | 3 ++-
 .../Tests/SimExoticsTests/test/test_FullG4_DecayingStaus.sh    | 3 ++-
 .../Tests/SimExoticsTests/test/test_FullG4_StableCharginos.sh  | 3 ++-
 .../Tests/SimExoticsTests/test/test_FullG4_StableSleptons.sh   | 3 ++-
 7 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos.sh
index e565afc1cfa6..6a536e8d5a25 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.448307.MGPy8EG_A14N23LO_mAMSB_C1C1_5000_208000_LL4p0_MET60.evgen.EVNT.e6962.EVNT.15631425._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos_busy.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos_busy.sh
index b25a0f7c6036..b8152732a6e1 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos_busy.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingCharginos_busy.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.448300.MGPy8EG_A14N23LO_GG_mixedC1LLP_0p2_1400_1200.evgen.EVNT.e7183.EVNT.16706750._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 4 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingLightSleptons.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingLightSleptons.sh
index b04bd95213ba..a8e6bb860473 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingLightSleptons.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingLightSleptons.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.399030.MGPy8EG_A14NNPDF23LO_SlepSlep_directLLP_100_0_0p01ns.evgen.EVNT.e7067.EVNT.16242732._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingNeutralinos.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingNeutralinos.sh
index 077572bbb907..c79ddcd3cc9e 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingNeutralinos.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingNeutralinos.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.448168.MGPy8EG_A14NNPDF23LO_GG_qqn1_2400_850_rpvLF_p01ns.evgen.EVNT.e7245.EVNT.17092338._000002.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingStaus.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingStaus.sh
index 7b99a7677581..09ea07753639 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingStaus.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_DecayingStaus.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.399007.MGPy8EG_A14NNPDF23LO_StauStau_directLLP_100_0_1ns.evgen.EVNT.e7067.EVNT.16137672._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableCharginos.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableCharginos.sh
index c4aedaefea42..be88e9b2e486 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableCharginos.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableCharginos.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.404460.MGPy8EG_A14N23LO_mAMSB_C1C1_5000_68000_Stable.evgen.EVNT.e5654.EVNT.13360885._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
diff --git a/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableSleptons.sh b/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableSleptons.sh
index 2abc2a9fe236..136b21d0ed2a 100755
--- a/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableSleptons.sh
+++ b/Simulation/Tests/SimExoticsTests/test/test_FullG4_StableSleptons.sh
@@ -8,6 +8,7 @@
 # art-include: 21.9/Athena
 # art-include: master/Athena
 # art-include: master/AthSimulation
+# art-output: *.root
 
 # MC16 setup
 # ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14
@@ -21,7 +22,7 @@ Sim_tf.py \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mc15_13TeV.404510.MGPy8EG_A14N23LO_GMSB_stablestau_lambda_090_tanb_10_dy.evgen.EVNT.e5652.EVNT.13360872._000001.pool.root.1" \
---outputHITSFile "Hits.pool.root" \
+--outputHITSFile "HITS.pool.root" \
 --maxEvents 10 \
 --imf False
 
-- 
GitLab


From 6d641c73249caec55965f753d63cd18f85b1d2c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Sun, 7 Jun 2020 16:52:50 +0200
Subject: [PATCH 028/266] check the output of the NSWPRDValAlg in ART

---
 .../test/test_Run3_asymmetric_fullChain.sh    | 20 +++++++++++++++++++
 .../test/test_Run3_symmetric_fullChain.sh     | 20 +++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_asymmetric_fullChain.sh b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_asymmetric_fullChain.sh
index fbdc31d5c82d..7627cdbe3cbb 100755
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_asymmetric_fullChain.sh
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_asymmetric_fullChain.sh
@@ -9,8 +9,10 @@
 # art-output: OUT_HITS.root
 # art-output: OUT_RDO.root
 # art-output: NSWPRDValAlg.digi.ntuple.root
+# art-output: NSWDigiCheck.txt
 # art-output: OUT_ESD.root
 # art-output: NSWPRDValAlg.reco.ntuple.root
+# art-output: NSWRecoCheck.txt
 
 #####################################################################
 # run simulation on 25 events using the asymmetric Run3 layout
@@ -57,6 +59,15 @@ NERROR="$(cat ${LOG_DIGI} | grep ERROR | wc -l)"
 NFATAL="$(cat ${LOG_DIGI} | grep FATAL | wc -l)"
 echo "Found ${NWARNING} WARNING, ${NERROR} ERROR and ${NFATAL} FATAL messages in ${LOG_DIGI}"
 #####################################################################
+# check the NSW validation ntuple
+python $Athena_DIR/bin/checkNSWValTree.py -i NSWPRDValAlg.digi.ntuple.root &> NSWDigiCheck.txt
+exit_code=$?
+echo  "art-result: ${exit_code} NSWDigiCheck"
+if [ ${exit_code} -ne 0 ]
+then
+    exit ${exit_code}
+fi
+#####################################################################
 
 #####################################################################
 # now use the produced RDO file and run reconstruction
@@ -81,5 +92,14 @@ NERROR="$(cat ${LOG_RECO} | grep ERROR | wc -l)"
 NFATAL="$(cat ${LOG_RECO} | grep FATAL | wc -l)"
 echo "Found ${NWARNING} WARNING, ${NERROR} ERROR and ${NFATAL} FATAL messages in ${LOG_RECO}"
 #####################################################################
+# check the NSW validation ntuple
+python $Athena_DIR/bin/checkNSWValTree.py -i NSWPRDValAlg.reco.ntuple.root --checkPRD &> NSWRecoCheck.txt
+exit_code=$?
+echo  "art-result: ${exit_code} NSWRecoCheck"
+if [ ${exit_code} -ne 0 ]
+then
+    exit ${exit_code}
+fi
+#####################################################################
 
 echo "art-result: $?"
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_symmetric_fullChain.sh b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_symmetric_fullChain.sh
index c8b2cadc799f..6e64585cabf5 100755
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_symmetric_fullChain.sh
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_Run3_symmetric_fullChain.sh
@@ -9,8 +9,10 @@
 # art-output: OUT_HITS.root
 # art-output: OUT_RDO.root
 # art-output: NSWPRDValAlg.digi.ntuple.root
+# art-output: NSWDigiCheck.txt
 # art-output: OUT_ESD.root
 # art-output: NSWPRDValAlg.reco.ntuple.root
+# art-output: NSWRecoCheck.txt
 
 #####################################################################
 # run simulation on 25 events using the symmetric Run3 layout
@@ -57,6 +59,15 @@ NERROR="$(cat ${LOG_DIGI} | grep ERROR | wc -l)"
 NFATAL="$(cat ${LOG_DIGI} | grep FATAL | wc -l)"
 echo "Found ${NWARNING} WARNING, ${NERROR} ERROR and ${NFATAL} FATAL messages in ${LOG_DIGI}"
 #####################################################################
+# check the NSW validation ntuple
+python $Athena_DIR/bin/checkNSWValTree.py -i NSWPRDValAlg.digi.ntuple.root &> NSWDigiCheck.txt
+exit_code=$?
+echo  "art-result: ${exit_code} NSWDigiCheck"
+if [ ${exit_code} -ne 0 ]
+then
+    exit ${exit_code}
+fi
+#####################################################################
 
 #####################################################################
 # now use the produced RDO file and run reconstruction
@@ -81,5 +92,14 @@ NERROR="$(cat ${LOG_RECO} | grep ERROR | wc -l)"
 NFATAL="$(cat ${LOG_RECO} | grep FATAL | wc -l)"
 echo "Found ${NWARNING} WARNING, ${NERROR} ERROR and ${NFATAL} FATAL messages in ${LOG_RECO}"
 #####################################################################
+# check the NSW validation ntuple
+python $Athena_DIR/bin/checkNSWValTree.py -i NSWPRDValAlg.reco.ntuple.root --checkPRD &> NSWRecoCheck.txt
+exit_code=$?
+echo  "art-result: ${exit_code} NSWRecoCheck"
+if [ ${exit_code} -ne 0 ]
+then
+    exit ${exit_code}
+fi
+#####################################################################
 
 echo "art-result: $?"
-- 
GitLab


From c419a80c0fcaf3c50c87d3dcf609777685c4bb3f Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 7 Jun 2020 20:48:11 +0200
Subject: [PATCH 029/266] Use the MeasurementBase type to avoid dynamic casts

---
 .../src/TrackSummaryTool.cxx                  | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index bb5bd5aba058..ecf10d511453 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -461,21 +461,29 @@ void Trk::TrackSummaryTool::processMeasurement(const Track& track,
 					       std::vector<int>& information,
 					       std::bitset<numberOfDetectorTypes>& hitPattern) const
 {
-  const RIO_OnTrack* rot = dynamic_cast<const RIO_OnTrack*> (meas);
-  
+
+  // Check if the measurement type is RIO on Track (ROT)
+  const RIO_OnTrack* rot = nullptr;
+  if (meas->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
+    rot = static_cast<const RIO_OnTrack*>(meas);
+  }
+
   if ( rot ){
     // have RIO_OnTrack
     const Trk::IExtendedTrackSummaryHelperTool* tool = getTool(rot->identify());
     if (tool==nullptr){
       ATH_MSG_WARNING("Cannot find tool to match ROT. Skipping.");
     } else {
-
       tool->analyse(track,prd_to_track_map, rot,tsos,information, hitPattern);
     }
   } else {
-    // Something other than a ROT.
-    const Trk::CompetingRIOsOnTrack *compROT = 
-      dynamic_cast<const Trk::CompetingRIOsOnTrack*>(meas);
+    //check if the measurement type is CompetingRIOsOnTrack
+    //
+    const Trk::CompetingRIOsOnTrack *compROT =nullptr;
+    if ( meas->type(Trk::MeasurementBaseType::CompetingRIOsOnTrack)) {
+      compROT = static_cast<const CompetingRIOsOnTrack *>(meas);
+    }
+
     if (compROT) {
       // if this works we have a CompetingRIOsOnTrack.
       rot = &compROT->rioOnTrack(0); // get 1st rot
-- 
GitLab


From 483ac424acb388a21135ac35338efda118950e21 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 7 Jun 2020 21:31:20 +0200
Subject: [PATCH 030/266] egammaLayerRecalibTool add ATLAS_CHECK_THREAD_SAFETY

---
 .../Root/corr_HV_EMBPS.cxx                    | 18 ++--
 .../Root/egammaLayerRecalibTool.cxx           | 86 +++++++++----------
 .../ATLAS_CHECK_THREAD_SAFETY                 |  1 +
 .../egammaLayerRecalibTool.h                  |  2 +-
 4 files changed, 54 insertions(+), 53 deletions(-)
 create mode 100644 Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/Root/corr_HV_EMBPS.cxx b/Reconstruction/egamma/egammaLayerRecalibTool/Root/corr_HV_EMBPS.cxx
index 507fa084e260..8dcacfc2b747 100644
--- a/Reconstruction/egamma/egammaLayerRecalibTool/Root/corr_HV_EMBPS.cxx
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/Root/corr_HV_EMBPS.cxx
@@ -154,17 +154,17 @@ float corr_HV_EMBPS::getDataCorrection(float hv,float eta) const
 //  as a function of eta (possibly)
 {
   if (hv>1300.) return 1.;
-  else if (hv>1000.) {
+  if (hv>1000.) {
     if (eta<-1.2) return 0.9925;
-    else if (eta<-0.8) return 0.9918;
-    else if (eta<-0.4) return 0.9889;
-    else if (eta<0.) return 0.9935;
-    else if (eta<0.4) return 0.9908;
-    else if (eta<0.8) return 0.99197;
-    else if (eta<1.2) return 0.9974;
-    else return 0.9971;
+    if (eta<-0.8) return 0.9918;
+    if (eta<-0.4) return 0.9889;
+    if (eta<0.) return 0.9935;
+    if (eta<0.4) return 0.9908;
+    if (eta<0.8) return 0.99197;
+    if (eta<1.2) return 0.9974;
+    return 0.9971;
   }
-  else return 1.015;
+  return 1.015;
 }
 
 //===============================================================================
diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/Root/egammaLayerRecalibTool.cxx b/Reconstruction/egamma/egammaLayerRecalibTool/Root/egammaLayerRecalibTool.cxx
index c8cf24807312..bfda8784ded4 100644
--- a/Reconstruction/egamma/egammaLayerRecalibTool/Root/egammaLayerRecalibTool.cxx
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/Root/egammaLayerRecalibTool.cxx
@@ -137,42 +137,42 @@ void ScaleEcalorimeter::scale_inputs(StdCalibrationInputs & inputs, float amount
 }
 
 
-const std::string& egammaLayerRecalibTool::resolve_alias(const std::string& tune) const {
-  static std::string result;
-  result = tune;
-  if ("layer1_2012" == tune)              result = "layer1_2012_v5";
-  else if ("layer1_alt_2012" == tune)     result = "layer1_alt_2012_v5";
-  else if ("layer1_2011" == tune)         result = "layer1_2011_v5";
-  else if ("layer1_alt_2011" == tune)     result = "layer1_alt_2011_v5";
-  else if ("layer1_2010" == tune)         result = "layer1_2010_v5";
-  else if ("ps_2012" == tune)             result = "ps_2012_v3";
-  else if ("ps_2011" == tune)             result = "ps_2011_v3";
-  else if ("ps_2010" == tune)             result = "ps_2010_v3";
-  else if ("layer1_2012_up" == tune)      result = "layer1_2012_v5_up";
-  else if ("layer1_2012_down" == tune)    result = "layer1_2012_v5_down";
-  else if ("layer1_2012_errup" == tune)   result = "layer1_2012_v5_errup";
-  else if ("layer1_2012_errdown" == tune) result = "layer1_2012_v5_errdown";
-  else if ("layer1_2011_up" == tune)      result = "layer1_2011_v5_up";
-  else if ("layer1_2011_down" == tune)    result = "layer1_2011_v5_down";
-  else if ("layer1_2011_errup" == tune)   result = "layer1_2011_v5_errup";
-  else if ("layer1_2011_errdown" == tune) result = "layer1_2011_v5_errdown";
-  else if ("layer1_2010_up" == tune)      result = "layer1_2010_v5_up";
-  else if ("layer1_2010_down" == tune)    result = "layer1_2010_v5_down";
-  else if ("layer1_2010_errup" == tune)   result = "layer1_2010_v5_errup";
-  else if ("layer1_2010_errdown" == tune) result = "layer1_2010_v5_errdown";
-  else if ("ps_2012_up" == tune)          result = "ps_2012_v3_up";
-  else if ("ps_2012_down" == tune)        result = "ps_2012_v3_down";
-  else if ("ps_2012_errup" == tune)       result = "ps_2012_v3_errup";
-  else if ("ps_2012_errdown" == tune)     result = "ps_2012_v3_errdown";
-  else if ("ps_2011_up" == tune)          result = "ps_2011_v3_up";
-  else if ("ps_2011_down" == tune)        result = "ps_2011_v3_down";
-  else if ("ps_2011_errup" == tune)       result = "ps_2011_v3_errup";
-  else if ("ps_2011_errdown" == tune)     result = "ps_2011_v3_errdown";
-  else if ("ps_2010_up" == tune)          result = "ps_2010_v3_up";
-  else if ("ps_2010_down" == tune)        result = "ps_2010_v3_down";
-  else if ("ps_2010_errup" == tune)       result = "ps_2010_v3_errup";
-  else if ("ps_2010_errdown" == tune)     result = "ps_2010_v3_errdown";
-  return result;
+std::string egammaLayerRecalibTool::resolve_alias(const std::string& tune) const {
+
+  if ("layer1_2012" == tune)         return "layer1_2012_v5";
+  if ("layer1_alt_2012" == tune)     return "layer1_alt_2012_v5";
+  if ("layer1_2011" == tune)         return "layer1_2011_v5";
+  if ("layer1_alt_2011" == tune)     return "layer1_alt_2011_v5";
+  if ("layer1_2010" == tune)         return "layer1_2010_v5";
+  if ("ps_2012" == tune)             return "ps_2012_v3";
+  if ("ps_2011" == tune)             return "ps_2011_v3";
+  if ("ps_2010" == tune)             return "ps_2010_v3";
+  if ("layer1_2012_up" == tune)      return "layer1_2012_v5_up";
+  if ("layer1_2012_down" == tune)    return "layer1_2012_v5_down";
+  if ("layer1_2012_errup" == tune)   return "layer1_2012_v5_errup";
+  if ("layer1_2012_errdown" == tune) return "layer1_2012_v5_errdown";
+  if ("layer1_2011_up" == tune)      return "layer1_2011_v5_up";
+  if ("layer1_2011_down" == tune)    return "layer1_2011_v5_down";
+  if ("layer1_2011_errup" == tune)   return "layer1_2011_v5_errup";
+  if ("layer1_2011_errdown" == tune) return "layer1_2011_v5_errdown";
+  if ("layer1_2010_up" == tune)      return "layer1_2010_v5_up";
+  if ("layer1_2010_down" == tune)    return "layer1_2010_v5_down";
+  if ("layer1_2010_errup" == tune)   return "layer1_2010_v5_errup";
+  if ("layer1_2010_errdown" == tune) return "layer1_2010_v5_errdown";
+  if ("ps_2012_up" == tune)          return "ps_2012_v3_up";
+  if ("ps_2012_down" == tune)        return "ps_2012_v3_down";
+  if ("ps_2012_errup" == tune)       return "ps_2012_v3_errup";
+  if ("ps_2012_errdown" == tune)     return "ps_2012_v3_errdown";
+  if ("ps_2011_up" == tune)          return "ps_2011_v3_up";
+  if ("ps_2011_down" == tune)        return "ps_2011_v3_down";
+  if ("ps_2011_errup" == tune)       return "ps_2011_v3_errup";
+  if ("ps_2011_errdown" == tune)     return "ps_2011_v3_errdown";
+  if ("ps_2010_up" == tune)          return "ps_2010_v3_up";
+  if ("ps_2010_down" == tune)        return "ps_2010_v3_down";
+  if ("ps_2010_errup" == tune)       return "ps_2010_v3_errup";
+  if ("ps_2010_errdown" == tune)     return "ps_2010_v3_errdown";
+
+  return tune;
 }
 
 void egammaLayerRecalibTool::add_scale(const std::string& tuneIn)
@@ -834,11 +834,11 @@ CP::CorrectionCode egammaLayerRecalibTool::applyCorrection(xAOD::Egamma& particl
 
   const CP::CorrectionCode status = scale_inputs(inputs);
 
-  static SG::AuxElement::Decorator<double> deco_E0("correctedcl_Es0");
-  static SG::AuxElement::Decorator<double> deco_E1("correctedcl_Es1");
-  static SG::AuxElement::Decorator<double> deco_E2("correctedcl_Es2");
-  static SG::AuxElement::Decorator<double> deco_E3("correctedcl_Es3");
-  static SG::AuxElement::Decorator<std::string> deco_layer_correction("layer_correction");
+  static const SG::AuxElement::Decorator<double> deco_E0("correctedcl_Es0");
+  static const SG::AuxElement::Decorator<double> deco_E1("correctedcl_Es1");
+  static const SG::AuxElement::Decorator<double> deco_E2("correctedcl_Es2");
+  static const SG::AuxElement::Decorator<double> deco_E3("correctedcl_Es3");
+  static const SG::AuxElement::Decorator<std::string> deco_layer_correction("layer_correction");
 
   if (status == CP::CorrectionCode::Ok) {
     ATH_MSG_DEBUG("decorating cluster with corrected layer energies");
@@ -849,7 +849,7 @@ CP::CorrectionCode egammaLayerRecalibTool::applyCorrection(xAOD::Egamma& particl
     deco_layer_correction(*cluster) = m_tune;
     return status;
   }
-  else {
+  
     ATH_MSG_DEBUG("cannot correct layer energies: decorating particle with non-corrected layer energies");
     // this is done for safety, since when a particle is decorated
     // all the particle in the container are decorated
@@ -861,7 +861,7 @@ CP::CorrectionCode egammaLayerRecalibTool::applyCorrection(xAOD::Egamma& particl
     deco_E3(*cluster) = cluster->energyBE(3);
     deco_layer_correction(*cluster) = m_tune;
     return status;
-  }
+  
 }
 
 
diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..8f8e81734425
--- /dev/null
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Reconstruction/egamma/egammaLayerRecalibTool
diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
index 73e8a36d9440..7ce654111324 100644
--- a/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
@@ -288,7 +288,7 @@ public:
 private:
   std::string m_tune;
   const std::string resolve_path(std::string filename) const;
-  const std::string& resolve_alias(const std::string& tune) const;
+  std::string resolve_alias(const std::string& tune) const;
   ModifiersList m_modifiers;
 };
 
-- 
GitLab


From b250583cd2cbf34dd1686defc8dc1cf008f3402e Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 7 Jun 2020 23:10:18 +0200
Subject: [PATCH 031/266] clang / flake8 tidy up

---
 .../Root/AsgElectronIsEMSelector.cxx          |  32 +-
 .../Root/AsgElectronLikelihoodTool.cxx        |  16 +-
 .../Root/AsgElectronMultiLeptonSelector.cxx   |   4 +-
 ...ElectronPhotonIsEMSelectorConfigHelper.cxx |   4 +-
 .../Root/AsgForwardElectronIsEMSelector.cxx   |  12 +-
 .../Root/AsgPhotonIsEMSelector.cxx            |  22 +-
 .../Root/EGammaAmbiguityTool.cxx              |   2 +-
 .../Root/TElectronLikelihoodTool.cxx          |  16 +-
 .../Root/TElectronMultiLeptonSelector.cxx     |  11 +-
 .../ConfiguredAsgElectronIsEMSelectors.py     |  46 +--
 .../ConfiguredAsgElectronLikelihoodTools.py   |  49 ++-
 ...nfiguredAsgForwardElectronIsEMSelectors.py |  49 ++-
 .../ConfiguredAsgPhotonIsEMSelectors.py       |  48 ++-
 .../ElectronIsEMH4l2011SelectorCutDefs.py     | 361 +++++++++---------
 14 files changed, 331 insertions(+), 341 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronIsEMSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronIsEMSelector.cxx
index 572c95567edd..6d34d7923b45 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronIsEMSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronIsEMSelector.cxx
@@ -294,10 +294,10 @@ asg::AcceptData AsgElectronIsEMSelector::accept( const EventContext& ctx,  const
   if(part->type()==xAOD::Type::Electron || part->type()==xAOD::Type::Photon){
     return accept(ctx, static_cast<const xAOD::Egamma*> (part));
   }
-  else{
+  
     ATH_MSG_ERROR("AsgElectronIsEMSelector::could not convert argument to Electron/Photon");
     return m_rootTool->accept();
-  }
+  
 }
 
 asg::AcceptData AsgElectronIsEMSelector::accept( const EventContext& ctx,  const xAOD::Egamma* eg ) const{
@@ -312,10 +312,10 @@ asg::AcceptData AsgElectronIsEMSelector::accept( const EventContext& ctx,  const
     }
     return m_rootTool->fillAccept(isEM);
   }
-  else{
+  
     ATH_MSG_ERROR("AsgElectronIsEMSelector::accept was given a bad argument");
     return m_rootTool->accept();
-  }
+  
 }
 
 asg::AcceptData AsgElectronIsEMSelector::accept( const EventContext& ctx, const xAOD::Electron* el) const{
@@ -336,20 +336,20 @@ std::string AsgElectronIsEMSelector::getOperatingPointName() const{
   if(!m_WorkingPoint.empty()){
     return m_WorkingPoint;
   }
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronLoosePP){ return "Loose"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronMediumPP ){ return "Medium"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronTightPP){ return "Tight"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronLoose1){return "Loose1";}
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronMedium1){return "Medium1";}
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronTight1){return "Tight1";}
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronLooseHLT){return "LooseHLT";}
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronMediumHLT){return "MediumHLT";}
-  else if (m_rootTool->m_isEMMask == egammaPID::ElectronTightHLT){return "TightHLT";}
-  else if (m_rootTool->m_isEMMask == 0){ return "0 No cuts applied"; }
-  else{
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronLoosePP){ return "Loose"; }
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronMediumPP ){ return "Medium"; }
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronTightPP){ return "Tight"; }
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronLoose1){return "Loose1";}
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronMedium1){return "Medium1";}
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronTight1){return "Tight1";}
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronLooseHLT){return "LooseHLT";}
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronMediumHLT){return "MediumHLT";}
+  if (m_rootTool->m_isEMMask == egammaPID::ElectronTightHLT){return "TightHLT";}
+  if (m_rootTool->m_isEMMask == 0){ return "0 No cuts applied"; }
+  
     ATH_MSG_INFO( "Didn't recognize the given operating point with mask: " << m_rootTool->m_isEMMask );
     return "";
-  }
+  
 }
 
 // ==============================================================
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx
index 402928c7c6ff..ed561ef7040b 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx
@@ -447,10 +447,10 @@ asg::AcceptData AsgElectronLikelihoodTool::accept(const EventContext& ctx, const
     if(eg->type() == xAOD::Type::Electron){
     const xAOD::Electron* el = static_cast<const xAOD::Electron*>(eg);
     return accept(el, mu);
-    } else {
+    } 
       ATH_MSG_ERROR("Input is not an electron and not caloOnly is set");
       return m_rootTool->accept();
-    }
+    
   }
   
   //Calo only LH
@@ -772,10 +772,10 @@ double AsgElectronLikelihoodTool::calculate( const EventContext& ctx, const xAOD
         const xAOD::Electron* el = static_cast<const xAOD::Electron*>(eg);
         return calculate(ctx, el);
       }
-      else {
+      
         ATH_MSG_ERROR("Input is not an electron and not Calo Only is required");
         return -999;
-      }
+      
   }
 
  const xAOD::CaloCluster* cluster = eg->caloCluster();
@@ -929,10 +929,10 @@ asg::AcceptData AsgElectronLikelihoodTool::accept(const EventContext& ctx, const
     const xAOD::Electron* el = static_cast<const xAOD::Electron*>(part);
     return accept(ctx, el);
   }
-  else {
+  
     ATH_MSG_ERROR("Input is not an electron");
     return m_rootTool->accept();
-  }
+  
 }
 
 double AsgElectronLikelihoodTool::calculate(const xAOD::IParticle* part) const
@@ -947,10 +947,10 @@ double AsgElectronLikelihoodTool::calculate(const EventContext& ctx, const xAOD:
     const xAOD::Electron* el = static_cast<const xAOD::Electron*>(part);
     return calculate(ctx, el);
   }
-  else {
+  
       ATH_MSG_ERROR ( "Input is not an electron" );
       return -999;
-  }
+  
 }
 
 //=============================================================================
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
index b90c49140fce..4ea5adbe38fa 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
@@ -242,10 +242,10 @@ asg::AcceptData AsgElectronMultiLeptonSelector::accept(const xAOD::IParticle* pa
     const xAOD::Electron* eg =static_cast<const xAOD::Electron*> (part);
     return accept(eg);
   }
-  else{
+  
     ATH_MSG_ERROR("AsgElectronMultiLeptonSelector::could not convert argument to accept");
     return m_rootTool->accept();
-  }
+  
 }
 
 //=============================================================================
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
index dff53d065931..21313bfdb626 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
@@ -45,7 +45,7 @@ namespace AsgConfigHelper{
       buffer>>f;
       return true;
     } 
-    else {
+    
       //if we have found comment character check if it is inlined between two "#"
       last = (input.find('#',first+1) );
       //if nor error
@@ -60,7 +60,7 @@ namespace AsgConfigHelper{
       std::istringstream buffer (tmp);
       buffer>>f;
       return true;
-    }
+    
   }
 
   template <typename T>  
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx
index 5227fe11b59e..4d30b5c27f4a 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx
@@ -179,10 +179,10 @@ AsgForwardElectronIsEMSelector::accept(const EventContext& ctx, const xAOD::IPar
   if(part->type()==xAOD::Type::Electron || part->type()==xAOD::Type::Photon){
     return accept(ctx, static_cast<const xAOD::Egamma*> (part));
   }
-  else{
+  
     ATH_MSG_ERROR("AsgForwardElectronIsEMSelector::could not convert argument to Electron/Photon");
     return m_rootForwardTool->accept();
-  }
+  
 }
 
 asg::AcceptData
@@ -198,10 +198,10 @@ AsgForwardElectronIsEMSelector::accept( const EventContext& ctx, const xAOD::Ega
     }
     return m_rootForwardTool->fillAccept(isEM);
   }
-  else{
+  
     ATH_MSG_ERROR("AsgForwardElectronIsEMSelector::accept was given a bad argument");
     return m_rootForwardTool->accept();
-  }
+  
 }
 
 asg::AcceptData
@@ -223,10 +223,10 @@ std::string AsgForwardElectronIsEMSelector::getOperatingPointName() const
 {
 
   if (m_rootForwardTool->m_isEMMask == egammaPID::ID_ForwardElectron){ return "Forw Id"; }
-  else{
+  
     ATH_MSG_INFO( "Didn't recognize the given operating point with mask: " << m_rootForwardTool->m_isEMMask );
     return "";
-  }
+  
 }
 
 ///==========================================================================================//
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgPhotonIsEMSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgPhotonIsEMSelector.cxx
index 587fdee718ab..309f2118a46e 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgPhotonIsEMSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgPhotonIsEMSelector.cxx
@@ -335,10 +335,10 @@ asg::AcceptData AsgPhotonIsEMSelector::accept( const EventContext& ctx, const xA
   if(part->type()==xAOD::Type::Photon || part->type()==xAOD::Type::Electron){
     return accept(ctx, static_cast<const xAOD::Egamma*> (part));
   }
-  else{
+  
     ATH_MSG_ERROR("AsgElectronIsEMSelector::could not convert argument to Photon/Electron");
     return m_rootTool->accept();
-  }
+  
 
 }
 asg::AcceptData AsgPhotonIsEMSelector::accept( const EventContext& ctx, const xAOD::Egamma* eg ) const{
@@ -353,10 +353,10 @@ asg::AcceptData AsgPhotonIsEMSelector::accept( const EventContext& ctx, const xA
     }
     return m_rootTool->fillAccept(isEM);
   }
-  else{
+  
     ATH_MSG_ERROR("AsgElectronIsEMSelector::accept was given a bad argument");
     return m_rootTool->accept();
-  }
+  
 }
 asg::AcceptData AsgPhotonIsEMSelector::accept( const EventContext& ctx, const xAOD::Photon* ph) const{
   ATH_MSG_DEBUG("Entering accept( const Photon* part )");  
@@ -374,15 +374,15 @@ asg::AcceptData AsgPhotonIsEMSelector::accept( const EventContext& ctx, const xA
 std::string AsgPhotonIsEMSelector::getOperatingPointName() const{
  
   if (m_rootTool->m_isEMMask == egammaPID::PhotonLoose){ return "Loose"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::PhotonMedium ){ return "Medium"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::PhotonTight){ return "Tight"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::PhotonLooseEF ){ return "LooseEF"; }
-  else if (m_rootTool->m_isEMMask == egammaPID::PhotonMediumEF){ return "MediumEF"; }
-  else if (m_rootTool->m_isEMMask == 0){ return "0 No cuts applied"; }
-  else{
+  if (m_rootTool->m_isEMMask == egammaPID::PhotonMedium ){ return "Medium"; }
+  if (m_rootTool->m_isEMMask == egammaPID::PhotonTight){ return "Tight"; }
+  if (m_rootTool->m_isEMMask == egammaPID::PhotonLooseEF ){ return "LooseEF"; }
+  if (m_rootTool->m_isEMMask == egammaPID::PhotonMediumEF){ return "MediumEF"; }
+  if (m_rootTool->m_isEMMask == 0){ return "0 No cuts applied"; }
+  
     ATH_MSG_ERROR( "Didn't recognize the given operating point with mask: " << m_rootTool->m_isEMMask );
     return "";
-  }
+  
 }
 
 // A simple execute command wrapper
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/EGammaAmbiguityTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/EGammaAmbiguityTool.cxx
index 2ab8eb2dac28..dbae430acead 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/EGammaAmbiguityTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/EGammaAmbiguityTool.cxx
@@ -30,7 +30,7 @@
 #include "FourMomUtils/xAODP4Helpers.h"
 
 #define CHECK_HITS( EXP )				\
-  if (!EXP)						\
+  if (!(EXP))						\
     {							\
       ATH_MSG_WARNING("Failed \"" << #EXP << "\"" );	\
       return false;					\
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
index 34050ed4f941..e1f56e38c222 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
@@ -3,15 +3,15 @@
  */
 
 #include "TElectronLikelihoodTool.h"
-#include <cmath>
-#include "TSystem.h"
-#include "TROOT.h"
-#include <stdio.h>                      // for sprintf
-#include <algorithm>                    // for min
-#include <fstream>                      // for char_traits
 #include "TFile.h"                      // for TFile
 #include "TH1.h"                        // for TH1F
+#include "TROOT.h"
 #include "TString.h"                    // for TString
+#include "TSystem.h"
+#include <algorithm>                    // for min
+#include <cmath>
+#include <cstdio>                      // for sprintf
+#include <fstream>                      // for char_traits
 
 #include "ElectronPhotonSelectorTools/ElectronSelectorHelpers.h"
 
@@ -885,7 +885,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT, co
     return nEtBins-1; // Return the last bin if > the last bin.
 
   }
-  else{
+  
     const unsigned int nEtBins = s_fnDiscEtBins;
     const double eTBins[nEtBins] = {10*GeV,15*GeV,20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,50*GeV};
 
@@ -895,7 +895,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT, co
     }
 
     return nEtBins-1; // Return the last bin if > the last bin.
-  }
+  
 }
 
 //---------------------------------------------------------------------------------------
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronMultiLeptonSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronMultiLeptonSelector.cxx
index 6a3bce7180c9..fac5afe6c175 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronMultiLeptonSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronMultiLeptonSelector.cxx
@@ -15,7 +15,7 @@ Description: Electron selector tool to select objects in pure ROOT using the mul
 // This class header
 #include "TElectronMultiLeptonSelector.h"
 // STL includes
-#include <math.h>
+#include <cmath>
 
 //=============================================================================
 // Constructor
@@ -537,12 +537,3 @@ bool Root::TElectronMultiLeptonSelector::passTightDeltaPhi(double deltaPhiRes, b
   return true;
 }
 
-//============================================================================================================================================
-
-
-
-
-
-
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronIsEMSelectors.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronIsEMSelectors.py
index cbe27bca6d50..476d634ef127 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronIsEMSelectors.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronIsEMSelectors.py
@@ -1,27 +1,25 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-##=============================================================================
-## Name:        ConfiguredAsgElectronIsEMSelectors
-##
-## Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC)
-## Created:     Dec. 2011
-##
-## Description: Apply the default configurations for the AsgElectronIsEMSelector,
-##              but allow for overwriting them with user-defined values.
-##
-##=============================================================================
+__doc__ = """Name:        ConfiguredAsgElectronIsEMSelectors
+  Author:      Karsten Koeneke(CERN), Jovan Mitrevski(UCSC)
+  Created:     Dec. 2011
+  Description: Apply the default configurations for the
+  AsgElectronIsEMSelector,but allow for overwriting
+  them with user-defined values."""
 
 # Import the needed general stuff
-from PATCore.HelperUtils import *
+from PATCore.HelperUtils import SetToolProperties
 from AthenaCommon import CfgMgr
 import sys
-import six
+
 
 # Import the needed stuff specific to the ElectronPhotonSelectorTools
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap, electronPIDmenu
+from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import (
+    ElectronIsEMMap, electronPIDmenu)
+
 
-def ConfiguredAsgElectronIsEMSelector( name, quality, menu=electronPIDmenu.menuDC14, **kw ):
+def ConfiguredAsgElectronIsEMSelector(
+        name, quality, menu=electronPIDmenu.menuDC14, **kw):
     """
     Configure the AsgElectronIsEMSelector with the quality cuts
     and allow for (re-)setting of all provided cuts.
@@ -29,13 +27,13 @@ def ConfiguredAsgElectronIsEMSelector( name, quality, menu=electronPIDmenu.menuD
     try:
         ntuple = ElectronIsEMMap(quality, menu)
     except KeyError:
-        sys.stderr.write("Electron quality not found. Please use an egammaIDQuality (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n This function only supports standard electron IDs, and not photon or forward IDs\n")
+        sys.stderr.write("Electron quality not found."
+                         "Please use an egammaIDQuality"
+                         "(ElectronPhotonSelectorTools/egammaPIDdefs.h).\n "
+                         "This function only supports standard electron IDs, "
+                         "and not photon or forward IDs\n")
         raise
 
-    # Get the label for user data
-    tmpName = six.get_function_code(ntuple[1]).co_name
-    labelName = "is" + ((tmpName.split("Selector")[0]).split("IsEM")[1])
-
     # Create and instance of the tool
     tool = CfgMgr.AsgElectronIsEMSelector(name, **kw)
 
@@ -44,11 +42,7 @@ def ConfiguredAsgElectronIsEMSelector( name, quality, menu=electronPIDmenu.menuD
     tool.isEMMask = ntuple[0]
 
     # Get all provided properties and overwrite the default values with them
-    SetToolProperties( tool, **kw )
+    SetToolProperties(tool, **kw)
 
-    #print tool
+    # print tool
     return tool
-
-
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronLikelihoodTools.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronLikelihoodTools.py
index 0cfbe5d3d363..e566ecd6150b 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronLikelihoodTools.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgElectronLikelihoodTools.py
@@ -1,27 +1,25 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-##=============================================================================
-## Name:        ConfiguredAsgElectronIsEMSelectors
-##
-## Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC), Kurt Brendlinger (Penn)
-## Created:     August 2013
-##
-## Description: Apply the default configurations for the AsgElectronIsEMSelector,
-##              but allow for overwriting them with user-defined values.
-##
-##=============================================================================
-
+__doc__ = """
+Name:        ConfiguredAsgElectronIsEMSelectors
+Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC),
+Kurt Brendlinger (Penn)
+Created:     August 2013
+Description: Apply the default configurations for the AsgElectronIsEMSelector,
+but allow for overwriting them with user-defined values.
+"""
 # Import the needed general stuff
-from PATCore.HelperUtils import *
+from PATCore.HelperUtils import SetToolProperties
 from AthenaCommon import CfgMgr
 import sys
-import six
 
 # Import the needed stuff specific to the ElectronPhotonSelectorTools
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronLikelihoodTool
-from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping import ElectronLikelihoodMap, electronLHmenu
+from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping import (
+    ElectronLikelihoodMap, electronLHmenu)
+
 
-def ConfiguredAsgElectronLikelihoodTool( name, quality, menu=electronLHmenu.offlineMC16, **kw ):
+def ConfiguredAsgElectronLikelihoodTool(
+        name, quality, menu=electronLHmenu.offlineMC16, **kw):
     """
     Configure the AsgElectronIsEMSelector with the quality cuts
     and allow for (re-)setting of all provided cuts.
@@ -29,23 +27,20 @@ def ConfiguredAsgElectronLikelihoodTool( name, quality, menu=electronLHmenu.offl
     try:
         ntuple = ElectronLikelihoodMap(quality, menu)
     except KeyError:
-        sys.stderr.write("Electron quality not found. Please use an egammaIDQuality (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n This function only supports standard electron IDs, and not photon or forward IDs\n")
+        sys.stderr.write(
+            "Electron quality not found."
+            " Please use an egammaIDQuality"
+            " (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n"
+            " This function only supports standard electron IDs,"
+            " and not photon or forward IDs\n")
         raise
 
-    # Get the label for user data
-    tmpName = six.get_function_code(ntuple[1]).co_name
-    labelName = "isLH" + ((tmpName.split("Config")[0]).split("Likelihood")[1])
-
     # Create an instance of the tool
     tool = CfgMgr.AsgElectronLikelihoodTool(name, **kw)
     ntuple[1](tool)
 
     # Get all provided properties and overwrite the default values with them
-    SetToolProperties( tool, **kw )
+    SetToolProperties(tool, **kw)
 
-    #print tool
+    # print tool
     return tool
-
-
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgForwardElectronIsEMSelectors.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgForwardElectronIsEMSelectors.py
index 90046733067b..653b66c950cf 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgForwardElectronIsEMSelectors.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgForwardElectronIsEMSelectors.py
@@ -1,26 +1,28 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-##=============================================================================
-## Name:        ConfiguredAsgForwardElectronIsEMSelectors
-##
-## Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC)
-## Created:     Dec. 2011
-##
-## Description: Apply the default configurations for the AsgForwardElectronIsEMSelector,  but allow for overwriting them with user-defined values.
-##
-##=============================================================================
+__doc__ = """
+Name:        ConfiguredAsgForwardElectronIsEMSelectors
+
+Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC)
+Created:     Dec. 2011
+
+Description: Apply the default configurations for the
+AsgForwardElectronIsEMSelector,  but allow for overwriting
+them with user-defined values.
+"""
 
 # Import the needed general stuff
-from PATCore.HelperUtils import *
+from PATCore.HelperUtils import SetToolProperties
 from AthenaCommon import CfgMgr
 import sys
-import six
 
 # Import the needed stuff specific to the ElectronPhotonSelectorTools
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgForwardElectronIsEMSelector
-from ElectronPhotonSelectorTools.ForwardElectronIsEMSelectorMapping import ForwardElectronIsEMMap, forwardelectronPIDmenu
+from ElectronPhotonSelectorTools.ForwardElectronIsEMSelectorMapping import (
+    ForwardElectronIsEMMap, forwardelectronPIDmenu)
 
-def ConfiguredAsgForwardElectronIsEMSelector( name, quality, menu=forwardelectronPIDmenu.menuMC15, **kw ):
+
+def ConfiguredAsgForwardElectronIsEMSelector(
+        name, quality, menu=forwardelectronPIDmenu.menuMC15, **kw):
     """
     Configure the AsgForwardElectronIsEMSelector with the quality cuts
     and allow for (re-)setting of all provided cuts.
@@ -28,13 +30,14 @@ def ConfiguredAsgForwardElectronIsEMSelector( name, quality, menu=forwardelectro
     try:
         ntuple = ForwardElectronIsEMMap(quality, menu)
     except KeyError:
-        sys.stderr.write("Fwd Electron quality not found. Please use an egammaIDQuality (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n This function only supports standard electron IDs, and not photon or forward IDs\n")
+        sys.stderr.write(
+            " Fwd Electron quality not found."
+            " Please use an egammaIDQuality"
+            " (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n"
+            " This function only supports standard electron IDs,"
+            " and not photon or forward IDs\n")
         raise
 
-    # Get the label for user data
-    tmpName = six.get_function_code(ntuple[1]).co_name
-    labelName = "is" + ((tmpName.split("Selector")[0]).split("IsEM")[1])
-
     # Create and instance of the tool
     tool = CfgMgr.AsgForwardElectronIsEMSelector(name, **kw)
 
@@ -43,11 +46,7 @@ def ConfiguredAsgForwardElectronIsEMSelector( name, quality, menu=forwardelectro
     tool.isEMMask = ntuple[0]
 
     # Get all provided properties and overwrite the default values with them
-    SetToolProperties( tool, **kw )
+    SetToolProperties(tool, **kw)
 
-    #print tool
+    # print tool
     return tool
-
-
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgPhotonIsEMSelectors.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgPhotonIsEMSelectors.py
index b7ff39cd6a23..aca1c0b090e2 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgPhotonIsEMSelectors.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ConfiguredAsgPhotonIsEMSelectors.py
@@ -1,26 +1,27 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
-##=============================================================================
-## Name:        ConfiguredAsgPhotonIsEMSelectors
-##
-## Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC)
-## Created:     Dec. 2011
-##
-## Description: Apply the default configurations for the AsgPhotonIsEMSelector,
-##              but allow for overwriting them with user-defined values.
-##
-##=============================================================================
+__doc__ = """
+Name:        ConfiguredAsgPhotonIsEMSelectors
+
+Author:      Karsten Koeneke (CERN), Jovan Mitrevski (UCSC)
+Created:     Dec. 2011
+
+Description: Apply the default configurations for the AsgPhotonIsEMSelector,
+             but allow for overwriting them with user-defined values.
+"""
 
 # Import the needed general stuff
-from PATCore.HelperUtils import *
+from PATCore.HelperUtils import SetToolProperties
 from AthenaCommon import CfgMgr
 import sys
 
 # Import the needed stuff specific to the PhotonPhotonSelectorTools
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgPhotonIsEMSelector
-from ElectronPhotonSelectorTools.PhotonIsEMSelectorMapping import PhotonIsEMMap, photonPIDmenu
+from ElectronPhotonSelectorTools.PhotonIsEMSelectorMapping import (
+    PhotonIsEMMap, photonPIDmenu)
 
-def ConfiguredAsgPhotonIsEMSelector( name, quality, menu=photonPIDmenu.menuDC14, **kw ):
+
+def ConfiguredAsgPhotonIsEMSelector(
+        name, quality, menu=photonPIDmenu.menuDC14, **kw):
     """
     Configure the AsgPhotonIsEMSelector with the quality cuts
     and allow for (re-)setting of all provided cuts.
@@ -28,12 +29,13 @@ def ConfiguredAsgPhotonIsEMSelector( name, quality, menu=photonPIDmenu.menuDC14,
     try:
         ntuple = PhotonIsEMMap(quality, menu)
     except KeyError:
-        sys.stderr.write("Photon quality not found. Please use an egammaIDQuality (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n This function only supports standard photon IDs, and not photon or forward IDs\n")
+        sys.stderr.write(
+            " Photon quality not found."
+            " Please use an egammaIDQuality"
+            " (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n"
+            " This function only supports standard photon IDs,"
+            " and not photon or forward IDs\n")
         raise
-    
-    # Get the label for user data
-    tmpName = (ntuple[1]).__name__
-    labelName = "is" + ((tmpName.split("Selector")[0]).split("IsEM")[1])
 
     # Create and instance of the tool
     tool = CfgMgr.AsgPhotonIsEMSelector(name, **kw)
@@ -43,11 +45,7 @@ def ConfiguredAsgPhotonIsEMSelector( name, quality, menu=photonPIDmenu.menuDC14,
     tool.isEMMask = ntuple[0]
 
     # Get all provided properties and overwrite the default values with them
-    SetToolProperties( tool, **kw )
+    SetToolProperties(tool, **kw)
 
-    #print tool
+    # print tool
     return tool
-
-
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronIsEMH4l2011SelectorCutDefs.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronIsEMH4l2011SelectorCutDefs.py
index de820dc021de..e64ed0737cfa 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronIsEMH4l2011SelectorCutDefs.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronIsEMH4l2011SelectorCutDefs.py
@@ -1,217 +1,230 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-# default configuration of the ElectronIsEMSelectorCutDefs
-# This one is used for loose++ menu
+__doc__ = """
+default configuration of the ElectronIsEMSelectorCutDefs
+This one is used for loose++ menu
+"""
 
 # Import a needed helper
-from PATCore.HelperUtils import *
+from PATCore.HelperUtils import GetTool
 
 # Define GeV
 GeV = 1000.0
 
-def ElectronIsEMH4l2011SelectorConfig(theTool) :
-    '''
+
+def ElectronIsEMH4l2011SelectorConfig(theTool):
+    """
     This is for the Loose++ isEM definitions.
-    '''
-    
+    """
+
     theTool = GetTool(theTool)
 
     # the eta ranges
-    theTool.CutBinEta += [0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
-    
+    theTool.CutBinEta += [0.1, 0.6, 0.8, 1.15,
+                          1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
+
     # range of ET bins for e-ID
-    theTool.CutBinET += [5.0*GeV, 10.0*GeV, 15.0*GeV, 20.0*GeV, 30.0*GeV, 40.0*GeV, 50.0*GeV, 60.0*GeV, 70.0*GeV, 80.0*GeV]
+    theTool.CutBinET += [
+        5.0*GeV, 10.0*GeV, 15.0*GeV, 20.0*GeV,
+        30.0*GeV, 40.0*GeV, 50.0*GeV, 60.0*GeV,
+        70.0*GeV, 80.0*GeV]
     # cut on fraction of energy deposited in 1st sampling
     theTool.CutF1 += [0.005]
-    # cut on hadronic energy
-    theTool.CutHadLeakage  += [ 0.031, 0.031, 0.021, 0.021, 0.019, 0.028, 0.065, 0.065, 0.046, 0.034, # < 5
-                               0.018, 0.018, 0.016, 0.015, 0.016, 0.028, 0.053, 0.038, 0.028, 0.025, # 5-10
-                               0.018, 0.018, 0.018, 0.020, 0.016, 0.033, 0.036, 0.033, 0.024, 0.025, # 10-15 
-                               0.015, 0.015, 0.015, 0.016, 0.014, 0.029, 0.033, 0.022, 0.019, 0.018, # 15-20 
-                               0.012, 0.012, 0.012, 0.012, 0.012, 0.015, 0.030, 0.022, 0.016, 0.016, # 20-30 
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.021, 0.021, 0.015, 0.015, # 30-40 
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010, # 40-50
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010, # 50-60
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010, # 60-70
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010, # 70-80
-                               0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010, # >80
-                               ]
 
+    # cut on hadronic energy
+    theTool.CutHadLeakage += [
+        0.031, 0.031, 0.021, 0.021, 0.019, 0.028, 0.065, 0.065, 0.046, 0.034,  # < 5
+        0.018, 0.018, 0.016, 0.015, 0.016, 0.028, 0.053, 0.038, 0.028, 0.025,  # 5-10
+        0.018, 0.018, 0.018, 0.020, 0.016, 0.033, 0.036, 0.033, 0.024, 0.025,  # 10-15
+        0.015, 0.015, 0.015, 0.016, 0.014, 0.029, 0.033, 0.022, 0.019, 0.018,  # 15-20
+        0.012, 0.012, 0.012, 0.012, 0.012, 0.015, 0.030, 0.022, 0.016, 0.016,  # 20-30
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.021, 0.021, 0.015, 0.015,  # 30-40
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010,  # 40-50
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010,  # 50-60
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010,  # 60-70
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010,  # 70-80
+        0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.015, 0.015, 0.010, 0.010,  # >80
+    ]
 
     # cut on ratio e237/e277
-    theTool.CutReta37  += [ 0.700, 0.700, 0.700, 0.700, 0.700, 0.690, 0.848, 0.876, 0.870, 0.888, # < 5
-                           0.700, 0.700, 0.700, 0.700, 0.700, 0.715, 0.860, 0.880, 0.880, 0.880, # 5-10
-                           0.875, 0.875, 0.875, 0.875, 0.875, 0.740, 0.860, 0.875, 0.870, 0.870, # 10-15
-                           0.900, 0.900, 0.895, 0.895, 0.890, 0.740, 0.880, 0.900, 0.880, 0.880, # 15-20
-                           0.910, 0.910, 0.910, 0.910, 0.910, 0.750, 0.890, 0.900, 0.890, 0.890, # 20-30
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # 30-40
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # 40-50 
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # 50-60 
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # 60-70 
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # 70-80 
-                           0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890, # >80 
-                           ]
-    
+    theTool.CutReta37 += [
+        0.700, 0.700, 0.700, 0.700, 0.700, 0.690, 0.848, 0.876, 0.870, 0.888,  # < 5
+        0.700, 0.700, 0.700, 0.700, 0.700, 0.715, 0.860, 0.880, 0.880, 0.880,  # 5-10
+        0.875, 0.875, 0.875, 0.875, 0.875, 0.740, 0.860, 0.875, 0.870, 0.870,  # 10-15
+        0.900, 0.900, 0.895, 0.895, 0.890, 0.740, 0.880, 0.900, 0.880, 0.880,  # 15-20
+        0.910, 0.910, 0.910, 0.910, 0.910, 0.750, 0.890, 0.900, 0.890, 0.890,  # 20-30
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # 30-40
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # 40-50
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # 50-60
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # 60-70
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # 70-80
+        0.920, 0.920, 0.920, 0.915, 0.915, 0.790, 0.895, 0.915, 0.895, 0.890,  # >80
+    ]
+
     # cut on shower width in 2nd sampling
-    theTool.CutWeta2c  +=  [0.014, 0.014, 0.014, 0.014, 0.014, 0.028, 0.017, 0.014, 0.014, 0.014,# <5 
-                            0.014, 0.014, 0.014, 0.014, 0.014, 0.026, 0.017, 0.014, 0.014, 0.014,# 5-10
-                            0.014, 0.014 ,0.015 ,0.016 ,0.017 ,0.025 ,0.017 ,0.015 ,0.015 ,0.015,#10-15
-                            0.013, 0.013 ,0.015 ,0.016 ,0.017 ,0.025 ,0.017 ,0.015 ,0.015 ,0.014,#15-20
-                            0.013 ,0.013 ,0.014 ,0.015 ,0.015 ,0.025 ,0.016 ,0.015 ,0.015 ,0.014,#20-30
-                            0.012 ,0.012 ,0.013 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013,#30-40
-                            0.011 ,0.011 ,0.012 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013,#40-50
-                            0.011 ,0.011 ,0.012 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013,# 50-60
-                            0.011 ,0.011 ,0.012 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013,# 60-70 
-                            0.011 ,0.011 ,0.012 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013,# 70-80 
-                            0.011 ,0.011 ,0.012 ,0.013 ,0.013 ,0.025 ,0.015 ,0.014 ,0.014 ,0.013]# 80<   
-
-    
+    theTool.CutWeta2c += [
+        0.014, 0.014, 0.014, 0.014, 0.014, 0.028, 0.017, 0.014, 0.014, 0.014,  # <5
+        0.014, 0.014, 0.014, 0.014, 0.014, 0.026, 0.017, 0.014, 0.014, 0.014,  # 5-10
+        0.014, 0.014, 0.015, 0.016, 0.017, 0.025, 0.017, 0.015, 0.015, 0.015,  # 10-15
+        0.013, 0.013, 0.015, 0.016, 0.017, 0.025, 0.017, 0.015, 0.015, 0.014,  # 15-20
+        0.013, 0.013, 0.014, 0.015, 0.015, 0.025, 0.016, 0.015, 0.015, 0.014,  # 20-30
+        0.012, 0.012, 0.013, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013,  # 30-40
+        0.011, 0.011, 0.012, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013,  # 40-50
+        0.011, 0.011, 0.012, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013,  # 50-60
+        0.011, 0.011, 0.012, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013,  # 60-70
+        0.011, 0.011, 0.012, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013,  # 70-80
+        0.011, 0.011, 0.012, 0.013, 0.013, 0.025, 0.015, 0.014, 0.014, 0.013]  # 80<
+
     # cut on total width in 1st sampling
-    theTool.CutWtot  += [ 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999.,  # < 5 
-                         9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999.,  # 5-10
-                         3.20, 3.20, 3.20, 3.85, 3.85, 9999., 3.80, 3.00, 2.00, 9999.,  # 10-15 
-                         3.00, 3.00, 3.00, 3.75, 3.75, 9999., 3.80, 3.00, 2.00, 9999.,  # 15-20 
-                         2.90, 2.90, 2.90, 3.50, 3.50, 9999., 3.80, 3.00, 2.00, 9999.,  # 20-30 
-                         2.80, 2.80, 2.80, 3.30, 3.40, 9999., 3.70, 3.00, 1.70, 9999.,  # 30-40 
-                         2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 40-50 
-                         2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 50-60 
-                         2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 60-70 
-                         2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 70-80 
-                         2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # >80 
-                         ]
-    
-    # cut on (Emax - Emax2)/(Emax + Emax2) in 1st sampling
-    theTool.CutDEmaxs1 += [ 0.390 ,0.390 ,0.200, 0.070 ,0.060, -9999,  0.070, 0.430, 0.750, -9999,  # < 5 
-                           0.650 ,0.660 ,0.560 ,0.460 ,0.530 ,-9999,  0.600, 0.680, 0.750, -9999,  # 5-10
-                           0.790, 0.790, 0.750, 0.590, 0.530, -9999., 0.600, 0.790, 0.840, -9999.,  # 10-15 
-                           0.790, 0.790, 0.790, 0.700, 0.580, -9999., 0.600, 0.790, 0.850, -9999.,  # 15-20 
-                           0.800, 0.800, 0.820, 0.720, 0.650, -9999., 0.780, 0.790, 0.850, -9999.,  # 20-30 
-                           0.800, 0.800, 0.825, 0.720, 0.690, -9999., 0.780, 0.810, 0.880, -9999.,  # 30-40 
-                           0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 40-50 
-                           0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 50-60 
-                           0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 60-70 
-                           0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 70-80 
-                           0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # >80 
-                           ]
-    
-    # cut on Track quality cut        
-    theTool.usePIXOutliers  = True
-    theTool.useSCTOutliers  = True  
+    theTool.CutWtot += [
+        9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999.,  # < 5
+        9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999.,  # 5-10
+        3.20, 3.20, 3.20, 3.85, 3.85, 9999., 3.80, 3.00, 2.00, 9999.,  # 10-15
+        3.00, 3.00, 3.00, 3.75, 3.75, 9999., 3.80, 3.00, 2.00, 9999.,  # 15-20
+        2.90, 2.90, 2.90, 3.50, 3.50, 9999., 3.80, 3.00, 2.00, 9999.,  # 20-30
+        2.80, 2.80, 2.80, 3.30, 3.40, 9999., 3.70, 3.00, 1.70, 9999.,  # 30-40
+        2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 40-50
+        2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 50-60
+        2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 60-70
+        2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # 70-80
+        2.80, 2.80, 2.80, 3.20, 3.40, 9999., 3.70, 2.90, 1.60, 9999.,  # >80
+    ]
 
+    # cut on (Emax - Emax2)/(Emax + Emax2) in 1st sampling
+    theTool.CutDEmaxs1 += [
+        0.390, 0.390, 0.200, 0.070, 0.060, -9999,  0.070, 0.430, 0.750, -9999,  # < 5
+        0.650, 0.660, 0.560, 0.460, 0.530, -9999,  0.600, 0.680, 0.750, -9999,  # 5-10
+        0.790, 0.790, 0.750, 0.590, 0.530, -9999., 0.600, 0.790, 0.840, -9999.,  # 10-15
+        0.790, 0.790, 0.790, 0.700, 0.580, -9999., 0.600, 0.790, 0.850, -9999.,  # 15-20
+        0.800, 0.800, 0.820, 0.720, 0.650, -9999., 0.780, 0.790, 0.850, -9999.,  # 20-30
+        0.800, 0.800, 0.825, 0.720, 0.690, -9999., 0.780, 0.810, 0.880, -9999.,  # 30-40
+        0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 40-50
+        0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 50-60
+        0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 60-70
+        0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # 70-80
+        0.800, 0.800, 0.825, 0.730, 0.690, -9999., 0.790, 0.810, 0.880, -9999.,  # >80
+    ]
+
+    # cut on Track quality cut
+    theTool.usePIXOutliers = True
+    theTool.useSCTOutliers = True
 
     # cut on pixel-layer hits
-    theTool.CutPi  += [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
-        
+    theTool.CutPi += [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+
     # cut on precision hits
-    theTool.CutSi  += [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]
-        
-    # cut on delta eta
-    theTool.CutDeltaEta += [0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                           0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
-                           ]
-
-###################### END OF USEFULL CUTS ##########################################
+    theTool.CutSi += [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]
 
+    # cut on delta eta
+    theTool.CutDeltaEta += [
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
+    ]
+
+    # END OF USEFULL CUTS
 
     # The following ARE NOT APPLIED FOR THE H4L or the LOOSE MENU ISEM
 
     # cut on transverse impact parameter
-    theTool.CutA0  += [5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0]
-    
-    # cut on transverse impact parameter for tight selection   	 	 
-    theTool.CutA0Tight  += [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
+    theTool.CutA0 += [5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0]
+
+    # cut on transverse impact parameter for tight selection
+    theTool.CutA0Tight += [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
 
     # cut on delta eta for tight selection
-    theTool.CutDeltaEtaTight += [0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
-                                ]
-    theTool.useTRTOutliers  = True
-    theTool.useBLOutliers  = True
-
-        
+    theTool.CutDeltaEtaTight += [
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
+    ]
+    theTool.useTRTOutliers = True
+    theTool.useBLOutliers = True
+
     # cut on b-layer hits
-    theTool.CutBL  += [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+    theTool.CutBL += [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
     # cut max on delta phi
-    theTool.CutmaxDeltaPhi  += [ 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
-                                0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
-                                ]
-    # cut min on deltaphi 
-    theTool.CutminDeltaPhi  += [ -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-                                 ] 
+    theTool.CutmaxDeltaPhi += [
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015,
+        0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015
+    ]
+    # cut min on deltaphi
+    theTool.CutminDeltaPhi += [
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+        -0.03, -0.03, -0.03, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
+    ]
 
     # cut min on E/P
-    theTool.CutminEp  += [0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
-                         0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
-                         0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90,
-                         0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90,
-                         0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
-                         0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
-                         0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
-                         0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
-                         0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
-                         0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
-                         0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
-                         ]
+    theTool.CutminEp += [
+        0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
+        0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
+        0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90,
+        0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90,
+        0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80,
+        0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
+        0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
+        0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
+        0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
+        0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70, 0.70,
+        0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
+    ]
     # cut max on E/P
-    theTool.CutmaxEp  += [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0, 3.0, 3.0,
-                         2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0, 3.0, 3.0,
-                         2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.0, 4.0,
-                         2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.0, 4.0,
-                         2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.5, 4.5,
-                         3.0, 3.0, 3.0, 3.0, 3.0, 3.5, 3.5, 4.0, 4.5, 4.5,
-                         3.0, 3.0, 3.0, 3.0, 3.0, 3.5, 4.0, 5.0, 5.0, 5.0,
-                         5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
-                         5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
-                         5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
-                         10., 10., 10., 10., 10., 10., 10., 10., 10., 10.
-                         ]
-    
+    theTool.CutmaxEp += [
+        2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0, 3.0, 3.0,
+        2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0, 3.0, 3.0,
+        2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.0, 4.0,
+        2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.0, 4.0,
+        2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.5, 3.5, 4.5, 4.5,
+        3.0, 3.0, 3.0, 3.0, 3.0, 3.5, 3.5, 4.0, 4.5, 4.5,
+        3.0, 3.0, 3.0, 3.0, 3.0, 3.5, 4.0, 5.0, 5.0, 5.0,
+        5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
+        5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
+        5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
+        10., 10., 10., 10., 10., 10., 10., 10., 10., 10.
+    ]
+
     # cuts on TRT
     # range of eta bins for e-ID for TRT
     theTool.CutBinEta_TRT += [0.1, 0.625, 1.07, 1.304, 1.752, 2.0]
     # cuts on Number of TRT hits with Outliers
-    theTool.CutNumTRT  += [-15.,-15., -15., -15., -15., -15.]
+    theTool.CutNumTRT += [-15., -15., -15., -15., -15., -15.]
     # cuts on TRT ratio with Outliers
-    theTool.CutTRTRatio  += [0.04, 0.04, 0.04, 0.05, 0.07, 0.07]
+    theTool.CutTRTRatio += [0.04, 0.04, 0.04, 0.05, 0.07, 0.07]
     # cuts on TRT ratio with Outliers for 90% efficiency
-    theTool.CutTRTRatio90  += [0.10, 0.10, 0.125, 0.13, 0.13, 0.13]
-
-###################### END OF CUTS ##########################################
+    theTool.CutTRTRatio90 += [0.10, 0.10, 0.125, 0.13, 0.13, 0.13]
 
+# END OF CUTS
-- 
GitLab


From 19d47650f34216276d37526b8bee9b28d82054ad Mon Sep 17 00:00:00 2001
From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch>
Date: Mon, 8 Jun 2020 10:37:20 +0200
Subject: [PATCH 032/266] Use ComponentFactory where needed Reverse use of
 context in JetBTaggingAlg for JFVtx and SecVtx container (crash with ctx)

---
 Control/AthenaConfiguration/python/ComponentAccumulator.py | 4 ++--
 .../BTagging/python/BTagLightSecVertexingConfig.py         | 3 ++-
 .../JetTagAlgs/BTagging/python/BTagRun3Config.py           | 5 ++---
 .../JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py     | 7 +++----
 .../JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx  | 4 ++--
 5 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index 50d4323dcf81..fd9c57064ede 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -216,10 +216,10 @@ class ComponentAccumulator(object):
         """ Adds new sequence. If second argument is present then it is added under another sequence  """
         from AthenaCommon.AlgSequence import AthSequencer as LegacySequence
         if isinstance( newseq, LegacySequence ):
-            raise TypeError('{} is not the Conf2 Sequence, ComponentAccumulator handles only the former'.format(newseq.name()))
+            raise ConfigurationError('{} is not the Conf2 Sequence, ComponentAccumulator handles only the former'.format(newseq.name()))
 
         if not isSequence(newseq):
-            raise TypeError('{} is not a sequence'.format(newseq.name))
+            raise ConfigurationError('{} is not a sequence'.format(newseq.name))
 
         if parentName is None:
             parent=self._sequence
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py
index 56327065748c..e87c04895a86 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py
@@ -1,11 +1,12 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 from BTagging.BTaggingFlags import BTaggingFlags
 from JetTagTools.JetFitterVariablesFactoryConfig import JetFitterVariablesFactoryCfg
 #from BTagging.MSVVariablesFactoryConfig import MSVVariablesFactoryCfg
 
-from BTagging.BTaggingConf import Analysis__BTagLightSecVertexing
+Analysis__BTagLightSecVertexing=CompFactory.Analysis.BTagLightSecVertexing
 
 def BTagLightSecVtxToolCfg(flags, Name, JetCollection, SVandAssoc = {""}, TimeStamp = "", **options):
     """Adds a SecVtxTool instance and registers it.
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
index 85353641822b..3d31adb660c4 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
@@ -281,7 +281,7 @@ def BTagCfg(inputFlags,**kwargs):
 def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps, TimeStamp):
     result = ComponentAccumulator()
 
-    from AthenaCommon.AlgSequence import AthSequencer
+    AthSequencer=CompFactory.AthSequencer
 
     BTagCollection = 'BTagging_'+JetCollection
     sequenceName = BTagCollection + "_HLTaggers"
@@ -289,8 +289,7 @@ def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps,
             BTagCollection += '_' + TimeStamp
             sequenceName += '_' + TimeStamp
 
-    HLBTagSeq = AthSequencer(sequenceName)
-    HLBTagSeq.Sequential = True
+    HLBTagSeq = AthSequencer(sequenceName, Sequential = True)
     result.addSequence(HLBTagSeq)
 
     result.merge(BTagHighLevelAugmenterAlgCfg(inputFlags, sequenceName, BTagCollection = BTagCollection, Associator = Associator, **kwargs) )
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
index 0306402ba53f..8eb6be5d53e6 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
@@ -1,11 +1,12 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 from BTagging.BTagToolConfig import BTagToolCfg
 from BTagging.BTagLightSecVertexingConfig import BTagLightSecVtxToolCfg
 
 # import the JetBTaggingAlg configurable
-from BTagging.BTaggingConf import Analysis__JetBTaggingAlg as JetBTaggingAlg
+Analysis__JetBTaggingAlg = CompFactory.Analysis.JetBTaggingAlg
 
 def JetBTaggingAlgCfg(ConfigFlags, JetCollection="", TaggerList=[], SetupScheme="", SVandAssoc={""}, TimeStamp = "", **options):
 
@@ -39,10 +40,8 @@ def JetBTaggingAlgCfg(ConfigFlags, JetCollection="", TaggerList=[], SetupScheme=
     options['BTaggingCollectionName'] = btagname
     options['JetLinkName'] = options['BTaggingCollectionName'] + '.jetLink'
     options['name'] = (btagname + ConfigFlags.BTagging.GeneralToolSuffix).lower()
-    print("Manu")
-    print(options)
 
     # -- create main BTagging algorithm
-    acc.addEventAlgo(JetBTaggingAlg(**options))
+    acc.addEventAlgo(Analysis__JetBTaggingAlg(**options))
 
     return acc
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
index cc3647eb31ee..582cfb7a7acc 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
@@ -108,7 +108,7 @@ namespace Analysis {
     }
 
     //retrieve the JF Vertex container
-    SG::ReadHandle<xAOD::BTagVertexContainer> h_BTagJFVtxCollectionName (m_BTagJFVtxCollectionName.key(), ctx );
+    SG::ReadHandle<xAOD::BTagVertexContainer> h_BTagJFVtxCollectionName (m_BTagJFVtxCollectionName.key() );
     if (!h_BTagJFVtxCollectionName.isValid()) {
       ATH_MSG_ERROR( " cannot retrieve JF Vertex container with key " << m_BTagJFVtxCollectionName.key()  );
       return StatusCode::FAILURE;
@@ -116,7 +116,7 @@ namespace Analysis {
     ATH_MSG_DEBUG("#BTAG# Size of the JF Vertex container: " <<  h_BTagJFVtxCollectionName->size());
 
     //retrieve the Secondary Vertex container
-    SG::ReadHandle<xAOD::VertexContainer> h_BTagSVCollectionName ( m_BTagSVCollectionName.key(), ctx );
+    SG::ReadHandle<xAOD::VertexContainer> h_BTagSVCollectionName ( m_BTagSVCollectionName.key() );
     if (!h_BTagSVCollectionName.isValid()) {
       ATH_MSG_ERROR( " cannot retrieve Sec Vertex container with key " << m_BTagJFVtxCollectionName.key()  );
       return StatusCode::FAILURE;
-- 
GitLab


From 1525ec94c99f28997abd8a422b2d5c8893ada516 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Mon, 8 Jun 2020 09:35:19 +0000
Subject: [PATCH 033/266] Identifier , default method, move inline to .icc,
 tidy

---
 DetectorDescription/Identifier/CMakeLists.txt |   1 -
 .../Identifier/ExpandedIdentifier.h           | 221 +----------
 .../Identifier/ExpandedIdentifier.icc         | 161 ++++++++
 .../Identifier/Identifier/HWIdentifier.h      |  18 +-
 .../Identifier/Identifier/Identifier.h        | 363 +-----------------
 .../Identifier/Identifier/Identifier.icc      | 266 +++++++++++++
 .../Identifier/Identifier/IdentifierHash.h    | 104 +----
 .../Identifier/Identifier/IdentifierHash.icc  |  67 ++++
 .../Identifier/src/ExpandedIdentifier.cxx     |  12 +-
 .../Identifier/src/Identifiable.cxx           |   4 +-
 .../Identifier/src/Identifier.cxx             |   6 +-
 .../Identifier/src/Identifier32.cxx           |   6 +-
 DetectorDescription/Identifier/src/Range.cxx  |  64 +--
 13 files changed, 596 insertions(+), 697 deletions(-)
 create mode 100644 DetectorDescription/Identifier/Identifier/ExpandedIdentifier.icc
 create mode 100644 DetectorDescription/Identifier/Identifier/Identifier.icc
 create mode 100644 DetectorDescription/Identifier/Identifier/IdentifierHash.icc

diff --git a/DetectorDescription/Identifier/CMakeLists.txt b/DetectorDescription/Identifier/CMakeLists.txt
index aba3e4abfb23..7f3640b14a60 100644
--- a/DetectorDescription/Identifier/CMakeLists.txt
+++ b/DetectorDescription/Identifier/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 732166 2016-03-24 13:30:37Z krasznaa $
 ################################################################################
 # Package: Identifier
 ################################################################################
diff --git a/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h
index 79e3ef1b642c..985f7fa5ee68 100644
--- a/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h
+++ b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IDENTIFIER_EXPANDEDIDENTIFIER_H
@@ -123,20 +123,14 @@ public:
     } max_value_type;
 
     //----------------------------------------------------------------
-    // Constructors
+    // Defaulted members
     //----------------------------------------------------------------
-
-    //----------------------------------------------------------------
-    // Default constructor
-    //----------------------------------------------------------------
-  ExpandedIdentifier ();
-
-    //----------------------------------------------------------------
-    // Copy constructor and assignment.
-    //----------------------------------------------------------------
-  ExpandedIdentifier (const ExpandedIdentifier& other);
-  ExpandedIdentifier& operator= (const ExpandedIdentifier& other);
-  ExpandedIdentifier& operator= (ExpandedIdentifier&& other);
+  ExpandedIdentifier() = default;
+  ExpandedIdentifier(const ExpandedIdentifier& other) = default;
+  ExpandedIdentifier(ExpandedIdentifier&& other) = default;
+  ExpandedIdentifier& operator=(const ExpandedIdentifier& other) = default;
+  ExpandedIdentifier& operator=(ExpandedIdentifier&& other) = default;
+  ~ExpandedIdentifier() = default;
 
     //----------------------------------------------------------------
     // Constructor from a subset of another ExpandedIdentifier
@@ -220,204 +214,7 @@ private:
 };
 //-----------------------------------------------
 
-// inline definitions
-
-
-  // Constructors
-//-----------------------------------------------
-inline
-ExpandedIdentifier::ExpandedIdentifier ()
-{
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier::ExpandedIdentifier (const ExpandedIdentifier& other)
-  : m_fields (other.m_fields)
-{
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier&
-ExpandedIdentifier::operator= (const ExpandedIdentifier& other)
-{
-  if (this != &other) {
-    m_fields = other.m_fields;
-  }
-  return *this;
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier&
-ExpandedIdentifier::operator= (ExpandedIdentifier&& other)
-{
-  if (this != &other) {
-    m_fields = std::move(other.m_fields);
-  }
-  return *this;
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier::ExpandedIdentifier (const ExpandedIdentifier& other, size_type start)
-{
-  if (start < other.fields ())
-    {
-      element_vector::const_iterator it = other.m_fields.begin ();
-      it += start;
-
-      m_fields.insert (m_fields.end (),
-                       it, 
-                       other.m_fields.end ());
-    }
-}
-
-  // Modifications
-//-----------------------------------------------
-inline
-void ExpandedIdentifier::add (element_type value)
-{
-  // Max size of id levels should be < 10
-  if(m_fields.capacity() < 10) m_fields.reserve(10);
-  m_fields.push_back (value);
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier& ExpandedIdentifier::operator << (element_type value)
-{
-  // Max size of id levels should be < 10
-  if(m_fields.capacity() < 10) m_fields.reserve(10);
-  m_fields.push_back (value);
-
-  return (*this);
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier::element_type & ExpandedIdentifier::operator [] (size_type index)
-{
-  // Raises an exception if index is out-of-bounds.
-  return m_fields.at (index);
-}
-
-//-----------------------------------------------
-inline
-void ExpandedIdentifier::clear ()
-{
-  m_fields.clear ();
-}
-
-
-
-  // Accessors
-//-----------------------------------------------
-inline
-ExpandedIdentifier::element_type ExpandedIdentifier::operator [] (size_type index) const
-{
-  // Raises an exception if index is out-of-bounds.
-  return m_fields.at (index);
-}
-
-//-----------------------------------------------
-inline
-ExpandedIdentifier::size_type ExpandedIdentifier::fields () const
-{
-  return (m_fields.size ());
-}
-
-  // Comparison operators
-
-//----------------------------------------------------------------
-inline
-int ExpandedIdentifier::operator == (const ExpandedIdentifier& other) const
-{
-  const ExpandedIdentifier& me = *this;
-  const size_type my_fields = fields ();
-  const size_type other_fields = other.fields ();
-  
-  if (my_fields != other_fields) return (0);
-  
-  size_type field = 0;
-  for (; field < my_fields; ++field) 
-    {
-      if (me[field] != other[field]) return (0);
-    }
-
-  return (1);
-}
-
-//----------------------------------------------------------------
-inline
-int ExpandedIdentifier::operator != (const ExpandedIdentifier& other) const
-{
-  const ExpandedIdentifier& me = *this;
-
-  return (!(me == other));
-}
-
-//-----------------------------------------------
-inline
-int ExpandedIdentifier::operator < (const ExpandedIdentifier& other) const
-{
-  const ExpandedIdentifier& me = *this;
-  const size_type my_fields = fields ();
-  const size_type other_fields = other.fields ();
-
-  size_type field = 0;
-  for (;;)
-    {
-      if ((field == my_fields) ||
-          (field == other_fields))
-        {
-            // Someone has run out of fields. And up to now my_id ==
-            // other_id. If the lengths are different, the following
-            // then defines the "shorter" one to be "less than". If
-            // the lengths are the same, then the two are NOT "less
-            // than".
-          return (my_fields < other_fields);
-        }
-
-      element_type my_field = me[field];
-      element_type other_field = other[field];
-
-      if (my_field < other_field) return (1);
-      if (my_field > other_field) return (0);
-
-      field++;
-    }
-
-  return (0);
-}
-
-//-----------------------------------------------
-inline
-int ExpandedIdentifier::operator > (const ExpandedIdentifier& other) const
-{
-  const ExpandedIdentifier& me = *this;
-
-  return (other < me);
-}
-
-//----------------------------------------------------------------
-inline
-int ExpandedIdentifier::match (const ExpandedIdentifier& other) const
-{
-  const ExpandedIdentifier& me = *this;
-  const size_type my_fields = fields ();
-  const size_type other_fields = other.fields ();
-
-  const size_type fs = (my_fields < other_fields) ? my_fields : other_fields;
-  
-  for (size_type field = 0; field < fs; ++field) 
-    {
-      if (me[field] != other[field]) return (0);
-    }
-
-  return (1);
-}
 
+#include "Identifier/ExpandedIdentifier.icc"
 
 #endif
diff --git a/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.icc b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.icc
new file mode 100644
index 000000000000..857f82a99eaa
--- /dev/null
+++ b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.icc
@@ -0,0 +1,161 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+//-----------------------------------------------
+inline ExpandedIdentifier::ExpandedIdentifier(const ExpandedIdentifier& other,
+                                              size_type start)
+{
+  if (start < other.fields()) {
+    element_vector::const_iterator it = other.m_fields.begin();
+    it += start;
+
+    m_fields.insert(m_fields.end(), it, other.m_fields.end());
+  }
+}
+
+// Modifications
+//-----------------------------------------------
+inline void
+ExpandedIdentifier::add(element_type value)
+{
+  // Max size of id levels should be < 10
+  if (m_fields.capacity() < 10)
+    m_fields.reserve(10);
+  m_fields.push_back(value);
+}
+
+//-----------------------------------------------
+inline ExpandedIdentifier&
+ExpandedIdentifier::operator<<(element_type value)
+{
+  // Max size of id levels should be < 10
+  if (m_fields.capacity() < 10)
+    m_fields.reserve(10);
+  m_fields.push_back(value);
+
+  return (*this);
+}
+
+//-----------------------------------------------
+inline ExpandedIdentifier::element_type& ExpandedIdentifier::operator[](
+  size_type index)
+{
+  // Raises an exception if index is out-of-bounds.
+  return m_fields.at(index);
+}
+
+//-----------------------------------------------
+inline void
+ExpandedIdentifier::clear()
+{
+  m_fields.clear();
+}
+
+// Accessors
+//-----------------------------------------------
+inline ExpandedIdentifier::element_type ExpandedIdentifier::operator[](
+  size_type index) const
+{
+  // Raises an exception if index is out-of-bounds.
+  return m_fields.at(index);
+}
+
+//-----------------------------------------------
+inline ExpandedIdentifier::size_type
+ExpandedIdentifier::fields() const
+{
+  return (m_fields.size());
+}
+
+// Comparison operators
+
+//----------------------------------------------------------------
+inline int
+ExpandedIdentifier::operator==(const ExpandedIdentifier& other) const
+{
+  const ExpandedIdentifier& me = *this;
+  const size_type my_fields = fields();
+  const size_type other_fields = other.fields();
+
+  if (my_fields != other_fields)
+    return (0);
+
+  size_type field = 0;
+  for (; field < my_fields; ++field) {
+    if (me[field] != other[field])
+      return (0);
+  }
+
+  return (1);
+}
+
+//----------------------------------------------------------------
+inline int
+ExpandedIdentifier::operator!=(const ExpandedIdentifier& other) const
+{
+  const ExpandedIdentifier& me = *this;
+
+  return (!(me == other));
+}
+
+//-----------------------------------------------
+inline int
+ExpandedIdentifier::operator<(const ExpandedIdentifier& other) const
+{
+  const ExpandedIdentifier& me = *this;
+  const size_type my_fields = fields();
+  const size_type other_fields = other.fields();
+
+  size_type field = 0;
+  for (;;) {
+    if ((field == my_fields) || (field == other_fields)) {
+      // Someone has run out of fields. And up to now my_id ==
+      // other_id. If the lengths are different, the following
+      // then defines the "shorter" one to be "less than". If
+      // the lengths are the same, then the two are NOT "less
+      // than".
+      return (my_fields < other_fields);
+    }
+
+    element_type my_field = me[field];
+    element_type other_field = other[field];
+
+    if (my_field < other_field)
+      return (1);
+    if (my_field > other_field)
+      return (0);
+
+    field++;
+  }
+
+  return (0);
+}
+
+//-----------------------------------------------
+inline int
+ExpandedIdentifier::operator>(const ExpandedIdentifier& other) const
+{
+  const ExpandedIdentifier& me = *this;
+
+  return (other < me);
+}
+
+//----------------------------------------------------------------
+inline int
+ExpandedIdentifier::match(const ExpandedIdentifier& other) const
+{
+  const ExpandedIdentifier& me = *this;
+  const size_type my_fields = fields();
+  const size_type other_fields = other.fields();
+
+  const size_type fs = (my_fields < other_fields) ? my_fields : other_fields;
+
+  for (size_type field = 0; field < fs; ++field) {
+    if (me[field] != other[field])
+      return (0);
+  }
+
+  return (1);
+}
+
diff --git a/DetectorDescription/Identifier/Identifier/HWIdentifier.h b/DetectorDescription/Identifier/Identifier/HWIdentifier.h
index 78f79305f010..6b2f7977a7a7 100644
--- a/DetectorDescription/Identifier/Identifier/HWIdentifier.h
+++ b/DetectorDescription/Identifier/Identifier/HWIdentifier.h
@@ -15,7 +15,17 @@ class HWIdentifier : public Identifier {
 public:
 
     /// Default constructor
-    HWIdentifier ();
+    HWIdentifier() = default;
+    /// Default Copy constructor
+    HWIdentifier(const HWIdentifier& other) = default;
+    /// Default Move constructor
+    HWIdentifier(HWIdentifier&& other) = default;
+    /// Default Assignment operators
+    HWIdentifier& operator=(const HWIdentifier& old) = default;
+    ///  Default Move Assignment operator
+    HWIdentifier& operator=(HWIdentifier&& old) = default;
+    /// Default dtor
+    ~HWIdentifier() = default;
 
     /// Constructor from value_type
     explicit HWIdentifier(value_type value);
@@ -42,12 +52,6 @@ struct hash<HWIdentifier>
 };
 }
 
-
-
-inline HWIdentifier::HWIdentifier()
-    : Identifier::Identifier()
-{}
-
 inline HWIdentifier::HWIdentifier(value_type value)
     : Identifier::Identifier(value)
 {}
diff --git a/DetectorDescription/Identifier/Identifier/Identifier.h b/DetectorDescription/Identifier/Identifier/Identifier.h
index 502385156f62..e71f2ca918a2 100644
--- a/DetectorDescription/Identifier/Identifier/Identifier.h
+++ b/DetectorDescription/Identifier/Identifier/Identifier.h
@@ -12,12 +12,10 @@
 
 #include "GaudiKernel/MsgStream.h"
 #include "Identifier/Identifier32.h"
-
-#include <iostream>
 #include <boost/io/ios_state.hpp>
 #include <vector>
 #include <string>
-
+#include <iostream>
 /**
  **-----------------------------------------------
  **
@@ -35,7 +33,6 @@ class Identifier
 {
 public:
 
-
     ///----------------------------------------------------------------
     /// Define public typedefs
     ///----------------------------------------------------------------
@@ -56,8 +53,19 @@ public:
     ///----------------------------------------------------------------
 
     /// Default constructor
-    Identifier ();
-
+    Identifier() = default;
+    /// Default Copy constructor
+    Identifier(const Identifier& other) = default;
+    /// Default Move constructor
+    Identifier(Identifier&& other) = default;
+    /// Default Assignment operators
+    Identifier& operator=(const Identifier& old) = default;
+    ///  Default Move Assignment operator
+    Identifier& operator=(Identifier&& old) = default;
+    /// Default dtor
+    ~Identifier() = default;
+
+    ///Additional ctors
     /// Constructor from value_type
     explicit Identifier (value_type value);
 
@@ -69,18 +77,15 @@ public:
     explicit Identifier (Identifier32::value_type value);
     explicit Identifier (int value);
 
-    /// Copy constructor
-    Identifier (const Identifier& other);
+ 
 
     ///----------------------------------------------------------------
     /// Modifications
     ///----------------------------------------------------------------
-
-    /// Assignment operator
-    Identifier& operator = (const Identifier& old);
+   
+    /// Assignment operators overloads
     Identifier& operator = (const Identifier32& old);
     Identifier& operator = (value_type value);
-
     /// Assignment to avoid common implicit conversions and shift properly
     Identifier& operator = (Identifier32::value_type value);
     Identifier& operator = (int value);
@@ -89,6 +94,7 @@ private:
     /// Bitwise operations 
     Identifier& operator |= (value_type value);
     Identifier& operator &= (value_type value);
+
 public:
 
     /// build from a string form - hexadecimal
@@ -132,13 +138,6 @@ public:
     bool operator <=    (const Identifier& other) const;
     bool operator >=    (const Identifier& other) const;
 
-    //bool operator ==    (const Identifier32& other) const;
-    //bool operator !=    (const Identifier32& other) const;
-    //bool operator <     (const Identifier32& other) const;
-    //bool operator >     (const Identifier32& other) const;
-    //bool operator <=    (const Identifier32& other) const;
-    //bool operator >=    (const Identifier32& other) const;
-
     /// Comparison operators with value_type.
     /// This is a hack, only because GeoAdaptors/GeoMuonHits wants to
     /// to compare explicitly with 0 as a test of whether the identifier
@@ -194,7 +193,7 @@ private:
     //----------------------------------------------------------------
     // The compact identifier data.
     //----------------------------------------------------------------
-    value_type m_id;
+    value_type m_id = max_value;
 
 };
 //-----------------------------------------------
@@ -213,328 +212,6 @@ struct hash<Identifier>
 };
 }
 
-
-
-
-// Constructors
-//-----------------------------------------------
-inline Identifier::Identifier ()
-        : m_id(max_value)
-{}
-
-//-----------------------------------------------
-inline Identifier::Identifier (const Identifier& other)
-        : m_id(other.m_id)
-{}
-
-/// Constructor from Identifier32
-//-----------------------------------------------
-inline Identifier::Identifier (const Identifier32& other)
-        : m_id(max_value)
-{
-    //std::cout << "Identifier(Identifier32) " << other.get_compact() << std::endl;
-    if (other.is_valid()) {
-        m_id = (static_cast<value_type>(other.get_compact()) << 32);
-    }
-}
-
-/// Constructor from Identifier32 value_type (unsigned int)
-/// (only use in id64 case since otherwise redundant)
-//-----------------------------------------------
-inline Identifier::Identifier (Identifier32::value_type value)
-        : m_id(max_value)
-{
-    //std::cout << "Identifier(Identifier32::value_type) " << value << std::endl;
-   if (value == ~static_cast<Identifier32::value_type>(0)) {
-     m_id = max_value;
-   }
-   else {
-     m_id = (static_cast<value_type>(value) << 32);
-   }
-}
-inline Identifier::Identifier (int value)
-        : m_id(max_value)
-{
-    //std::cout << "Identifier(int) " << value << std::endl;
-    m_id = (static_cast<value_type>(value) << 32);
-}
-
-//-----------------------------------------------
-inline Identifier::Identifier (value_type value)
-        : m_id(value)
-{
-    //std::cout << "Identifier(value_type) " << value << std::endl;
-
-    // Print out warning for potential call with value for a 32-bit id
-    // I.e. if lower bits are set and no upper bit set
-    const value_type upper = 0XFFFFFFFF00000000LL;
-    const value_type lower = 0X00000000FFFFFFFFLL;
-    const value_type testUpper = value & upper;
-    const value_type testLower = value & lower;
-    if ( testUpper == 0 && testLower > 0) {
-        boost::io::ios_flags_saver ifs(std::cout);
-        std::cout << "Identifier::Identifier - WARNING Constructing 64-bit id with empty upper and non-empty lower: " << std::hex << testUpper << " " << testLower << std::endl;
-        m_id = (value << 32);
-    }
-}
-
-// Modifications
-//-----------------------------------------------
-
-inline Identifier&
-Identifier::operator = (const Identifier& old) {
-  if (&old != this) {
-    //std::cout << "operator=(Identifier) " << old.get_compact() << std::endl;
-    m_id = old.m_id;
-  }
-  return (*this);
-}
-
-inline Identifier&
-Identifier::operator = (const Identifier32& old) {
-    //std::cout << "operator=(Identifier32) " << old.get_compact() << std::endl;
-    m_id = (static_cast<value_type>(old.get_compact()) << 32);
-    return (*this);
-}
-
-inline Identifier&
-Identifier::operator = (value_type value)
-{
-    //std::cout << "operator=(value_type) " << value << std::endl;
-
-    // Print out warning for potential call with value for a 32-bit id
-    // I.e. if lower bits are set and no upper bit set
-    const value_type upper = 0XFFFFFFFF00000000LL;
-    const value_type lower = 0X00000000FFFFFFFFLL;
-    const value_type testUpper = value & upper;
-    const value_type testLower = value & lower;
-    if ( testUpper == 0 && testLower > 0) {
-        boost::io::ios_flags_saver ifs(std::cout);
-        std::cout << "Identifier::opertor = - WARNING Constructing 64-bit id with empty upper and non-empty lower: " << std::hex << testUpper << " " << testLower << std::endl;
-        m_id = (value << 32);
-        return (*this);
-    }
-
-    m_id = value;
-    return (*this);
-}
-
-inline Identifier&
-Identifier::operator = (Identifier32::value_type value)
-{
-    //std::cout << "operator=(Identifier32::value_type) " << value << std::endl;
-    if (value == ~static_cast<Identifier32::value_type>(0)) {
-      m_id = max_value;
-    }
-    else {
-      m_id = static_cast<value_type>(value) << 32;
-    }
-    return (*this);
-}
-inline Identifier&
-Identifier::operator = (int value)
-{
-    //std::cout << "operator=(int) " << value << std::endl;
-    m_id = static_cast<value_type>(value) << 32;
-    return (*this);
-}
-
-inline Identifier&                                   
-Identifier::operator |= (value_type value)
-{
-    m_id |= value;
-    return (*this);
-}
-
-inline Identifier& 
-Identifier::operator &= (value_type value)
-{
-    m_id &= value;
-    return (*this);
-}
-
-inline Identifier&
-Identifier::set_literal (value_type value)
-{
-    m_id = value;
-    return (*this);
-}
-
-inline void 
-Identifier::clear () 
-{
-    m_id = max_value;
-}
-
-inline Identifier::value_type Identifier::extract(
-    Identifier::size_type shift, Identifier::size_type mask) const {
-    return (m_id >> shift) & static_cast<Identifier::value_type>(mask);
-}
-
-inline Identifier::value_type Identifier::mask_shift(
-    Identifier::value_type mask, Identifier::size_type shift) const {
-    return (m_id & mask) >> shift;
-}
-
-inline Identifier::value_type Identifier::extract(
-    Identifier::size_type shift) const {
-    return (m_id >> shift);
-}
-
-inline Identifier32 Identifier::get_identifier32  (void) const
-{
-    // test for bit set in lower 32
-    if (extract(0,0xFFFFFFFF)) return (Identifier32());
-    return (Identifier32(extract(32)));
-}
-
-
-inline Identifier::value_type  Identifier::get_compact  (void) const
-{
-    return (m_id);
-}
-
-// Comparison operators
-//----------------------------------------------------------------
-inline bool 
-Identifier::operator == (const Identifier& other) const
-{
-    return (m_id == other.m_id);
-}
-
-//----------------------------------------------------------------
-inline bool 
-Identifier::operator != (const Identifier& other) const
-{
-    return (m_id != other.m_id);
-}
-
-//-----------------------------------------------
-inline bool 
-Identifier::operator < (const Identifier& other) const
-{
-    return (m_id < other.m_id);
-}
-
-//-----------------------------------------------
-inline bool 
-Identifier::operator > (const Identifier& other) const
-{
-    return (m_id > other.m_id);
-}
-
-//-----------------------------------------------
-inline bool 
-Identifier::operator <= (const Identifier& other) const
-{
-    return (m_id <= other.m_id);
-}
-
-//-----------------------------------------------
-inline bool 
-Identifier::operator >= (const Identifier& other) const
-{
-    return (m_id >= other.m_id);
-}
-
-//----------------------------------------------------------------
-//inline bool 
-//Identifier::operator == (const Identifier32& other) const
-//{
-//    return (this == Identifier(other));
-//}
-//
-//----------------------------------------------------------------
-//inline bool 
-//Identifier::operator != (const Identifier32& other) const
-//{
-//    return (this != Identifier(other));
-//}
-//
-//-----------------------------------------------
-//inline bool 
-//Identifier::operator < (const Identifier32& other) const
-//{
-//    return (this < Identifier(other));
-//}
-//
-//-----------------------------------------------
-//inline bool 
-//Identifier::operator > (const Identifier32& other) const
-//{
-//    return (this > Identifier(other));
-//}
-//
-//-----------------------------------------------
-//inline bool 
-//Identifier::operator <= (const Identifier32& other) const
-//{
-//    return (this <= Identifier(other));
-//}
-//
-//-----------------------------------------------
-//inline bool 
-//Identifier::operator >= (const Identifier32& other) const
-//{
-//    return (this >= Identifier(other));
-//}
-
-//----------------------------------------------------------------
-inline bool 
-Identifier::operator == (Identifier::value_type other) const
-{
-    return (m_id == other);
-}
-
-inline bool 
-Identifier::operator != (Identifier::value_type other) const
-{
-    return (m_id != other);
-}
-
-inline bool 
-Identifier::operator == (Identifier32::value_type other) const
-{
-    return ((*this) == Identifier(other));
-}
-
-inline bool 
-Identifier::operator == (int other) const
-{
-    return ((*this) == Identifier(other));
-}
-
-inline bool 
-Identifier::operator != (Identifier32::value_type other) const
-{
-    return ((*this) != Identifier(other));
-}
-
-inline bool 
-Identifier::operator != (int other) const
-{
-    return ((*this) != Identifier(other));
-}
-
-/// This is for logging
-
-inline MsgStream& operator << (MsgStream& f, const Identifier& id)
-{
-    f << id.getString();
-    return f;
-}
-
-inline std::ostream& operator << (std::ostream& os, const Identifier& id)
-{
-    os << id.getString();
-    return os;
-}
-
-
-inline bool 
-Identifier::is_valid () const
-{
-    return (!(max_value == m_id));
-}
+#include "Identifier/Identifier.icc"
 
 #endif
diff --git a/DetectorDescription/Identifier/Identifier/Identifier.icc b/DetectorDescription/Identifier/Identifier/Identifier.icc
new file mode 100644
index 000000000000..6c1b3359d65e
--- /dev/null
+++ b/DetectorDescription/Identifier/Identifier/Identifier.icc
@@ -0,0 +1,266 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// Constructor from Identifier32
+//-----------------------------------------------
+inline Identifier::Identifier(const Identifier32& other)
+  : m_id(max_value)
+{
+  if (other.is_valid()) {
+    m_id = (static_cast<value_type>(other.get_compact()) << 32);
+  }
+}
+
+/// Constructor from Identifier32 value_type (unsigned int)
+/// (only use in id64 case since otherwise redundant)
+//-----------------------------------------------
+inline Identifier::Identifier(Identifier32::value_type value)
+  : m_id(max_value)
+{
+  if (value == ~static_cast<Identifier32::value_type>(0)) {
+    m_id = max_value;
+  } else {
+    m_id = (static_cast<value_type>(value) << 32);
+  }
+}
+inline Identifier::Identifier(int value)
+  : m_id(max_value)
+{
+  m_id = (static_cast<value_type>(value) << 32);
+}
+
+//-----------------------------------------------
+inline Identifier::Identifier(value_type value)
+  : m_id(value)
+{
+
+  // Print out warning for potential call with value for a 32-bit id
+  // I.e. if lower bits are set and no upper bit set
+  const value_type upper = 0XFFFFFFFF00000000LL;
+  const value_type lower = 0X00000000FFFFFFFFLL;
+  const value_type testUpper = value & upper;
+  const value_type testLower = value & lower;
+  if (testUpper == 0 && testLower > 0) {
+    boost::io::ios_flags_saver ifs(std::cout);
+    std::cout << "Identifier::Identifier - WARNING Constructing 64-bit id "
+                 "with empty upper and non-empty lower: "
+              << std::hex << testUpper << " " << testLower << std::endl;
+    m_id = (value << 32);
+  }
+}
+
+// Modifications
+//-----------------------------------------------
+
+inline Identifier&
+Identifier::operator=(const Identifier32& old)
+{
+  m_id = (static_cast<value_type>(old.get_compact()) << 32);
+  return (*this);
+}
+
+inline Identifier&
+Identifier::operator=(value_type value)
+{
+
+  // Print out warning for potential call with value for a 32-bit id
+  // I.e. if lower bits are set and no upper bit set
+  const value_type upper = 0XFFFFFFFF00000000LL;
+  const value_type lower = 0X00000000FFFFFFFFLL;
+  const value_type testUpper = value & upper;
+  const value_type testLower = value & lower;
+  if (testUpper == 0 && testLower > 0) {
+    boost::io::ios_flags_saver ifs(std::cout);
+    std::cout << "Identifier::opertor = - WARNING Constructing 64-bit id "
+                 "with empty upper and non-empty lower: "
+              << std::hex << testUpper << " " << testLower << std::endl;
+    m_id = (value << 32);
+    return (*this);
+  }
+
+  m_id = value;
+  return (*this);
+}
+
+inline Identifier&
+Identifier::operator=(Identifier32::value_type value)
+{
+  if (value == ~static_cast<Identifier32::value_type>(0)) {
+    m_id = max_value;
+  } else {
+    m_id = static_cast<value_type>(value) << 32;
+  }
+  return (*this);
+}
+inline Identifier&
+Identifier::operator=(int value)
+{
+  m_id = static_cast<value_type>(value) << 32;
+  return (*this);
+}
+
+inline Identifier&
+Identifier::operator|=(value_type value)
+{
+  m_id |= value;
+  return (*this);
+}
+
+inline Identifier&
+Identifier::operator&=(value_type value)
+{
+  m_id &= value;
+  return (*this);
+}
+
+inline Identifier&
+Identifier::set_literal(value_type value)
+{
+  m_id = value;
+  return (*this);
+}
+
+inline void
+Identifier::clear()
+{
+  m_id = max_value;
+}
+
+inline Identifier::value_type
+Identifier::extract(Identifier::size_type shift,
+                    Identifier::size_type mask) const
+{
+  return (m_id >> shift) & static_cast<Identifier::value_type>(mask);
+}
+
+inline Identifier::value_type
+Identifier::mask_shift(Identifier::value_type mask,
+                       Identifier::size_type shift) const
+{
+  return (m_id & mask) >> shift;
+}
+
+inline Identifier::value_type
+Identifier::extract(Identifier::size_type shift) const
+{
+  return (m_id >> shift);
+}
+
+inline Identifier32
+Identifier::get_identifier32(void) const
+{
+  // test for bit set in lower 32
+  if (extract(0, 0xFFFFFFFF))
+    return (Identifier32());
+  return (Identifier32(extract(32)));
+}
+
+inline Identifier::value_type
+Identifier::get_compact(void) const
+{
+  return (m_id);
+}
+
+// Comparison operators
+//----------------------------------------------------------------
+inline bool
+Identifier::operator==(const Identifier& other) const
+{
+  return (m_id == other.m_id);
+}
+
+//----------------------------------------------------------------
+inline bool
+Identifier::operator!=(const Identifier& other) const
+{
+  return (m_id != other.m_id);
+}
+
+//-----------------------------------------------
+inline bool
+Identifier::operator<(const Identifier& other) const
+{
+  return (m_id < other.m_id);
+}
+
+//-----------------------------------------------
+inline bool
+Identifier::operator>(const Identifier& other) const
+{
+  return (m_id > other.m_id);
+}
+
+//-----------------------------------------------
+inline bool
+Identifier::operator<=(const Identifier& other) const
+{
+  return (m_id <= other.m_id);
+}
+
+//-----------------------------------------------
+inline bool
+Identifier::operator>=(const Identifier& other) const
+{
+  return (m_id >= other.m_id);
+}
+
+//----------------------------------------------------------------
+inline bool
+Identifier::operator==(Identifier::value_type other) const
+{
+  return (m_id == other);
+}
+
+inline bool
+Identifier::operator!=(Identifier::value_type other) const
+{
+  return (m_id != other);
+}
+
+inline bool
+Identifier::operator==(Identifier32::value_type other) const
+{
+  return ((*this) == Identifier(other));
+}
+
+inline bool
+Identifier::operator==(int other) const
+{
+  return ((*this) == Identifier(other));
+}
+
+inline bool
+Identifier::operator!=(Identifier32::value_type other) const
+{
+  return ((*this) != Identifier(other));
+}
+
+inline bool
+Identifier::operator!=(int other) const
+{
+  return ((*this) != Identifier(other));
+}
+
+/// This is for logging
+
+inline MsgStream&
+operator<<(MsgStream& f, const Identifier& id)
+{
+  f << id.getString();
+  return f;
+}
+
+inline std::ostream&
+operator<<(std::ostream& os, const Identifier& id)
+{
+  os << id.getString();
+  return os;
+}
+
+inline bool
+Identifier::is_valid() const
+{
+  return (!(max_value == m_id));
+}
+
diff --git a/DetectorDescription/Identifier/Identifier/IdentifierHash.h b/DetectorDescription/Identifier/Identifier/IdentifierHash.h
index 22086b42f660..e2df71f1c22f 100644
--- a/DetectorDescription/Identifier/Identifier/IdentifierHash.h
+++ b/DetectorDescription/Identifier/Identifier/IdentifierHash.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -48,14 +48,13 @@ public:
     /// Constructors
     ///----------------------------------------------------------------
 
-    /// Default constructor
-    IdentifierHash ();
-
-    /// Copy constructor
-    IdentifierHash (const IdentifierHash& other);
-
-    /// Assignment
-    IdentifierHash& operator= (const IdentifierHash& other);
+    /// Default methods
+    IdentifierHash () = default;
+    IdentifierHash (const IdentifierHash& other) =default;
+    IdentifierHash (IdentifierHash&& other) =default;
+    IdentifierHash& operator=(const IdentifierHash& other) = default;
+    IdentifierHash& operator=(IdentifierHash&& other) = default;
+    ~IdentifierHash () = default;
 
     /// Initialization with value
     IdentifierHash (value_type value);
@@ -93,95 +92,12 @@ private:
     //----------------------------------------------------------------
     // The actual identifier data.
     //----------------------------------------------------------------
-    value_type m_value;
+    value_type m_value = max_value;
 };
 //-----------------------------------------------
 
 
 
-//<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
-//<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
-
-
-//-----------------------------------------------
-inline IdentifierHash::IdentifierHash ()
-    : m_value(max_value)
-{}
-
-//-----------------------------------------------
-inline IdentifierHash::IdentifierHash (const IdentifierHash& other)
-    : m_value(other.m_value)
-{}
-
-//-----------------------------------------------
-inline IdentifierHash& IdentifierHash::operator= (const IdentifierHash& other)
-{
-  if (this != &other)
-    m_value = other.m_value;
-  return *this;
-}
-
-//-----------------------------------------------
-inline IdentifierHash::IdentifierHash (value_type value)
-    : m_value(value)
-{}
-
-//-----------------------------------------------
-inline IdentifierHash&
-IdentifierHash::operator = (value_type value)
-{
-    m_value = value;
-    return (*this);
-}
-
-//-----------------------------------------------
-inline IdentifierHash& 				     
-IdentifierHash::operator += (unsigned int value)
-{
-    m_value += value;
-    return (*this);
-}
-
-//-----------------------------------------------
-inline IdentifierHash& 
-IdentifierHash::operator -= (unsigned int value)
-{
-    m_value = (m_value > value) ? m_value - value : 0;
-    return (*this);
-}
-
-//-----------------------------------------------
-inline IdentifierHash::operator unsigned int (void) const
-{
-    return (m_value);
-}
-
-//-----------------------------------------------
-inline unsigned int IdentifierHash::value (void) const
-{
-    return (m_value);
-}
-
-//-----------------------------------------------
-inline bool 
-IdentifierHash::is_valid () const
-{
-    return (!(max_value == m_value));
-}
-
-inline MsgStream& operator << (MsgStream& f, const IdentifierHash& id)
-{
-  f << id.value();
-  return f;
-}
-
-inline std::ostream& operator << (std::ostream& os, const IdentifierHash& id)
-{
-  os << id.value();
-  return os;
-}
-
-
 // Define a hash functional
 
 namespace std {
@@ -195,5 +111,5 @@ struct hash<IdentifierHash>
 };
 }
 
-
+#include "Identifier/IdentifierHash.icc"
 #endif // IDENTIFIER_IDENTIFIERHASH_H
diff --git a/DetectorDescription/Identifier/Identifier/IdentifierHash.icc b/DetectorDescription/Identifier/Identifier/IdentifierHash.icc
new file mode 100644
index 000000000000..1cfb111c64a4
--- /dev/null
+++ b/DetectorDescription/Identifier/Identifier/IdentifierHash.icc
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+//-----------------------------------------------
+inline IdentifierHash::IdentifierHash (value_type value)
+    : m_value(value)
+{}
+
+//-----------------------------------------------
+inline IdentifierHash&
+IdentifierHash::operator = (value_type value)
+{
+    m_value = value;
+    return (*this);
+}
+
+//-----------------------------------------------
+inline IdentifierHash& 				     
+IdentifierHash::operator += (unsigned int value)
+{
+    m_value += value;
+    return (*this);
+}
+
+//-----------------------------------------------
+inline IdentifierHash& 
+IdentifierHash::operator -= (unsigned int value)
+{
+    m_value = (m_value > value) ? m_value - value : 0;
+    return (*this);
+}
+
+//-----------------------------------------------
+inline IdentifierHash::operator unsigned int (void) const
+{
+    return (m_value);
+}
+
+//-----------------------------------------------
+inline unsigned int IdentifierHash::value (void) const
+{
+    return (m_value);
+}
+
+//-----------------------------------------------
+inline bool 
+IdentifierHash::is_valid () const
+{
+    return (!(max_value == m_value));
+}
+
+inline MsgStream& operator << (MsgStream& f, const IdentifierHash& id)
+{
+  f << id.value();
+  return f;
+}
+
+inline std::ostream& operator << (std::ostream& os, const IdentifierHash& id)
+{
+  os << id.value();
+  return os;
+}
+
+
+
diff --git a/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx b/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx
index 86387b11b355..83d8dce1df2b 100644
--- a/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx
+++ b/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx
@@ -1,15 +1,15 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
 #include "Identifier/ExpandedIdentifier.h"
-#include <stdarg.h>
-#include <stdio.h>
 #include <algorithm>
+#include <cstdarg>
+#include <cstdio>
 #include <cstring>
-#include <iostream>
 #include <iomanip>
+#include <iostream>
 
 //-----------------------------------------------
 static void show_vector (const ExpandedIdentifier::element_vector& v)
@@ -44,7 +44,7 @@ ExpandedIdentifier::ExpandedIdentifier (const std::string& text)
 void ExpandedIdentifier::set (const std::string& text)
 {
   clear ();
-  if (text.size () == 0) return;
+  if (text.empty()) return;
   const char* ctext = text.c_str ();
 
   for (;;)
@@ -59,7 +59,7 @@ void ExpandedIdentifier::set (const std::string& text)
 
       add ((element_type) value);
 
-      if (sep == 0) break;
+      if (sep == nullptr) break;
       
       ctext = sep + 1;
     }
diff --git a/DetectorDescription/Identifier/src/Identifiable.cxx b/DetectorDescription/Identifier/src/Identifiable.cxx
index 70ed5e5d8bfc..0bafd4741077 100644
--- a/DetectorDescription/Identifier/src/Identifiable.cxx
+++ b/DetectorDescription/Identifier/src/Identifiable.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -27,6 +27,6 @@ IdentifierHash	Identifiable::identifyHash() const
 const IdHelper* 
 Identifiable::getHelper() const
 {
-    return (0);
+    return (nullptr);
 }
 
diff --git a/DetectorDescription/Identifier/src/Identifier.cxx b/DetectorDescription/Identifier/src/Identifier.cxx
index 94739525e5b0..307bbf06bcd4 100644
--- a/DetectorDescription/Identifier/src/Identifier.cxx
+++ b/DetectorDescription/Identifier/src/Identifier.cxx
@@ -1,12 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
 #include "Identifier/Identifier.h"
-#include <stdarg.h>
-#include <stdio.h>
 #include <algorithm>
+#include <cstdarg>
+#include <cstdio>
 
 #include <iostream>
 #include <iomanip>
diff --git a/DetectorDescription/Identifier/src/Identifier32.cxx b/DetectorDescription/Identifier/src/Identifier32.cxx
index ecebbbd4195b..9f7200217d92 100644
--- a/DetectorDescription/Identifier/src/Identifier32.cxx
+++ b/DetectorDescription/Identifier/src/Identifier32.cxx
@@ -1,12 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
 #include "Identifier/Identifier32.h"
-#include <stdarg.h>
-#include <stdio.h>
 #include <algorithm>
+#include <cstdarg>
+#include <cstdio>
 
 #include <iostream>
 #include <iomanip>
diff --git a/DetectorDescription/Identifier/src/Range.cxx b/DetectorDescription/Identifier/src/Range.cxx
index ffe38cb3ac38..e3fb06337e41 100644
--- a/DetectorDescription/Identifier/src/Range.cxx
+++ b/DetectorDescription/Identifier/src/Range.cxx
@@ -6,17 +6,17 @@
  
 #include "Identifier/Range.h" 
  
-#include <stdio.h> 
+#include <algorithm> 
+#include <cstdio> 
 #include <string> 
 #include <vector> 
-#include <algorithm> 
  
 #include <limits>
 #include <iostream> 
 #include <iomanip> 
 #include <set>
 
-#include <assert.h> 
+#include <cassert> 
  
 #ifdef WIN32 
 namespace std 
@@ -433,7 +433,7 @@ Range::field::get_previous (element_type current, element_type& previous) const
 	      previous = m_maximum;
 	      return (true); 
 	  }
-	  else if (has_previous == m_continuation_mode) {
+	  if (has_previous == m_continuation_mode) {
 	      previous = m_previous;
 	      return (true); 
 	  }
@@ -446,12 +446,12 @@ Range::field::get_previous (element_type current, element_type& previous) const
     case enumerated: 
       size_type index = get_value_index(current);
       if (index == 0) {
-	  if (has_wrap_around == m_continuation_mode && m_values.size() > 0) {
+	  if (has_wrap_around == m_continuation_mode && !m_values.empty()) {
 	      index = m_values.size() - 1;
 	      previous = m_values[index];
 	      return (true); 
 	  }
-	  else if (has_previous == m_continuation_mode) {
+	  if (has_previous == m_continuation_mode) {
 	      previous = m_previous;
 	      return (true); 
 	  }
@@ -498,7 +498,7 @@ Range::field::get_next     (element_type current, element_type& next) const
 	      next = m_minimum;
 	      return (true); 
 	  }
-	  else if (has_next == m_continuation_mode) {
+	  if (has_next == m_continuation_mode) {
 	      next = m_next;
 	      return (true); 
 	  }
@@ -516,7 +516,7 @@ Range::field::get_next     (element_type current, element_type& next) const
 	      next = m_values[0];
 	      return (true); 
 	  }
-	  else if (has_next == m_continuation_mode) {
+	  if (has_next == m_continuation_mode) {
 	      next = m_next;
 	      return (true); 
 	  }
@@ -752,7 +752,7 @@ void Range::field::add_value (element_type value)
 //----------------------------------------------- 
 void Range::field::set (const std::vector <element_type>& values) 
 { 
-  if (values.size () == 0) 
+  if (values.empty()) 
     { 
       clear (); 
       return; 
@@ -1112,7 +1112,7 @@ void Range::field::set_indices()
 //----------------------------------------------- 
 void Range::field::check_for_both_bounded()
 {
-    if (m_mode == enumerated && m_values.size() > 0) {
+    if (m_mode == enumerated && !m_values.empty()) {
 	element_type last = m_values[0];	
 	for (size_type i = 1; i < m_values.size (); ++i) { 
 	    if (m_values[i] > last + 1) return;
@@ -1137,7 +1137,7 @@ void Range::field::check_for_both_bounded()
 void Range::field::create_index_table()
 {
     /// Create index table from value table
-    if (m_mode == enumerated && m_values.size() > 0) {
+    if (m_mode == enumerated && !m_values.empty()) {
 	size_type size = m_maximum - m_minimum + 1;
 	// return if we are over the maximum desired vector table size	
 	if (size > max_indexes) {
@@ -1737,7 +1737,7 @@ Range::const_identifier_factory Range::factory_end () const
 } 
  
 //----------------------------------------------- 
-Range::identifier_factory::identifier_factory () : m_range (0) 
+Range::identifier_factory::identifier_factory () : m_range (nullptr) 
 { 
 } 
  
@@ -1890,10 +1890,10 @@ void Range::identifier_factory::operator ++ ()
           m_id.clear (); 
           break; 
         } 
-      else 
-        { 
+      
+        
           --i; 
-        } 
+        
     } 
 } 
  
@@ -1918,7 +1918,7 @@ bool Range::identifier_factory::operator != (const identifier_factory& other) co
 } 
  
 //----------------------------------------------- 
-Range::const_identifier_factory::const_identifier_factory () : m_range (0) 
+Range::const_identifier_factory::const_identifier_factory () : m_range (nullptr) 
 { 
 } 
  
@@ -2072,10 +2072,10 @@ void Range::const_identifier_factory::operator ++ ()
           m_id.clear (); 
           break; 
         } 
-      else 
-        { 
+      
+        
           --i; 
-        } 
+        
     } 
 } 
  
@@ -2108,7 +2108,7 @@ public:
  
   MultiRangeParser () 
       { 
-        m_multirange = 0; 
+        m_multirange = nullptr; 
       } 
  
   bool run (const std::string& text, MultiRange& multirange) 
@@ -2201,27 +2201,39 @@ private:
               break; 
             case ':': 
               pos++; 
-              if (true) 
-                { 
+              { 
+
                   Range& r = m_multirange->back (); 
+
  
+
                   if (!parse_number (text, pos, maximum))  
+
                     { 
+
                       result = false; 
+
                     } 
+
                   else 
+
                     { 
+
                       r.add_maximum ((MultiRange::element_type) maximum); 
+
                     } 
+
                 } 
  
               break; 
             case '*': 
               pos++; 
-              if (true) 
-                { 
+              { 
+
                   Range& r = m_multirange->back (); 
+
                   r.add (); 
+
                 } 
  
               break; 
@@ -2552,7 +2564,7 @@ MultiRange::const_identifier_factory MultiRange::factory_end () const
 //----------------------------------------------- 
 MultiRange::identifier_factory::identifier_factory () 
     : 
-    m_multirange(0)
+    m_multirange(nullptr)
 { 
 }
 
@@ -2677,7 +2689,7 @@ bool MultiRange::identifier_factory::operator != (const identifier_factory& othe
 //----------------------------------------------- 
 MultiRange::const_identifier_factory::const_identifier_factory () 
     : 
-    m_multirange(0)
+    m_multirange(nullptr)
 { 
 } 
 
-- 
GitLab


From 1908da159ae9e99d38deef93ab4dd6352e69df11 Mon Sep 17 00:00:00 2001
From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch>
Date: Mon, 8 Jun 2020 11:55:56 +0200
Subject: [PATCH 034/266] Fix ReadHandle when context is used

---
 .../JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
index 582cfb7a7acc..b9f547464567 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
@@ -108,7 +108,7 @@ namespace Analysis {
     }
 
     //retrieve the JF Vertex container
-    SG::ReadHandle<xAOD::BTagVertexContainer> h_BTagJFVtxCollectionName (m_BTagJFVtxCollectionName.key() );
+    SG::ReadHandle<xAOD::BTagVertexContainer> h_BTagJFVtxCollectionName (m_BTagJFVtxCollectionName, ctx);
     if (!h_BTagJFVtxCollectionName.isValid()) {
       ATH_MSG_ERROR( " cannot retrieve JF Vertex container with key " << m_BTagJFVtxCollectionName.key()  );
       return StatusCode::FAILURE;
@@ -116,7 +116,7 @@ namespace Analysis {
     ATH_MSG_DEBUG("#BTAG# Size of the JF Vertex container: " <<  h_BTagJFVtxCollectionName->size());
 
     //retrieve the Secondary Vertex container
-    SG::ReadHandle<xAOD::VertexContainer> h_BTagSVCollectionName ( m_BTagSVCollectionName.key() );
+    SG::ReadHandle<xAOD::VertexContainer> h_BTagSVCollectionName (m_BTagSVCollectionName , ctx);
     if (!h_BTagSVCollectionName.isValid()) {
       ATH_MSG_ERROR( " cannot retrieve Sec Vertex container with key " << m_BTagJFVtxCollectionName.key()  );
       return StatusCode::FAILURE;
-- 
GitLab


From 97295f92436c4be17833668c4542b309af207592 Mon Sep 17 00:00:00 2001
From: Julie Kirk <Julie.Kirk@cern.ch>
Date: Mon, 8 Jun 2020 12:48:06 +0200
Subject: [PATCH 035/266] Fixes for triggr PhysVal ART test

	modified:   Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_PhysValWeb_grid.py
	modified:   Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
---
 .../test/test_trigAna_PhysValWeb_grid.py             |  2 +-
 .../python/TrigValSteering/CheckSteps.py             | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_PhysValWeb_grid.py b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_PhysValWeb_grid.py
index b8f09eb57cc5..3e57c07903e9 100755
--- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_PhysValWeb_grid.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_PhysValWeb_grid.py
@@ -68,7 +68,7 @@ pv.append(['Muon','MuonMon'])
 pv.append(['ID','IDMon'])
 pv.append(['Bphys','BphysMon'])
 pv.append(['HLTCalo','HLTCaloESD'])
-pv.append(['Result','Result'])
+pv.append(['Result','ResultMon'])
 pv.append(['Bjet','BjetMon'])
 pv.append(['MET','METMon'])
 pv.append(['MinBias','MinBiasMon'])
diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
index e88fbf285ef8..6c7462f75379 100644
--- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
+++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
@@ -460,17 +460,17 @@ class PhysValWebStep(InputDependentStep):
         self.required = True
         
     def configure(self, test):
-        for fname in os.listdir('.'):
-            if fname.startswith('ref-'): 
-                self.refdir = fname
-        refargs = ' --reffile Ref:'+self.refdir+'/NTUP_PHYSVAL.pool.root '
         outargs = ' --outdir PHYSVAL_WEB/'+self.sig
         dirargs = ' --startpath run_1/HLT/'+self.sig
-        self.args += ' '+refargs+' '+outargs+' '+dirargs
-        self.args += ' '+self.input_file
+        self.args += ' '+outargs+' '+dirargs
         super(PhysValWebStep, self).configure(test)
 
     def run(self, dry_run=False):
+        for fname in os.listdir('.'):
+            if fname.startswith('ref-'): 
+                self.refdir = fname
+        refargs = ' --reffile Ref:'+self.refdir+'/NTUP_PHYSVAL.pool.root '
+        self.args += ' '+refargs+' '+self.input_file
         retcode, cmd = super(PhysValWebStep, self).run(dry_run)
         fname='PHYSVAL_WEB/'+self.sig+'/index.html'
         if os.path.exists(fname):
-- 
GitLab


From 11f6ce6a6820d29449f008bcac8477997b420947 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Mon, 8 Jun 2020 11:23:38 +0000
Subject: [PATCH 036/266] Remove defunct job option from ByteStreamInputSvc

The ByteStreamEventStorageInput service provided a legacy job option called FullFileName to specify bytestream input. With the move to EventSelector this option was all but removed from ByteStreamEventInputSvc. The EventSelectorByteStream provieded the input option to specify input. It captured the FullFileName option of the InputSvc. This commit removes the relevant parts of the ByteStreamEventStorageInputSvc and EventSelectorByteStream. It also attempts to move all references in other job options (unless they specify being for an older release).
---
 .../share/test_seeking_athena_bs.py           |  4 +-
 .../AthenaPoolMultiTest/share/BSMetaRead.py   |  2 +-
 .../AthenaPoolMultiTest/share/BSMetaWrite.py  |  2 +-
 .../share/BSMetaWriteNone.py                  |  2 +-
 .../python/ByteStreamConfig.py                |  3 +-
 .../share/BSFilter_test_jobOptions.py         |  2 +-
 .../src/ByteStreamEventStorageInputSvc.cxx    |  1 -
 .../src/ByteStreamEventStorageInputSvc.h      |  1 -
 .../src/EventSelectorByteStream.cxx           | 41 +------------------
 .../share/testROBDataProviderSvcMT.py         |  6 +--
 Event/ByteStreamTest/share/MPSharedQueue.py   |  2 +-
 Event/ByteStreamTest/share/MPSharedReader.py  |  2 +-
 Event/ByteStreamTest/share/Selectors.py       |  2 +-
 Event/ByteStreamTest/share/SkipAll.py         |  2 +-
 .../share/ConfiguredOverlay_jobOptions.py     |  2 +-
 .../share/skeleton.BSOverlayFilter_tf.py      |  6 +--
 .../ALFA/ALFA_Ntuple/share/joAlfaRecoChain.py |  4 +-
 .../share/ReadZdcBS_jobOptions.py             |  2 +-
 .../share/ReadZdcBS_jobOptions_v2.py          |  2 +-
 .../share/ReadZdcBS_jobOptions_v3.py          |  4 +-
 .../share/ReadZdcBS_jobOptions_v4.py          |  6 +--
 .../share/TestZdcDataAccess_jobOptions.py     |  2 +-
 .../share/AthenaL2muCalibTestOptions.py       |  2 +-
 .../share/CompareModulesTDAQandBytestream.py  |  2 +-
 .../PixelCalibAlgs/share/NoiseMapBuilder.py   |  2 +-
 .../scripts/createFilesForRun.py              |  2 +-
 .../SCT_CalibAlgs/share/input_BS.py           |  2 +-
 .../SCT_CalibAlgs/share/skeleton.sct_calib.py |  2 +-
 .../share/CosmicCalibTemplate.py              |  2 +-
 .../share/CosmicMCCalibTemplate.py            |  2 +-
 .../TRT_CalibAlgs/share/CosmicMCTemplate.py   |  2 +-
 .../TRT_CalibAlgs/share/CosmicTemplate.py     |  2 +-
 .../TRT_CalibAlgs/share/RAWHITemplate.py      |  2 +-
 .../TRT_CalibAlgs/share/joboptionsFullReco.py |  2 +-
 .../share/BSexample.py                        |  4 +-
 .../share/testSCTDecode.py                    |  2 +-
 .../src/SCTRawDataProvider.cxx                |  1 +
 .../ErrorScaling/datasets.py                  |  4 +-
 .../share/JobSetupFragment.py                 |  2 +-
 .../InDetRecExample/share/InDetRec_all.py     |  2 +-
 .../TESTS/testEFIDReadBSMemAudit.py           |  4 +-
 .../share/InDetTrigReadBS_jobOptions.py       |  4 +-
 .../share/jobOptionsNewSteering.py            |  2 +-
 .../jobOptions_RTT_InDetTrigRecExample.py     |  2 +-
 ...ns_RTT_InDetTrigRecExample_backTracking.py |  2 +-
 ...ptions_RTT_InDetTrigRecExample_doReadBS.py |  2 +-
 .../SCT_Monitoring/share/strippedDown.py      |  2 +-
 .../TRT_Monitoring/share/jobOptions_artest.py | 10 ++---
 .../share/SiSPSeededTracksStandalone.py       |  2 +-
 .../share/trt_eff_jobOptions.data.raw.py      |  4 +-
 .../share/LArBadChannelReadTest.py            |  2 +-
 .../LArCafJobs/share/skeleton.LArCAF.py       |  2 +-
 .../share/skeleton.LArNoise_fromraw.py        |  2 +-
 .../share/LArAverages2Ntuple_jobOptions.py    |  6 +--
 .../share/LArDigits2Ntuple_jobOptions.py      |  2 +-
 .../LArCalibTools/share/LArPulseShapeRun.py   |  2 +-
 .../share/jobOptions_ReadLArROD.py            |  2 +-
 .../share/LArCalib_AutoCorrPhys_jobOptions.py |  2 +-
 .../share/LArCalib_CTB04_Ramp_jobOptions.py   |  6 +--
 .../share/LArCalib_DelayXtalk_jobOptions.py   |  2 +-
 .../LArCalib_Delay_OFC_Cali_jobOptions.py     |  6 +--
 .../LArCalib_Delay_OFC_splitter_jobOptions.py |  6 +--
 .../share/LArCalib_Delay_jobOptions.py        |  6 +--
 .../LArCalib_Delay_splitter_jobOptions.py     |  8 ++--
 .../LArCalib_DigitAccumulator_jobOptions.py   |  2 +-
 .../share/LArCalib_Example_FillOFCPhase.py    |  2 +-
 .../LArCalib_PedestalAutoCorr_jobOptions.py   |  6 +--
 .../share/LArCalib_Ramp_jobOptions.py         |  6 +--
 .../LArCalib_Ramp_splitter_jobOptions.py      |  6 +--
 .../LArMonTools/share/LArMonByteStream.py     |  2 +-
 .../share/LArMonTools_RTT_jobOptions.py       |  2 +-
 .../LArMonitoring/share/LArReco_fromraw.py    |  2 +-
 .../LArROD/share/LArDigit2Ntuple.py           |  2 +-
 .../LArROD/share/LArOFCIter2Ntuple.py         |  2 +-
 .../LArCalibTest/share/DumpCaloBadChannels.py |  2 +-
 .../share/LArCablingTest_atlas.py             |  2 +-
 .../LArEventTest/share/DumpLArDigits.py       |  2 +-
 .../CscCalibAlgs/share/CscCalcPedMon.py       |  4 +-
 .../CscCalibAlgs/share/CscCalcSlopeMon.py     |  2 +-
 .../share/CscCalibCommonOptions.py            |  2 +-
 .../share/ReadCscByteStream_topOptions.py     |  6 +--
 .../CscValidationUtil/share/CscDataBuilder.py |  6 +--
 .../share/runRPCdecodingDumpOnNtuple.py       |  2 +-
 .../share/SctNtuple_topOptions.py             |  2 +-
 .../share/RecExCommon_topOptions.py           |  8 ++--
 .../RecExample/RecExConfig/python/PyComps.py  |  2 +-
 .../share/jobOptions_LaserTiming.py           |  2 +-
 .../share/jobOptions_NoiseCalib.py            |  2 +-
 .../TileRecEx/share/jobOptions_TileTBDump.py  |  2 +-
 .../TileRecEx/share/jobOptions_TileTBStat.py  |  2 +-
 .../share/jobOptions_TileLasMon.py            |  2 +-
 .../share/jobOptions_TileTBMon.py             |  2 +-
 .../TrigBSExtraction/share/unpackBS.py        |  2 +-
 .../TrigCostMonitor/share/readDataRate.py     |  6 +--
 .../TrigCostMonitor/share/readTrigCost.py     |  6 +--
 .../run/standalone_TrigHLTMonCommon.py        |  2 +-
 .../share/TrigHLTMonCommon_jobOptions.py      |  2 +-
 .../share/L1Topo_ReadBS_test.py               |  8 ++--
 .../share/TrigT1CTMonitoringJobOptions.py     |  2 +-
 .../TrigT1CaloByteStream/share/BS2xAOD.py     |  2 +-
 .../TestTrigT1CaloDataAccess_jobOptions.py    |  2 +-
 .../share/xAODWrite_jobOptions.py             |  2 +-
 .../share/L1Calo_BS2xAOD_jobOptions.py        |  2 +-
 .../share/L1CaloRampMaker_topOptions.py       |  2 +-
 .../share/LArL1CaloRampMaker.py               |  2 +-
 .../share/TileL1CaloRampMaker.py              |  2 +-
 .../TrigT1CaloMonitoring_runStandalone.py     |  2 +-
 .../share/ReadLVL1BS_jobOptions.py            |  2 +-
 .../share/Trigger_topOptions_standalone.py    |  2 +-
 ...ergingEventLoopMgr_TriggerBSandRDOtoRDO.py |  2 +-
 .../share/skeleton.BStoTRIGBS.fails.py        |  2 +-
 .../share/skeleton.BStoTRIGBS.py              |  2 +-
 112 files changed, 164 insertions(+), 201 deletions(-)

diff --git a/AtlasTest/ControlTest/share/test_seeking_athena_bs.py b/AtlasTest/ControlTest/share/test_seeking_athena_bs.py
index c3843dd4772a..0f0101edc154 100644
--- a/AtlasTest/ControlTest/share/test_seeking_athena_bs.py
+++ b/AtlasTest/ControlTest/share/test_seeking_athena_bs.py
@@ -50,7 +50,7 @@ OUTPUT='%(output_file_name)s'
 
 include('ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py')
 
-svcMgr.ByteStreamInputSvc.FullFileName = %(input_file_list)s
+svcMgr.EventSelector.Input = %(input_file_list)s
 
 import AthenaServices.PyAthenaEventLoopMgr as aspy
 #aspy.enable_seeking()
@@ -147,4 +147,4 @@ diff = os.linesep.join( [d for d in diff] )
 assert diff=='', diff
 
 print "::: bye."
-print ":"*80
\ No newline at end of file
+print ":"*80
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaRead.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaRead.py
index 45e18d51b283..655b6590bd97 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaRead.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaRead.py
@@ -25,7 +25,6 @@ theApp.EvtMax = 200000
 if not hasattr(svcMgr,"ByteStreamCnvSvc"):
    from ByteStreamCnvSvc import ReadByteStream
    # Define the input
-   svcMgr.ByteStreamInputSvc.FullFileName = [ "metatest.data" ]
    theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 
 svcMgr.ByteStreamCnvSvc.OutputLevel = DEBUG
@@ -38,6 +37,7 @@ from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool
 svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ]
 
 #svcMgr.EventSelector.InputCollections = [ "test_defl.data" ]
+svcMgr.EventSelector.Input = [ "metatest.data" ]
 
 #--------------------------------------------------------------
 # Private Application Configuration options
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWrite.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWrite.py
index 521632e4b2d4..b899638c00bb 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWrite.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWrite.py
@@ -28,7 +28,7 @@ theApp.EvtMax = 200000
 if not hasattr(svcMgr,"ByteStreamCnvSvc"):
    from ByteStreamCnvSvc import ReadByteStream
    # Define the input
-   svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
+   svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
    theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 
    from ByteStreamCnvSvc import WriteByteStream
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWriteNone.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWriteNone.py
index 9dd526668f95..d9e4e12320bc 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWriteNone.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/BSMetaWriteNone.py
@@ -32,7 +32,6 @@ topSequence += PassNoneFilter
 if not hasattr(svcMgr,"ByteStreamCnvSvc"):
    from ByteStreamCnvSvc import ReadByteStream
    # Define the input
-   svcMgr.ByteStreamInputSvc.FullFileName = [ "metatest.data" ]
    theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 
    from ByteStreamCnvSvc import WriteByteStream
@@ -53,6 +52,7 @@ from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool
 svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ]
 
 #svcMgr.EventSelector.InputCollections = [ "test_defl.data" ]
+svcMgr.EventSelector.Input= [ "metatest.data" ]
 
 #--------------------------------------------------------------
 # Private Application Configuration options
diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index 489fdd523805..17fbb7de231d 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -18,19 +18,20 @@ def ByteStreamReadCfg( inputFlags, typeNames=[] ):
     if inputFlags.Input.SecondaryFiles:
         filenames = inputFlags.Input.SecondaryFiles
         eventSelector = EventSelectorByteStream("SecondaryEventSelector", IsSecondary=True)
+        eventSelector.Input = filenames
         acc.addService( eventSelector )
     else:
         filenames = inputFlags.Input.Files
         xAODMaker__EventInfoSelectorTool = CompFactory.xAODMaker.EventInfoSelectorTool
         xconv = xAODMaker__EventInfoSelectorTool()
         eventSelector = EventSelectorByteStream("EventSelector")
+        eventSelector.Input = filenames
         eventSelector.HelperTools += [xconv]
         eventSelector.SkipEvents=inputFlags.Exec.SkipEvents
         acc.addService( eventSelector )
         acc.setAppProperty( "EvtSel", eventSelector.name )
 
     bsInputSvc = ByteStreamEventStorageInputSvc( "ByteStreamInputSvc" )
-    bsInputSvc.FullFileName = filenames
     if inputFlags.Overlay.DataOverlay:
         bsInputSvc.EventInfoKey = inputFlags.Overlay.BkgPrefix + "EventInfo"
     acc.addService( bsInputSvc )
diff --git a/Event/ByteStreamCnvSvc/share/BSFilter_test_jobOptions.py b/Event/ByteStreamCnvSvc/share/BSFilter_test_jobOptions.py
index d700968f9b95..5944a46f5576 100644
--- a/Event/ByteStreamCnvSvc/share/BSFilter_test_jobOptions.py
+++ b/Event/ByteStreamCnvSvc/share/BSFilter_test_jobOptions.py
@@ -11,7 +11,7 @@ svcMgr = theApp.serviceMgr()
 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
 
 theApp.EvtMax = 5000
-ByteStreamInputSvc.FullFileName += [
+EventSelector.Input += [
     "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data",
     ]
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
index a77785f67b1f..b3ac139d2874 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
@@ -48,7 +48,6 @@ ByteStreamEventStorageInputSvc::ByteStreamEventStorageInputSvc(
   , m_storeGate    ("StoreGateSvc", name)
   , m_inputMetadata("StoreGateSvc/InputMetaDataStore", name)
   , m_robProvider  ("ROBDataProviderSvc", name)
-  , m_vExplicitFile(this, "FullFileName",          {}, "")
   , m_sequential   (this, "EnableSequential",   false, "")
   , m_dump         (this, "DumpFlag",           false, "Dump fragments")
   , m_wait         (this, "WaitSecs",              0., "Seconds to wait if input is in wait state")
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h
index 7385c5cb4b85..d3a793f19dd8 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h
@@ -96,7 +96,6 @@ private: // properties
   ServiceHandle<StoreGateSvc>                m_storeGate;     //!< StoreGateSvc
   ServiceHandle<StoreGateSvc>                m_inputMetadata; //!< StoreGateSvc
   ServiceHandle<IROBDataProviderSvc>         m_robProvider;
-  Gaudi::Property<std::vector<std::string> > m_vExplicitFile;
   Gaudi::Property<bool>                      m_sequential;    //!< enable sequential reading.
   Gaudi::Property<bool>                      m_dump;
   Gaudi::Property<float>                     m_wait;
diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
index f4bf2ee6b2d9..5991520c7c57 100644
--- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
+++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
@@ -17,7 +17,6 @@
 #include "GaudiKernel/FileIncident.h"
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/IIoComponentMgr.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 
 #include "AthenaKernel/IAthenaIPCTool.h"
 #include "EventInfo/EventInfo.h"
@@ -76,44 +75,8 @@ StatusCode EventSelectorByteStream::initialize() {
 
    // Check for input setting
    if (m_filebased && m_inputCollectionsProp.value().empty()) {
-      ATH_MSG_WARNING("InputCollections not properly set, checking EventStorageInputSvc properties");
-      ServiceHandle<IJobOptionsSvc> joSvc("JobOptionsSvc", name());
-      bool retrieve(false);
-      if (!joSvc.retrieve().isSuccess()) {
-         ATH_MSG_FATAL("Cannot get JobOptionsSvc.");
-      } else {
-         // Check if FullFileName is set in the InputSvc
-         typedef std::vector<const Property*> Properties_t;
-         const Properties_t* esProps = joSvc->getProperties("ByteStreamInputSvc");
-         std::vector<const Property*>::const_iterator ii = esProps->begin();
-         if (esProps != 0) {
-            while (ii != esProps->end()) {
-               if ((*ii)->name() == "FullFileName") {
-                  StringArrayProperty temp;
-                  if ((*ii)->load(temp)) {
-                     retrieve = true;
-                     m_inputCollectionsProp.assign(temp);
-                     m_inputCollectionsFromIS = true;
-                     ATH_MSG_INFO("Retrieved InputCollections from InputSvc");
-                  }
-               }
-               if ((*ii)->name() == "EventStore") {
-                  StringProperty temp2;
-                  if ((*ii)->load(temp2)) {
-                     m_evtStore = ServiceHandle<StoreGateSvc>(temp2.value(),this->name());
-                     ATH_MSG_INFO("Retrieved StoreGateSvc name of " << temp2);
-                  }
-               }
-               ++ii;
-            }
-         } else {
-            ATH_MSG_WARNING("Did not find InputSvc jobOptions properties");
-         }
-      }
-      if (!retrieve) {
-         ATH_MSG_FATAL("Unable to retrieve valid input list");
-         return(StatusCode::FAILURE);
-      }
+     ATH_MSG_FATAL("Unable to retrieve valid input list");
+     return(StatusCode::FAILURE);
    }
    m_skipEventSequence = m_skipEventSequenceProp.value();
    std::sort(m_skipEventSequence.begin(), m_skipEventSequence.end());
diff --git a/Event/ByteStreamCnvSvcBase/share/testROBDataProviderSvcMT.py b/Event/ByteStreamCnvSvcBase/share/testROBDataProviderSvcMT.py
index 80020fc76474..fe00342c3405 100644
--- a/Event/ByteStreamCnvSvcBase/share/testROBDataProviderSvcMT.py
+++ b/Event/ByteStreamCnvSvcBase/share/testROBDataProviderSvcMT.py
@@ -5,9 +5,9 @@
 #==============================================================
 # Input 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" ]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
-#svcMgr.ByteStreamInputSvc.FullFileName += [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
+svcMgr.EventSelector.Input = [ "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" ]
+#svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
+#svcMgr.EventSelector.Input += [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
 #svcMgr.EventSelector.InputCollections = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
 #svcMgr.ByteStreamInputSvc.ValidateEvent = False
 
diff --git a/Event/ByteStreamTest/share/MPSharedQueue.py b/Event/ByteStreamTest/share/MPSharedQueue.py
index 653c605f9161..231252caec9a 100644
--- a/Event/ByteStreamTest/share/MPSharedQueue.py
+++ b/Event/ByteStreamTest/share/MPSharedQueue.py
@@ -6,7 +6,7 @@
 # Input 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
+svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
 
 from AthenaMP.AthenaMPFlags import jobproperties as jps
 jps.AthenaMPFlags.Strategy='SharedQueue'
diff --git a/Event/ByteStreamTest/share/MPSharedReader.py b/Event/ByteStreamTest/share/MPSharedReader.py
index b5c211cf9b50..57dc53ce0a19 100644
--- a/Event/ByteStreamTest/share/MPSharedReader.py
+++ b/Event/ByteStreamTest/share/MPSharedReader.py
@@ -6,7 +6,7 @@
 # Input 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
+svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
 
 from AthenaMP.AthenaMPFlags import jobproperties as jps
 jps.AthenaMPFlags.UseSharedReader=True
diff --git a/Event/ByteStreamTest/share/Selectors.py b/Event/ByteStreamTest/share/Selectors.py
index 21b614513b21..6c25ec9de62e 100755
--- a/Event/ByteStreamTest/share/Selectors.py
+++ b/Event/ByteStreamTest/share/Selectors.py
@@ -12,7 +12,7 @@ svcMgr = theApp.serviceMgr()
 #ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
 
 theApp.EvtMax = 500
-#svcMgr.ByteStreamInputSvc.FullFileName += [
+#svcMgr.EventSelector.Input += [
 #    "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data",
 #    ]
 
diff --git a/Event/ByteStreamTest/share/SkipAll.py b/Event/ByteStreamTest/share/SkipAll.py
index 696b65ce20ae..cf87dd8314ab 100755
--- a/Event/ByteStreamTest/share/SkipAll.py
+++ b/Event/ByteStreamTest/share/SkipAll.py
@@ -28,7 +28,7 @@ if not hasattr(svcMgr,"ByteStreamCnvSvc"): from ByteStreamCnvSvc import ReadByte
 
 # Define the input
 svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
+#svcMgr.EventSelector.Input = [ "/afs/cern.ch/atlas/maxidisk/d108/cranshaw/nightlies/extractedEvents.data" ]
 theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 svcMgr.ByteStreamInputSvc.OutputLevel=DEBUG
 #svcMgr.ByteStreamInputSvc.DumpFlag = True
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
index 11b9169864fc..c29e29758c90 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
@@ -35,7 +35,7 @@ if overlayFlags.isDataOverlay():
     from InDetRecExample.InDetJobProperties import InDetFlags
     from ByteStreamCnvSvc import ReadByteStream
     include("RecExCommon/BSRead_config.py")
-    ServiceMgr.ByteStreamInputSvc.FullFileName = DataInputCollections
+    ServiceMgr.EventSelector.Input = DataInputCollections
     ServiceMgr.ByteStreamInputSvc.EventStore= "StoreGateSvc/"+overlayFlags.dataStore()
     from AthenaKernel import StoreID
     ServiceMgr.ByteStreamAddressProviderSvc.StoreID=StoreID.UNKNOWN
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
index 991e6f8bbe01..01026f34be56 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
@@ -37,11 +37,11 @@ BSFilterLog.info( '**** ByteStreamInputSvc configuration' )
 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
-# ByteStreamInputSvc.FullFileName = open(runArgs.InputFileMapFile).readline().rstrip().split(',')
+# EventSelector.Input = open(runArgs.InputFileMapFile).readline().rstrip().split(',')
 if hasattr( runArgs, 'inputZeroBiasBSFile'):
-    ByteStreamInputSvc.FullFileName=runArgs.inputZeroBiasBSFile
+    EventSelector.Input=runArgs.inputZeroBiasBSFile
 else:
-    ByteStreamInputSvc.FullFileName=runArgs.inputBS_SKIMFile
+    EventSelector.Input=runArgs.inputBS_SKIMFile
 print ByteStreamInputSvc
 
 # ---------------------------
diff --git a/ForwardDetectors/ALFA/ALFA_Ntuple/share/joAlfaRecoChain.py b/ForwardDetectors/ALFA/ALFA_Ntuple/share/joAlfaRecoChain.py
index ba6938563473..8176d3b697e2 100644
--- a/ForwardDetectors/ALFA/ALFA_Ntuple/share/joAlfaRecoChain.py
+++ b/ForwardDetectors/ALFA/ALFA_Ntuple/share/joAlfaRecoChain.py
@@ -119,8 +119,8 @@ conddb.addFolder("","<db>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_FWD;dbname
 #-------------------------------------------------------------------------------------------------#
 globalflags.InputFormat.set_Value_and_Lock('bytestream')
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-#ServiceMgr.ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/work/g/ggach/public/xAOD/myTest/RAW/data15_13TeV/data15_13TeV.00266904.calibration_ALFACalib.daq.RAW._lb0000._SFO-6._0002.data"]
-ServiceMgr.ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/work/g/ggach/public/xAOD/myTest/RAW/data15_13TeV/data15_13TeV.00267358.physics_Main.merge.RAW._lb0005._SFO-2._0001.1"]
+#ServiceMgr.EventSelector.Input = ["/afs/cern.ch/work/g/ggach/public/xAOD/myTest/RAW/data15_13TeV/data15_13TeV.00266904.calibration_ALFACalib.daq.RAW._lb0000._SFO-6._0002.data"]
+ServiceMgr.EventSelector.Input = ["/afs/cern.ch/work/g/ggach/public/xAOD/myTest/RAW/data15_13TeV/data15_13TeV.00267358.physics_Main.merge.RAW._lb0005._SFO-2._0001.1"]
 from ALFA_RawDataByteStreamCnv.ALFA_RawDataByteStreamCnvConf import ALFA_RawDataProvider
 
 
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions.py b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions.py
index a1566aa9a805..4c528f7520cc 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions.py
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions.py
@@ -12,7 +12,7 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # EventStorage Input
 ByteStreamInputSvc =  svcMgr.ByteStreamInputSvc
 
-ByteStreamInputSvc.FullFileName = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
+EventSelector.Input = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
 #["/castor/cern.ch/grid/atlas/DAQ/2009/00115405/physics_ZDCStream/" + \
 #"data09_cos.00115405.physics_ZDCStream.daq.RAW._lb0000._SFO-1._0064.data"]
 
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v2.py b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v2.py
index f0e4e4cd1222..77dd6bfc1d64 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v2.py
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v2.py
@@ -12,7 +12,7 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # EventStorage Input
 ByteStreamInputSvc =  svcMgr.ByteStreamInputSvc
 
-ByteStreamInputSvc.FullFileName = \
+EventSelector.Input = \
 ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
 #["/tmp/leite/test_map/data_test.00146536.calibration_map.daq.RAW._lb0000._ROSEventBuilder._0001.data"]
 #["/castor/cern.ch/grid/atlas/DAQ/2009/00115405/physics_ZDCStream/" + \
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v3.py b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v3.py
index 94648e09068c..2b8bbced4bae 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v3.py
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v3.py
@@ -12,8 +12,8 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # EventStorage Input
 ByteStreamInputSvc =  svcMgr.ByteStreamInputSvc
 
-ByteStreamInputSvc.FullFileName = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
-#ByteStreamInputSvc.FullFileName = \
+EventSelector.Input = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
+#EventSelector.Input = \
 #["/tmp/leite/test_map/data_test.00146536.calibration_map.daq.RAW._lb0000._ROSEventBuilder._0001.data"]
 #["/castor/cern.ch/grid/atlas/DAQ/2009/00115405/physics_ZDCStream/" + \
 #"data09_cos.00115405.physics_ZDCStream.daq.RAW._lb0000._SFO-1._0064.data"]
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v4.py b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v4.py
index 574e68ad4181..e66a3db08952 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v4.py
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/ReadZdcBS_jobOptions_v4.py
@@ -12,9 +12,9 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # EventStorage Input
 ByteStreamInputSvc =  svcMgr.ByteStreamInputSvc
 
-#ByteStreamInputSvc.FullFileName = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
-#ByteStreamInputSvc.FullFileName = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-zdc/ZdcData/standalone/data15_calib.00283741.calibration_.daq.RAW._lb0000._ROS-FWD-ZDC-00._0001.data"]
-ByteStreamInputSvc.FullFileName = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-zdc/ZdcData/calib/data15_calib.00285911.calibration_.daq.RAW._lb0000._ROS-FWD-ZDC-00._0001.data"]
+#EventSelector.Input = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data11_hi.00193403.physics_HardProbes.merge.RAW._lb0012._SFO-9._0001.1"]
+#EventSelector.Input = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-zdc/ZdcData/standalone/data15_calib.00283741.calibration_.daq.RAW._lb0000._ROS-FWD-ZDC-00._0001.data"]
+EventSelector.Input = ["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-zdc/ZdcData/calib/data15_calib.00285911.calibration_.daq.RAW._lb0000._ROS-FWD-ZDC-00._0001.data"]
 
 from AthenaCommon.GlobalFlags import GlobalFlags
 GlobalFlags.InputFormat = "bytestream"
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/TestZdcDataAccess_jobOptions.py b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/TestZdcDataAccess_jobOptions.py
index 2ab74ea3a05c..b240a579d374 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/TestZdcDataAccess_jobOptions.py
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/share/TestZdcDataAccess_jobOptions.py
@@ -12,7 +12,7 @@ from ByteStreamCnvSvc import ReadByteStream
 import struct
 
 
-svcMgr.ByteStreamInputSvc.FullFileName = [InputFile]
+svcMgr.EventSelector.Input = [InputFile]
 
 
 from AthenaCommon.GlobalFlags import globalflags
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/share/AthenaL2muCalibTestOptions.py b/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/share/AthenaL2muCalibTestOptions.py
index 8edcee0103a0..b80fe7ea8389 100755
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/share/AthenaL2muCalibTestOptions.py
+++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/share/AthenaL2muCalibTestOptions.py
@@ -77,7 +77,7 @@ svcMgr.ByteStreamAddressProviderSvc.OutputLevel = DEBUG
 #
 #==============================================================
 
-svcMgr.ByteStreamInputSvc.FullFileName = [ "bla-muon-calib._0001.data"]
+svcMgr.EventSelector.Input = [ "bla-muon-calib._0001.data"]
 
 #**************************************************************
 #
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/CompareModulesTDAQandBytestream.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/CompareModulesTDAQandBytestream.py
index fae53276e89a..46254d90192d 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/CompareModulesTDAQandBytestream.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/CompareModulesTDAQandBytestream.py
@@ -377,7 +377,7 @@ if globalflags.InputFormat() == 'pool':
 elif globalflags.InputFormat() == 'bytestream':
   include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
   include("InDetRecExample/InDetReadBS_jobOptions.py")
-  ServiceMgr.ByteStreamInputSvc.FullFileName = collection
+  ServiceMgr.EventSelector.Input = collection
 
 
 ### configure the event selector
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
index ff6bdb8ee35a..67a11a30b79b 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
@@ -151,7 +151,7 @@ if globalflags.InputFormat() == 'pool':
 elif globalflags.InputFormat() == 'bytestream':
   include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
   include("InDetRecExample/InDetReadBS_jobOptions.py")
-  ServiceMgr.ByteStreamInputSvc.FullFileName = collection
+  ServiceMgr.EventSelector.Input = collection
 
 
 topSequence += NoiseMapBuilder
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/createFilesForRun.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/createFilesForRun.py
index 4e1e0f2062a7..4808d8aa7ac9 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/createFilesForRun.py
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/createFilesForRun.py
@@ -6,7 +6,7 @@ import os, sys, runInfo,re
 def inputBs(dataFilename):
   outputFile='input_BS.py' #the file to write will be an input file to the jobOptions
   f=open(outputFile,'w')
-  f.write('ServiceMgr.ByteStreamInputSvc.FullFileName = [\n')
+  f.write('ServiceMgr.EventSelector.Input = [\n')
   f.write('"'+dataFilename+'"\n]\n')
   f.close()
   
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/input_BS.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/input_BS.py
index e3dfcf9149d5..ea8498ffd914 100755
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/input_BS.py
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/input_BS.py
@@ -1,3 +1,3 @@
-ServiceMgr.ByteStreamInputSvc.FullFileName = [
+ServiceMgr.EventSelector.Input = [
 "/afs/cern.ch/user/s/sctcalib/scratch0/test_results/data/data10_7TeV.00167661.calibration_SCTNoise.daq.RAW._lb0000._SFO-9._0003.data"
 ]
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
index 48f2c191d435..3a1f2e3b90dc 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
@@ -497,7 +497,7 @@ SCTCalib.ReadBS         = ReadBS
 #--- Input files
 if hasattr( runArgs, 'InputType' ) :
     if runArgs.InputType is 'RAW' :
-        ServiceMgr.ByteStreamInputSvc.FullFileName = runArgs.inputNames
+        ServiceMgr.EventSelector.Input = runArgs.inputNames
 #        ServiceMgr.ByteStreamInputSvc.PartName = runArgs.part
     elif runArgs.InputType is 'NTUP_TRKVALID' :
         SCTCalib.InputTrkVal                       = runArgs.inputNames
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py
index f6dceb0e3c10..4f99c8040c7b 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py
@@ -203,7 +203,7 @@ if not doReadBS:
     ostring+="""
 
 if doReadBS:
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "some file" ]
+  ServiceMgr.EventSelector.Input = [ "some file" ]
 
 #--------------------------------------------------------------
 # Calibration stuff
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCCalibTemplate.py
index 8e776c2d9caf..2250a635c555 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCCalibTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCCalibTemplate.py
@@ -198,7 +198,7 @@ if not doReadBS:
     ostring+="""
 
 if doReadBS:
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "some file" ]
+  ServiceMgr.EventSelector.Input = [ "some file" ]
 
 #--------------------------------------------------------------
 # Calibration stuff
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCTemplate.py
index ad030dcad25e..f59d0676c455 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicMCTemplate.py
@@ -206,7 +206,7 @@ if not doReadBS:
     ostring+="""
 
 if doReadBS:
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "some file" ]
+  ServiceMgr.EventSelector.Input = [ "some file" ]
 
 #--------------------------------------------------------------
 # Calibration stuff
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py
index 8ce490169a26..eeefef9e0581 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py
@@ -217,7 +217,7 @@ if not doReadBS:
     ostring+="""
 
 if doReadBS:
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "some file" ]
+  ServiceMgr.EventSelector.Input = [ "some file" ]
 
 #--------------------------------------------------------------
 # Calibration stuff
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
index 5e6e52226353..1a6981374cf2 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
@@ -271,7 +271,7 @@ theApp.EvtMax = %i""" % nevents
 #ServiceMgr.EventSelector.SkipEvents = 2
 #ServiceMgr.StoreGateSvc.Dump = True
 
-ServiceMgr.ByteStreamInputSvc.FullFileName = ["""
+ServiceMgr.EventSelector.Input = ["""
     for i in range(len(inputfiles)-1):
         ostring+='"%s", ' % inputfiles[i]
     ostring+='"%s"]' % inputfiles[len(inputfiles)-1]
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
index b03f998135e6..2f4efb9abeb8 100755
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
@@ -208,7 +208,7 @@ theApp.EvtMax = 10
 #ServiceMgr.EventSelector.SkipEvents = 2
 #ServiceMgr.StoreGateSvc.Dump = True
 
-#ServiceMgr.ByteStreamInputSvc.FullFileName = ["data12_8TeV.00208485.express_express.merge.RAW._lb0055._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0056._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0057._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0058._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0059._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0060._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0061._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0062._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0063._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0064._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0065._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0066._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0067._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0068._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0069._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0070._SFO-ALL._0001.1"]
+#ServiceMgr.EventSelector.Input = ["data12_8TeV.00208485.express_express.merge.RAW._lb0055._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0056._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0057._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0058._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0059._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0060._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0061._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0062._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0063._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0064._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0065._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0066._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0067._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0068._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0069._SFO-ALL._0001.1","data12_8TeV.00208485.express_express.merge.RAW._lb0070._SFO-ALL._0001.1"]
 
 from AthenaCommon.AppMgr import ToolSvc
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/BSexample.py b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/BSexample.py
index 83f8e08e6a81..c2d751d89c8d 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/BSexample.py
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/BSexample.py
@@ -73,6 +73,6 @@ if not doReadBS:
   #ServiceMgr.EventSelector.InputCollections = ["castor:/castor/cern.ch/grid/atlas/datafiles/egamma/DC3.007040.singlepart_gamma_Et20/digit/120031/ideal0_mc12.007040.singlepart_gamma_Et20.digit.RDO.v12003108_tid005022._00001.pool.root"]
   #ServiceMgr.EventSelector.InputCollections += ["castor:/castor/cern.ch/grid/atlas/datafiles/egamma/DC3.007040.singlepart_gamma_Et20/digit/120031/ideal0_mc12.007040.singlepart_gamma_Et20.digit.RDO.v12003108_tid005022._00002.pool.root"]
 if doReadBS:
-  #ServiceMgr.ByteStreamInputSvc.FullFileName = [ "rfio:/castor/cern.ch/user/w/wildauer/calib0.007003.singlepart_e_Et25.digit.RDO.v12003101_tid003425._00001.bs.data" ] 
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "RawEvent.re" ] 
+  #ServiceMgr.EventSelector.Input = [ "rfio:/castor/cern.ch/user/w/wildauer/calib0.007003.singlepart_e_Et25.digit.RDO.v12003101_tid003425._00001.bs.data" ] 
+  ServiceMgr.EventSelector.Input = [ "RawEvent.re" ] 
   ServiceMgr.ByteStreamInputSvc.NumFile      = [1] # this might be the same as SkipEvents?? useless if it just specifies the number of input files ...
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
index 791905bbbea3..9547557cb61a 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
@@ -100,7 +100,7 @@ IOVDbSvc.OutputLevel = WARNING
 # Set input byte stream file (from q431 test)
 inputBSFiles = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data17_13TeV.00330470.physics_Main.daq.RAW._lb0310._SFO-1._0001.data"]
 include("ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py")
-ServiceMgr.ByteStreamInputSvc.FullFileName = inputBSFiles
+ServiceMgr.EventSelector.Input = inputBSFiles
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
 athenaCommonFlags.FilesInput = inputBSFiles
 
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
index 799c13013d55..69623dbdc040 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
@@ -8,6 +8,7 @@
 #include "SCT_Cabling/ISCT_CablingTool.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "EventContainers/IdentifiableContTemp.h"
+#include "EventContainers/IdentifiableContainerBase.h"
 
 #include <memory>
 
diff --git a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/datasets.py b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/datasets.py
index 5271e4f17648..2b940be7ae53 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/datasets.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/datasets.py
@@ -44,7 +44,7 @@ class CastorDataset(object):
         athenaCommonFlags.FilesInput = copy.deepcopy(self.filePaths)
 
         #ServiceMgr.EventSelector.InputCollections = copy.deepcopy(self.filePaths)
-        #ServiceMgr.ByteStreamInputSvc.FullFileName = copy.deepcopy(self.filePaths)
+        #ServiceMgr.EventSelector.Input = copy.deepcopy(self.filePaths)
 
         if (shuffle):
             import random
@@ -192,7 +192,7 @@ class EOSDataset(object):
         athenaCommonFlags.FilesInput = copy.deepcopy(self.filePaths)
 
         #ServiceMgr.EventSelector.InputCollections = copy.deepcopy(self.filePaths)
-        #ServiceMgr.ByteStreamInputSvc.FullFileName = copy.deepcopy(self.filePaths)
+        #ServiceMgr.EventSelector.Input = copy.deepcopy(self.filePaths)
 
         if (shuffle):
             import random
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/JobSetupFragment.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/JobSetupFragment.py
index cde5a1496253..c4498501288b 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/JobSetupFragment.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/JobSetupFragment.py
@@ -52,7 +52,7 @@ if not jobConfig['bytestream']:
     ServiceMgr.PoolSvc.AttemptCatalogPatch=True
     ServiceMgr.EventSelector.InputCollections = jobConfig['inputfiles']
 else:
-    ServiceMgr.ByteStreamInputSvc.FullFileName = jobConfig['inputfiles']
+    ServiceMgr.EventSelector.Input = jobConfig['inputfiles']
 
 
 # Number of events
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
index b254e3b35595..dc78cdfc6ccd 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
@@ -56,7 +56,7 @@ if globalflags.InputFormat() == 'bytestream':
   # configure converters, including cabling
   include("InDetRecExample/InDetReadBS_jobOptions.py")
   if 'athenaCommonFlags' in dir() and athenaCommonFlags.FilesInput():
-    ServiceMgr.ByteStreamInputSvc.FullFileName  = athenaCommonFlags.FilesInput()
+    ServiceMgr.EventSelector.Input  = athenaCommonFlags.FilesInput()
 else:
   # set up pool reading
   import AthenaPoolCnvSvc.ReadAthenaPool
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py b/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py
index 5e4bd7cd2dbb..b8703204386f 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py
@@ -61,8 +61,8 @@ if 'theRTTisRunningMe' in dir() and theRTTisRunningMe:
 	print "input data to be set up by RTT"
 	del ByteStreamInputSvc
 else:
-	ByteStreamInputSvc.FullFileName = BSRDOInput
-	print ByteStreamInputSvc.FullFileName
+	EventSelector.Input = BSRDOInput
+	print EventSelector.Input
 # algorithm to measure vmem size
 theApp.DLLs += [ "TrigTestTools" ]
 theApp.TopAlg += [ "MemAuditAlg" ]
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigReadBS_jobOptions.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigReadBS_jobOptions.py
index 8ac6c52ba14a..0bdb4392531b 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigReadBS_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigReadBS_jobOptions.py
@@ -8,14 +8,14 @@ from AthenaCommon.AppMgr import ToolSvc
 
 # InputSvc
 from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageInputSvc
-ByteStreamInputSvc = ByteStreamEventStorageInputSvc("ByteStreamInputSvc",
-                                                FullFileName = ["RawEvent.re"])
+ByteStreamInputSvc = ByteStreamEventStorageInputSvc("ByteStreamInputSvc")
 ServiceMgr            += ByteStreamInputSvc
 print                    ByteStreamInputSvc
 
 # get EventSelector
 from ByteStreamCnvSvc.ByteStreamCnvSvcConf import EventSelectorByteStream
 EventSelector  = EventSelectorByteStream("EventSelector",
+                                         Input = ["RawEvent.re"],
                                          ByteStreamInputSvc = "ByteStreamInputSvc")
 ServiceMgr    += EventSelector
 # declare EventSelector to theApp
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
index ccdc6bd88e7e..fc65bd7d3fe8 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
@@ -352,7 +352,7 @@ if not doReadBS:
   ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d38/ID_ValidationData/testIdeal_07.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000201_tid002760._00002.pool.root.1"]
   #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
 else:
-  ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
+  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
 # ------------------------------------------------------------
 
 # switch off history service
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
index fd431e1cc36e..18c51da92ee1 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
@@ -351,7 +351,7 @@ if not doReadBS:
   ServiceMgr.EventSelector.InputCollections = ["rfio:/castor/cern.ch/user/e/enzuobon/RTT/RTTdata/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00001.pool.root.4"]
   #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
 else:
-  ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
+  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
 # ------------------------------------------------------------
 
 # switch off history service
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
index 150efdf99ba1..61515232d508 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
@@ -304,7 +304,7 @@ if not doReadBS:
   ServiceMgr.EventSelector.InputCollections = ["rfio:/castor/cern.ch/user/e/enzuobon/RTT/RTTdata/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00001.pool.root.4"]
   #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
 else:
-  ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
+  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
 # ------------------------------------------------------------
 
 # switch off history service
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
index bdc04982b554..a4b72d0cd66d 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
@@ -353,7 +353,7 @@ if not doReadBS:
   ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d38/ID_ValidationData/testIdeal_07.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000201_tid002760._00002.pool.root.1"]
   #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
 else:
-  ByteStreamInputSvc.FullFileName = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data"]
+  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data"]
 
 # ------------------------------------------------------------
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
index 1fc5469676b6..9893bb893701 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
@@ -57,7 +57,7 @@ if globalflags.InputFormat() == 'pool':
   ServiceMgr.EventSelector.InputCollections = collection
 elif globalflags.InputFormat() == 'bytestream':
   include("InDetRecExample/InDetReadBS_jobOptions.py")
-  ServiceMgr.ByteStreamInputSvc.FullFileName = collection
+  ServiceMgr.EventSelector.Input = collection
   
 #--------------------------------------------------------------
 # include SCT Clusterization
diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/share/jobOptions_artest.py b/InnerDetector/InDetMonitoring/TRT_Monitoring/share/jobOptions_artest.py
index b6759d2610db..532b64bb2ee4 100644
--- a/InnerDetector/InDetMonitoring/TRT_Monitoring/share/jobOptions_artest.py
+++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/share/jobOptions_artest.py
@@ -76,9 +76,9 @@ if not doReadBS:
   ServiceMgr.PoolSvc.AttemptCatalogPatch=True
   ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d158/CSC.005200.T1_McAtNlo_Jimmy.RDO.pool.root" ]
 if doReadBS:
-#  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW._lb0137._SFO-ALL._0001.1"]
-#AB  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1"]
-#ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/work/e/ecelebi/public/data11_7TeV.00179710.physics_ZeroBias.merge.RAW" ]
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/public/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1"]
+#  ServiceMgr.EventSelector.Input = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW._lb0137._SFO-ALL._0001.1"]
+#AB  ServiceMgr.EventSelector.Input = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1"]
+#ServiceMgr.EventSelector.Input = [ "/afs/cern.ch/work/e/ecelebi/public/data11_7TeV.00179710.physics_ZeroBias.merge.RAW" ]
+  ServiceMgr.EventSelector.Input = [ "/afs/cern.ch/user/e/eyazici/public/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1"]
 
-#  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/tmp/rjungst/testinput"]
+#  ServiceMgr.EventSelector.Input = [ "/tmp/rjungst/testinput"]
diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
index 6880029de6a0..9e15f052297d 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
@@ -137,7 +137,7 @@ IOVDbSvc.GlobalTag="CONDBR2-BLKPA-2018-03"
 IOVDbSvc.OutputLevel = WARNING
 
 include("ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py")
-ServiceMgr.ByteStreamInputSvc.FullFileName = inputBSFiles
+ServiceMgr.EventSelector.Input = inputBSFiles
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.FilesInput = inputBSFiles
 
diff --git a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
index d36ea305ee95..ca9cb5c47fed 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
+++ b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
@@ -218,10 +218,10 @@ if not doReadBS:
 if doReadBS:
   # input used for FDR2b (run 8): low lumi (2.3 min bias, 10^33)/pile-up/shifted vertex run 8
   # this file needs (as set by default): DetDescrVersion = "ATLAS-CSC-02-00-00" globalflags.ConditionsTag="OFLCOND-FDR-02-01-00", jobproperties.Beam.numberOfCollisions = 2.3
-  ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/tmp/jahreda/data11_7TeV.00191628.physics_ZeroBias.merge.RAW/data11_7TeV.00191628.physics_ZeroBias.merge.RAW._lb0216._SFO-ALL._0001.1"]
+  ServiceMgr.EventSelector.Input = [ "/tmp/jahreda/data11_7TeV.00191628.physics_ZeroBias.merge.RAW/data11_7TeV.00191628.physics_ZeroBias.merge.RAW._lb0216._SFO-ALL._0001.1"]
   # if you create the input BS file yourself with InDetWriteBS jobO the output will be this file
   # and you have to set the detdescr and cond tag to what you used ...
-  #ServiceMgr.ByteStreamInputSvc.FullFileName = [ "daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data" ]
+  #ServiceMgr.EventSelector.Input = [ "daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data" ]
 
 from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
 theAtlasExtrapolator = AtlasExtrapolator()
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArBadChannelReadTest.py b/LArCalorimeter/LArBadChannelTool/share/LArBadChannelReadTest.py
index 2bd22534b250..f61de37ef5df 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArBadChannelReadTest.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArBadChannelReadTest.py
@@ -59,7 +59,7 @@ from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr)
 theApp.EvtMax=1
 
 ## theByteStreamInputSvc=svcMgr.ByteStreamInputSvc
-## theByteStreamInputSvc.FullFileName=["/home/wlampl/LArOFIter/ramp/inputs/daq.Ramp.0029146.No.Streaming.LB0000.EB-EMBA._0001.data"]
+## svcMgr.EventSelector.Input=["/home/wlampl/LArOFIter/ramp/inputs/daq.Ramp.0029146.No.Streaming.LB0000.EB-EMBA._0001.data"]
    
 
 
diff --git a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py b/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
index 3fab8f41e701..9b8a4e28718a 100644
--- a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
+++ b/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
@@ -106,7 +106,7 @@ else:
 #"COMCOND-BLKP-005-05"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
 if hasattr(runArgs,"skipEvents"):
     svcMgr.EventSelector.SkipEvents=runArgs.skipEvents
 
diff --git a/LArCalorimeter/LArCafJobs/share/skeleton.LArNoise_fromraw.py b/LArCalorimeter/LArCafJobs/share/skeleton.LArNoise_fromraw.py
index 1a5275fb9b19..e80661c8cac9 100644
--- a/LArCalorimeter/LArCafJobs/share/skeleton.LArNoise_fromraw.py
+++ b/LArCalorimeter/LArCafJobs/share/skeleton.LArNoise_fromraw.py
@@ -115,7 +115,7 @@ else:
 #"COMCOND-BLKP-005-05"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
 
 if hasattr(runArgs,"skipEvents"):
     svcMgr.EventSelector.SkipEvents=runArgs.skipEvents
diff --git a/LArCalorimeter/LArCalibTools/share/LArAverages2Ntuple_jobOptions.py b/LArCalorimeter/LArCalibTools/share/LArAverages2Ntuple_jobOptions.py
index f3bcafcc8666..0084c0d35f68 100755
--- a/LArCalorimeter/LArCalibTools/share/LArAverages2Ntuple_jobOptions.py
+++ b/LArCalorimeter/LArCalibTools/share/LArAverages2Ntuple_jobOptions.py
@@ -29,9 +29,9 @@ ByteStreamAddressProviderSvc.TypeNames += ["LArCalibDigitContainer/MEDIUM"]
 ByteStreamAddressProviderSvc.TypeNames += ["LArCalibDigitContainer/HIGH"]
 
 # Three input files (for H8): accordion HG, accordion MG, PS (HG only)
-#ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005134_file01.data"]
-ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005135_file01.data"]
-#ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005136_file01.data"]
+#EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005134_file01.data"]
+EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005135_file01.data"]
+#EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005136_file01.data"]
 
 
 include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H8_joboptions.py" )
diff --git a/LArCalorimeter/LArCalibTools/share/LArDigits2Ntuple_jobOptions.py b/LArCalorimeter/LArCalibTools/share/LArDigits2Ntuple_jobOptions.py
index add93e7a5c15..f970419da636 100755
--- a/LArCalorimeter/LArCalibTools/share/LArDigits2Ntuple_jobOptions.py
+++ b/LArCalorimeter/LArCalibTools/share/LArDigits2Ntuple_jobOptions.py
@@ -137,7 +137,7 @@ if not 'FullFileName' in dir():
    theApp.exit(-1)
 
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
 svcMgr.ByteStreamCnvSvc.InitCnvs += [ "EventInfo"]
diff --git a/LArCalorimeter/LArCalibTools/share/LArPulseShapeRun.py b/LArCalorimeter/LArCalibTools/share/LArPulseShapeRun.py
index 655a40f26237..ef841ebcfdba 100644
--- a/LArCalorimeter/LArCalibTools/share/LArPulseShapeRun.py
+++ b/LArCalorimeter/LArCalibTools/share/LArPulseShapeRun.py
@@ -45,7 +45,7 @@ from AtlasGeoModel import GeoModelInit
 
 from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
 topSequence+=xAODMaker__EventInfoCnvAlg()
-svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
 
 #Get identifier mapping (needed by LArConditionsContainer)
                            
diff --git a/LArCalorimeter/LArCnv/LArByteStream/share/jobOptions_ReadLArROD.py b/LArCalorimeter/LArCnv/LArByteStream/share/jobOptions_ReadLArROD.py
index 643a52434bcc..9582dc31349d 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/share/jobOptions_ReadLArROD.py
+++ b/LArCalorimeter/LArCnv/LArByteStream/share/jobOptions_ReadLArROD.py
@@ -9,7 +9,7 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 
 # EventStorage Input 
 ByteStreamInputSvc =  svcMgr.ByteStreamInputSvc
-ByteStreamInputSvc.FullFileName = ["daq.csc12.0000000.Single.Stream.LB0000.Athena._0001.data"]
+EventSelector.Input = ["daq.csc12.0000000.Single.Stream.LB0000.Athena._0001.data"]
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 
 from AthenaCommon.DetFlags import DetFlags
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_AutoCorrPhys_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_AutoCorrPhys_jobOptions.py
index 695ef4bcd3ee..4a1f8d7d3e66 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_AutoCorrPhys_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_AutoCorrPhys_jobOptions.py
@@ -123,7 +123,7 @@ except:
    pass
 
 theByteStreamInputSvc=svcMgr.ByteStreamInputSvc
-theByteStreamInputSvc.FullFileName=athenaCommonFlags.FilesInput()
+svcMgr.EventSelector.Input=athenaCommonFlags.FilesInput()
 
 theByteStreamAddressProviderSvc =svcMgr.ByteStreamAddressProviderSvc
 theByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"]
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_Ramp_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_Ramp_jobOptions.py
index 1968221f8a98..44d7c37a06ec 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_Ramp_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_Ramp_jobOptions.py
@@ -22,9 +22,9 @@ ByteStreamAddressProviderSvc.TypeNames += ["LArCalibDigitContainer/MEDIUM"]
 ByteStreamAddressProviderSvc.TypeNames += ["LArCalibDigitContainer/HIGH"]
 
 # Three input files (for H8): accordion HG, accordion MG, PS (HG only)
-ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005134_file01.data"]
-ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005135_file01.data"]
-ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005136_file01.data"]
+EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005134_file01.data"]
+EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005135_file01.data"]
+EventSelector.Input += ["/castor/cern.ch/atlas/testbeam/lar/2004/daq_ROS-41_LargCalib_0005136_file01.data"]
 
 
 include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H8_joboptions.py" )
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DelayXtalk_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DelayXtalk_jobOptions.py
index 82a87d4bb1c0..0810c2f37f22 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DelayXtalk_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DelayXtalk_jobOptions.py
@@ -263,7 +263,7 @@ if not 'FullFileName' in dir():
    DelayLog.info( "No FullFileName! Please give a FullFileName list.")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 svcMgr.EventSelector.MaxBadEvents = 0
 
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_Cali_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_Cali_jobOptions.py
index 1fc6e113ac4f..46b460d5d60d 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_Cali_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_Cali_jobOptions.py
@@ -451,7 +451,7 @@ if not 'FullFileName' in dir():
    DelayOFCLog.info( "No FullFileName! Please give a FullFileName list.")
    theApp.exit(-1)
 else :   
-   #theByteStreamInputSvc.FullFileName=FullFileName
+   #svcMgr.EventSelector.Input=FullFileName
    svcMgr.EventSelector.Input = FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
@@ -463,8 +463,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 # else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
    
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_splitter_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_splitter_jobOptions.py
index d318758a2df1..974f7af0800a 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_splitter_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_OFC_splitter_jobOptions.py
@@ -450,7 +450,7 @@ if not 'FullFileName' in dir():
    DelayLog.info( "No FullFileName! Please give a FullFileName list.")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
   
 svcMgr.EventSelector.MaxBadEvents = 0
 
@@ -461,8 +461,8 @@ svcMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 # else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
    
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_jobOptions.py
index d6bde46597b7..394e43803e15 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_jobOptions.py
@@ -268,7 +268,7 @@ if not 'FullFileName' in dir():
    DelayLog.info( "No FullFileName! Please give a FullFileName list.")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
 
@@ -279,8 +279,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 # else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
    
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_splitter_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_splitter_jobOptions.py
index f4798504b7d2..6a56f0534601 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_splitter_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Delay_splitter_jobOptions.py
@@ -296,9 +296,9 @@ if not 'FullFileName' in dir():
    DelayLog.info( "No FullFileName! Please give a FullFileName list.")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
-scvMgr.EventSelector.MaxBadEvents = 0
+svcMgr.EventSelector.MaxBadEvents = 0
 
 ##############################################################################################
 #                                                                                            #
@@ -307,8 +307,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 # else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
    
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DigitAccumulator_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DigitAccumulator_jobOptions.py
index 75772be30e5b..707ef4518de6 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DigitAccumulator_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_DigitAccumulator_jobOptions.py
@@ -257,7 +257,7 @@ if not 'FullFileName' in dir():
    PedestalAutoCorrLog.info( "No FullFileName! Please give a FullFileName list")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
 
 from LArByteStream.LArByteStreamConf import LArRodDecoder
 svcMgr.ToolSvc += LArRodDecoder()
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_FillOFCPhase.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_FillOFCPhase.py
index 9aee485ae7b6..98a92edeeaa5 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_FillOFCPhase.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_FillOFCPhase.py
@@ -18,7 +18,7 @@ include( "AthenaCommon/Atlas_Gen.UnixStandardJob.py" )
 #include ("LArConditionsCommon/LArMinimalSetup.py")
 
 #theByteStreamInputSvc=svcMgr.ByteStreamInputSvc
-#theByteStreamInputSvc.FullFileName=["/data/pavol/athena_calib/daq.Ramp.0031077.No.Streaming.LB0000.EB-ECC._0001.data"]
+#svcMgr.EventSelector.Input=["/data/pavol/athena_calib/daq.Ramp.0031077.No.Streaming.LB0000.EB-ECC._0001.data"]
 #--------------------------------------------------------------
 # pick a proper run number for conditions
 #--------------------------------------------------------------
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_PedestalAutoCorr_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_PedestalAutoCorr_jobOptions.py
index 7e8acce43737..a09a8f0525a1 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_PedestalAutoCorr_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_PedestalAutoCorr_jobOptions.py
@@ -283,7 +283,7 @@ if not 'FullFileName' in dir():
    PedestalAutoCorrLog.info( "No FullFileName! Please give a FullFileName list")
    theApp.exit(-1)
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
 
@@ -294,8 +294,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 # else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
 
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_jobOptions.py
index 42b97e043065..94d2ea6624b3 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_jobOptions.py
@@ -344,7 +344,7 @@ if not 'FullFileName' in dir():
    theApp.exit(-1)
 
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
 
@@ -355,8 +355,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 #else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
 
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_splitter_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_splitter_jobOptions.py
index c4a990f607f6..935026b83565 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_splitter_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Ramp_splitter_jobOptions.py
@@ -320,7 +320,7 @@ if not 'FullFileName' in dir():
    theApp.exit(-1)
 
 else :   
-   theByteStreamInputSvc.FullFileName=FullFileName
+   svcMgr.EventSelector.Input=FullFileName
    
 scvMgr.EventSelector.MaxBadEvents = 0
 
@@ -331,8 +331,8 @@ scvMgr.EventSelector.MaxBadEvents = 0
 # maybe useful one day                                                                       #
 #                                                                                            #
 #else                                                                                        #
-#   theByteStreamInputSvc.FullFileName=OneFileName                                           #
-#   for i in range(len(theByteStreamInputSvc.FullFileName)):                                 #
+#   svcMgr.EventSelector.Input=OneFileName                                           #
+#   for i in range(len(svcMgr.EventSelector.Input)):                                 #
 #      theByteStreamInputSvc.NumFile+=[10000]                                                #
 ##############################################################################################
 
diff --git a/LArCalorimeter/LArMonTools/share/LArMonByteStream.py b/LArCalorimeter/LArMonTools/share/LArMonByteStream.py
index 3e29cdf1a47d..b9c1830faae1 100755
--- a/LArCalorimeter/LArMonTools/share/LArMonByteStream.py
+++ b/LArCalorimeter/LArMonTools/share/LArMonByteStream.py
@@ -4,7 +4,7 @@
 #
 if not online:
     theByteStreamInputSvc = svcMgr.ByteStreamInputSvc
-    theByteStreamInputSvc.FullFileName = FullFileName
+    svcMgr.EventSelector.Input = FullFileName
     svcMgr.EventSelector.MaxBadEvents = 0
 else:
     theApp.CreateSvc += ["ByteStreamCnvSvc"]
diff --git a/LArCalorimeter/LArMonTools/share/LArMonTools_RTT_jobOptions.py b/LArCalorimeter/LArMonTools/share/LArMonTools_RTT_jobOptions.py
index 084b2149c1a4..73363e515302 100755
--- a/LArCalorimeter/LArMonTools/share/LArMonTools_RTT_jobOptions.py
+++ b/LArCalorimeter/LArMonTools/share/LArMonTools_RTT_jobOptions.py
@@ -69,7 +69,7 @@ ByteStreamInputSvc = Service( "ByteStreamInputSvc" )
 ByteStreamInputSvc.InputDirectory = [ InputDir ]
 ByteStreamInputSvc.FilePrefix     = [ FilePrefix ]
 ByteStreamInputSvc.RunNumber      = [ RunNumber ]
-# ByteStreamInputSvc.FullFileName += [ InputFileName ]
+# EventSelector.Input += [ InputFileName ]
 
 ByteStreamEventStorageInputSvc = Service( "ByteStreamEventStorageInputSvc" )
 ByteStreamEventStorageInputSvc.ReaderType = "Castor"
diff --git a/LArCalorimeter/LArMonitoring/share/LArReco_fromraw.py b/LArCalorimeter/LArMonitoring/share/LArReco_fromraw.py
index 8eda9ae6343d..dfedb684105f 100644
--- a/LArCalorimeter/LArMonitoring/share/LArReco_fromraw.py
+++ b/LArCalorimeter/LArMonitoring/share/LArReco_fromraw.py
@@ -102,7 +102,7 @@ svcMgr.IOVDbSvc.GlobalTag=currentGlobalES
 #"COMCOND-BLKP-005-05"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
 
 svcMgr.EventSelector.SkipEvents=skipEvents
 
diff --git a/LArCalorimeter/LArROD/share/LArDigit2Ntuple.py b/LArCalorimeter/LArROD/share/LArDigit2Ntuple.py
index 1aa27646486d..3d353bb2e68b 100644
--- a/LArCalorimeter/LArROD/share/LArDigit2Ntuple.py
+++ b/LArCalorimeter/LArROD/share/LArDigit2Ntuple.py
@@ -15,7 +15,7 @@ include("LArConditionsCommon/LArMinimalSetup.py")
 svcMgr.IOVDbSvc.GlobalTag="COMCOND-ES1C-001-00"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=CafJobInputs[0]
+svcMgr.EventSelector.Input=CafJobInputs[0]
 
 # Specify the object you want to read from ByteStream
 theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
diff --git a/LArCalorimeter/LArROD/share/LArOFCIter2Ntuple.py b/LArCalorimeter/LArROD/share/LArOFCIter2Ntuple.py
index 7e8e9c56f60c..5fe01fc9859e 100644
--- a/LArCalorimeter/LArROD/share/LArOFCIter2Ntuple.py
+++ b/LArCalorimeter/LArROD/share/LArOFCIter2Ntuple.py
@@ -18,7 +18,7 @@ include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
 svcMgr.IOVDbSvc.GlobalTag="COMCOND-BLKPA-RUN1-06"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=CafJobInputs[0]
+svcMgr.EventSelector.Input=CafJobInputs[0]
 
 # Specify the object you want to read from ByteStream
 theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
diff --git a/LArCalorimeter/LArTest/LArCalibTest/share/DumpCaloBadChannels.py b/LArCalorimeter/LArTest/LArCalibTest/share/DumpCaloBadChannels.py
index de2eefef723c..fce09c206b52 100644
--- a/LArCalorimeter/LArTest/LArCalibTest/share/DumpCaloBadChannels.py
+++ b/LArCalorimeter/LArTest/LArCalibTest/share/DumpCaloBadChannels.py
@@ -54,7 +54,7 @@ from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr,ToolSvc)
 theApp.EvtMax=1
 
 ## theByteStreamInputSvc=svcMgr.ByteStreamInputSvc
-## theByteStreamInputSvc.FullFileName=["/home/wlampl/LArOFIter/ramp/inputs/daq.Ramp.0029146.No.Streaming.LB0000.EB-EMBA._0001.data"]
+## svcMgr.EventSelector.Input=["/home/wlampl/LArOFIter/ramp/inputs/daq.Ramp.0029146.No.Streaming.LB0000.EB-EMBA._0001.data"]
    
 
 
diff --git a/LArCalorimeter/LArTest/LArCalibTest/share/LArCablingTest_atlas.py b/LArCalorimeter/LArTest/LArCalibTest/share/LArCablingTest_atlas.py
index 39d48683a7f0..fd6ac36f1fdb 100755
--- a/LArCalorimeter/LArTest/LArCalibTest/share/LArCablingTest_atlas.py
+++ b/LArCalorimeter/LArTest/LArCalibTest/share/LArCablingTest_atlas.py
@@ -43,7 +43,7 @@ IOVDbSvc.Folders += ["/lar/LArElecCalibTB04/LArCalibParams"]
 theApp.Dlls += [ "LArByteStream"]
 
 ByteStreamInputSvc = Service( "ByteStreamInputSvc" )
-ByteStreamInputSvc.FullFileName += ["/castor/cern.ch/atlas/LargFec/Installation/daq_ROS-1_HIGH_InstCalib_0010157_file01.data"]
+EventSelector.Input += ["/castor/cern.ch/atlas/LargFec/Installation/daq_ROS-1_HIGH_InstCalib_0010157_file01.data"]
 
 ByteStreamAddressProviderSvc = Service( "ByteStreamAddressProviderSvc" )
 ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/LOW"]
diff --git a/LArCalorimeter/LArTest/LArEventTest/share/DumpLArDigits.py b/LArCalorimeter/LArTest/LArEventTest/share/DumpLArDigits.py
index 14adbb10ee73..b6f4a12c4f9a 100755
--- a/LArCalorimeter/LArTest/LArEventTest/share/DumpLArDigits.py
+++ b/LArCalorimeter/LArTest/LArEventTest/share/DumpLArDigits.py
@@ -10,7 +10,7 @@ include("LArConditionsCommon/LArMinimalSetup.py")
 svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2015-05"
 
 #Specify the input file(s)
-svcMgr.ByteStreamInputSvc.FullFileName=["/scratch/wlampl/data15_13TeV/data15_13TeV.00267073.express_express.merge.RAW._lb0706._SFO-ALL._0001.1",]
+svcMgr.EventSelector.Input=["/scratch/wlampl/data15_13TeV/data15_13TeV.00267073.express_express.merge.RAW._lb0706._SFO-ALL._0001.1",]
 
 # Specify the object you want to read from ByteStream
 theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
index bb8c4626b0eb..19cbbfd44be6 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
@@ -153,8 +153,8 @@ include ( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
 printfunc ('File list is')
 printfunc (myInputFiles)
 
-ServiceMgr.ByteStreamInputSvc.FullFileName = myInputFiles
-#ServiceMgr.ByteStreamInputSvc.FullFileName = myTestFiles
+ServiceMgr.EventSelector.Input = myInputFiles
+#ServiceMgr.EventSelector.Input = myTestFiles
 
 #---------------------------------------------------------------
 # CSC Calibration from DB
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
index 656c122bdea8..d549f9c85cec 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
@@ -113,7 +113,7 @@ include ( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
  
 
 #Set input files
-ServiceMgr.ByteStreamInputSvc.FullFileName = myInputFiles
+ServiceMgr.EventSelector.Input = myInputFiles
 
 #---------------------------------------------------------------
 # CSC Calibration from DB
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
index c6be1c55d203..0e3953526aef 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
@@ -102,7 +102,7 @@ if('inputFiles' not in dir()):
   
 printfunc ('the input files are: '  )
 printfunc (inputFiles)
-ServiceMgr.ByteStreamInputSvc.FullFileName= inputFiles 
+ServiceMgr.EventSelector.Input = inputFiles
 
 include ("CscCalibTools/CscCalibTool_jobOptions.py")
 ToolSvc.CscCalibTool.ReadFromDatabase = True
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/ReadCscByteStream_topOptions.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/ReadCscByteStream_topOptions.py
index 7a74b3dc5f26..0fcc132c5362 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/ReadCscByteStream_topOptions.py
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/ReadCscByteStream_topOptions.py
@@ -20,11 +20,11 @@ include( "MuonByteStream/ReadCscRDO_jobOptions.py" )
 #ServiceMgr.ByteStreamInputSvc.DumpEvent = True
 
 # Simulated data
-#ServiceMgr.ByteStreamInputSvc.FullFileName=["daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data"]
+#ServiceMgr.eventSelector.Input=["daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data"]
 
 # Real data - from cosmic test for example
 # Old cosmic data before the ROB id = ROD id fix
-#ServiceMgr.ByteStreamInputSvc.FullFileName=[ 
+#ServiceMgr.EventSelector.Input=[ 
 #"rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001090_file01.data",
 #"rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001105_file01.data",
 #"rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001109_file01.data",
@@ -45,7 +45,7 @@ include( "MuonByteStream/ReadCscRDO_jobOptions.py" )
 
 # Real data - from cosmic test for example
 # New cosmic data after the ROB id = ROD id fix
-ServiceMgr.ByteStreamInputSvc.FullFileName=[ 
+ServiceMgr.EventSelector.Input=[
 "/afs/cern.ch/user/k/ketevi/w0/data/daq_CSC-EB-RCD__0001190_file01.data"
 ]
 
diff --git a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/share/CscDataBuilder.py b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/share/CscDataBuilder.py
index f0c8c017c99e..d12f21d39cab 100755
--- a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/share/CscDataBuilder.py
+++ b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/share/CscDataBuilder.py
@@ -119,7 +119,7 @@ elif inputStreamType == "RAW":
   svcMgr = theApp.serviceMgr()
   from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageInputSvc
   svcMgr += ByteStreamEventStorageInputSvc("ByteStreamInputSvc")
-  cscEventSelector = svcMgr.ByteStreamInputSvc
+  cscEventSelector = svcMgr.EventSelector
   from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc
   svcMgr += ByteStreamCnvSvc()
   ByteStreamCnvSvc = svcMgr.ByteStreamCnvSvc
@@ -133,5 +133,5 @@ elif inputStreamType == "RDO":
     "/afs/usatlas.bnl.gov/users/dladams/data/calib0.005145.PythiaZmumu.digit.RDO.v12003101_tid003432._00001.pool.root.1"
   ]
 elif inputStreamType == "RAW":
-#  cscEventSelector.FullFileName=["/afs/usatlas.bnl.gov/users/dladams/data/daq_CSC-EB-RCD__0001190_file01.data"]
-  cscEventSelector.FullFileName=["rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001215_file01.data"]
+#  cscEventSelector.Input=["/afs/usatlas.bnl.gov/users/dladams/data/daq_CSC-EB-RCD__0001190_file01.data"]
+  cscEventSelector.Input=["rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001215_file01.data"]
diff --git a/MuonSpectrometer/MuonValidation/MuonSimHitToPrdTest/share/runRPCdecodingDumpOnNtuple.py b/MuonSpectrometer/MuonValidation/MuonSimHitToPrdTest/share/runRPCdecodingDumpOnNtuple.py
index f7fbac22feab..b798c5ee27b6 100644
--- a/MuonSpectrometer/MuonValidation/MuonSimHitToPrdTest/share/runRPCdecodingDumpOnNtuple.py
+++ b/MuonSpectrometer/MuonValidation/MuonSimHitToPrdTest/share/runRPCdecodingDumpOnNtuple.py
@@ -118,7 +118,7 @@ MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
 #MessageSvc.setDebug+=["RpcROD_Decoder"]
 
 from ByteStreamCnvSvc import ReadByteStream
-ServiceMgr.ByteStreamInputSvc.FullFileName=["root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_cos/physics_CosmicMuons/00256385/data15_cos.00256385.physics_CosmicMuons.merge.RAW/data15_cos.00256385.physics_CosmicMuons.merge.RAW._lb0615._SFO-13._0001.1"]
+ServiceMgr.EventSelector.Input=["root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_cos/physics_CosmicMuons/00256385/data15_cos.00256385.physics_CosmicMuons.merge.RAW/data15_cos.00256385.physics_CosmicMuons.merge.RAW._lb0615._SFO-13._0001.1"]
 
 #import AthenaPoolCnvSvc.ReadAthenaPool
 #ServiceMgr.EventSelector.InputBSCollections = [ "root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_cos/physics_CosmicMuons/00256385/data15_cos.00256385.physics_CosmicMuons.merge.RAW/data15_cos.00256385.physics_CosmicMuons.merge.RAW._lb0615._SFO-13._0001.1" ]
diff --git a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/share/SctNtuple_topOptions.py b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/share/SctNtuple_topOptions.py
index e3d6354c040b..c3b364890c30 100644
--- a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/share/SctNtuple_topOptions.py
+++ b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/share/SctNtuple_topOptions.py
@@ -56,6 +56,6 @@ if hasattr(runArgs,"maxEvents"):
 #ServiceMgr.EventSelector.SkipEvents=1870
 
 if globalflags.InputFormat() == 'bytestream':
-    ServiceMgr.FullFileName=athenaCommonFlags.BSRDOInput()
+    ServiceMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
 else:
     ServiceMgr.EventSelector.InputCollections = InDetD3PDSCTFlags.inputFiles()
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 35d98527c10f..a30313ddc6a9 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -466,9 +466,9 @@ if globalflags.InputFormat.is_bytestream():
 
             # Specify input file
             if len(athenaCommonFlags.FilesInput())>0:
-                svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.FilesInput()
+                svcMgr.EventSelector.Input=athenaCommonFlags.FilesInput()
             elif len(athenaCommonFlags.BSRDOInput())>0:
-                svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+                svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
         # --> AK
     else:
         logRecExCommon_topOptions.info("Read ByteStream file(s)")
@@ -476,9 +476,9 @@ if globalflags.InputFormat.is_bytestream():
 
         # Specify input file
         if len(athenaCommonFlags.FilesInput())>0:
-            svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.FilesInput()
+            svcMgr.EventSelector.Input=athenaCommonFlags.FilesInput()
         elif len(athenaCommonFlags.BSRDOInput())>0:
-            svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+            svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
 
     if globalflags.DataSource()=='geant4':
         logRecExCommon_topOptions.info("DataSource is 'geant4'")
diff --git a/Reconstruction/RecExample/RecExConfig/python/PyComps.py b/Reconstruction/RecExample/RecExConfig/python/PyComps.py
index 58662d807789..3dfb72e15a41 100644
--- a/Reconstruction/RecExample/RecExConfig/python/PyComps.py
+++ b/Reconstruction/RecExample/RecExConfig/python/PyComps.py
@@ -41,7 +41,7 @@ class AutoConfigConsistencyCheckSvc(PyAthena.Svc):
           if esName=="EventSelectorAthenaPool":
              ic=ServiceMgr.EventSelector.InputCollections
           elif esName=="EventSelectorByteStream":
-             ic=ServiceMgr.ByteStreamInputSvc.FullFileName
+             ic=ServiceMgr.EventSelector.Input
           else:
              self.msg.warning("Unknown EventSelector instance.Cannot check AutoCOnfig.")
              return
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_LaserTiming.py b/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_LaserTiming.py
index 1ff37a2cda99..3b5cdc8c4516 100755
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_LaserTiming.py
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_LaserTiming.py
@@ -337,7 +337,7 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 theApp.ExtSvc += [ "ByteStreamCnvSvc" ] 
 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
-ByteStreamInputSvc.FullFileName += FileNameVec
+EventSelector.Input += FileNameVec
 
 # read ByteStream and reconstruct data
 include( "TileTBRec/TileTBRec_jobOptions.py" )
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_NoiseCalib.py b/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_NoiseCalib.py
index 73667cff0c84..1d5ef2d98437 100755
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_NoiseCalib.py
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/share/jobOptions_NoiseCalib.py
@@ -344,7 +344,7 @@ include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 theApp.ExtSvc += [ "ByteStreamCnvSvc" ] 
 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
-ByteStreamInputSvc.FullFileName += FileNameVec
+EventSelector.Input += FileNameVec
 
 # read ByteStream and reconstruct data
 include( "TileTBRec/TileTBRec_jobOptions.py" )
diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py
index 0cf62675c892..3cc44b408a36 100644
--- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py
+++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py
@@ -308,7 +308,7 @@ printfunc (tileInfoConfigurator)
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 theApp.ExtSvc += [ "ByteStreamCnvSvc" ] 
-svcMgr.ByteStreamInputSvc.FullFileName += FileNameVec
+svcMgr.EventSelector.Input += FileNameVec
 svcMgr.ByteStreamCnvSvc.ROD2ROBmap = [ "-1" ]
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["TileBeamElemContainer/TileBeamElemCnt",
                                                   "TileRawChannelContainer/TileRawChannelCnt",
diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py
index 465f6796ff8b..b3c00014d093 100644
--- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py
+++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py
@@ -311,7 +311,7 @@ printfunc (tileInfoConfigurator)
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 theApp.ExtSvc += [ "ByteStreamCnvSvc" ] 
-svcMgr.ByteStreamInputSvc.FullFileName += FileNameVec
+svcMgr.EventSelector.Input += FileNameVec
 svcMgr.ByteStreamCnvSvc.ROD2ROBmap = [ "-1" ]
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["TileBeamElemContainer/TileBeamElemCnt",
                                                   "TileRawChannelContainer/TileRawChannelCnt",
diff --git a/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py b/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
index 69f7f4e00e66..a87a099bffaa 100644
--- a/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
+++ b/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
@@ -143,7 +143,7 @@ if not athenaCommonFlags.isOnline():
     log.info( "Skip Events is " + str(EvtMin) )
     log.info( "Max events is " + str(EvtMax) )
 
-    svcMgr.ByteStreamInputSvc.FullFileName = FileNameVec
+    svcMgr.EventSelector.Input = FileNameVec
     svcMgr.EventSelector.MaxBadEvents = MaxBadEvents
    
     athenaCommonFlags.FilesInput = FileNameVec
diff --git a/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py b/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
index 0bc93c7dd42f..b4b335268179 100644
--- a/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
+++ b/TileCalorimeter/TileMonitoring/share/jobOptions_TileTBMon.py
@@ -204,7 +204,7 @@ if not athenaCommonFlags.isOnline() or TestOnline:
     log.info( "Skip Events is " + str(EvtMin) )
     log.info( "Max events is " + str(EvtMax) )
 
-    svcMgr.ByteStreamInputSvc.FullFileName = FileNameVec
+    svcMgr.EventSelector.Input = FileNameVec
     svcMgr.EventSelector.MaxBadEvents = MaxBadEvents
    
     athenaCommonFlags.FilesInput = FileNameVec
diff --git a/Trigger/TrigEvent/TrigBSExtraction/share/unpackBS.py b/Trigger/TrigEvent/TrigBSExtraction/share/unpackBS.py
index c26788947fd7..64f0f5f5fb2f 100644
--- a/Trigger/TrigEvent/TrigBSExtraction/share/unpackBS.py
+++ b/Trigger/TrigEvent/TrigBSExtraction/share/unpackBS.py
@@ -22,7 +22,7 @@ include( "AthenaServices/AthenaSealSvc_joboptions.py" )
 from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageInputSvc
 svcMgr += ByteStreamEventStorageInputSvc("ByteStreamInputSvc")
 
-svcMgr.ByteStreamInputSvc.FullFileName = BSFileList
+svcMgr.EventSelector.Input = BSFileList
 
 from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ROBDataProviderSvc
 svcMgr += ROBDataProviderSvc()
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py b/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
index 44e7450d244a..504f3c2fa6fc 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
+++ b/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
@@ -39,10 +39,10 @@ if not ('BSRDOInput' in dir()) or len(BSRDOInput) < 1:
     BSRDOInput = readInputFiles('input_files.txt', 'RAW')
     
 if ('BSRDOInput' in dir()):
-    svcMgr.ByteStreamInputSvc.FullFileName = BSRDOInput
+    svcMgr.EventSelector.Input = BSRDOInput
 
-if len(svcMgr.ByteStreamInputSvc.FullFileName) == 0:
-    print 'ERROR! svcMgr.ByteStreamInputSvc.FullFileName is empty'
+if len(svcMgr.EventSelector.Input) == 0:
+    print 'ERROR! svcMgr.EventSelector.Input is empty'
     sys.exit(1)
     
 #----------------------------------------------------------------------
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/share/readTrigCost.py b/Trigger/TrigMonitoring/TrigCostMonitor/share/readTrigCost.py
index 9040992541f6..ceff0d601a14 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitor/share/readTrigCost.py
+++ b/Trigger/TrigMonitoring/TrigCostMonitor/share/readTrigCost.py
@@ -59,10 +59,10 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "HLT::HLTResult/HLTResult_L2"
 # Set input files
 #
 if ('BSRDOInput' in dir()):
-    svcMgr.ByteStreamInputSvc.FullFileName = BSRDOInput
+    svcMgr.EventSelector.Input = BSRDOInput
 
-if len(svcMgr.ByteStreamInputSvc.FullFileName) == 0:
-    print 'ERROR! svcMgr.ByteStreamInputSvc.FullFileName is empty'
+if len(svcMgr.EventSelector.Input) == 0:
+    print 'ERROR! svcMgr.EventSelector.Input is empty'
     sys.exit(1)
 
 #----------------------------------------------------------------------
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/run/standalone_TrigHLTMonCommon.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/run/standalone_TrigHLTMonCommon.py
index 4bbe53bf4f91..1cbc21188c31 100755
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/run/standalone_TrigHLTMonCommon.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/run/standalone_TrigHLTMonCommon.py
@@ -24,7 +24,7 @@ topSequence = AlgSequence()
 #-- set up BS reading ------------------------------------------------------------------------------
 
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = [InputFile]
+svcMgr.EventSelector.Input = [InputFile]
 
 #-- set up output histogram file ------------------------------------------------------------------------------
 
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
index 79cc8819bae6..3c0032bd774f 100755
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
@@ -86,7 +86,7 @@ if data_type == 'bytestream':
     #-- set up BS reading ------------------------------------------------------------------------------
 
     from ByteStreamCnvSvc import ReadByteStream
-    svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput()
+    svcMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
     if hasattr(runArgs,"skipEvents"):
         svcMgr.EventSelector.SkipEvents=runArgs.skipEvents
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
index 5602fe8a7af7..2cc9f3d4a9bf 100755
--- a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
+++ b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
@@ -21,10 +21,10 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
-# older file, has wrong ROD id: svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/m/mzinser/public/l1calo-event.sim"]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/m/mzinser/public/InputSimon/Mode7/l1calo-event.sim" ]
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/m/mzinser/public/InputSimon/Mode8/l1calo-event.sim" ]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/s/sgeorge/atlaspublic/L1TopoCnv/mergedsim._0001.data" ]
+# older file, has wrong ROD id: svcMgr.EventSelector.Input = [ "/afs/cern.ch/user/m/mzinser/public/l1calo-event.sim"]
+#svcMgr.EventSelector.Input = [ "/afs/cern.ch/user/m/mzinser/public/InputSimon/Mode7/l1calo-event.sim" ]
+svcMgr.EventSelector.Input = [ "/afs/cern.ch/user/m/mzinser/public/InputSimon/Mode8/l1calo-event.sim" ]
+#svcMgr.EventSelector.Input = [ "/afs/cern.ch/user/s/sgeorge/atlaspublic/L1TopoCnv/mergedsim._0001.data" ]
 
 svcMgr.ByteStreamInputSvc.ValidateEvent = True
 svcMgr.EventSelector.ProcessBadEvent = True
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
index 051d937ebeb6..00ff054f95a8 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
@@ -258,7 +258,7 @@ svcMgr.THistSvc.Output = [ CTmonMan.FileKey + " DATAFILE='HistFile.root' OPT='RE
 
 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+svcMgr.EventSelector.Input = athenaCommonFlags.FilesInput()
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RDO_jobOptions.py" )
 include( "ByteStreamCnvSvcBase/BSAddProvSvc_RIO_jobOptions.py" )
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/share/BS2xAOD.py b/Trigger/TrigT1/TrigT1CaloByteStream/share/BS2xAOD.py
index 2935b7e3f467..5e98b8a2710f 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/share/BS2xAOD.py
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/share/BS2xAOD.py
@@ -61,7 +61,7 @@ xaodStream = MSMgr.NewPoolRootStream("StreamXAOD", OutFile)
 
 # Tell Athena about the input file(s)
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = InFiles
+svcMgr.EventSelector.Input = InFiles
 
 topSequence = CfgMgr.AthSequencer("AthAlgSeq")
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/share/TestTrigT1CaloDataAccess_jobOptions.py b/Trigger/TrigT1/TrigT1CaloByteStream/share/TestTrigT1CaloDataAccess_jobOptions.py
index c384aade9d0a..8475188c07cd 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/share/TestTrigT1CaloDataAccess_jobOptions.py
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/share/TestTrigT1CaloDataAccess_jobOptions.py
@@ -9,7 +9,7 @@ from ByteStreamCnvSvc import ReadByteStream
 import struct
 
 
-svcMgr.ByteStreamInputSvc.FullFileName = [InputFile]
+svcMgr.EventSelector.Input = [InputFile]
 
 
 from AthenaCommon.GlobalFlags import globalflags
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/share/xAODWrite_jobOptions.py b/Trigger/TrigT1/TrigT1CaloByteStream/share/xAODWrite_jobOptions.py
index 58e368eca367..815248809495 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/share/xAODWrite_jobOptions.py
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/share/xAODWrite_jobOptions.py
@@ -31,7 +31,7 @@ InputFiles = [
 from ByteStreamCnvSvc import ReadByteStream
 
 
-svcMgr.ByteStreamInputSvc.FullFileName = InputFiles
+svcMgr.EventSelector.Input = InputFiles
 include("TrigT1CaloByteStream/ReadLVL1CaloBSRun2_jobOptions.py")
 svcMgr.MessageSvc.defaultLimit = 1000000
 
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/share/L1Calo_BS2xAOD_jobOptions.py b/Trigger/TrigT1/TrigT1CaloCalibTools/share/L1Calo_BS2xAOD_jobOptions.py
index 7fca6aa505bd..cd6a28378fa7 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/share/L1Calo_BS2xAOD_jobOptions.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/share/L1Calo_BS2xAOD_jobOptions.py
@@ -35,7 +35,7 @@ nEvents = -1
 
 # Tell Athena about the input file(s)
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = InFiles
+svcMgr.EventSelector.Input = InFiles
 
 topSequence = CfgMgr.AthSequencer("AthAlgSeq")
 
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker_topOptions.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker_topOptions.py
index dff67a3e653b..cdcd505107c3 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker_topOptions.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/L1CaloRampMaker_topOptions.py
@@ -99,7 +99,7 @@ from AtlasGeoModel import SetupRecoGeometry
 
 # setup bytestream reading
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+svcMgr.EventSelector.Input = athenaCommonFlags.FilesInput()
 theApp.EvtMax = athenaCommonFlags.EvtMax()
 svcMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 # Level-1 bs data
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
index 5a4b97b87086..f4f09421cd77 100755
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1CaloRampMaker.py
@@ -70,7 +70,7 @@ from AtlasGeoModel import SetupRecoGeometry
 
 # setup bytestream reading
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+svcMgr.EventSelector.Input = athenaCommonFlags.FilesInput()
 theApp.EvtMax = athenaCommonFlags.EvtMax()
 svcMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 # Level-1 bs data
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
index 5f9eb2afc43c..69ff40592c73 100755
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/TileL1CaloRampMaker.py
@@ -72,7 +72,7 @@ from AtlasGeoModel import SetupRecoGeometry
 
 # setup bytestream reading
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+svcMgr.EventSelector.Input = athenaCommonFlags.FilesInput()
 theApp.EvtMax = athenaCommonFlags.EvtMax()
 svcMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 # Level-1 bs data
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/share/TrigT1CaloMonitoring_runStandalone.py b/Trigger/TrigT1/TrigT1CaloMonitoring/share/TrigT1CaloMonitoring_runStandalone.py
index fbe2c5141ec8..45837539ee1e 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/share/TrigT1CaloMonitoring_runStandalone.py
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/share/TrigT1CaloMonitoring_runStandalone.py
@@ -14,7 +14,7 @@ FilesInput = [
 
 
 from ByteStreamCnvSvc import ReadByteStream
-svcMgr.ByteStreamInputSvc.FullFileName = FilesInput
+svcMgr.EventSelector.Input = FilesInput
 
 include("TrigT1CaloByteStream/ReadLVL1CaloBSRun2_jobOptions.py")
 
diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/share/ReadLVL1BS_jobOptions.py b/Trigger/TrigT1/TrigT1ResultByteStream/share/ReadLVL1BS_jobOptions.py
index c8eb43ff757b..448ed45b44f3 100644
--- a/Trigger/TrigT1/TrigT1ResultByteStream/share/ReadLVL1BS_jobOptions.py
+++ b/Trigger/TrigT1/TrigT1ResultByteStream/share/ReadLVL1BS_jobOptions.py
@@ -27,7 +27,7 @@ from AthenaCommon.AppMgr import ServiceMgr
 # Set up the reading of the BS file:
 #
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-svcMgr.ByteStreamInputSvc.FullFileName = [
+svcMgr.EventSelector.Input = [
   "daq.lvl1test.0000000.Single.Stream.LB0000.Athena._0001.data"
 ]
 
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/Trigger_topOptions_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/Trigger_topOptions_standalone.py
index 47c3e1799bfa..f14c69448623 100755
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/Trigger_topOptions_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/Trigger_topOptions_standalone.py
@@ -87,7 +87,7 @@ if globalflags.InputFormat()=='bytestream':
     if not hasattr(svcMgr,"ByteStreamCnvSvc"):
         from ByteStreamCnvSvc import ReadByteStream
         # Define the input
-        svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput()
+        svcMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
         theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 
 
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
index a5e3aedd2d02..3fd1dfa6997f 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
@@ -82,7 +82,7 @@ svcMgr += StoreGateSvc("BSStoreGate")
 svcMgr += ByteStreamEventStorageInputSvc("ByteStreamInputSvc")
 svcMgr.ByteStreamInputSvc.EventStore        = svcMgr.BSStoreGate
 svcMgr.ByteStreamInputSvc.MetaDataStore     = svcMgr.BSMetaDataStore
-svcMgr.ByteStreamInputSvc.FullFileName      = athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input      = athenaCommonFlags.BSRDOInput()
 
 svcMgr += EventSelectorByteStream("BSEventSelector")
 svcMgr.BSEventSelector.ByteStreamInputSvc = "ByteStreamInputSvc"
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py
index b610d5e5466b..5057d3d6c75a 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py
@@ -196,7 +196,7 @@ include ("RecExCond/AllDet_detDescr.py")
 if not hasattr(svcMgr,"ByteStreamCnvSvc"):
    from ByteStreamCnvSvc import ReadByteStream
    # Define the input
-   svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput()
+   svcMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
    theApp.ExtSvc += [ "ByteStreamCnvSvc"]
 
 # Online specific setup of BS converters
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
index f002ff31e3de..697b39d2711f 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
@@ -465,7 +465,7 @@ print '######################## End of Storegate dump ########################'
 
 print svcMgr
 
-svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput()
+svcMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
 
 #svcMgr.ByteStreamCnvSvc.OutputLevel = DEBUG
 
-- 
GitLab


From 052714cba84d69215e82364419f2d26b29d72e51 Mon Sep 17 00:00:00 2001
From: xiaozhon Huang <xiaozhong.huang@cern.ch>
Date: Mon, 8 Jun 2020 11:59:47 +0000
Subject: [PATCH 037/266] tauRecTools: include headers to fix some compilation
 errors in AnalysisBase

---
 Reconstruction/tauRec/tauRec/TauProcessorAlg.h     | 14 +++++++-------
 Reconstruction/tauRec/tauRec/TauRunnerAlg.h        | 10 ++++------
 .../tauRecTools/Root/MvaTESVariableDecorator.cxx   |  2 ++
 Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx |  5 ++---
 .../tauRecTools/Root/TauIDVarCalculator.cxx        |  6 ++++--
 Reconstruction/tauRecTools/Root/TauWPDecorator.cxx |  6 ++++--
 .../tauRecTools/tauRecTools/ITauToolBase.h         | 13 +++++++++----
 .../tauRecTools/tauRecTools/TauIDVarCalculator.h   |  4 +---
 .../tauRecTools/tauRecTools/TauWPDecorator.h       |  4 +++-
 9 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/Reconstruction/tauRec/tauRec/TauProcessorAlg.h b/Reconstruction/tauRec/tauRec/TauProcessorAlg.h
index 144df0fb82be..6d96d5995eb5 100644
--- a/Reconstruction/tauRec/tauRec/TauProcessorAlg.h
+++ b/Reconstruction/tauRec/tauRec/TauProcessorAlg.h
@@ -5,24 +5,24 @@
 #ifndef TAUREC_TAUPROCESSORALG_H
 #define TAUREC_TAUPROCESSORALG_H
 
-#include "GaudiKernel/SystemOfUnits.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
 #include "tauRecTools/ITauToolBase.h"
 
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
-#include "TRT_ReadoutGeometry/TRT_DetElementContainer.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
-
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "xAODTau/TauJetContainer.h"
 #include "xAODPFlow/PFOContainer.h"
 #include "xAODPFlow/PFOAuxContainer.h"
-
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterAuxContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "TRT_ReadoutGeometry/TRT_DetElementContainer.h"
 #include "CaloInterface/ICaloCellMakerTool.h"
 
+#include "GaudiKernel/SystemOfUnits.h"
+#include "GaudiKernel/ToolHandle.h"
+
 /**
  * @brief       Main class for tau candidate processing.
  */
diff --git a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
index 9cb5996ad5ef..68c5da9a297e 100644
--- a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
+++ b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
@@ -5,25 +5,23 @@
 #ifndef TAUREC_TAURUNNERALG_H
 #define TAUREC_TAURUNNERALG_H
 
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
 #include "tauRecTools/ITauToolBase.h"
 
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
-
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "xAODTau/TauJetContainer.h"
 #include "xAODPFlow/PFOContainer.h"
 #include "xAODPFlow/PFOAuxContainer.h"
-
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterAuxContainer.h"
-
 #include "xAODTracking/VertexContainer.h"
 #include "xAODTracking/VertexAuxContainer.h"
-
 #include "xAODParticleEvent/ParticleContainer.h"
 #include "xAODParticleEvent/ParticleAuxContainer.h"
 
+#include "GaudiKernel/ToolHandle.h"
+
 /**
  * @brief       Main class for tau candidate processing.
  */
diff --git a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
index f9f839c0c392..d26fd32d53de 100644
--- a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
+++ b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
@@ -6,6 +6,8 @@
 #include "tauRecTools/MvaTESVariableDecorator.h"
 #include "tauRecTools/HelperFunctions.h"
 
+#include "AsgDataHandles/ReadHandle.h"
+
 #define GeV 1000
 
 //_____________________________________________________________________________
diff --git a/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx b/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx
index 6e41e948f5a4..4ab231237638 100644
--- a/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx
+++ b/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx
@@ -2,11 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//tau
 #include "tauRecTools/TauCalibrateLC.h"
-#include "xAODTau/TauJet.h"
 
-// root
+#include "AsgDataHandles/ReadHandle.h"
+
 #include "TFile.h"
 #include "TF1.h"
 #include "TH1D.h"
diff --git a/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx b/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
index d005725d7004..4fb22ecafd8b 100644
--- a/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
@@ -8,11 +8,13 @@
  * Author: Lorenz Hauswald
  */
 
-#include "tauRecTools/HelperFunctions.h"
 #include "tauRecTools/TauIDVarCalculator.h"
-#include "xAODTracking/VertexContainer.h"  
+#include "tauRecTools/HelperFunctions.h"
+
 #include "CaloGeoHelpers/CaloSampling.h"
 #include "FourMomUtils/xAODP4Helpers.h"
+#include "AsgDataHandles/ReadHandle.h"
+
 #include "TLorentzVector.h"
 
 #define GeV 1000
diff --git a/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx b/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
index c5a3c6ff842d..6cec4185264a 100644
--- a/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
@@ -2,12 +2,14 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "tauRecTools/TauWPDecorator.h"
+
+#include "AsgDataHandles/ReadHandle.h"
+
 #include <utility>
 #include "TFile.h"
 #include "TH2.h"
 #include "TString.h"
-#include "tauRecTools/TauWPDecorator.h"
-#include "xAODEventInfo/EventInfo.h"
 
 /********************************************************************/
 TauWPDecorator::TauWPDecorator(const std::string& name) :
diff --git a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
index 3ff40cd12795..93d406be7819 100644
--- a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
@@ -6,12 +6,17 @@
 #define ITOOLBASE_TAU_H
 
 #include "AsgTools/IAsgTool.h"
-#include "xAODParticleEvent/Particle.h"
+
+#include "xAODTau/TauJet.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTracking/VertexContainer.h"
+#include "xAODPFlow/PFOContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODParticleEvent/ParticleContainer.h"
-#include "xAODParticleEvent/ParticleAuxContainer.h"
 
-#include "xAODTau/TauJetContainer.h"
-#include "xAODTau/TauJetAuxContainer.h"
+#ifndef XAOD_ANALYSIS
+#include "CaloEvent/CaloCellContainer.h"
+#endif
 
 /**
  * @brief The base class for all tau tools.
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauIDVarCalculator.h b/Reconstruction/tauRecTools/tauRecTools/TauIDVarCalculator.h
index d92c9183b6ef..854b58f9f428 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauIDVarCalculator.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauIDVarCalculator.h
@@ -13,9 +13,7 @@
 #define TAUIDVARCALCULATOR_H
 
 #include "tauRecTools/TauRecToolBase.h"
-#include "xAODTau/TauJet.h"
-#include "xAODEventInfo/EventInfo.h"
-#include <string>
+#include "AsgDataHandles/ReadHandleKey.h"
 
 class TauIDVarCalculator: public TauRecToolBase
 {
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h b/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
index 476458a2eb89..706903123046 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
@@ -6,9 +6,11 @@
 #define TAUREC_TAUWPDECORATOR_H
 
 #include "tauRecTools/TauRecToolBase.h"
+
 #include "xAODTau/TauDefs.h"
-#include "xAODTau/TauJet.h"
 #include "xAODEventInfo/EventInfo.h"
+#include "AsgDataHandles/ReadHandleKey.h"
+
 #include <map>
 
 class TH2;
-- 
GitLab


From 0523b42362075203018f54f3ba92f1be94daee3c Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Mon, 8 Jun 2020 14:33:01 +0200
Subject: [PATCH 038/266] HLTResultMTMaker: Disable StreamTagMaker if not
 configured in python

---
 .../TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx
index 09d6ba5a136e..ad4cf1dc5d1a 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx
@@ -64,7 +64,7 @@ HLTResultMTMaker::~HLTResultMTMaker() {}
 // =============================================================================
 StatusCode HLTResultMTMaker::initialize() {
   ATH_CHECK(m_hltResultWHKey.initialize());
-  ATH_CHECK(m_streamTagMaker.retrieve());
+  ATH_CHECK(m_streamTagMaker.retrieve(DisableTool{m_streamTagMaker.name().empty()}));
   ATH_CHECK(m_makerTools.retrieve());
   ATH_CHECK(m_monTool.retrieve());
   ATH_CHECK(m_jobOptionsSvc.retrieve());
@@ -136,9 +136,9 @@ StatusCode HLTResultMTMaker::makeResult(const EventContext& eventContext) const
 
   // Fill the stream tags
   StatusCode finalStatus = StatusCode::SUCCESS;
-  if (StatusCode sc = m_streamTagMaker->fill(*hltResult, eventContext); sc.isFailure()) {
+  if (m_streamTagMaker.isEnabled() && m_streamTagMaker->fill(*hltResult, eventContext).isFailure()) {
     ATH_MSG_ERROR(m_streamTagMaker->name() << " failed");
-    finalStatus = sc;
+    finalStatus = StatusCode::FAILURE;
   }
 
   // Fill the result using all other tools if the event was accepted
-- 
GitLab


From c62ad341a6b7198c13b848f5ca90ab7306fb512c Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 8 Jun 2020 12:42:55 +0000
Subject: [PATCH 039/266] PyUtils: Delete unused modules and scripts

Delete unused fileutils, path and merge_join modules. Also delete pep8
and avn alias. The pep8 script is superseded by flake8. And the avn
alias was pointing to a non-existent script.
---
 Tools/PyUtils/CMakeLists.txt                  |    5 +-
 Tools/PyUtils/bin/pep8.py                     | 2715 -----------------
 Tools/PyUtils/python/AthFile/__init__.py      |    8 +-
 Tools/PyUtils/python/AthFile/impl.py          |   61 +-
 Tools/PyUtils/python/AthFile/tests.py         |    3 +-
 Tools/PyUtils/python/AthFileLite.py           |    7 +-
 Tools/PyUtils/python/Decorators.py            |    6 +-
 Tools/PyUtils/python/Dso.py                   |   33 +-
 Tools/PyUtils/python/FilePeekerTool.py        |   13 +-
 Tools/PyUtils/python/Helpers.py               |    9 +-
 Tools/PyUtils/python/MetaDiff.py              |    4 +-
 Tools/PyUtils/python/MetaReaderPeeker.py      |    4 +-
 Tools/PyUtils/python/MetaReaderPeekerFull.py  |    3 +-
 Tools/PyUtils/python/PoolFile.py              |   84 +-
 Tools/PyUtils/python/RootUtils.py             |   15 +-
 Tools/PyUtils/python/coverage.py              |    9 +-
 Tools/PyUtils/python/dbsqlite.py              |    6 +-
 Tools/PyUtils/python/fileutils.py             |  297 --
 Tools/PyUtils/python/merge_join.py            |  103 -
 Tools/PyUtils/python/path.py                  |  995 ------
 Tools/PyUtils/python/scripts/ath_dump.py      |    7 +-
 Tools/PyUtils/python/scripts/check_file.py    |   10 +-
 Tools/PyUtils/python/scripts/check_reflex.py  |   14 +-
 Tools/PyUtils/python/scripts/check_sg.py      |   21 +-
 .../python/scripts/cmake_newanalysisalg.py    |    9 +-
 Tools/PyUtils/python/scripts/cmake_newpkg.py  |    9 +-
 .../python/scripts/cmake_newskeleton.py       |    6 +-
 Tools/PyUtils/python/scripts/cmt_newjobo.py   |    5 +-
 .../PyUtils/python/scripts/diff_root_files.py |    9 +-
 .../PyUtils/python/scripts/dump_root_file.py  |    9 +-
 Tools/PyUtils/python/scripts/filter_files.py  |    6 +-
 Tools/PyUtils/python/scripts/jira_issues.py   |    8 +-
 Tools/PyUtils/python/xmldict.py               |    7 +-
 33 files changed, 128 insertions(+), 4372 deletions(-)
 delete mode 100755 Tools/PyUtils/bin/pep8.py
 delete mode 100644 Tools/PyUtils/python/fileutils.py
 delete mode 100644 Tools/PyUtils/python/merge_join.py
 delete mode 100644 Tools/PyUtils/python/path.py

diff --git a/Tools/PyUtils/CMakeLists.txt b/Tools/PyUtils/CMakeLists.txt
index 99af2fca82cd..54be94b7b7d1 100644
--- a/Tools/PyUtils/CMakeLists.txt
+++ b/Tools/PyUtils/CMakeLists.txt
@@ -10,14 +10,14 @@ find_package( six )
 find_package( ROOT COMPONENTS Core PyROOT Tree MathCore Hist RIO pthread )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py python/scripts python/AthFile )
+atlas_install_python_modules( python/*.py python/scripts python/AthFile POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( bin/acmd.py bin/checkFile.py bin/checkPlugins.py
    bin/checkSG.py bin/checkMetaSG.py bin/checkTP.py bin/checkxAOD.py
    bin/diff-athfile bin/diff-jobo-cfg.py bin/diffConfigs.py
    bin/diffPoolFiles.py bin/dlldep.py bin/dso-stats.py bin/dump-athfile.py
    bin/dumpAthfilelite.py bin/filter-and-merge-d3pd.py bin/getMetadata.py
    bin/gprof2dot bin/issues bin/magnifyPoolFile.py bin/merge-poolfiles.py
-   bin/pep8.py bin/pool_extractFileIdentifier.py
+   bin/pool_extractFileIdentifier.py
    bin/pool_insertFileToCatalog.py bin/print_auditor_callgraph.py bin/pyroot.py
    bin/vmem-sz.py bin/meta-reader.py bin/meta-diff.py bin/tree-orderer.py )
 
@@ -29,7 +29,6 @@ atlas_add_alias( gen_klass "acmd.py" "gen-klass" )
 atlas_add_alias( merge-poolfiles "merge-poolfiles.py" )
 atlas_add_alias( diffConfigs "diffConfigs.py" )
 atlas_add_alias( filter-and-merge-d3pd "filter-and-merge-d3pd.py" )
-atlas_add_alias( avn "avn.py" )
 atlas_add_alias( diffPoolFiles "diffPoolFiles.py" )
 atlas_add_alias( print_auditor_callgraph "print_auditor_callgraph.py" )
 atlas_add_alias( dump-athfile "dump-athfile.py" )
diff --git a/Tools/PyUtils/bin/pep8.py b/Tools/PyUtils/bin/pep8.py
deleted file mode 100755
index 6d3b554c9fc6..000000000000
--- a/Tools/PyUtils/bin/pep8.py
+++ /dev/null
@@ -1,2715 +0,0 @@
-#!/usr/bin/env python
-# pycodestyle.py - Check Python source code formatting, according to
-# PEP 8
-#
-# Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net>
-# Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
-# Copyright (C) 2014-2016 Ian Lee <ianlee1521@gmail.com>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation files
-# (the "Software"), to deal in the Software without restriction,
-# including without limitation the rights to use, copy, modify, merge,
-# publish, distribute, sublicense, and/or sell copies of the Software,
-# and to permit persons to whom the Software is furnished to do so,
-# subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-r"""
-Check Python source code formatting, according to PEP 8.
-
-For usage and a list of options, try this:
-$ python pycodestyle.py -h
-
-This program and its regression test suite live here:
-https://github.com/pycqa/pycodestyle
-
-Groups of errors and warnings:
-E errors
-W warnings
-100 indentation
-200 whitespace
-300 blank lines
-400 imports
-500 line length
-600 deprecation
-700 statements
-900 syntax error
-"""
-from __future__ import with_statement
-
-import inspect
-import keyword
-import os
-import re
-import sys
-import time
-import tokenize
-import warnings
-import bisect
-
-try:
-    from functools import lru_cache
-except ImportError:
-    def lru_cache(maxsize=128):  # noqa as it's a fake implementation.
-        """Does not really need a real a lru_cache, it's just
-        optimization, so let's just do nothing here. Python 3.2+ will
-        just get better performances, time to upgrade?
-        """
-        return lambda function: function
-
-from fnmatch import fnmatch
-from optparse import OptionParser
-
-try:
-    from configparser import RawConfigParser
-    from io import TextIOWrapper
-except ImportError:
-    from ConfigParser import RawConfigParser
-
-__version__ = '2.5.0'
-
-DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox'
-DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704,W503,W504'
-try:
-    if sys.platform == 'win32':
-        USER_CONFIG = os.path.expanduser(r'~\.pycodestyle')
-    else:
-        USER_CONFIG = os.path.join(
-            os.getenv('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'),
-            'pycodestyle'
-        )
-except ImportError:
-    USER_CONFIG = None
-
-PROJECT_CONFIG = ('setup.cfg', 'tox.ini')
-TESTSUITE_PATH = os.path.join(os.path.dirname(__file__), 'testsuite')
-MAX_LINE_LENGTH = 79
-# Number of blank lines between various code parts.
-BLANK_LINES_CONFIG = {
-    # Top level class and function.
-    'top_level': 2,
-    # Methods and nested class and function.
-    'method': 1,
-}
-MAX_DOC_LENGTH = 72
-REPORT_FORMAT = {
-    'default': '%(path)s:%(row)d:%(col)d: %(code)s %(text)s',
-    'pylint': '%(path)s:%(row)d: [%(code)s] %(text)s',
-}
-
-PyCF_ONLY_AST = 1024
-SINGLETONS = frozenset(['False', 'None', 'True'])
-KEYWORDS = frozenset(keyword.kwlist + ['print', 'async']) - SINGLETONS
-UNARY_OPERATORS = frozenset(['>>', '**', '*', '+', '-'])
-ARITHMETIC_OP = frozenset(['**', '*', '/', '//', '+', '-'])
-WS_OPTIONAL_OPERATORS = ARITHMETIC_OP.union(['^', '&', '|', '<<', '>>', '%'])
-# Warn for -> function annotation operator in py3.5+ (issue 803)
-FUNCTION_RETURN_ANNOTATION_OP = ['->'] if sys.version_info >= (3, 5) else []
-ASSIGNMENT_EXPRESSION_OP = [':='] if sys.version_info >= (3, 8) else []
-WS_NEEDED_OPERATORS = frozenset([
-    '**=', '*=', '/=', '//=', '+=', '-=', '!=', '<>', '<', '>',
-    '%=', '^=', '&=', '|=', '==', '<=', '>=', '<<=', '>>=', '=',
-    'and', 'in', 'is', 'or'] +
-    FUNCTION_RETURN_ANNOTATION_OP +
-    ASSIGNMENT_EXPRESSION_OP)
-WHITESPACE = frozenset(' \t')
-NEWLINE = frozenset([tokenize.NL, tokenize.NEWLINE])
-SKIP_TOKENS = NEWLINE.union([tokenize.INDENT, tokenize.DEDENT])
-# ERRORTOKEN is triggered by backticks in Python 3
-SKIP_COMMENTS = SKIP_TOKENS.union([tokenize.COMMENT, tokenize.ERRORTOKEN])
-BENCHMARK_KEYS = ['directories', 'files', 'logical lines', 'physical lines']
-
-INDENT_REGEX = re.compile(r'([ \t]*)')
-RAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,')
-RERAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,.*,\s*\w+\s*$')
-ERRORCODE_REGEX = re.compile(r'\b[A-Z]\d{3}\b')
-DOCSTRING_REGEX = re.compile(r'u?r?["\']')
-EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[\[({] | [\]}),;]| :(?!=)')
-WHITESPACE_AFTER_COMMA_REGEX = re.compile(r'[,;:]\s*(?:  |\t)')
-COMPARE_SINGLETON_REGEX = re.compile(r'(\bNone|\bFalse|\bTrue)?\s*([=!]=)'
-                                     r'\s*(?(1)|(None|False|True))\b')
-COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+[^][)(}{ ]+\s+(in|is)\s')
-COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s+type(?:s.\w+Type'
-                                r'|\s*\(\s*([^)]*[^ )])\s*\))')
-KEYWORD_REGEX = re.compile(r'(\s*)\b(?:%s)\b(\s*)' % r'|'.join(KEYWORDS))
-OPERATOR_REGEX = re.compile(r'(?:[^,\s])(\s*)(?:[-+*/|!<=>%&^]+)(\s*)')
-LAMBDA_REGEX = re.compile(r'\blambda\b')
-HUNK_REGEX = re.compile(r'^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$')
-STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)\b')
-STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def\s+|def\s+|class\s+|@)')
-STARTSWITH_INDENT_STATEMENT_REGEX = re.compile(
-    r'^\s*({0})\b'.format('|'.join(s.replace(' ', r'\s+') for s in (
-        'def', 'async def',
-        'for', 'async for',
-        'if', 'elif', 'else',
-        'try', 'except', 'finally',
-        'with', 'async with',
-        'class',
-        'while',
-    )))
-)
-DUNDER_REGEX = re.compile(r'^__([^\s]+)__ = ')
-
-_checks = {'physical_line': {}, 'logical_line': {}, 'tree': {}}
-
-
-def _get_parameters(function):
-    if sys.version_info >= (3, 3):
-        return [parameter.name
-                for parameter
-                in inspect.signature(function).parameters.values()
-                if parameter.kind == parameter.POSITIONAL_OR_KEYWORD]
-    else:
-        return inspect.getargspec(function)[0]
-
-
-def register_check(check, codes=None):
-    """Register a new check object."""
-    def _add_check(check, kind, codes, args):
-        if check in _checks[kind]:
-            _checks[kind][check][0].extend(codes or [])
-        else:
-            _checks[kind][check] = (codes or [''], args)
-    if inspect.isfunction(check):
-        args = _get_parameters(check)
-        if args and args[0] in ('physical_line', 'logical_line'):
-            if codes is None:
-                codes = ERRORCODE_REGEX.findall(check.__doc__ or '')
-            _add_check(check, args[0], codes, args)
-    elif inspect.isclass(check):
-        if _get_parameters(check.__init__)[:2] == ['self', 'tree']:
-            _add_check(check, 'tree', codes, None)
-    return check
-
-
-########################################################################
-# Plugins (check functions) for physical lines
-########################################################################
-
-@register_check
-def tabs_or_spaces(physical_line, indent_char):
-    r"""Never mix tabs and spaces.
-
-    The most popular way of indenting Python is with spaces only.  The
-    second-most popular way is with tabs only.  Code indented with a
-    mixture of tabs and spaces should be converted to using spaces
-    exclusively.  When invoking the Python command line interpreter with
-    the -t option, it issues warnings about code that illegally mixes
-    tabs and spaces.  When using -tt these warnings become errors.
-    These options are highly recommended!
-
-    Okay: if a == 0:\n    a = 1\n    b = 1
-    E101: if a == 0:\n        a = 1\n\tb = 1
-    """
-    indent = INDENT_REGEX.match(physical_line).group(1)
-    for offset, char in enumerate(indent):
-        if char != indent_char:
-            return offset, "E101 indentation contains mixed spaces and tabs"
-
-
-@register_check
-def tabs_obsolete(physical_line):
-    r"""On new projects, spaces-only are strongly recommended over tabs.
-
-    Okay: if True:\n    return
-    W191: if True:\n\treturn
-    """
-    indent = INDENT_REGEX.match(physical_line).group(1)
-    if '\t' in indent:
-        return indent.index('\t'), "W191 indentation contains tabs"
-
-
-@register_check
-def trailing_whitespace(physical_line):
-    r"""Trailing whitespace is superfluous.
-
-    The warning returned varies on whether the line itself is blank,
-    for easier filtering for those who want to indent their blank lines.
-
-    Okay: spam(1)\n#
-    W291: spam(1) \n#
-    W293: class Foo(object):\n    \n    bang = 12
-    """
-    physical_line = physical_line.rstrip('\n')    # chr(10), newline
-    physical_line = physical_line.rstrip('\r')    # chr(13), carriage return
-    physical_line = physical_line.rstrip('\x0c')  # chr(12), form feed, ^L
-    stripped = physical_line.rstrip(' \t\v')
-    if physical_line != stripped:
-        if stripped:
-            return len(stripped), "W291 trailing whitespace"
-        else:
-            return 0, "W293 blank line contains whitespace"
-
-
-@register_check
-def trailing_blank_lines(physical_line, lines, line_number, total_lines):
-    r"""Trailing blank lines are superfluous.
-
-    Okay: spam(1)
-    W391: spam(1)\n
-
-    However the last line should end with a new line (warning W292).
-    """
-    if line_number == total_lines:
-        stripped_last_line = physical_line.rstrip()
-        if physical_line and not stripped_last_line:
-            return 0, "W391 blank line at end of file"
-        if stripped_last_line == physical_line:
-            return len(lines[-1]), "W292 no newline at end of file"
-
-
-@register_check
-def maximum_line_length(physical_line, max_line_length, multiline,
-                        line_number, noqa):
-    r"""Limit all lines to a maximum of 79 characters.
-
-    There are still many devices around that are limited to 80 character
-    lines; plus, limiting windows to 80 characters makes it possible to
-    have several windows side-by-side.  The default wrapping on such
-    devices looks ugly.  Therefore, please limit all lines to a maximum
-    of 79 characters. For flowing long blocks of text (docstrings or
-    comments), limiting the length to 72 characters is recommended.
-
-    Reports error E501.
-    """
-    line = physical_line.rstrip()
-    length = len(line)
-    if length > max_line_length and not noqa:
-        # Special case: ignore long shebang lines.
-        if line_number == 1 and line.startswith('#!'):
-            return
-        # Special case for long URLs in multi-line docstrings or
-        # comments, but still report the error when the 72 first chars
-        # are whitespaces.
-        chunks = line.split()
-        if ((len(chunks) == 1 and multiline) or
-            (len(chunks) == 2 and chunks[0] == '#')) and \
-                len(line) - len(chunks[-1]) < max_line_length - 7:
-            return
-        if hasattr(line, 'decode'):   # Python 2
-            # The line could contain multi-byte characters
-            try:
-                length = len(line.decode('utf-8'))
-            except UnicodeError:
-                pass
-        if length > max_line_length:
-            return (max_line_length, "E501 line too long "
-                    "(%d > %d characters)" % (length, max_line_length))
-
-
-########################################################################
-# Plugins (check functions) for logical lines
-########################################################################
-
-
-@register_check
-def blank_lines(logical_line, blank_lines, indent_level, line_number,
-                blank_before, previous_logical,
-                previous_unindented_logical_line, previous_indent_level,
-                lines):
-    r"""Separate top-level function and class definitions with two blank
-    lines.
-
-    Method definitions inside a class are separated by a single blank
-    line.
-
-    Extra blank lines may be used (sparingly) to separate groups of
-    related functions.  Blank lines may be omitted between a bunch of
-    related one-liners (e.g. a set of dummy implementations).
-
-    Use blank lines in functions, sparingly, to indicate logical
-    sections.
-
-    Okay: def a():\n    pass\n\n\ndef b():\n    pass
-    Okay: def a():\n    pass\n\n\nasync def b():\n    pass
-    Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
-    Okay: default = 1\nfoo = 1
-    Okay: classify = 1\nfoo = 1
-
-    E301: class Foo:\n    b = 0\n    def bar():\n        pass
-    E302: def a():\n    pass\n\ndef b(n):\n    pass
-    E302: def a():\n    pass\n\nasync def b(n):\n    pass
-    E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
-    E303: def a():\n\n\n\n    pass
-    E304: @decorator\n\ndef a():\n    pass
-    E305: def a():\n    pass\na()
-    E306: def a():\n    def b():\n        pass\n    def c():\n        pass
-    """  # noqa
-    top_level_lines = BLANK_LINES_CONFIG['top_level']
-    method_lines = BLANK_LINES_CONFIG['method']
-
-    if line_number < top_level_lines + 1 and not previous_logical:
-        return  # Don't expect blank lines before the first line
-    if previous_logical.startswith('@'):
-        if blank_lines:
-            yield 0, "E304 blank lines found after function decorator"
-    elif (blank_lines > top_level_lines or
-            (indent_level and blank_lines == method_lines + 1)
-          ):
-        yield 0, "E303 too many blank lines (%d)" % blank_lines
-    elif STARTSWITH_TOP_LEVEL_REGEX.match(logical_line):
-        # If this is a one-liner (i.e. this is not a decorator and the
-        # next line is not more indented), and the previous line is also
-        # not deeper (it would be better to check if the previous line
-        # is part of another def/class at the same level), don't require
-        # blank lines around this.
-        prev_line = lines[line_number - 2] if line_number >= 2 else ''
-        next_line = lines[line_number] if line_number < len(lines) else ''
-        if (not logical_line.startswith("@") and
-                expand_indent(prev_line) <= indent_level and
-                expand_indent(next_line) <= indent_level):
-            return
-        if indent_level:
-            if not (blank_before == method_lines or
-                    previous_indent_level < indent_level or
-                    DOCSTRING_REGEX.match(previous_logical)
-                    ):
-                ancestor_level = indent_level
-                nested = False
-                # Search backwards for a def ancestor or tree root
-                # (top level).
-                for line in lines[line_number - top_level_lines::-1]:
-                    if line.strip() and expand_indent(line) < ancestor_level:
-                        ancestor_level = expand_indent(line)
-                        nested = line.lstrip().startswith('def ')
-                        if nested or ancestor_level == 0:
-                            break
-                if nested:
-                    yield 0, "E306 expected %s blank line before a " \
-                        "nested definition, found 0" % (method_lines,)
-                else:
-                    yield 0, "E301 expected %s blank line, found 0" % (
-                        method_lines,)
-        elif blank_before != top_level_lines:
-            yield 0, "E302 expected %s blank lines, found %d" % (
-                top_level_lines, blank_before)
-    elif (logical_line and
-            not indent_level and
-            blank_before != top_level_lines and
-            previous_unindented_logical_line.startswith(('def ', 'class '))
-          ):
-        yield 0, "E305 expected %s blank lines after " \
-            "class or function definition, found %d" % (
-                top_level_lines, blank_before)
-
-
-@register_check
-def extraneous_whitespace(logical_line):
-    r"""Avoid extraneous whitespace.
-
-    Avoid extraneous whitespace in these situations:
-    - Immediately inside parentheses, brackets or braces.
-    - Immediately before a comma, semicolon, or colon.
-
-    Okay: spam(ham[1], {eggs: 2})
-    E201: spam( ham[1], {eggs: 2})
-    E201: spam(ham[ 1], {eggs: 2})
-    E201: spam(ham[1], { eggs: 2})
-    E202: spam(ham[1], {eggs: 2} )
-    E202: spam(ham[1 ], {eggs: 2})
-    E202: spam(ham[1], {eggs: 2 })
-
-    E203: if x == 4: print x, y; x, y = y , x
-    E203: if x == 4: print x, y ; x, y = y, x
-    E203: if x == 4 : print x, y; x, y = y, x
-    """
-    line = logical_line
-    for match in EXTRANEOUS_WHITESPACE_REGEX.finditer(line):
-        text = match.group()
-        char = text.strip()
-        found = match.start()
-        if text == char + ' ':
-            # assert char in '([{'
-            yield found + 1, "E201 whitespace after '%s'" % char
-        elif line[found - 1] != ',':
-            code = ('E202' if char in '}])' else 'E203')  # if char in ',;:'
-            yield found, "%s whitespace before '%s'" % (code, char)
-
-
-@register_check
-def whitespace_around_keywords(logical_line):
-    r"""Avoid extraneous whitespace around keywords.
-
-    Okay: True and False
-    E271: True and  False
-    E272: True  and False
-    E273: True and\tFalse
-    E274: True\tand False
-    """
-    for match in KEYWORD_REGEX.finditer(logical_line):
-        before, after = match.groups()
-
-        if '\t' in before:
-            yield match.start(1), "E274 tab before keyword"
-        elif len(before) > 1:
-            yield match.start(1), "E272 multiple spaces before keyword"
-
-        if '\t' in after:
-            yield match.start(2), "E273 tab after keyword"
-        elif len(after) > 1:
-            yield match.start(2), "E271 multiple spaces after keyword"
-
-
-@register_check
-def missing_whitespace_after_import_keyword(logical_line):
-    r"""Multiple imports in form from x import (a, b, c) should have
-    space between import statement and parenthesised name list.
-
-    Okay: from foo import (bar, baz)
-    E275: from foo import(bar, baz)
-    E275: from importable.module import(bar, baz)
-    """
-    line = logical_line
-    indicator = ' import('
-    if line.startswith('from '):
-        found = line.find(indicator)
-        if -1 < found:
-            pos = found + len(indicator) - 1
-            yield pos, "E275 missing whitespace after keyword"
-
-
-@register_check
-def missing_whitespace(logical_line):
-    r"""Each comma, semicolon or colon should be followed by whitespace.
-
-    Okay: [a, b]
-    Okay: (3,)
-    Okay: a[1:4]
-    Okay: a[:4]
-    Okay: a[1:]
-    Okay: a[1:4:2]
-    E231: ['a','b']
-    E231: foo(bar,baz)
-    E231: [{'a':'b'}]
-    """
-    line = logical_line
-    for index in range(len(line) - 1):
-        char = line[index]
-        next_char = line[index + 1]
-        if char in ',;:' and next_char not in WHITESPACE:
-            before = line[:index]
-            if char == ':' and before.count('[') > before.count(']') and \
-                    before.rfind('{') < before.rfind('['):
-                continue  # Slice syntax, no space required
-            if char == ',' and next_char == ')':
-                continue  # Allow tuple with only one element: (3,)
-            if char == ':' and next_char == '=' and sys.version_info >= (3, 8):
-                continue  # Allow assignment expression
-            yield index, "E231 missing whitespace after '%s'" % char
-
-
-@register_check
-def indentation(logical_line, previous_logical, indent_char,
-                indent_level, previous_indent_level):
-    r"""Use 4 spaces per indentation level.
-
-    For really old code that you don't want to mess up, you can continue
-    to use 8-space tabs.
-
-    Okay: a = 1
-    Okay: if a == 0:\n    a = 1
-    E111:   a = 1
-    E114:   # a = 1
-
-    Okay: for item in items:\n    pass
-    E112: for item in items:\npass
-    E115: for item in items:\n# Hi\n    pass
-
-    Okay: a = 1\nb = 2
-    E113: a = 1\n    b = 2
-    E116: a = 1\n    # b = 2
-    """
-    c = 0 if logical_line else 3
-    tmpl = "E11%d %s" if logical_line else "E11%d %s (comment)"
-    if indent_level % 4:
-        yield 0, tmpl % (1 + c, "indentation is not a multiple of four")
-    indent_expect = previous_logical.endswith(':')
-    if indent_expect and indent_level <= previous_indent_level:
-        yield 0, tmpl % (2 + c, "expected an indented block")
-    elif not indent_expect and indent_level > previous_indent_level:
-        yield 0, tmpl % (3 + c, "unexpected indentation")
-
-    if indent_expect:
-        expected_indent_amount = 8 if indent_char == '\t' else 4
-        expected_indent_level = previous_indent_level + expected_indent_amount
-        if indent_level > expected_indent_level:
-            yield 0, tmpl % (7, 'over-indented')
-
-
-@register_check
-def continued_indentation(logical_line, tokens, indent_level, hang_closing,
-                          indent_char, noqa, verbose):
-    r"""Continuation lines indentation.
-
-    Continuation lines should align wrapped elements either vertically
-    using Python's implicit line joining inside parentheses, brackets
-    and braces, or using a hanging indent.
-
-    When using a hanging indent these considerations should be applied:
-    - there should be no arguments on the first line, and
-    - further indentation should be used to clearly distinguish itself
-      as a continuation line.
-
-    Okay: a = (\n)
-    E123: a = (\n    )
-
-    Okay: a = (\n    42)
-    E121: a = (\n   42)
-    E122: a = (\n42)
-    E123: a = (\n    42\n    )
-    E124: a = (24,\n     42\n)
-    E125: if (\n    b):\n    pass
-    E126: a = (\n        42)
-    E127: a = (24,\n      42)
-    E128: a = (24,\n    42)
-    E129: if (a or\n    b):\n    pass
-    E131: a = (\n    42\n 24)
-    """
-    first_row = tokens[0][2][0]
-    nrows = 1 + tokens[-1][2][0] - first_row
-    if noqa or nrows == 1:
-        return
-
-    # indent_next tells us whether the next block is indented; assuming
-    # that it is indented by 4 spaces, then we should not allow 4-space
-    # indents on the final continuation line; in turn, some other
-    # indents are allowed to have an extra 4 spaces.
-    indent_next = logical_line.endswith(':')
-
-    row = depth = 0
-    valid_hangs = (4,) if indent_char != '\t' else (4, 8)
-    # remember how many brackets were opened on each line
-    parens = [0] * nrows
-    # relative indents of physical lines
-    rel_indent = [0] * nrows
-    # for each depth, collect a list of opening rows
-    open_rows = [[0]]
-    # for each depth, memorize the hanging indentation
-    hangs = [None]
-    # visual indents
-    indent_chances = {}
-    last_indent = tokens[0][2]
-    visual_indent = None
-    last_token_multiline = False
-    # for each depth, memorize the visual indent column
-    indent = [last_indent[1]]
-    if verbose >= 3:
-        print(">>> " + tokens[0][4].rstrip())
-
-    for token_type, text, start, end, line in tokens:
-
-        newline = row < start[0] - first_row
-        if newline:
-            row = start[0] - first_row
-            newline = not last_token_multiline and token_type not in NEWLINE
-
-        if newline:
-            # this is the beginning of a continuation line.
-            last_indent = start
-            if verbose >= 3:
-                print("... " + line.rstrip())
-
-            # record the initial indent.
-            rel_indent[row] = expand_indent(line) - indent_level
-
-            # identify closing bracket
-            close_bracket = (token_type == tokenize.OP and text in ']})')
-
-            # is the indent relative to an opening bracket line?
-            for open_row in reversed(open_rows[depth]):
-                hang = rel_indent[row] - rel_indent[open_row]
-                hanging_indent = hang in valid_hangs
-                if hanging_indent:
-                    break
-            if hangs[depth]:
-                hanging_indent = (hang == hangs[depth])
-            # is there any chance of visual indent?
-            visual_indent = (not close_bracket and hang > 0 and
-                             indent_chances.get(start[1]))
-
-            if close_bracket and indent[depth]:
-                # closing bracket for visual indent
-                if start[1] != indent[depth]:
-                    yield (start, "E124 closing bracket does not match "
-                           "visual indentation")
-            elif close_bracket and not hang:
-                # closing bracket matches indentation of opening
-                # bracket's line
-                if hang_closing:
-                    yield start, "E133 closing bracket is missing indentation"
-            elif indent[depth] and start[1] < indent[depth]:
-                if visual_indent is not True:
-                    # visual indent is broken
-                    yield (start, "E128 continuation line "
-                           "under-indented for visual indent")
-            elif hanging_indent or (indent_next and rel_indent[row] == 8):
-                # hanging indent is verified
-                if close_bracket and not hang_closing:
-                    yield (start, "E123 closing bracket does not match "
-                           "indentation of opening bracket's line")
-                hangs[depth] = hang
-            elif visual_indent is True:
-                # visual indent is verified
-                indent[depth] = start[1]
-            elif visual_indent in (text, str):
-                # ignore token lined up with matching one from a
-                # previous line
-                pass
-            else:
-                # indent is broken
-                if hang <= 0:
-                    error = "E122", "missing indentation or outdented"
-                elif indent[depth]:
-                    error = "E127", "over-indented for visual indent"
-                elif not close_bracket and hangs[depth]:
-                    error = "E131", "unaligned for hanging indent"
-                else:
-                    hangs[depth] = hang
-                    if hang > 4:
-                        error = "E126", "over-indented for hanging indent"
-                    else:
-                        error = "E121", "under-indented for hanging indent"
-                yield start, "%s continuation line %s" % error
-
-        # look for visual indenting
-        if (parens[row] and
-                token_type not in (tokenize.NL, tokenize.COMMENT) and
-                not indent[depth]):
-            indent[depth] = start[1]
-            indent_chances[start[1]] = True
-            if verbose >= 4:
-                print("bracket depth %s indent to %s" % (depth, start[1]))
-        # deal with implicit string concatenation
-        elif (token_type in (tokenize.STRING, tokenize.COMMENT) or
-              text in ('u', 'ur', 'b', 'br')):
-            indent_chances[start[1]] = str
-        # special case for the "if" statement because len("if (") == 4
-        elif not indent_chances and not row and not depth and text == 'if':
-            indent_chances[end[1] + 1] = True
-        elif text == ':' and line[end[1]:].isspace():
-            open_rows[depth].append(row)
-
-        # keep track of bracket depth
-        if token_type == tokenize.OP:
-            if text in '([{':
-                depth += 1
-                indent.append(0)
-                hangs.append(None)
-                if len(open_rows) == depth:
-                    open_rows.append([])
-                open_rows[depth].append(row)
-                parens[row] += 1
-                if verbose >= 4:
-                    print("bracket depth %s seen, col %s, visual min = %s" %
-                          (depth, start[1], indent[depth]))
-            elif text in ')]}' and depth > 0:
-                # parent indents should not be more than this one
-                prev_indent = indent.pop() or last_indent[1]
-                hangs.pop()
-                for d in range(depth):
-                    if indent[d] > prev_indent:
-                        indent[d] = 0
-                for ind in list(indent_chances):
-                    if ind >= prev_indent:
-                        del indent_chances[ind]
-                del open_rows[depth + 1:]
-                depth -= 1
-                if depth:
-                    indent_chances[indent[depth]] = True
-                for idx in range(row, -1, -1):
-                    if parens[idx]:
-                        parens[idx] -= 1
-                        break
-            assert len(indent) == depth + 1
-            if start[1] not in indent_chances:
-                # allow lining up tokens
-                indent_chances[start[1]] = text
-
-        last_token_multiline = (start[0] != end[0])
-        if last_token_multiline:
-            rel_indent[end[0] - first_row] = rel_indent[row]
-
-    if indent_next and expand_indent(line) == indent_level + 4:
-        pos = (start[0], indent[0] + 4)
-        if visual_indent:
-            code = "E129 visually indented line"
-        else:
-            code = "E125 continuation line"
-        yield pos, "%s with same indent as next logical line" % code
-
-
-@register_check
-def whitespace_before_parameters(logical_line, tokens):
-    r"""Avoid extraneous whitespace.
-
-    Avoid extraneous whitespace in the following situations:
-    - before the open parenthesis that starts the argument list of a
-      function call.
-    - before the open parenthesis that starts an indexing or slicing.
-
-    Okay: spam(1)
-    E211: spam (1)
-
-    Okay: dict['key'] = list[index]
-    E211: dict ['key'] = list[index]
-    E211: dict['key'] = list [index]
-    """
-    prev_type, prev_text, __, prev_end, __ = tokens[0]
-    for index in range(1, len(tokens)):
-        token_type, text, start, end, __ = tokens[index]
-        if (token_type == tokenize.OP and
-            text in '([' and
-            start != prev_end and
-            (prev_type == tokenize.NAME or prev_text in '}])') and
-            # Syntax "class A (B):" is allowed, but avoid it
-            (index < 2 or tokens[index - 2][1] != 'class') and
-                # Allow "return (a.foo for a in range(5))"
-                not keyword.iskeyword(prev_text)):
-            yield prev_end, "E211 whitespace before '%s'" % text
-        prev_type = token_type
-        prev_text = text
-        prev_end = end
-
-
-@register_check
-def whitespace_around_operator(logical_line):
-    r"""Avoid extraneous whitespace around an operator.
-
-    Okay: a = 12 + 3
-    E221: a = 4  + 5
-    E222: a = 4 +  5
-    E223: a = 4\t+ 5
-    E224: a = 4 +\t5
-    """
-    for match in OPERATOR_REGEX.finditer(logical_line):
-        before, after = match.groups()
-
-        if '\t' in before:
-            yield match.start(1), "E223 tab before operator"
-        elif len(before) > 1:
-            yield match.start(1), "E221 multiple spaces before operator"
-
-        if '\t' in after:
-            yield match.start(2), "E224 tab after operator"
-        elif len(after) > 1:
-            yield match.start(2), "E222 multiple spaces after operator"
-
-
-@register_check
-def missing_whitespace_around_operator(logical_line, tokens):
-    r"""Surround operators with a single space on either side.
-
-    - Always surround these binary operators with a single space on
-      either side: assignment (=), augmented assignment (+=, -= etc.),
-      comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
-      Booleans (and, or, not).
-
-    - If operators with different priorities are used, consider adding
-      whitespace around the operators with the lowest priorities.
-
-    Okay: i = i + 1
-    Okay: submitted += 1
-    Okay: x = x * 2 - 1
-    Okay: hypot2 = x * x + y * y
-    Okay: c = (a + b) * (a - b)
-    Okay: foo(bar, key='word', *args, **kwargs)
-    Okay: alpha[:-i]
-
-    E225: i=i+1
-    E225: submitted +=1
-    E225: x = x /2 - 1
-    E225: z = x **y
-    E225: z = 1and 1
-    E226: c = (a+b) * (a-b)
-    E226: hypot2 = x*x + y*y
-    E227: c = a|b
-    E228: msg = fmt%(errno, errmsg)
-    """
-    parens = 0
-    need_space = False
-    prev_type = tokenize.OP
-    prev_text = prev_end = None
-    operator_types = (tokenize.OP, tokenize.NAME)
-    for token_type, text, start, end, line in tokens:
-        if token_type in SKIP_COMMENTS:
-            continue
-        if text in ('(', 'lambda'):
-            parens += 1
-        elif text == ')':
-            parens -= 1
-        if need_space:
-            if start != prev_end:
-                # Found a (probably) needed space
-                if need_space is not True and not need_space[1]:
-                    yield (need_space[0],
-                           "E225 missing whitespace around operator")
-                need_space = False
-            elif text == '>' and prev_text in ('<', '-'):
-                # Tolerate the "<>" operator, even if running Python 3
-                # Deal with Python 3's annotated return value "->"
-                pass
-            else:
-                if need_space is True or need_space[1]:
-                    # A needed trailing space was not found
-                    yield prev_end, "E225 missing whitespace around operator"
-                elif prev_text != '**':
-                    code, optype = 'E226', 'arithmetic'
-                    if prev_text == '%':
-                        code, optype = 'E228', 'modulo'
-                    elif prev_text not in ARITHMETIC_OP:
-                        code, optype = 'E227', 'bitwise or shift'
-                    yield (need_space[0], "%s missing whitespace "
-                           "around %s operator" % (code, optype))
-                need_space = False
-        elif token_type in operator_types and prev_end is not None:
-            if text == '=' and parens:
-                # Allow keyword args or defaults: foo(bar=None).
-                pass
-            elif text in WS_NEEDED_OPERATORS:
-                need_space = True
-            elif text in UNARY_OPERATORS:
-                # Check if the operator is used as a binary operator
-                # Allow unary operators: -123, -x, +1.
-                # Allow argument unpacking: foo(*args, **kwargs).
-                if (prev_text in '}])' if prev_type == tokenize.OP
-                        else prev_text not in KEYWORDS):
-                    need_space = None
-            elif text in WS_OPTIONAL_OPERATORS:
-                need_space = None
-
-            if need_space is None:
-                # Surrounding space is optional, but ensure that
-                # trailing space matches opening space
-                need_space = (prev_end, start != prev_end)
-            elif need_space and start == prev_end:
-                # A needed opening space was not found
-                yield prev_end, "E225 missing whitespace around operator"
-                need_space = False
-        prev_type = token_type
-        prev_text = text
-        prev_end = end
-
-
-@register_check
-def whitespace_around_comma(logical_line):
-    r"""Avoid extraneous whitespace after a comma or a colon.
-
-    Note: these checks are disabled by default
-
-    Okay: a = (1, 2)
-    E241: a = (1,  2)
-    E242: a = (1,\t2)
-    """
-    line = logical_line
-    for m in WHITESPACE_AFTER_COMMA_REGEX.finditer(line):
-        found = m.start() + 1
-        if '\t' in m.group():
-            yield found, "E242 tab after '%s'" % m.group()[0]
-        else:
-            yield found, "E241 multiple spaces after '%s'" % m.group()[0]
-
-
-@register_check
-def whitespace_around_named_parameter_equals(logical_line, tokens):
-    r"""Don't use spaces around the '=' sign in function arguments.
-
-    Don't use spaces around the '=' sign when used to indicate a
-    keyword argument or a default parameter value, except when
-    using a type annotation.
-
-    Okay: def complex(real, imag=0.0):
-    Okay: return magic(r=real, i=imag)
-    Okay: boolean(a == b)
-    Okay: boolean(a != b)
-    Okay: boolean(a <= b)
-    Okay: boolean(a >= b)
-    Okay: def foo(arg: int = 42):
-    Okay: async def foo(arg: int = 42):
-
-    E251: def complex(real, imag = 0.0):
-    E251: return magic(r = real, i = imag)
-    E252: def complex(real, image: float=0.0):
-    """
-    parens = 0
-    no_space = False
-    require_space = False
-    prev_end = None
-    annotated_func_arg = False
-    in_def = bool(STARTSWITH_DEF_REGEX.match(logical_line))
-
-    message = "E251 unexpected spaces around keyword / parameter equals"
-    missing_message = "E252 missing whitespace around parameter equals"
-
-    for token_type, text, start, end, line in tokens:
-        if token_type == tokenize.NL:
-            continue
-        if no_space:
-            no_space = False
-            if start != prev_end:
-                yield (prev_end, message)
-        if require_space:
-            require_space = False
-            if start == prev_end:
-                yield (prev_end, missing_message)
-        if token_type == tokenize.OP:
-            if text in '([':
-                parens += 1
-            elif text in ')]':
-                parens -= 1
-            elif in_def and text == ':' and parens == 1:
-                annotated_func_arg = True
-            elif parens == 1 and text == ',':
-                annotated_func_arg = False
-            elif parens and text == '=':
-                if annotated_func_arg and parens == 1:
-                    require_space = True
-                    if start == prev_end:
-                        yield (prev_end, missing_message)
-                else:
-                    no_space = True
-                    if start != prev_end:
-                        yield (prev_end, message)
-            if not parens:
-                annotated_func_arg = False
-
-        prev_end = end
-
-
-@register_check
-def whitespace_before_comment(logical_line, tokens):
-    r"""Separate inline comments by at least two spaces.
-
-    An inline comment is a comment on the same line as a statement.
-    Inline comments should be separated by at least two spaces from the
-    statement. They should start with a # and a single space.
-
-    Each line of a block comment starts with a # and a single space
-    (unless it is indented text inside the comment).
-
-    Okay: x = x + 1  # Increment x
-    Okay: x = x + 1    # Increment x
-    Okay: # Block comment
-    E261: x = x + 1 # Increment x
-    E262: x = x + 1  #Increment x
-    E262: x = x + 1  #  Increment x
-    E265: #Block comment
-    E266: ### Block comment
-    """
-    prev_end = (0, 0)
-    for token_type, text, start, end, line in tokens:
-        if token_type == tokenize.COMMENT:
-            inline_comment = line[:start[1]].strip()
-            if inline_comment:
-                if prev_end[0] == start[0] and start[1] < prev_end[1] + 2:
-                    yield (prev_end,
-                           "E261 at least two spaces before inline comment")
-            symbol, sp, comment = text.partition(' ')
-            bad_prefix = symbol not in '#:' and (symbol.lstrip('#')[:1] or '#')
-            if inline_comment:
-                if bad_prefix or comment[:1] in WHITESPACE:
-                    yield start, "E262 inline comment should start with '# '"
-            elif bad_prefix and (bad_prefix != '!' or start[0] > 1):
-                if bad_prefix != '#':
-                    yield start, "E265 block comment should start with '# '"
-                elif comment:
-                    yield start, "E266 too many leading '#' for block comment"
-        elif token_type != tokenize.NL:
-            prev_end = end
-
-
-@register_check
-def imports_on_separate_lines(logical_line):
-    r"""Place imports on separate lines.
-
-    Okay: import os\nimport sys
-    E401: import sys, os
-
-    Okay: from subprocess import Popen, PIPE
-    Okay: from myclas import MyClass
-    Okay: from foo.bar.yourclass import YourClass
-    Okay: import myclass
-    Okay: import foo.bar.yourclass
-    """
-    line = logical_line
-    if line.startswith('import '):
-        found = line.find(',')
-        if -1 < found and ';' not in line[:found]:
-            yield found, "E401 multiple imports on one line"
-
-
-@register_check
-def module_imports_on_top_of_file(
-        logical_line, indent_level, checker_state, noqa):
-    r"""Place imports at the top of the file.
-
-    Always put imports at the top of the file, just after any module
-    comments and docstrings, and before module globals and constants.
-
-    Okay: import os
-    Okay: # this is a comment\nimport os
-    Okay: '''this is a module docstring'''\nimport os
-    Okay: r'''this is a module docstring'''\nimport os
-    Okay:
-    try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
-    Okay:
-    try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
-    E402: a=1\nimport os
-    E402: 'One string'\n"Two string"\nimport os
-    E402: a=1\nfrom sys import x
-
-    Okay: if x:\n    import os
-    """  # noqa
-    def is_string_literal(line):
-        if line[0] in 'uUbB':
-            line = line[1:]
-        if line and line[0] in 'rR':
-            line = line[1:]
-        return line and (line[0] == '"' or line[0] == "'")
-
-    allowed_keywords = (
-        'try', 'except', 'else', 'finally', 'with', 'if', 'elif')
-
-    if indent_level:  # Allow imports in conditional statement/function
-        return
-    if not logical_line:  # Allow empty lines or comments
-        return
-    if noqa:
-        return
-    line = logical_line
-    if line.startswith('import ') or line.startswith('from '):
-        if checker_state.get('seen_non_imports', False):
-            yield 0, "E402 module level import not at top of file"
-    elif re.match(DUNDER_REGEX, line):
-        return
-    elif any(line.startswith(kw) for kw in allowed_keywords):
-        # Allow certain keywords intermixed with imports in order to
-        # support conditional or filtered importing
-        return
-    elif is_string_literal(line):
-        # The first literal is a docstring, allow it. Otherwise, report
-        # error.
-        if checker_state.get('seen_docstring', False):
-            checker_state['seen_non_imports'] = True
-        else:
-            checker_state['seen_docstring'] = True
-    else:
-        checker_state['seen_non_imports'] = True
-
-
-@register_check
-def compound_statements(logical_line):
-    r"""Compound statements (on the same line) are generally
-    discouraged.
-
-    While sometimes it's okay to put an if/for/while with a small body
-    on the same line, never do this for multi-clause statements.
-    Also avoid folding such long lines!
-
-    Always use a def statement instead of an assignment statement that
-    binds a lambda expression directly to a name.
-
-    Okay: if foo == 'blah':\n    do_blah_thing()
-    Okay: do_one()
-    Okay: do_two()
-    Okay: do_three()
-
-    E701: if foo == 'blah': do_blah_thing()
-    E701: for x in lst: total += x
-    E701: while t < 10: t = delay()
-    E701: if foo == 'blah': do_blah_thing()
-    E701: else: do_non_blah_thing()
-    E701: try: something()
-    E701: finally: cleanup()
-    E701: if foo == 'blah': one(); two(); three()
-    E702: do_one(); do_two(); do_three()
-    E703: do_four();  # useless semicolon
-    E704: def f(x): return 2*x
-    E731: f = lambda x: 2*x
-    """
-    line = logical_line
-    last_char = len(line) - 1
-    found = line.find(':')
-    prev_found = 0
-    counts = {char: 0 for char in '{}[]()'}
-    while -1 < found < last_char:
-        update_counts(line[prev_found:found], counts)
-        if ((counts['{'] <= counts['}'] and   # {'a': 1} (dict)
-             counts['['] <= counts[']'] and   # [1:2] (slice)
-             counts['('] <= counts[')']) and  # (annotation)
-            not (sys.version_info >= (3, 8) and
-                 line[found + 1] == '=')):  # assignment expression
-            lambda_kw = LAMBDA_REGEX.search(line, 0, found)
-            if lambda_kw:
-                before = line[:lambda_kw.start()].rstrip()
-                if before[-1:] == '=' and isidentifier(before[:-1].strip()):
-                    yield 0, ("E731 do not assign a lambda expression, use a "
-                              "def")
-                break
-            if STARTSWITH_DEF_REGEX.match(line):
-                yield 0, "E704 multiple statements on one line (def)"
-            elif STARTSWITH_INDENT_STATEMENT_REGEX.match(line):
-                yield found, "E701 multiple statements on one line (colon)"
-        prev_found = found
-        found = line.find(':', found + 1)
-    found = line.find(';')
-    while -1 < found:
-        if found < last_char:
-            yield found, "E702 multiple statements on one line (semicolon)"
-        else:
-            yield found, "E703 statement ends with a semicolon"
-        found = line.find(';', found + 1)
-
-
-@register_check
-def explicit_line_join(logical_line, tokens):
-    r"""Avoid explicit line join between brackets.
-
-    The preferred way of wrapping long lines is by using Python's
-    implied line continuation inside parentheses, brackets and braces.
-    Long lines can be broken over multiple lines by wrapping expressions
-    in parentheses.  These should be used in preference to using a
-    backslash for line continuation.
-
-    E502: aaa = [123, \\n       123]
-    E502: aaa = ("bbb " \\n       "ccc")
-
-    Okay: aaa = [123,\n       123]
-    Okay: aaa = ("bbb "\n       "ccc")
-    Okay: aaa = "bbb " \\n    "ccc"
-    Okay: aaa = 123  # \\
-    """
-    prev_start = prev_end = parens = 0
-    comment = False
-    backslash = None
-    for token_type, text, start, end, line in tokens:
-        if token_type == tokenize.COMMENT:
-            comment = True
-        if start[0] != prev_start and parens and backslash and not comment:
-            yield backslash, "E502 the backslash is redundant between brackets"
-        if end[0] != prev_end:
-            if line.rstrip('\r\n').endswith('\\'):
-                backslash = (end[0], len(line.splitlines()[-1]) - 1)
-            else:
-                backslash = None
-            prev_start = prev_end = end[0]
-        else:
-            prev_start = start[0]
-        if token_type == tokenize.OP:
-            if text in '([{':
-                parens += 1
-            elif text in ')]}':
-                parens -= 1
-
-
-_SYMBOLIC_OPS = frozenset("()[]{},:.;@=%~") | frozenset(("...",))
-
-
-def _is_binary_operator(token_type, text):
-    is_op_token = token_type == tokenize.OP
-    is_conjunction = text in ['and', 'or']
-    # NOTE(sigmavirus24): Previously the not_a_symbol check was executed
-    # conditionally. Since it is now *always* executed, text may be
-    # None. In that case we get a TypeError for `text not in str`.
-    not_a_symbol = text and text not in _SYMBOLIC_OPS
-    # The % character is strictly speaking a binary operator, but the
-    # common usage seems to be to put it next to the format parameters,
-    # after a line break.
-    return ((is_op_token or is_conjunction) and not_a_symbol)
-
-
-def _break_around_binary_operators(tokens):
-    """Private function to reduce duplication.
-
-    This factors out the shared details between
-    :func:`break_before_binary_operator` and
-    :func:`break_after_binary_operator`.
-    """
-    line_break = False
-    unary_context = True
-    # Previous non-newline token types and text
-    previous_token_type = None
-    previous_text = None
-    for token_type, text, start, end, line in tokens:
-        if token_type == tokenize.COMMENT:
-            continue
-        if ('\n' in text or '\r' in text) and token_type != tokenize.STRING:
-            line_break = True
-        else:
-            yield (token_type, text, previous_token_type, previous_text,
-                   line_break, unary_context, start)
-            unary_context = text in '([{,;'
-            line_break = False
-            previous_token_type = token_type
-            previous_text = text
-
-
-@register_check
-def break_before_binary_operator(logical_line, tokens):
-    r"""
-    Avoid breaks before binary operators.
-
-    The preferred place to break around a binary operator is after the
-    operator, not before it.
-
-    W503: (width == 0\n + height == 0)
-    W503: (width == 0\n and height == 0)
-    W503: var = (1\n       & ~2)
-    W503: var = (1\n       / -2)
-    W503: var = (1\n       + -1\n       + -2)
-
-    Okay: foo(\n    -x)
-    Okay: foo(x\n    [])
-    Okay: x = '''\n''' + ''
-    Okay: foo(x,\n    -y)
-    Okay: foo(x,  # comment\n    -y)
-    """
-    for context in _break_around_binary_operators(tokens):
-        (token_type, text, previous_token_type, previous_text,
-         line_break, unary_context, start) = context
-        if (_is_binary_operator(token_type, text) and line_break and
-                not unary_context and
-                not _is_binary_operator(previous_token_type,
-                                        previous_text)):
-            yield start, "W503 line break before binary operator"
-
-
-@register_check
-def break_after_binary_operator(logical_line, tokens):
-    r"""
-    Avoid breaks after binary operators.
-
-    The preferred place to break around a binary operator is before the
-    operator, not after it.
-
-    W504: (width == 0 +\n height == 0)
-    W504: (width == 0 and\n height == 0)
-    W504: var = (1 &\n       ~2)
-
-    Okay: foo(\n    -x)
-    Okay: foo(x\n    [])
-    Okay: x = '''\n''' + ''
-    Okay: x = '' + '''\n'''
-    Okay: foo(x,\n    -y)
-    Okay: foo(x,  # comment\n    -y)
-
-    The following should be W504 but unary_context is tricky with these
-    Okay: var = (1 /\n       -2)
-    Okay: var = (1 +\n       -1 +\n       -2)
-    """
-    prev_start = None
-    for context in _break_around_binary_operators(tokens):
-        (token_type, text, previous_token_type, previous_text,
-         line_break, unary_context, start) = context
-        if (_is_binary_operator(previous_token_type, previous_text) and
-                line_break and
-                not unary_context and
-                not _is_binary_operator(token_type, text)):
-            yield prev_start, "W504 line break after binary operator"
-        prev_start = start
-
-
-@register_check
-def comparison_to_singleton(logical_line, noqa):
-    r"""Comparison to singletons should use "is" or "is not".
-
-    Comparisons to singletons like None should always be done
-    with "is" or "is not", never the equality operators.
-
-    Okay: if arg is not None:
-    E711: if arg != None:
-    E711: if None == arg:
-    E712: if arg == True:
-    E712: if False == arg:
-
-    Also, beware of writing if x when you really mean if x is not None
-    -- e.g. when testing whether a variable or argument that defaults to
-    None was set to some other value.  The other value might have a type
-    (such as a container) that could be false in a boolean context!
-    """
-    match = not noqa and COMPARE_SINGLETON_REGEX.search(logical_line)
-    if match:
-        singleton = match.group(1) or match.group(3)
-        same = (match.group(2) == '==')
-
-        msg = "'if cond is %s:'" % (('' if same else 'not ') + singleton)
-        if singleton in ('None',):
-            code = 'E711'
-        else:
-            code = 'E712'
-            nonzero = ((singleton == 'True' and same) or
-                       (singleton == 'False' and not same))
-            msg += " or 'if %scond:'" % ('' if nonzero else 'not ')
-        yield match.start(2), ("%s comparison to %s should be %s" %
-                               (code, singleton, msg))
-
-
-@register_check
-def comparison_negative(logical_line):
-    r"""Negative comparison should be done using "not in" and "is not".
-
-    Okay: if x not in y:\n    pass
-    Okay: assert (X in Y or X is Z)
-    Okay: if not (X in Y):\n    pass
-    Okay: zz = x is not y
-    E713: Z = not X in Y
-    E713: if not X.B in Y:\n    pass
-    E714: if not X is Y:\n    pass
-    E714: Z = not X.B is Y
-    """
-    match = COMPARE_NEGATIVE_REGEX.search(logical_line)
-    if match:
-        pos = match.start(1)
-        if match.group(2) == 'in':
-            yield pos, "E713 test for membership should be 'not in'"
-        else:
-            yield pos, "E714 test for object identity should be 'is not'"
-
-
-@register_check
-def comparison_type(logical_line, noqa):
-    r"""Object type comparisons should always use isinstance().
-
-    Do not compare types directly.
-
-    Okay: if isinstance(obj, int):
-    E721: if type(obj) is type(1):
-
-    When checking if an object is a string, keep in mind that it might
-    be a unicode string too! In Python 2.3, str and unicode have a
-    common base class, basestring, so you can do:
-
-    Okay: if isinstance(obj, basestring):
-    Okay: if type(a1) is type(b1):
-    """
-    match = COMPARE_TYPE_REGEX.search(logical_line)
-    if match and not noqa:
-        inst = match.group(1)
-        if inst and isidentifier(inst) and inst not in SINGLETONS:
-            return  # Allow comparison for types which are not obvious
-        yield match.start(), "E721 do not compare types, use 'isinstance()'"
-
-
-@register_check
-def bare_except(logical_line, noqa):
-    r"""When catching exceptions, mention specific exceptions when
-    possible.
-
-    Okay: except Exception:
-    Okay: except BaseException:
-    E722: except:
-    """
-    if noqa:
-        return
-
-    regex = re.compile(r"except\s*:")
-    match = regex.match(logical_line)
-    if match:
-        yield match.start(), "E722 do not use bare 'except'"
-
-
-@register_check
-def ambiguous_identifier(logical_line, tokens):
-    r"""Never use the characters 'l', 'O', or 'I' as variable names.
-
-    In some fonts, these characters are indistinguishable from the
-    numerals one and zero. When tempted to use 'l', use 'L' instead.
-
-    Okay: L = 0
-    Okay: o = 123
-    Okay: i = 42
-    E741: l = 0
-    E741: O = 123
-    E741: I = 42
-
-    Variables can be bound in several other contexts, including class
-    and function definitions, 'global' and 'nonlocal' statements,
-    exception handlers, and 'with' and 'for' statements.
-    In addition, we have a special handling for function parameters.
-
-    Okay: except AttributeError as o:
-    Okay: with lock as L:
-    Okay: foo(l=12)
-    Okay: for a in foo(l=12):
-    E741: except AttributeError as O:
-    E741: with lock as l:
-    E741: global I
-    E741: nonlocal l
-    E741: def foo(l):
-    E741: def foo(l=12):
-    E741: l = foo(l=12)
-    E741: for l in range(10):
-    E742: class I(object):
-    E743: def l(x):
-    """
-    is_func_def = False  # Set to true if 'def' is found
-    parameter_parentheses_level = 0
-    idents_to_avoid = ('l', 'O', 'I')
-    prev_type, prev_text, prev_start, prev_end, __ = tokens[0]
-    for token_type, text, start, end, line in tokens[1:]:
-        ident = pos = None
-        # find function definitions
-        if prev_text == 'def':
-            is_func_def = True
-        # update parameter parentheses level
-        if parameter_parentheses_level == 0 and \
-                prev_type == tokenize.NAME and \
-                token_type == tokenize.OP and text == '(':
-            parameter_parentheses_level = 1
-        elif parameter_parentheses_level > 0 and \
-                token_type == tokenize.OP:
-            if text == '(':
-                parameter_parentheses_level += 1
-            elif text == ')':
-                parameter_parentheses_level -= 1
-        # identifiers on the lhs of an assignment operator
-        if token_type == tokenize.OP and '=' in text and \
-                parameter_parentheses_level == 0:
-            if prev_text in idents_to_avoid:
-                ident = prev_text
-                pos = prev_start
-        # identifiers bound to values with 'as', 'for',
-        # 'global', or 'nonlocal'
-        if prev_text in ('as', 'for', 'global', 'nonlocal'):
-            if text in idents_to_avoid:
-                ident = text
-                pos = start
-        # function parameter definitions
-        if is_func_def:
-            if text in idents_to_avoid:
-                ident = text
-                pos = start
-        if prev_text == 'class':
-            if text in idents_to_avoid:
-                yield start, "E742 ambiguous class definition '%s'" % text
-        if prev_text == 'def':
-            if text in idents_to_avoid:
-                yield start, "E743 ambiguous function definition '%s'" % text
-        if ident:
-            yield pos, "E741 ambiguous variable name '%s'" % ident
-        prev_type = token_type
-        prev_text = text
-        prev_start = start
-
-
-@register_check
-def python_3000_has_key(logical_line, noqa):
-    r"""The {}.has_key() method is removed in Python 3: use the 'in'
-    operator.
-
-    Okay: if "alph" in d:\n    print d["alph"]
-    W601: assert d.has_key('alph')
-    """
-    pos = logical_line.find('.has_key(')
-    if pos > -1 and not noqa:
-        yield pos, "W601 .has_key() is deprecated, use 'in'"
-
-
-@register_check
-def python_3000_raise_comma(logical_line):
-    r"""When raising an exception, use "raise ValueError('message')".
-
-    The older form is removed in Python 3.
-
-    Okay: raise DummyError("Message")
-    W602: raise DummyError, "Message"
-    """
-    match = RAISE_COMMA_REGEX.match(logical_line)
-    if match and not RERAISE_COMMA_REGEX.match(logical_line):
-        yield match.end() - 1, "W602 deprecated form of raising exception"
-
-
-@register_check
-def python_3000_not_equal(logical_line):
-    r"""New code should always use != instead of <>.
-
-    The older syntax is removed in Python 3.
-
-    Okay: if a != 'no':
-    W603: if a <> 'no':
-    """
-    pos = logical_line.find('<>')
-    if pos > -1:
-        yield pos, "W603 '<>' is deprecated, use '!='"
-
-
-@register_check
-def python_3000_backticks(logical_line):
-    r"""Use repr() instead of backticks in Python 3.
-
-    Okay: val = repr(1 + 2)
-    W604: val = `1 + 2`
-    """
-    pos = logical_line.find('`')
-    if pos > -1:
-        yield pos, "W604 backticks are deprecated, use 'repr()'"
-
-
-@register_check
-def python_3000_invalid_escape_sequence(logical_line, tokens, noqa):
-    r"""Invalid escape sequences are deprecated in Python 3.6.
-
-    Okay: regex = r'\.png$'
-    W605: regex = '\.png$'
-    """
-    if noqa:
-        return
-
-    # https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
-    valid = [
-        '\n',
-        '\\',
-        '\'',
-        '"',
-        'a',
-        'b',
-        'f',
-        'n',
-        'r',
-        't',
-        'v',
-        '0', '1', '2', '3', '4', '5', '6', '7',
-        'x',
-
-        # Escape sequences only recognized in string literals
-        'N',
-        'u',
-        'U',
-    ]
-
-    for token_type, text, start, end, line in tokens:
-        if token_type == tokenize.STRING:
-            start_line, start_col = start
-            quote = text[-3:] if text[-3:] in ('"""', "'''") else text[-1]
-            # Extract string modifiers (e.g. u or r)
-            quote_pos = text.index(quote)
-            prefix = text[:quote_pos].lower()
-            start = quote_pos + len(quote)
-            string = text[start:-len(quote)]
-
-            if 'r' not in prefix:
-                pos = string.find('\\')
-                while pos >= 0:
-                    pos += 1
-                    if string[pos] not in valid:
-                        line = start_line + string.count('\n', 0, pos)
-                        if line == start_line:
-                            col = start_col + len(prefix) + len(quote) + pos
-                        else:
-                            col = pos - string.rfind('\n', 0, pos) - 1
-                        yield (
-                            (line, col - 1),
-                            "W605 invalid escape sequence '\\%s'" %
-                            string[pos],
-                        )
-                    pos = string.find('\\', pos + 1)
-
-
-@register_check
-def python_3000_async_await_keywords(logical_line, tokens):
-    """'async' and 'await' are reserved keywords starting at Python 3.7.
-
-    W606: async = 42
-    W606: await = 42
-    Okay: async def read(db):\n    data = await db.fetch('SELECT ...')
-    """
-    # The Python tokenize library before Python 3.5 recognizes
-    # async/await as a NAME token. Therefore, use a state machine to
-    # look for the possible async/await constructs as defined by the
-    # Python grammar:
-    # https://docs.python.org/3/reference/grammar.html
-
-    state = None
-    for token_type, text, start, end, line in tokens:
-        error = False
-
-        if token_type == tokenize.NL:
-            continue
-
-        if state is None:
-            if token_type == tokenize.NAME:
-                if text == 'async':
-                    state = ('async_stmt', start)
-                elif text == 'await':
-                    state = ('await', start)
-                elif (token_type == tokenize.NAME and
-                      text in ('def', 'for')):
-                    state = ('define', start)
-
-        elif state[0] == 'async_stmt':
-            if token_type == tokenize.NAME and text in ('def', 'with', 'for'):
-                # One of funcdef, with_stmt, or for_stmt. Return to
-                # looking for async/await names.
-                state = None
-            else:
-                error = True
-        elif state[0] == 'await':
-            if token_type == tokenize.NAME:
-                # An await expression. Return to looking for async/await
-                # names.
-                state = None
-            elif token_type == tokenize.OP and text == '(':
-                state = None
-            else:
-                error = True
-        elif state[0] == 'define':
-            if token_type == tokenize.NAME and text in ('async', 'await'):
-                error = True
-            else:
-                state = None
-
-        if error:
-            yield (
-                state[1],
-                "W606 'async' and 'await' are reserved keywords starting with "
-                "Python 3.7",
-            )
-            state = None
-
-    # Last token
-    if state is not None:
-        yield (
-            state[1],
-            "W606 'async' and 'await' are reserved keywords starting with "
-            "Python 3.7",
-        )
-
-
-########################################################################
-@register_check
-def maximum_doc_length(logical_line, max_doc_length, noqa, tokens):
-    r"""Limit all doc lines to a maximum of 72 characters.
-
-    For flowing long blocks of text (docstrings or comments), limiting
-    the length to 72 characters is recommended.
-
-    Reports warning W505
-    """
-    if max_doc_length is None or noqa:
-        return
-
-    prev_token = None
-    skip_lines = set()
-    # Skip lines that
-    for token_type, text, start, end, line in tokens:
-        if token_type not in SKIP_COMMENTS.union([tokenize.STRING]):
-            skip_lines.add(line)
-
-    for token_type, text, start, end, line in tokens:
-        # Skip lines that aren't pure strings
-        if token_type == tokenize.STRING and skip_lines:
-            continue
-        if token_type in (tokenize.STRING, tokenize.COMMENT):
-            # Only check comment-only lines
-            if prev_token is None or prev_token in SKIP_TOKENS:
-                lines = line.splitlines()
-                for line_num, physical_line in enumerate(lines):
-                    if hasattr(physical_line, 'decode'):  # Python 2
-                        # The line could contain multi-byte characters
-                        try:
-                            physical_line = physical_line.decode('utf-8')
-                        except UnicodeError:
-                            pass
-                    if start[0] + line_num == 1 and line.startswith('#!'):
-                        return
-                    length = len(physical_line)
-                    chunks = physical_line.split()
-                    if token_type == tokenize.COMMENT:
-                        if (len(chunks) == 2 and
-                                length - len(chunks[-1]) < MAX_DOC_LENGTH):
-                            continue
-                    if len(chunks) == 1 and line_num + 1 < len(lines):
-                        if (len(chunks) == 1 and
-                                length - len(chunks[-1]) < MAX_DOC_LENGTH):
-                            continue
-                    if length > max_doc_length:
-                        doc_error = (start[0] + line_num, max_doc_length)
-                        yield (doc_error, "W505 doc line too long "
-                                          "(%d > %d characters)"
-                               % (length, max_doc_length))
-        prev_token = token_type
-
-
-########################################################################
-# Helper functions
-########################################################################
-
-
-if sys.version_info < (3,):
-    # Python 2: implicit encoding.
-    def readlines(filename):
-        """Read the source code."""
-        with open(filename, 'rU') as f:
-            return f.readlines()
-    isidentifier = re.compile(r'[a-zA-Z_]\w*$').match
-    stdin_get_value = sys.stdin.read
-else:
-    # Python 3
-    def readlines(filename):
-        """Read the source code."""
-        try:
-            with open(filename, 'rb') as f:
-                (coding, lines) = tokenize.detect_encoding(f.readline)
-                f = TextIOWrapper(f, coding, line_buffering=True)
-                return [line.decode(coding) for line in lines] + f.readlines()
-        except (LookupError, SyntaxError, UnicodeError):
-            # Fall back if file encoding is improperly declared
-            with open(filename, encoding='latin-1') as f:
-                return f.readlines()
-    isidentifier = str.isidentifier
-
-    def stdin_get_value():
-        """Read the value from stdin."""
-        return TextIOWrapper(sys.stdin.buffer, errors='ignore').read()
-
-noqa = lru_cache(512)(re.compile(r'# no(?:qa|pep8)\b', re.I).search)
-
-
-def expand_indent(line):
-    r"""Return the amount of indentation.
-
-    Tabs are expanded to the next multiple of 8.
-
-    >>> expand_indent('    ')
-    4
-    >>> expand_indent('\t')
-    8
-    >>> expand_indent('       \t')
-    8
-    >>> expand_indent('        \t')
-    16
-    """
-    if '\t' not in line:
-        return len(line) - len(line.lstrip())
-    result = 0
-    for char in line:
-        if char == '\t':
-            result = result // 8 * 8 + 8
-        elif char == ' ':
-            result += 1
-        else:
-            break
-    return result
-
-
-def mute_string(text):
-    """Replace contents with 'xxx' to prevent syntax matching.
-
-    >>> mute_string('"abc"')
-    '"xxx"'
-    >>> mute_string("'''abc'''")
-    "'''xxx'''"
-    >>> mute_string("r'abc'")
-    "r'xxx'"
-    """
-    # String modifiers (e.g. u or r)
-    start = text.index(text[-1]) + 1
-    end = len(text) - 1
-    # Triple quotes
-    if text[-3:] in ('"""', "'''"):
-        start += 2
-        end -= 2
-    return text[:start] + 'x' * (end - start) + text[end:]
-
-
-def parse_udiff(diff, patterns=None, parent='.'):
-    """Return a dictionary of matching lines."""
-    # For each file of the diff, the entry key is the filename,
-    # and the value is a set of row numbers to consider.
-    rv = {}
-    path = nrows = None
-    for line in diff.splitlines():
-        if nrows:
-            if line[:1] != '-':
-                nrows -= 1
-            continue
-        if line[:3] == '@@ ':
-            hunk_match = HUNK_REGEX.match(line)
-            (row, nrows) = [int(g or '1') for g in hunk_match.groups()]
-            rv[path].update(range(row, row + nrows))
-        elif line[:3] == '+++':
-            path = line[4:].split('\t', 1)[0]
-            # Git diff will use (i)ndex, (w)ork tree, (c)ommit and
-            # (o)bject instead of a/b/c/d as prefixes for patches
-            if path[:2] in ('b/', 'w/', 'i/'):
-                path = path[2:]
-            rv[path] = set()
-    return {
-        os.path.join(parent, filepath): rows
-        for (filepath, rows) in rv.items()
-        if rows and filename_match(filepath, patterns)
-    }
-
-
-def normalize_paths(value, parent=os.curdir):
-    """Parse a comma-separated list of paths.
-
-    Return a list of absolute paths.
-    """
-    if not value:
-        return []
-    if isinstance(value, list):
-        return value
-    paths = []
-    for path in value.split(','):
-        path = path.strip()
-        if '/' in path:
-            path = os.path.abspath(os.path.join(parent, path))
-        paths.append(path.rstrip('/'))
-    return paths
-
-
-def filename_match(filename, patterns, default=True):
-    """Check if patterns contains a pattern that matches filename.
-
-    If patterns is unspecified, this always returns True.
-    """
-    if not patterns:
-        return default
-    return any(fnmatch(filename, pattern) for pattern in patterns)
-
-
-def update_counts(s, counts):
-    r"""Adds one to the counts of each appearance of characters in s,
-        for characters in counts"""
-    for char in s:
-        if char in counts:
-            counts[char] += 1
-
-
-def _is_eol_token(token):
-    return token[0] in NEWLINE or token[4][token[3][1]:].lstrip() == '\\\n'
-
-
-########################################################################
-# Framework to run all checks
-########################################################################
-
-
-class Checker(object):
-    """Load a Python source file, tokenize it, check coding style."""
-
-    def __init__(self, filename=None, lines=None,
-                 options=None, report=None, **kwargs):
-        if options is None:
-            options = StyleGuide(kwargs).options
-        else:
-            assert not kwargs
-        self._io_error = None
-        self._physical_checks = options.physical_checks
-        self._logical_checks = options.logical_checks
-        self._ast_checks = options.ast_checks
-        self.max_line_length = options.max_line_length
-        self.max_doc_length = options.max_doc_length
-        self.multiline = False  # in a multiline string?
-        self.hang_closing = options.hang_closing
-        self.verbose = options.verbose
-        self.filename = filename
-        # Dictionary where a checker can store its custom state.
-        self._checker_states = {}
-        if filename is None:
-            self.filename = 'stdin'
-            self.lines = lines or []
-        elif filename == '-':
-            self.filename = 'stdin'
-            self.lines = stdin_get_value().splitlines(True)
-        elif lines is None:
-            try:
-                self.lines = readlines(filename)
-            except IOError:
-                (exc_type, exc) = sys.exc_info()[:2]
-                self._io_error = '%s: %s' % (exc_type.__name__, exc)
-                self.lines = []
-        else:
-            self.lines = lines
-        if self.lines:
-            ord0 = ord(self.lines[0][0])
-            if ord0 in (0xef, 0xfeff):  # Strip the UTF-8 BOM
-                if ord0 == 0xfeff:
-                    self.lines[0] = self.lines[0][1:]
-                elif self.lines[0][:3] == '\xef\xbb\xbf':
-                    self.lines[0] = self.lines[0][3:]
-        self.report = report or options.report
-        self.report_error = self.report.error
-        self.noqa = False
-
-    def report_invalid_syntax(self):
-        """Check if the syntax is valid."""
-        (exc_type, exc) = sys.exc_info()[:2]
-        if len(exc.args) > 1:
-            offset = exc.args[1]
-            if len(offset) > 2:
-                offset = offset[1:3]
-        else:
-            offset = (1, 0)
-        self.report_error(offset[0], offset[1] or 0,
-                          'E901 %s: %s' % (exc_type.__name__, exc.args[0]),
-                          self.report_invalid_syntax)
-
-    def readline(self):
-        """Get the next line from the input buffer."""
-        if self.line_number >= self.total_lines:
-            return ''
-        line = self.lines[self.line_number]
-        self.line_number += 1
-        if self.indent_char is None and line[:1] in WHITESPACE:
-            self.indent_char = line[0]
-        return line
-
-    def run_check(self, check, argument_names):
-        """Run a check plugin."""
-        arguments = []
-        for name in argument_names:
-            arguments.append(getattr(self, name))
-        return check(*arguments)
-
-    def init_checker_state(self, name, argument_names):
-        """Prepare custom state for the specific checker plugin."""
-        if 'checker_state' in argument_names:
-            self.checker_state = self._checker_states.setdefault(name, {})
-
-    def check_physical(self, line):
-        """Run all physical checks on a raw input line."""
-        self.physical_line = line
-        for name, check, argument_names in self._physical_checks:
-            self.init_checker_state(name, argument_names)
-            result = self.run_check(check, argument_names)
-            if result is not None:
-                (offset, text) = result
-                self.report_error(self.line_number, offset, text, check)
-                if text[:4] == 'E101':
-                    self.indent_char = line[0]
-
-    def build_tokens_line(self):
-        """Build a logical line from tokens."""
-        logical = []
-        comments = []
-        length = 0
-        prev_row = prev_col = mapping = None
-        for token_type, text, start, end, line in self.tokens:
-            if token_type in SKIP_TOKENS:
-                continue
-            if not mapping:
-                mapping = [(0, start)]
-            if token_type == tokenize.COMMENT:
-                comments.append(text)
-                continue
-            if token_type == tokenize.STRING:
-                text = mute_string(text)
-            if prev_row:
-                (start_row, start_col) = start
-                if prev_row != start_row:    # different row
-                    prev_text = self.lines[prev_row - 1][prev_col - 1]
-                    if prev_text == ',' or (prev_text not in '{[(' and
-                                            text not in '}])'):
-                        text = ' ' + text
-                elif prev_col != start_col:  # different column
-                    text = line[prev_col:start_col] + text
-            logical.append(text)
-            length += len(text)
-            mapping.append((length, end))
-            (prev_row, prev_col) = end
-        self.logical_line = ''.join(logical)
-        self.noqa = comments and noqa(''.join(comments))
-        return mapping
-
-    def check_logical(self):
-        """Build a line from tokens and run all logical checks on it."""
-        self.report.increment_logical_line()
-        mapping = self.build_tokens_line()
-        if not mapping:
-            return
-
-        mapping_offsets = [offset for offset, _ in mapping]
-        (start_row, start_col) = mapping[0][1]
-        start_line = self.lines[start_row - 1]
-        self.indent_level = expand_indent(start_line[:start_col])
-        if self.blank_before < self.blank_lines:
-            self.blank_before = self.blank_lines
-        if self.verbose >= 2:
-            print(self.logical_line[:80].rstrip())
-        for name, check, argument_names in self._logical_checks:
-            if self.verbose >= 4:
-                print('   ' + name)
-            self.init_checker_state(name, argument_names)
-            for offset, text in self.run_check(check, argument_names) or ():
-                if not isinstance(offset, tuple):
-                    # As mappings are ordered, bisecting is a fast way
-                    # to find a given offset in them.
-                    token_offset, pos = mapping[bisect.bisect_left(
-                        mapping_offsets, offset)]
-                    offset = (pos[0], pos[1] + offset - token_offset)
-                self.report_error(offset[0], offset[1], text, check)
-        if self.logical_line:
-            self.previous_indent_level = self.indent_level
-            self.previous_logical = self.logical_line
-            if not self.indent_level:
-                self.previous_unindented_logical_line = self.logical_line
-        self.blank_lines = 0
-        self.tokens = []
-
-    def check_ast(self):
-        """Build the file's AST and run all AST checks."""
-        try:
-            tree = compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST)
-        except (ValueError, SyntaxError, TypeError):
-            return self.report_invalid_syntax()
-        for name, cls, __ in self._ast_checks:
-            checker = cls(tree, self.filename)
-            for lineno, offset, text, check in checker.run():
-                if not self.lines or not noqa(self.lines[lineno - 1]):
-                    self.report_error(lineno, offset, text, check)
-
-    def generate_tokens(self):
-        """Tokenize file, run physical line checks and yield tokens."""
-        if self._io_error:
-            self.report_error(1, 0, 'E902 %s' % self._io_error, readlines)
-        tokengen = tokenize.generate_tokens(self.readline)
-        try:
-            for token in tokengen:
-                if token[2][0] > self.total_lines:
-                    return
-                self.noqa = token[4] and noqa(token[4])
-                self.maybe_check_physical(token)
-                yield token
-        except (SyntaxError, tokenize.TokenError):
-            self.report_invalid_syntax()
-
-    def maybe_check_physical(self, token):
-        """If appropriate for token, check current physical line(s)."""
-        # Called after every token, but act only on end of line.
-        if _is_eol_token(token):
-            # Obviously, a newline token ends a single physical line.
-            self.check_physical(token[4])
-        elif token[0] == tokenize.STRING and '\n' in token[1]:
-            # Less obviously, a string that contains newlines is a
-            # multiline string, either triple-quoted or with internal
-            # newlines backslash-escaped. Check every physical line in
-            # the string *except* for the last one: its newline is
-            # outside of the multiline string, so we consider it a
-            # regular physical line, and will check it like any other
-            # physical line.
-            #
-            # Subtleties:
-            # - we don't *completely* ignore the last line; if it
-            #   contains the magical "# noqa" comment, we disable all
-            #   physical checks for the entire multiline string
-            # - have to wind self.line_number back because initially it
-            #   points to the last line of the string, and we want
-            #   check_physical() to give accurate feedback
-            if noqa(token[4]):
-                return
-            self.multiline = True
-            self.line_number = token[2][0]
-            _, src, (_, offset), _, _ = token
-            src = self.lines[self.line_number - 1][:offset] + src
-            for line in src.split('\n')[:-1]:
-                self.check_physical(line + '\n')
-                self.line_number += 1
-            self.multiline = False
-
-    def check_all(self, expected=None, line_offset=0):
-        """Run all checks on the input file."""
-        self.report.init_file(self.filename, self.lines, expected, line_offset)
-        self.total_lines = len(self.lines)
-        if self._ast_checks:
-            self.check_ast()
-        self.line_number = 0
-        self.indent_char = None
-        self.indent_level = self.previous_indent_level = 0
-        self.previous_logical = ''
-        self.previous_unindented_logical_line = ''
-        self.tokens = []
-        self.blank_lines = self.blank_before = 0
-        parens = 0
-        for token in self.generate_tokens():
-            self.tokens.append(token)
-            token_type, text = token[0:2]
-            if self.verbose >= 3:
-                if token[2][0] == token[3][0]:
-                    pos = '[%s:%s]' % (token[2][1] or '', token[3][1])
-                else:
-                    pos = 'l.%s' % token[3][0]
-                print('l.%s\t%s\t%s\t%r' %
-                      (token[2][0], pos, tokenize.tok_name[token[0]], text))
-            if token_type == tokenize.OP:
-                if text in '([{':
-                    parens += 1
-                elif text in '}])':
-                    parens -= 1
-            elif not parens:
-                if token_type in NEWLINE:
-                    if token_type == tokenize.NEWLINE:
-                        self.check_logical()
-                        self.blank_before = 0
-                    elif len(self.tokens) == 1:
-                        # The physical line contains only this token.
-                        self.blank_lines += 1
-                        del self.tokens[0]
-                    else:
-                        self.check_logical()
-        if self.tokens:
-            self.check_physical(self.lines[-1])
-            self.check_logical()
-        return self.report.get_file_results()
-
-
-class BaseReport(object):
-    """Collect the results of the checks."""
-
-    print_filename = False
-
-    def __init__(self, options):
-        self._benchmark_keys = options.benchmark_keys
-        self._ignore_code = options.ignore_code
-        # Results
-        self.elapsed = 0
-        self.total_errors = 0
-        self.counters = dict.fromkeys(self._benchmark_keys, 0)
-        self.messages = {}
-
-    def start(self):
-        """Start the timer."""
-        self._start_time = time.time()
-
-    def stop(self):
-        """Stop the timer."""
-        self.elapsed = time.time() - self._start_time
-
-    def init_file(self, filename, lines, expected, line_offset):
-        """Signal a new file."""
-        self.filename = filename
-        self.lines = lines
-        self.expected = expected or ()
-        self.line_offset = line_offset
-        self.file_errors = 0
-        self.counters['files'] += 1
-        self.counters['physical lines'] += len(lines)
-
-    def increment_logical_line(self):
-        """Signal a new logical line."""
-        self.counters['logical lines'] += 1
-
-    def error(self, line_number, offset, text, check):
-        """Report an error, according to options."""
-        code = text[:4]
-        if self._ignore_code(code):
-            return
-        if code in self.counters:
-            self.counters[code] += 1
-        else:
-            self.counters[code] = 1
-            self.messages[code] = text[5:]
-        # Don't care about expected errors or warnings
-        if code in self.expected:
-            return
-        if self.print_filename and not self.file_errors:
-            print(self.filename)
-        self.file_errors += 1
-        self.total_errors += 1
-        return code
-
-    def get_file_results(self):
-        """Return the count of errors and warnings for this file."""
-        return self.file_errors
-
-    def get_count(self, prefix=''):
-        """Return the total count of errors and warnings."""
-        return sum(self.counters[key]
-                   for key in self.messages if key.startswith(prefix))
-
-    def get_statistics(self, prefix=''):
-        """Get statistics for message codes that start with the prefix.
-
-        prefix='' matches all errors and warnings
-        prefix='E' matches all errors
-        prefix='W' matches all warnings
-        prefix='E4' matches all errors that have to do with imports
-        """
-        return ['%-7s %s %s' % (self.counters[key], key, self.messages[key])
-                for key in sorted(self.messages) if key.startswith(prefix)]
-
-    def print_statistics(self, prefix=''):
-        """Print overall statistics (number of errors and warnings)."""
-        for line in self.get_statistics(prefix):
-            print(line)
-
-    def print_benchmark(self):
-        """Print benchmark numbers."""
-        print('%-7.2f %s' % (self.elapsed, 'seconds elapsed'))
-        if self.elapsed:
-            for key in self._benchmark_keys:
-                print('%-7d %s per second (%d total)' %
-                      (self.counters[key] / self.elapsed, key,
-                       self.counters[key]))
-
-
-class FileReport(BaseReport):
-    """Collect the results of the checks and print the filenames."""
-
-    print_filename = True
-
-
-class StandardReport(BaseReport):
-    """Collect and print the results of the checks."""
-
-    def __init__(self, options):
-        super(StandardReport, self).__init__(options)
-        self._fmt = REPORT_FORMAT.get(options.format.lower(),
-                                      options.format)
-        self._repeat = options.repeat
-        self._show_source = options.show_source
-        self._show_pep8 = options.show_pep8
-
-    def init_file(self, filename, lines, expected, line_offset):
-        """Signal a new file."""
-        self._deferred_print = []
-        return super(StandardReport, self).init_file(
-            filename, lines, expected, line_offset)
-
-    def error(self, line_number, offset, text, check):
-        """Report an error, according to options."""
-        code = super(StandardReport, self).error(line_number, offset,
-                                                 text, check)
-        if code and (self.counters[code] == 1 or self._repeat):
-            self._deferred_print.append(
-                (line_number, offset, code, text[5:], check.__doc__))
-        return code
-
-    def get_file_results(self):
-        """Print results and return the overall count for this file."""
-        self._deferred_print.sort()
-        for line_number, offset, code, text, doc in self._deferred_print:
-            print(self._fmt % {
-                'path': self.filename,
-                'row': self.line_offset + line_number, 'col': offset + 1,
-                'code': code, 'text': text,
-            })
-            if self._show_source:
-                if line_number > len(self.lines):
-                    line = ''
-                else:
-                    line = self.lines[line_number - 1]
-                print(line.rstrip())
-                print(re.sub(r'\S', ' ', line[:offset]) + '^')
-            if self._show_pep8 and doc:
-                print('    ' + doc.strip())
-
-            # stdout is block buffered when not stdout.isatty().
-            # line can be broken where buffer boundary since other
-            # processes write to same file.
-            # flush() after print() to avoid buffer boundary.
-            # Typical buffer size is 8192. line written safely when
-            # len(line) < 8192.
-            sys.stdout.flush()
-        return self.file_errors
-
-
-class DiffReport(StandardReport):
-    """Collect and print the results for the changed lines only."""
-
-    def __init__(self, options):
-        super(DiffReport, self).__init__(options)
-        self._selected = options.selected_lines
-
-    def error(self, line_number, offset, text, check):
-        if line_number not in self._selected[self.filename]:
-            return
-        return super(DiffReport, self).error(line_number, offset, text, check)
-
-
-class StyleGuide(object):
-    """Initialize a PEP-8 instance with few options."""
-
-    def __init__(self, *args, **kwargs):
-        # build options from the command line
-        self.checker_class = kwargs.pop('checker_class', Checker)
-        parse_argv = kwargs.pop('parse_argv', False)
-        config_file = kwargs.pop('config_file', False)
-        parser = kwargs.pop('parser', None)
-        # build options from dict
-        options_dict = dict(*args, **kwargs)
-        arglist = None if parse_argv else options_dict.get('paths', None)
-        verbose = options_dict.get('verbose', None)
-        options, self.paths = process_options(
-            arglist, parse_argv, config_file, parser, verbose)
-        if options_dict:
-            options.__dict__.update(options_dict)
-            if 'paths' in options_dict:
-                self.paths = options_dict['paths']
-
-        self.runner = self.input_file
-        self.options = options
-
-        if not options.reporter:
-            options.reporter = BaseReport if options.quiet else StandardReport
-
-        options.select = tuple(options.select or ())
-        if not (options.select or options.ignore or
-                options.testsuite or options.doctest) and DEFAULT_IGNORE:
-            # The default choice: ignore controversial checks
-            options.ignore = tuple(DEFAULT_IGNORE.split(','))
-        else:
-            # Ignore all checks which are not explicitly selected
-            options.ignore = ('',) if options.select else tuple(options.ignore)
-        options.benchmark_keys = BENCHMARK_KEYS[:]
-        options.ignore_code = self.ignore_code
-        options.physical_checks = self.get_checks('physical_line')
-        options.logical_checks = self.get_checks('logical_line')
-        options.ast_checks = self.get_checks('tree')
-        self.init_report()
-
-    def init_report(self, reporter=None):
-        """Initialize the report instance."""
-        self.options.report = (reporter or self.options.reporter)(self.options)
-        return self.options.report
-
-    def check_files(self, paths=None):
-        """Run all checks on the paths."""
-        if paths is None:
-            paths = self.paths
-        report = self.options.report
-        runner = self.runner
-        report.start()
-        try:
-            for path in paths:
-                if os.path.isdir(path):
-                    self.input_dir(path)
-                elif not self.excluded(path):
-                    runner(path)
-        except KeyboardInterrupt:
-            print('... stopped')
-        report.stop()
-        return report
-
-    def input_file(self, filename, lines=None, expected=None, line_offset=0):
-        """Run all checks on a Python source file."""
-        if self.options.verbose:
-            print('checking %s' % filename)
-        fchecker = self.checker_class(
-            filename, lines=lines, options=self.options)
-        return fchecker.check_all(expected=expected, line_offset=line_offset)
-
-    def input_dir(self, dirname):
-        """Check all files in this directory and all subdirectories."""
-        dirname = dirname.rstrip('/')
-        if self.excluded(dirname):
-            return 0
-        counters = self.options.report.counters
-        verbose = self.options.verbose
-        filepatterns = self.options.filename
-        runner = self.runner
-        for root, dirs, files in os.walk(dirname):
-            if verbose:
-                print('directory ' + root)
-            counters['directories'] += 1
-            for subdir in sorted(dirs):
-                if self.excluded(subdir, root):
-                    dirs.remove(subdir)
-            for filename in sorted(files):
-                # contain a pattern that matches?
-                if ((filename_match(filename, filepatterns) and
-                     not self.excluded(filename, root))):
-                    runner(os.path.join(root, filename))
-
-    def excluded(self, filename, parent=None):
-        """Check if the file should be excluded.
-
-        Check if 'options.exclude' contains a pattern matching filename.
-        """
-        if not self.options.exclude:
-            return False
-        basename = os.path.basename(filename)
-        if filename_match(basename, self.options.exclude):
-            return True
-        if parent:
-            filename = os.path.join(parent, filename)
-        filename = os.path.abspath(filename)
-        return filename_match(filename, self.options.exclude)
-
-    def ignore_code(self, code):
-        """Check if the error code should be ignored.
-
-        If 'options.select' contains a prefix of the error code,
-        return False.  Else, if 'options.ignore' contains a prefix of
-        the error code, return True.
-        """
-        if len(code) < 4 and any(s.startswith(code)
-                                 for s in self.options.select):
-            return False
-        return (code.startswith(self.options.ignore) and
-                not code.startswith(self.options.select))
-
-    def get_checks(self, argument_name):
-        """Get all the checks for this category.
-
-        Find all globally visible functions where the first argument
-        name starts with argument_name and which contain selected tests.
-        """
-        checks = []
-        for check, attrs in _checks[argument_name].items():
-            (codes, args) = attrs
-            if any(not (code and self.ignore_code(code)) for code in codes):
-                checks.append((check.__name__, check, args))
-        return sorted(checks)
-
-
-def get_parser(prog='pycodestyle', version=__version__):
-    """Create the parser for the program."""
-    parser = OptionParser(prog=prog, version=version,
-                          usage="%prog [options] input ...")
-    parser.config_options = [
-        'exclude', 'filename', 'select', 'ignore', 'max-line-length',
-        'max-doc-length', 'hang-closing', 'count', 'format', 'quiet',
-        'show-pep8', 'show-source', 'statistics', 'verbose']
-    parser.add_option('-v', '--verbose', default=0, action='count',
-                      help="print status messages, or debug with -vv")
-    parser.add_option('-q', '--quiet', default=0, action='count',
-                      help="report only file names, or nothing with -qq")
-    parser.add_option('-r', '--repeat', default=True, action='store_true',
-                      help="(obsolete) show all occurrences of the same error")
-    parser.add_option('--first', action='store_false', dest='repeat',
-                      help="show first occurrence of each error")
-    parser.add_option('--exclude', metavar='patterns', default=DEFAULT_EXCLUDE,
-                      help="exclude files or directories which match these "
-                           "comma separated patterns (default: %default)")
-    parser.add_option('--filename', metavar='patterns', default='*.py',
-                      help="when parsing directories, only check filenames "
-                           "matching these comma separated patterns "
-                           "(default: %default)")
-    parser.add_option('--select', metavar='errors', default='',
-                      help="select errors and warnings (e.g. E,W6)")
-    parser.add_option('--ignore', metavar='errors', default='',
-                      help="skip errors and warnings (e.g. E4,W) "
-                           "(default: %s)" % DEFAULT_IGNORE)
-    parser.add_option('--show-source', action='store_true',
-                      help="show source code for each error")
-    parser.add_option('--show-pep8', action='store_true',
-                      help="show text of PEP 8 for each error "
-                           "(implies --first)")
-    parser.add_option('--statistics', action='store_true',
-                      help="count errors and warnings")
-    parser.add_option('--count', action='store_true',
-                      help="print total number of errors and warnings "
-                           "to standard error and set exit code to 1 if "
-                           "total is not null")
-    parser.add_option('--max-line-length', type='int', metavar='n',
-                      default=MAX_LINE_LENGTH,
-                      help="set maximum allowed line length "
-                           "(default: %default)")
-    parser.add_option('--max-doc-length', type='int', metavar='n',
-                      default=None,
-                      help="set maximum allowed doc line length and perform "
-                           "these checks (unchecked if not set)")
-    parser.add_option('--hang-closing', action='store_true',
-                      help="hang closing bracket instead of matching "
-                           "indentation of opening bracket's line")
-    parser.add_option('--format', metavar='format', default='default',
-                      help="set the error format [default|pylint|<custom>]")
-    parser.add_option('--diff', action='store_true',
-                      help="report changes only within line number ranges in "
-                           "the unified diff received on STDIN")
-    group = parser.add_option_group("Testing Options")
-    if os.path.exists(TESTSUITE_PATH):
-        group.add_option('--testsuite', metavar='dir',
-                         help="run regression tests from dir")
-        group.add_option('--doctest', action='store_true',
-                         help="run doctest on myself")
-    group.add_option('--benchmark', action='store_true',
-                     help="measure processing speed")
-    return parser
-
-
-def read_config(options, args, arglist, parser):
-    """Read and parse configurations.
-
-    If a config file is specified on the command line with the
-    "--config" option, then only it is used for configuration.
-
-    Otherwise, the user configuration (~/.config/pycodestyle) and any
-    local configurations in the current directory or above will be
-    merged together (in that order) using the read method of
-    ConfigParser.
-    """
-    config = RawConfigParser()
-
-    cli_conf = options.config
-
-    local_dir = os.curdir
-
-    if USER_CONFIG and os.path.isfile(USER_CONFIG):
-        if options.verbose:
-            print('user configuration: %s' % USER_CONFIG)
-        config.read(USER_CONFIG)
-
-    parent = tail = args and os.path.abspath(os.path.commonprefix(args))
-    while tail:
-        if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG):
-            local_dir = parent
-            if options.verbose:
-                print('local configuration: in %s' % parent)
-            break
-        (parent, tail) = os.path.split(parent)
-
-    if cli_conf and os.path.isfile(cli_conf):
-        if options.verbose:
-            print('cli configuration: %s' % cli_conf)
-        config.read(cli_conf)
-
-    pycodestyle_section = None
-    if config.has_section(parser.prog):
-        pycodestyle_section = parser.prog
-    elif config.has_section('pep8'):
-        pycodestyle_section = 'pep8'  # Deprecated
-        warnings.warn('[pep8] section is deprecated. Use [pycodestyle].')
-
-    if pycodestyle_section:
-        option_list = {o.dest: o.type or o.action for o in parser.option_list}
-
-        # First, read the default values
-        (new_options, __) = parser.parse_args([])
-
-        # Second, parse the configuration
-        for opt in config.options(pycodestyle_section):
-            if opt.replace('_', '-') not in parser.config_options:
-                print("  unknown option '%s' ignored" % opt)
-                continue
-            if options.verbose > 1:
-                print("  %s = %s" % (opt,
-                                     config.get(pycodestyle_section, opt)))
-            normalized_opt = opt.replace('-', '_')
-            opt_type = option_list[normalized_opt]
-            if opt_type in ('int', 'count'):
-                value = config.getint(pycodestyle_section, opt)
-            elif opt_type in ('store_true', 'store_false'):
-                value = config.getboolean(pycodestyle_section, opt)
-            else:
-                value = config.get(pycodestyle_section, opt)
-                if normalized_opt == 'exclude':
-                    value = normalize_paths(value, local_dir)
-            setattr(new_options, normalized_opt, value)
-
-        # Third, overwrite with the command-line options
-        (options, __) = parser.parse_args(arglist, values=new_options)
-    options.doctest = options.testsuite = False
-    return options
-
-
-def process_options(arglist=None, parse_argv=False, config_file=None,
-                    parser=None, verbose=None):
-    """Process options passed either via arglist or command line args.
-
-    Passing in the ``config_file`` parameter allows other tools, such as
-    flake8 to specify their own options to be processed in pycodestyle.
-    """
-    if not parser:
-        parser = get_parser()
-    if not parser.has_option('--config'):
-        group = parser.add_option_group("Configuration", description=(
-            "The project options are read from the [%s] section of the "
-            "tox.ini file or the setup.cfg file located in any parent folder "
-            "of the path(s) being processed.  Allowed options are: %s." %
-            (parser.prog, ', '.join(parser.config_options))))
-        group.add_option('--config', metavar='path', default=config_file,
-                         help="user config file location")
-    # Don't read the command line if the module is used as a library.
-    if not arglist and not parse_argv:
-        arglist = []
-    # If parse_argv is True and arglist is None, arguments are
-    # parsed from the command line (sys.argv)
-    (options, args) = parser.parse_args(arglist)
-    options.reporter = None
-
-    # If explicitly specified verbosity, override any `-v` CLI flag
-    if verbose is not None:
-        options.verbose = verbose
-
-    if options.ensure_value('testsuite', False):
-        args.append(options.testsuite)
-    elif not options.ensure_value('doctest', False):
-        if parse_argv and not args:
-            if options.diff or any(os.path.exists(name)
-                                   for name in PROJECT_CONFIG):
-                args = ['.']
-            else:
-                parser.error('input not specified')
-        options = read_config(options, args, arglist, parser)
-        options.reporter = parse_argv and options.quiet == 1 and FileReport
-
-    options.filename = _parse_multi_options(options.filename)
-    options.exclude = normalize_paths(options.exclude)
-    options.select = _parse_multi_options(options.select)
-    options.ignore = _parse_multi_options(options.ignore)
-
-    if options.diff:
-        options.reporter = DiffReport
-        stdin = stdin_get_value()
-        options.selected_lines = parse_udiff(stdin, options.filename, args[0])
-        args = sorted(options.selected_lines)
-
-    return options, args
-
-
-def _parse_multi_options(options, split_token=','):
-    r"""Split and strip and discard empties.
-
-    Turns the following:
-
-    A,
-    B,
-
-    into ["A", "B"]
-    """
-    if options:
-        return [o.strip() for o in options.split(split_token) if o.strip()]
-    else:
-        return options
-
-
-def _main():
-    """Parse options and run checks on Python source."""
-    import signal
-
-    # Handle "Broken pipe" gracefully
-    try:
-        signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
-    except AttributeError:
-        pass    # not supported on Windows
-
-    style_guide = StyleGuide(parse_argv=True)
-    options = style_guide.options
-
-    if options.doctest or options.testsuite:
-        from testsuite.support import run_tests
-        report = run_tests(style_guide)
-    else:
-        report = style_guide.check_files()
-
-    if options.statistics:
-        report.print_statistics()
-
-    if options.benchmark:
-        report.print_benchmark()
-
-    if options.testsuite and not options.quiet:
-        report.print_results()
-
-    if report.total_errors:
-        if options.count:
-            sys.stderr.write(str(report.total_errors) + '\n')
-        sys.exit(1)
-
-
-if __name__ == '__main__':
-    _main()
diff --git a/Tools/PyUtils/python/AthFile/__init__.py b/Tools/PyUtils/python/AthFile/__init__.py
index ffef68271ac0..37ef8f1f5686 100644
--- a/Tools/PyUtils/python/AthFile/__init__.py
+++ b/Tools/PyUtils/python/AthFile/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils/python/AthFile/__init__.py
 # @purpose a simple abstraction of a file to retrieve informations out of it
@@ -7,14 +7,8 @@
 from __future__ import with_statement, print_function
 
 __doc__ = "a simple abstraction of a file to retrieve informations out of it"
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
-### imports -------------------------------------------------------------------
-import os
-import imp
-import hashlib
-
 __all__        = []
 __pseudo_all__ = [
     'AthFile',
diff --git a/Tools/PyUtils/python/AthFile/impl.py b/Tools/PyUtils/python/AthFile/impl.py
index 708af7184283..8f48be83dc92 100644
--- a/Tools/PyUtils/python/AthFile/impl.py
+++ b/Tools/PyUtils/python/AthFile/impl.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils/python/AthFile/impl.py
 # @purpose a simple abstraction of a file to retrieve informations out of it
@@ -7,18 +7,14 @@
 
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision: 723532 $"
 __author__  = "Sebastien Binet"
 __doc__ = "implementation of AthFile-server behind a set of proxies to isolate environments"
 
 import errno
 import os
-import subprocess
-import sys
 import six
 
 import PyUtils.Helpers as H
-from PyUtils.Helpers    import ShutUp
 from .timerdecorator import timelimit, TimeoutError
 
 # see bug #95942 for the excruciating details
@@ -26,7 +22,7 @@ try:
     from AthenaCommon.Include import excludeTracePattern
     excludeTracePattern.append("*cache.ascii.gz")
     del excludeTracePattern
-except:
+except Exception:
     pass
 
 ### globals -------------------------------------------------------------------
@@ -45,9 +41,9 @@ DEFAULT_AF_TIMEOUT = 20
 # to prevent interoperability problems if we then read with python3.
 def _clean_dict (d):
     for k, v in d.items():
-        if type(v) == type({}):
+        if isinstance(v, dict):
             _clean_dict(v)
-        elif type(v) == type([]):
+        elif isinstance(v, list):
             _clean_list(v)
         elif type(v) in six.integer_types:
             d[k] = int(v)
@@ -55,9 +51,9 @@ def _clean_dict (d):
 def _clean_list (l):
     for i in range(len(l)):
         v = l[i]
-        if type(v) == type({}):
+        if isinstance(v, dict):
             _clean_dict(v)
-        elif type(v) == type([]):
+        elif isinstance(v, list):
             _clean_list(v)
         elif type(v) in six.integer_types:
             l[i] = int(v)
@@ -90,16 +86,14 @@ def _my_open(name, mode='r', bufsiz=-1):
     
 def _find_file(filename, pathlist, access):
     """Find <filename> with rights <access> through <pathlist>."""
-    import os
-    import os.path as osp
     # special case for those filenames that already contain a path
-    if osp.dirname(filename):
+    if os.path.dirname(filename):
         if os.access(filename, access):
             return filename
 
     # test the file name in all possible paths until first found
     for path in pathlist:
-        f = osp.join(path, filename)
+        f = os.path.join(path, filename)
         if os.access(f, access):
             return f
 
@@ -449,7 +443,7 @@ class AthFileServer(object):
 
     def pfopen(self, fnames, evtmax=1):
         if isinstance(fnames, (list, tuple)):
-            self.msg().debug("using mp.pool... (files=%s)" % len(fnames))
+            self.msg().debug("using mp.pool... (files=%s)", len(fnames))
             fct = _do_fopen
             do_pers_cache = self._do_pers_cache
             self.disable_pers_cache()
@@ -593,8 +587,7 @@ class AthFileServer(object):
     def fname(self, fname):
         """take a file name, return the pair (protocol, 'real' file name)
         """
-        import os.path as osp
-        fname = osp.expanduser(osp.expandvars(fname))
+        fname = os.path.expanduser(os.path.expandvars(fname))
 
         msg = self.msg()
         
@@ -607,7 +600,6 @@ class AthFileServer(object):
         url = urlsplit(_normalize_uri(fname))
         protocol = url.scheme
         def _normalize(fname):
-            import os.path as osp
             from posixpath import normpath
             fname = normpath(fname)
             if fname.startswith('//'): fname = fname[1:]
@@ -667,7 +659,6 @@ class AthFileServer(object):
         msg = self.msg()
         self._do_pers_cache = True
         
-        import os
         fname = DEFAULT_AF_CACHE_FNAME
         if (fname and
             os.path.exists(fname) and
@@ -692,7 +683,6 @@ class AthFileServer(object):
         if not self._do_pers_cache:
             return
         msg = self.msg()
-        import os
         fname = DEFAULT_AF_CACHE_FNAME
         if not fname:
             # protect against empty or invalid (None) cache file names
@@ -729,11 +719,9 @@ class AthFileServer(object):
         extension of the `fname` parameter.
         defaults to py-ASCII.
         """
-        import os
-        import os.path as osp
         msg = self.msg()
 
-        ext = _get_real_ext(osp.basename(fname))
+        ext = _get_real_ext(os.path.basename(fname))
         if len(ext) == 0:
             # illegal file...
             msg.info('load_cache: invalid file [%s]', fname)
@@ -750,7 +738,7 @@ class AthFileServer(object):
         try:
             search_path = os.environ.get('DATAPATH',os.getcwd())
             search_path = search_path.split(os.pathsep)
-            fname = _find_file(osp.expanduser(osp.expandvars(fname)),
+            fname = _find_file(os.path.expanduser(os.path.expandvars(fname)),
                              search_path,
                              os.R_OK) or fname
         except ImportError:
@@ -758,7 +746,7 @@ class AthFileServer(object):
             pass
 
         # ensure one can read that file...
-        with open(fname, 'r') as file_handle:
+        with open(fname, 'r'):
             pass
 
         msg.debug('loading cache from [%s]...', fname)
@@ -780,7 +768,6 @@ class AthFileServer(object):
         falls back to py-ASCII.
         """
         msg = self.msg()
-        import os
         if os.path.exists(fname):
             os.rename(fname, fname+'.bak')
         ext = _get_real_ext(fname)
@@ -847,7 +834,7 @@ class AthFileServer(object):
         del ast
         try:
             cache = dct['fileinfos']
-        except Exception as err:
+        except Exception:
             raise
         finally:
             del dct
@@ -919,9 +906,6 @@ class AthFileServer(object):
         >>> af.ftype ('rfio:/castor/cern.ch/bs.data')
         ('bs', 'rfio:/castor/cern.ch/bs.data')
         """
-        msg = self.msg()
-        import os
-        import os.path as osp
 
         _is_root_file = None
         do_close = True
@@ -939,7 +923,6 @@ class AthFileServer(object):
                 ami_infos = self.fopen(fname).infos
                 return ami_infos['file_type'], fname
 
-            root = self.pyroot
             f = self._root_open(fname)
         else:
             do_close = False
@@ -972,9 +955,6 @@ class AthFileServer(object):
         >>> af.exists('/afs/cern.ch/atlas/offline/ReleaseData/v2/testfile/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00016_extract_10evt.pool.root')
         True
         """
-        import os
-
-        msg = self.msg()
 
         def _root_exists(fname):
             exists = False
@@ -999,7 +979,7 @@ class AthFileServer(object):
         elif protocol in ('ami',):
             # FIXME: what else can we do ?
             try:
-                infos = ami_dsinfos(fname)
+                ami_dsinfos(fname)
                 return True
             except Exception:
                 return False
@@ -1042,8 +1022,6 @@ class FilePeeker(object):
         nentries = 0
         runs=[]
         evts=[]
-        import PyUtils.Helpers as H
-        root = self.pyroot
         do_close = True
         if isinstance(fname, str):
             f = self._root_open(fname, raw=False)
@@ -1064,7 +1042,7 @@ class FilePeeker(object):
         del schema
         metadata= f.Get('CollectionMetadata') if f else None
         if metadata:
-            nbytes = metadata.GetEntry(0)
+            metadata.GetEntry(0)
             # note: we used to use .rstrip('\0') b/c of the change in
             # semantics in PyROOT (char[] and const char* may not mean
             # the same thing)
@@ -1105,7 +1083,6 @@ class FilePeeker(object):
 
     def _is_empty_pool_file(self, fname):
         is_empty = False
-        root = self.pyroot
         do_close = True
         if isinstance(fname, str):
             f = self._root_open(fname, raw=False)
@@ -1125,7 +1102,6 @@ class FilePeeker(object):
         return is_empty
      
     def _process_call(self, fname, evtmax, projects=['AtlasCore']):
-        import os
         msg = self.msg()
         f = _create_file_infos()
         protocol, _ = self.server.fname(fname)
@@ -1138,7 +1114,6 @@ class FilePeeker(object):
         f_root = f_raw
         try:
             file_type, file_name = self.server.ftype(f_raw)
-            import os
 
             protocol,file_name = self.server.fname(fname)
             f['file_md5sum'] = self.server.md5sum(f_raw)
@@ -1168,7 +1143,6 @@ class FilePeeker(object):
                     else:
                         import tempfile
                         fd_pkl,out_pkl_fname = tempfile.mkstemp(suffix='.pkl')
-                        import os
                         os.close(fd_pkl)
                         if os.path.exists(out_pkl_fname):
                             os.remove(out_pkl_fname)
@@ -1204,7 +1178,6 @@ class FilePeeker(object):
                             'outfname': out_pkl_fname,
                             'evtmax': evtmax,
                             }
-                        import os
                         import uuid
                         stdout_fname = (
                             'athfile-%i-%s.log.txt' %
@@ -1240,7 +1213,6 @@ class FilePeeker(object):
                             db.close()
                             msg.info('extracting infos from [%s]... [ok]',
                                      out_pkl_fname)
-                            import os
                             os.remove(stdout.name)
                         else:
                             # maybe an empty file
@@ -1322,7 +1294,6 @@ class FilePeeker(object):
         bs = ef.istream(fname)
 
         file_infos = _create_file_infos()
-        infos = []; _append = infos.append
         nentries = bs.total_events
         file_infos['nentries'] = nentries
         import uuid
diff --git a/Tools/PyUtils/python/AthFile/tests.py b/Tools/PyUtils/python/AthFile/tests.py
index 08aef7a1d6d0..877baa1c5a38 100644
--- a/Tools/PyUtils/python/AthFile/tests.py
+++ b/Tools/PyUtils/python/AthFile/tests.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils/python/AthFile/tests.py
 # @purpose a simple abstraction of a file to retrieve informations out of it
@@ -473,7 +473,6 @@ def main(verbose=False):
     return result
 
 if __name__ == "__main__":
-    import sys
     print (__file__)
     sys.exit(main())
     
diff --git a/Tools/PyUtils/python/AthFileLite.py b/Tools/PyUtils/python/AthFileLite.py
index 6559b97919f9..5f76fceb26dd 100644
--- a/Tools/PyUtils/python/AthFileLite.py
+++ b/Tools/PyUtils/python/AthFileLite.py
@@ -14,7 +14,7 @@ import sys
 import uuid
 
 import PyUtils.dbsqlite as dbsqlite
-from PyUtils.Logging import msg, logging
+from PyUtils.Logging import msg
 
 def _create_file_info_template():
     """simple helper function to create consistent dicts for the
@@ -265,7 +265,7 @@ class AthBSFile(object):
             return
         
         if evtmax == -1:
-            evtmax = nentries
+            evtmax = bs.total_events
             
         ievt = iter(bs)
         for i in range(evtmax):
@@ -305,7 +305,6 @@ class AthTagFile(object):
         return self._metadata
 
     def _process_tag_file(self, evtmax=1):
-        tag_ref= None
         tag_guid=None
         nentries = 0
         runs=[]
@@ -318,7 +317,7 @@ class AthTagFile(object):
 
             metadata= f.Get('CollectionMetadata') if f else None
             if metadata:
-                nbytes = metadata.GetEntry(0)
+                metadata.GetEntry(0)
                 # note: we used to use .rstrip('\0') b/c of the change in
                 # semantics in PyROOT (char[] and const char* may not mean
                 # the same thing)
diff --git a/Tools/PyUtils/python/Decorators.py b/Tools/PyUtils/python/Decorators.py
index 8fb44a4ef2d6..42b5ef8b5eb9 100644
--- a/Tools/PyUtils/python/Decorators.py
+++ b/Tools/PyUtils/python/Decorators.py
@@ -8,7 +8,6 @@
 #
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 __all__ = [
@@ -18,9 +17,8 @@ __all__ = [
     ]
 
 import sys
-import os
 import itertools
-from decorator import *
+from decorator import decorator
 
 @decorator
 def memoize(func, *args):
@@ -181,7 +179,7 @@ class Async(object):
         def func_wrapper():
             try:
                 result = func(*args, **kw)
-            except:
+            except Exception:
                 func.on_failure(sys.exc_info())
             else:
                 return func.on_success(result)
diff --git a/Tools/PyUtils/python/Dso.py b/Tools/PyUtils/python/Dso.py
index 97ff75df8b74..c49308a967b0 100644
--- a/Tools/PyUtils/python/Dso.py
+++ b/Tools/PyUtils/python/Dso.py
@@ -8,10 +8,9 @@ from __future__ import print_function
 
 __author__  = "Sebastien Binet"
 
-__all__ = [
-    'DsoDb',
-    ]
+__all__ = ['DsoDb']
 
+import sys
 import os
 import re
 
@@ -70,12 +69,12 @@ _cpp_builtins = (
     'bool',
     )
 
-_is_stl_sequence = re.compile (r'std::(?P<ContType>.*?)'\
-                               r'<(?P<TemplateArg>.*?)'\
+_is_stl_sequence = re.compile (r'std::(?P<ContType>.*?)'
+                               r'<(?P<TemplateArg>.*?)'
                                r',\s*?std::allocator<\2> >')
-_is_stl_mapping = re.compile (r'std::map<'\
-                              r'(?P<TemplateArg1>.*?),\s*?'\
-                              r'(?P<TemplateArg2>.*?)'\
+_is_stl_mapping = re.compile (r'std::map<'
+                              r'(?P<TemplateArg1>.*?),\s*?'
+                              r'(?P<TemplateArg2>.*?)'
                               r',\s*?std::allocator<\2> >')
     
 
@@ -84,7 +83,6 @@ _is_stl_mapping = re.compile (r'std::map<'\
 ### helpers
 def _get_native_libname(libname):
     """ return the OS-native name from an OS-indenpendent one """
-    import sys
     plat = sys.platform
     if plat.count('linux')>0:
         lib_prefix,lib_suffix = 'lib', '.so'
@@ -122,8 +120,8 @@ def find_library(libname):
      >>> find_library('AthenaServices')
      '/afs/cern.ch/.../AtlasCore/[release]/InstallArea/.../libAthenaServices.so
     """
-    import os, sys
-    import ctypes.util as cu
+    import os
+    ## import ctypes.util as cu
     ## # ctypes.util.find_library does not return the path
     ## # to the library, just the basename of the so-name...
     ## lib = cu._findLib_ldconfig(libname) or cu._findLib_gcc(libname)
@@ -142,7 +140,6 @@ def find_library(libname):
     return
 
 
-import re
 def _is_rootcint_dict (libname):
     """helper function to reject rootcint libraries entries from rootmap
     files (which appeared w/ ROOT v21/22)
@@ -160,7 +157,7 @@ class CxxDsoDb(object):
     The repository of 'rootmap' files (location, content,...)
     """
     def __init__(self):
-        import cppyy
+        import cppyy  # noqa: F401
         # import root
         import PyUtils.RootUtils as ru
         ROOT = ru.import_root()
@@ -237,7 +234,6 @@ def _to_rootmap_name(typename):
         # rootmap files do not contain the default template arguments
         # for STL containers... consistency, again.
         _m = _is_stl_sequence.match(typename)
-        _cont_type = _m.group('ContType')
         _m_type = _m.group('TemplateArg')
         # handle the dreaded 'std::Bla<Foo<d> >
         _m_type = _to_rootmap_name(_m_type.strip())
@@ -324,7 +320,7 @@ class PyDsoDb( object ):
                 except Exception as err:
                     msg.warning("caught:\n%s", err)
             if dir_content is None:
-                msg.warning("could not run os.listdir on [%s]" % path)
+                msg.warning("could not run os.listdir on [%s]", path)
                 dir_content = []
             dsoFiles = [ f for f in dir_content
                          if f.endswith(self.RootMap) ]
@@ -362,8 +358,7 @@ class PyDsoDb( object ):
                             db = self.pf
                         else:
                             db = self.db
-                        if not db.has_key(dsoKey): db[dsoKey] = list()
-                        import re
+                        if dsoKey not in db: db[dsoKey] = list()
                         if _is_rootcint_dict (libName):
                             #print "## discarding [%s]..." % libName
                             continue
@@ -411,9 +406,9 @@ class PyDsoDb( object ):
                        self.pfDuplicates(pedantic) ]:
             for k in dupDb:
                 if k in caps:
-                    if not dups.has_key(k): dups[k] = []
+                    if k not in dups: dups[k] = []
                     dups[k] += [ lib for lib in dupDb[k]
-                                 if not libName in os.path.basename(lib) ]
+                                 if libName not in os.path.basename(lib) ]
         dups.keys().sort()
         for k in dups.keys():
             dups[k].sort()
diff --git a/Tools/PyUtils/python/FilePeekerTool.py b/Tools/PyUtils/python/FilePeekerTool.py
index 947381bb6f44..18b82f54c7e7 100644
--- a/Tools/PyUtils/python/FilePeekerTool.py
+++ b/Tools/PyUtils/python/FilePeekerTool.py
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__= "$Revision: 734431 $"
 __author__ = "Alexandre Vaniachine <vaniachine@anl.gov>"
 __doc__ = "peek into APR files to read in-file metadata"
 
@@ -64,9 +63,7 @@ class FilePeekerTool():
 
         from AthenaPython.FilePeekerLib import toiter
 
-        from PyCool import coral
-
-        nb = meta.GetEntry( 0 )
+        meta.GetEntry( 0 )
 
         esiName= 'Stream'
         esiTypeName = 'EventStreamInfo'
@@ -374,18 +371,18 @@ class FilePeekerTool():
             peeked_data['beam_energy']= [maybe_float(taginfo.get('beam_energy',
                                                                  'N/A'))]
 
-        if not 'evt_type' in peeked_data: # must be eventless MC file
+        if 'evt_type' not in peeked_data: # must be eventless MC file
             if '/Simulation/Parameters' in metadata:
                 peeked_data['evt_type'] = ['IS_SIMULATION', 'IS_ATLAS', 'IS_PHYSICS']
                 peeked_data['run_number'] = [metadata['/Simulation/Parameters'].get('RunNumber','')]
             else:
                 peeked_data['evt_type'] = []
 
-        if not 'geometry' in peeked_data:
+        if 'geometry' not in peeked_data:
             peeked_data['geometry'] = None
-        if not 'conditions_tag' in peeked_data:
+        if 'conditions_tag' not in peeked_data:
             peeked_data['conditions_tag'] = None
-        if not 'det_descr_tags' in peeked_data:
+        if 'det_descr_tags' not in peeked_data:
             peeked_data['det_descr_tags'] = {}
 
         ## -- summary
diff --git a/Tools/PyUtils/python/Helpers.py b/Tools/PyUtils/python/Helpers.py
index e65df31a6fb8..3bb6d39c358e 100644
--- a/Tools/PyUtils/python/Helpers.py
+++ b/Tools/PyUtils/python/Helpers.py
@@ -6,7 +6,6 @@
 #
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 import sys
@@ -17,7 +16,7 @@ from AthenaCommon.Logging import log
 
 # import xml before ROOT to prevent crashes (LCG_96): ATEAM-597
 # should be OK to remove from LCG_97 on
-import xml.etree.cElementTree
+import xml.etree.cElementTree  # noqa: F401
 
 def ROOT6Setup():
    log.info('executing ROOT6Setup')
@@ -32,8 +31,8 @@ def ROOT6Setup():
        if six.PY3 and level < 0: level = 0
        m = oldimporthook(name, globals, locals, fromlist, level)
        if m and (m.__name__== 'ROOT' or name[0:4]=='ROOT') \
-             and (name!='ROOT' or fromlist!=None): # prevent triggering on just 'import ROOT'; see ATEAM-597
-          log.debug('Python import module=%s  fromlist=%s'%(name, str(fromlist)))
+             and (name!='ROOT' or fromlist is not None): # prevent triggering on just 'import ROOT'; see ATEAM-597
+          log.debug('Python import module=%s  fromlist=%s', name, str(fromlist))
           if fromlist:
              #MN: in this case 'm' is the final nested module already, don't walk the full 'name'
              vars = [ '.'.join(['', fl, autoload_var_name]) for fl in fromlist]
@@ -45,7 +44,7 @@ def ROOT6Setup():
                 #MN: walk the module chain and try to touch 'autoload_var_name' to trigger ROOT autoloading of namespaces
                 for comp in v.split('.')[1:]:
                    mm = getattr(mm, comp)
-             except:
+             except Exception:
                 pass
        return m
    
diff --git a/Tools/PyUtils/python/MetaDiff.py b/Tools/PyUtils/python/MetaDiff.py
index 991567340685..a6766a3f3468 100644
--- a/Tools/PyUtils/python/MetaDiff.py
+++ b/Tools/PyUtils/python/MetaDiff.py
@@ -62,9 +62,9 @@ def print_diff_dict_keys(parent_key, obj1, obj2, diff_format):
     result = '\n'
 
     value1 = ', '.join(['{}: {}'.format(k, '{...}' if isinstance(v, dict) else v)
-            for k, v in sorted(obj1.items())]);
+                        for k, v in sorted(obj1.items())])
     value2 = ', '.join(['{}: {}'.format(k, '{...}' if isinstance(v, dict) else v)
-            for k, v in sorted(obj2.items())])
+                        for k, v in sorted(obj2.items())])
     
     if diff_format == 'simple':
         if obj1 is None:
diff --git a/Tools/PyUtils/python/MetaReaderPeeker.py b/Tools/PyUtils/python/MetaReaderPeeker.py
index 6a43f85f9e16..7da52e3c5df7 100644
--- a/Tools/PyUtils/python/MetaReaderPeeker.py
+++ b/Tools/PyUtils/python/MetaReaderPeeker.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python
-
-# info
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 __all__ = ['metadata', 'metadata_all_files', 'convert_itemList', 'convert_metadata_items']
 
@@ -9,7 +8,6 @@ metadata_all_files = {}
 
 
 def _setup():
-    
     from PyUtils.MetaReader import read_metadata
 
     from AthenaCommon.Logging import logging
diff --git a/Tools/PyUtils/python/MetaReaderPeekerFull.py b/Tools/PyUtils/python/MetaReaderPeekerFull.py
index 76942f1a5025..e629e2e346a7 100644
--- a/Tools/PyUtils/python/MetaReaderPeekerFull.py
+++ b/Tools/PyUtils/python/MetaReaderPeekerFull.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python
-
-# info
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 __all__ = ['metadata', 'metadata_all_files', 'convert_itemList', 'convert_metadata_items']
 
diff --git a/Tools/PyUtils/python/PoolFile.py b/Tools/PyUtils/python/PoolFile.py
index 999b22f84fd4..371e686ade1c 100644
--- a/Tools/PyUtils/python/PoolFile.py
+++ b/Tools/PyUtils/python/PoolFile.py
@@ -7,8 +7,6 @@
 from __future__ import with_statement, print_function
 import six
 
-
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 ### --- data ------------------------------------------------------------------
@@ -30,7 +28,6 @@ import sys
 import os
 import shelve
 
-import six
 if six.PY2:
     from whichdb import whichdb
 else:
@@ -83,7 +80,7 @@ class PoolFileCatalog(object):
         def _handle_apcfile_old(x):
             """ return $ATLAS_POOLCOND_PATH/poolcond/x
             """
-            if not 'ATLAS_POOLCOND_PATH' in os.environ:
+            if 'ATLAS_POOLCOND_PATH' not in os.environ:
                 return osp_exp(x)
             pcp = os.environ["ATLAS_POOLCOND_PATH"]
             if x.startswith("apcfile:"):
@@ -93,7 +90,7 @@ class PoolFileCatalog(object):
         def _handle_apcfile(x):
             """ return $ATLAS_POOLCOND_PATH/x
             """
-            if not 'ATLAS_POOLCOND_PATH' in os.environ:
+            if 'ATLAS_POOLCOND_PATH' not in os.environ:
                 return osp_exp(x)
             pcp = os.environ["ATLAS_POOLCOND_PATH"]
             if x.startswith("apcfile:"):
@@ -302,7 +299,6 @@ def extract_streams_from_tag (fname,
      ['aod.pool']
     """
     
-    import sys
     import PyUtils.RootUtils as ru
     ROOT = ru.import_root()
 
@@ -345,7 +341,7 @@ def extract_streams_from_tag (fname,
         _streams = stream_refs[:]
         stream_refs = []
         for ref in _streams:
-            if not ref in branches:
+            if ref not in branches:
                 print("::: discarding [%s] from file chasing..."%ref)
             else:
                 stream_refs.append (ref)
@@ -484,7 +480,7 @@ def extract_items(pool_file, verbose=True, items_type='eventdata'):
     """
     _allowed_values = ('eventdata',
                        'metadata',)
-    if not items_type in _allowed_values:
+    if items_type not in _allowed_values:
         err = "".join([
             "invalid argument for 'items_type'. ",
             "got: [%s] " % items_type,
@@ -557,23 +553,21 @@ class PoolFile(object):
         
         self.poolFile = None
         dbFileName = whichdb( fileName )
-        if not dbFileName in ( None, '' ):
-            if self.verbose==True:
+        if dbFileName not in ( None, '' ):
+            if self.verbose is True:
                 print("## opening file [%s]..." % str(fileName))
             db = shelve.open( fileName, 'r' )
-            if self.verbose==True:
+            if self.verbose is True:
                 print("## opening file [OK]")
             report = db['report']
             self._fileInfos = report['fileInfos']
             self.dataHeader = report['dataHeader']
             self.data       = report['data']
         else:
-            import PyUtils.Helpers as _H
-            projects = 'AtlasCore' if PoolOpts.FAST_MODE else None
-            if self.verbose==True:
+            if self.verbose is True:
                 print("## opening file [%s]..." % str(fileName))
             self.__openPoolFile( fileName )
-            if self.verbose==True:
+            if self.verbose is True:
                 print("## opening file [OK]")
             self.__processFile()
             
@@ -582,11 +576,11 @@ class PoolFile(object):
     def __openPoolFile(self, fileName):
         # hack to prevent ROOT from loading graphic libraries and hence bother
         # our fellow Mac users
-        if self.verbose==True:
+        if self.verbose is True:
             print("## importing ROOT...")
         import PyUtils.RootUtils as ru
         ROOT = ru.import_root()
-        if self.verbose==True:
+        if self.verbose is True:
             print("## importing ROOT... [DONE]")
         # prevent ROOT from being too verbose
         rootMsg = ShutUp()
@@ -606,7 +600,7 @@ class PoolFile(object):
 
         rootMsg.unMute()
 
-        if poolFile == None:
+        if poolFile is None:
             print("## Failed to open file [%s] !!" % fileName)
             msg = "Could not open file [%s]" % fileName
             raise IOError(msg)
@@ -725,7 +719,7 @@ class PoolFile(object):
 
     
     def checkFile(self, sorting = PoolRecord.Sorter.DiskSize):
-        if self.verbose==True:
+        if self.verbose is True:
             print(self.fileInfos())
 
         ## sorting data
@@ -747,7 +741,7 @@ class PoolFile(object):
                 return 0.
             return num/den   
                  
-        if self.verbose==True:
+        if self.verbose is True:
             print("")
             print("="*80)
             print(PoolOpts.HDR_FORMAT % ( "Mem Size", "Disk Size","Size/Evt",
@@ -770,7 +764,7 @@ class PoolFile(object):
             totMemSize  += 0. if PoolOpts.FAST_MODE else d.memSize
             totDiskSize += d.diskSize
             memSizeNoZip = d.memSizeNoZip/d.memSize if d.memSize != 0. else 0.
-            if self.verbose==True:
+            if self.verbose is True:
                 print(PoolOpts.ROW_FORMAT % (
                     _get_val (d.memSize),
                     d.diskSize,
@@ -780,7 +774,7 @@ class PoolFile(object):
                     "("+d.dirType+") "+d.name
                     ))
 
-        if self.verbose==True:
+        if self.verbose is True:
             print("="*80)
             print(PoolOpts.ROW_FORMAT % (
                 totMemSize,
@@ -797,8 +791,8 @@ class PoolFile(object):
         return
 
     def detailedDump(self, bufferName = sys.stdout.name ):
-        if self.poolFile == None or \
-           self.keys     == None:
+        if self.poolFile is None or \
+           self.keys is None:
             print("Can't perform a detailedDump with a shelve file as input !")
             return
                   
@@ -898,7 +892,6 @@ class PoolFile(object):
         args = {} if six.PY2 else {'newline' : ''}
         f = open (fileName, 'w', **args)
         o = csv.writer (f)
-        nentries = self.dataHeader.nEntries
         o.writerow (['file name', self._fileInfos['name']])
         o.writerow (['file size', self._fileInfos['size']])
         o.writerow (['nbr evts',  self.dataHeader.nEntries])
@@ -911,45 +904,6 @@ class PoolFile(object):
         f.close()
         return
 
-    def printBreakDown(self, categories=None):
-        """
-        Print out the sizes of containers broken-down by categories.
-        Categories is supposed to be a list of item-lists, an item list being
-        a list of pairs (class-name, storegate-key)
-        """
-
-        def parse( data, klass, key ):
-            import re
-            # pattern to match 'CppClassName_pX_MyKey'
-            # eg: EventInfo_p2_McEventInfo
-            #     TauDetailsContainer_tlp1
-            tp_pattern = re.compile(r'(?P<ClassName>.*?)_(?P<Vers>(tlp|p)[0-9])((?P<SgKey>_.*)|)')
-
-            hint_pattern = re.compile(
-                r'%s(_(tlp|p)[0-9]|)_%s' % ( klass, key )
-                )
-            return re.match( hint_pattern, data )
-            
-            className = None
-            sgKey     = None
-            pat = re.match(tp_pattern, data)
-            if pat:
-                className = pat.group("ClassName")
-                sgKey     = pat.group("SgKey")
-                if sgKey == str(None): sgKey = '*'
-                if len(sgKey)>0 and sgKey[0] == '_': sgKey = sgKey[1:]
-                return (className, sgKey)
-            else:
-                return (data,'')
-
-        for cat in categories:
-            for d in self.data:
-                item = parse( d.name, cat.className, cat.key )
-                #print (": [%s/%s]" % (className, sgKey), end='')
-            #for cat in categories:
-                
-        return
-
     def __del__(self):
         if self.poolFile and hasattr(self.poolFile, 'Close'):
             try:
@@ -988,7 +942,7 @@ class DiffFiles(object):
             print(sys.exc_info()[0])
             print(sys.exc_info()[1])
             raise(err)
-        except :
+        except Exception:
             print("## Caught something !! (don't know what)")
             print(sys.exc_info()[0])
             print(sys.exc_info()[1])
diff --git a/Tools/PyUtils/python/RootUtils.py b/Tools/PyUtils/python/RootUtils.py
index 7ff37474a3e0..8721cb3042a3 100644
--- a/Tools/PyUtils/python/RootUtils.py
+++ b/Tools/PyUtils/python/RootUtils.py
@@ -8,7 +8,6 @@
 from __future__ import with_statement, print_function
 
 __doc__ = "a few utils to ease the day-to-day work with ROOT"
-__version__ = "$Revision: 739816 $"
 __author__ = "Sebastien Binet"
 
 __all__ = [
@@ -18,10 +17,8 @@ __all__ = [
 
 ### imports -------------------------------------------------------------------
 import os
-import sys
 import re
 import six
-from pprint import pprint
 from array import array
 
 from .Decorators import memoize
@@ -47,7 +44,7 @@ def import_root(batch=True):
     ROOT.gROOT.SetBatch(batch)
     if batch:
         ROOT.PyConfig.IgnoreCommandLineOptions = True
-    import cppyy
+    import cppyy  # noqa: F401
     if os.environ.get('GLIBCXX_USE_CXX11_ABI') == '0':
         cmd = ROOT.gSystem.GetMakeSharedLib()
         if cmd.find('GLIBCXX_USE_CXX11_ABI') < 0:
@@ -145,7 +142,7 @@ def _pythonize_tfile():
         ]):
         cppyy.loadDict("RootUtilsPyROOTDict")
         rootutils = getattr(root, "RootUtils")
-        pybytes        = getattr(rootutils, "PyBytes")
+        pybytes        = getattr(rootutils, "PyBytes")  # noqa: F841
         #MN: lines below fail in ROOT6 if PCM from RootUtils is not found
         read_root_file = getattr(rootutils, "_pythonize_read_root_file")
         tell_root_file = getattr(rootutils, "_pythonize_tell_root_file")
@@ -212,7 +209,7 @@ def _getLeaf (l):
     if tname in ['Char_t']:
         try:
             return l.GetValueString() # TLeafC for variable size string
-        except:
+        except Exception:
             return [l.GetValue(i) for i in range(ndat)] # TLeafB for 8-bit integers
     return None
 
@@ -259,7 +256,7 @@ class RootFileDumper(object):
 
         self.tree = self.root_file.Get(tree_name)
         if self.tree is None or not isinstance(self.tree, ROOT.TTree):
-            raise AttributeError('no tree [%s] in file [%s]', tree_name, fname)
+            raise AttributeError('no tree [%s] in file [%s]', tree_name, self.root_file.GetName())
 
         tree = self.tree
         nentries = tree.GetEntries()
@@ -351,7 +348,7 @@ class RootFileDumper(object):
 
 ### test support --------------------------------------------------------------
 def _test_main():
-    root = import_root()
+    root = import_root()  # noqa: F841
     def no_raise(msg, fct, *args, **kwds):
         caught = False
         err = None
@@ -369,7 +366,7 @@ def _test_main():
              fct=root_compile, src="void foo1a() { return ; }")
     import tempfile
     # PvG workaround for ROOT-7059
-    dummy = tempfile.NamedTemporaryFile(prefix="foo_",suffix=".cxx")
+    dummy = tempfile.NamedTemporaryFile(prefix="foo_",suffix=".cxx")  # noqa: F841
     with tempfile.NamedTemporaryFile(prefix="foo_",suffix=".cxx") as tmp:
         tmp.write (b"void foo2() { return ; }\n")
         tmp.flush()
diff --git a/Tools/PyUtils/python/coverage.py b/Tools/PyUtils/python/coverage.py
index 06407def58d5..730e4e9ec8f5 100644
--- a/Tools/PyUtils/python/coverage.py
+++ b/Tools/PyUtils/python/coverage.py
@@ -1,5 +1,4 @@
-#
-# $Id: coverage.py,v 1.1 2008-12-16 05:46:38 ssnyder Exp $
+# noqa: ATL902
 #
 # File: coverage.py
 # Purpose: A coverage utility for component tests.
@@ -40,7 +39,7 @@
 # adding '#pragma: NO COVER' to the end of the line.
 #
 # Original permission notice:
-# Copyright 1999, Bioreason, Inc., all rights reserved.
+# Copyright 1999, 2020, Bioreason, Inc., all rights reserved.
 # Author: Andrew Dalke
 #
 # Copyright 1995-1997, Automatrix, Inc., all rights reserved.
@@ -59,7 +58,6 @@
 #
 from __future__ import print_function
 import sys
-import string
 
 ## The completely brain-damaged fnorb setup overrides the builtin
 ## parser module, which we need!  Cudgel it out of the way.
@@ -68,7 +66,6 @@ import string
 import re
 import os
 import dis
-import sys
 
 running_coverage = 0
 
@@ -127,7 +124,7 @@ def _find_LINENO(code):
 
     # and check the constants for references to other code objects
     for c in code.co_consts:
-        if type(c) == types.CodeType:
+        if isinstance(c, types.CodeType):
             # find another code object, so recurse into it
             linenos.update(_find_LINENO(c))
     return linenos
diff --git a/Tools/PyUtils/python/dbsqlite.py b/Tools/PyUtils/python/dbsqlite.py
index cf6b82d67f72..82edd867f959 100644
--- a/Tools/PyUtils/python/dbsqlite.py
+++ b/Tools/PyUtils/python/dbsqlite.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils/python/dbsqlite.py
 # reaped off: http://svn.python.org/view/sandbox/trunk/dbm_sqlite
@@ -13,13 +13,13 @@ Issues:
 
 """
 
-__version__ = "$Revision: 225332 $"
+from __future__ import print_function
+
 __all__ = ['error', 'open']
 
 import sqlite3
 import pickle
 from collections import MutableMapping
-import collections
 from operator import itemgetter
 import shelve
 
diff --git a/Tools/PyUtils/python/fileutils.py b/Tools/PyUtils/python/fileutils.py
deleted file mode 100644
index e296f80d3971..000000000000
--- a/Tools/PyUtils/python/fileutils.py
+++ /dev/null
@@ -1,297 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-"""
-A collection of UNIX inspired functions for working with the filesystem.
-
-This module is inspired by Ruby's FileUtils library and of course UNIX.
-
-see: http://github.com/clutchski/fileutils
-"""
-
-from __future__ import with_statement
-
-__author__ = 'clutchski@gmail.com'
-
-# FIXME: still to implement ls, ln, du, df
-
-import itertools
-import grp
-import os
-import pwd as password_db
-import shutil
-import stat
-
-#
-# statics
-#
-
-NL = os.linesep
-
-# chmod modes by permission type, ordered by user, group, other
-
-READ_MODES  = (stat.S_IRUSR, stat.S_IRGRP, stat.S_IROTH)
-WRITE_MODES = (stat.S_IWUSR, stat.S_IWGRP, stat.S_IWOTH)
-EXEC_MODES  = (stat.S_IXUSR, stat.S_IXGRP, stat.S_IXOTH)
-MODES = (READ_MODES, WRITE_MODES, EXEC_MODES)
-
-# chmod modes by target, ordered by read, write, execute
-
-USER_MODES  = [m[0] for m in MODES]
-GROUP_MODES = [m[1] for m in MODES]
-OTHER_MODES = [m[2] for m in MODES]
-
-# chmod permission bits
-
-READ_BIT       = 4  # e.g. chmod XYZ is user readable if X >= 4
-WRITE_BIT      = 2
-EXECUTABLE_BIT = 1
-
-# error messages
-
-ERROR_FILE_EXISTS = '[Errno 17] File exists'
-
-def _is_str(obj):
-    return isinstance(obj, basestring)
-
-def _list(paths):
-    return [paths] if _is_str(paths) else paths
-
-def cd(path):
-    """ Change the working directory to the given path. """
-    os.chdir(path)
-
-def pwd():
-    """ Return the current working directory. """
-    return os.getcwd()
-
-def mkdir(dirs):
-    """ Create the given directory or list of directories. """
-    dirs = _list(dirs)
-    map(os.mkdir, dirs)
-
-def mkdir_p(dirs):
-    """ Create the given directory or list of directories, along with any
-        missing parent directories. This function is idempotent, so no 
-        errors will be raised if a directory already exists.
-    """
-    dirs = _list(dirs)
-    for dir_ in dirs:
-        try:
-            os.makedirs(dir_)
-        except OSError as err:
-            #FIXME: possible race condition in the isdir check. is a there a
-            #way to avoid it?
-            if ERROR_FILE_EXISTS in str(err) and os.path.isdir(dir_):
-                # mkdir_p is idempotent in UNIX, thus here as well
-                pass
-            else:
-                raise
-
-def cp(paths, dest):
-    """ Copy the given file or list of files to the destination. When copying 
-        more than one file, the destination must be a directory.
-    """
-    paths = _list(paths)
-    if len(paths) > 1:
-        if not os.path.exists(dest) or not os.path.isdir(dest):
-            raise OSError("target '%s' is not a directory" % dest)
-    # use imap because it terminates at the end of the shortest iterable
-    for _ in itertools.imap(shutil.copy, paths, itertools.repeat(dest)):
-        pass
-
-def _rm_path(path, force=False, recursive=False):
-    if not os.path.exists(path):
-        if force:
-            # rm -f ignores missing paths
-            return
-        raise OSError('no such file or directory: %s' % path)
-    elif not is_writeable(path) and not force:
-        msg = 'cannot rm write-protected file or directory: %s' % path
-        raise OSError(msg)
-    if os.path.isdir(path):
-        if not recursive:
-            raise OSError("cannot remove directory: %s" % path)
-        for child_path in os.listdir(path):
-            _rm(os.path.join(path, child_path), force, recursive)
-        os.rmdir(path)
-    else:
-        os.remove(path)
-
-def _rm(paths, force=False, recursive=False):
-    paths = _list(paths)
-    for path in paths:
-        _rm_path(path, force, recursive)
-
-def rm(files):
-    """ Remove the given file or list of files. """
-    _rm(files)
-
-def rm_f(files):
-    """ Remove the given file or list of files, ignoring non-existant 
-        and write-protected files.
-    """
-    _rm(files, force=True)
-
-def rm_r(paths):
-    """ Recursively remove the given paths or list of paths. """
-    _rm(paths, recursive=True)
-
-def rm_rf(paths):
-    """ Recursively remove the given paths or list of paths, ignoring
-        non-existant and write-protected files.
-    """
-    _rm(paths, force=True, recursive=True)
-
-def rmdir(paths):
-    """ Alias for "rm_r" """
-    rm_r(paths)
-
-def _is_valid_mode(mode):
-    # mode must be a string because literal ints cannot start with zero
-    return _is_str(mode)            \
-       and len(mode) == 4           \
-       and mode.isdigit()           \
-       and mode[0] in ('0', '1')    \
-       and not any((d in mode for d in ['8','9'])) 
-
-def chmod(mode, paths):
-    """ Apply the given permissions to the path or list of paths. The 
-        permissions mode must be specified in octal notation, for example,
-        "0755". 
-    """
-    paths = _list(paths)
-    if not _is_valid_mode(mode):
-        raise OSError('invalid chmod mode: %s' % mode)
-    sticky_bit, user_bit, group_bit, other_bit = [int(c) for c in mode]
-    bit_to_modes = ( (user_bit, USER_MODES)
-                   , (group_bit, GROUP_MODES)
-                   , (other_bit, OTHER_MODES)
-                   )
-    new_mode = 0
-    for bit, (read_mode, write_mode, exec_mode) in bit_to_modes:
-        if bit >= READ_BIT:
-            new_mode = new_mode | read_mode
-            bit = bit - READ_BIT
-        if bit >= WRITE_BIT:
-            new_mode = new_mode | write_mode
-            bit = bit - WRITE_BIT
-        if bit >= EXECUTABLE_BIT:
-            new_mode = new_mode | exec_mode
-    #FIXME: handle sticky bit
-    for path in paths:
-        os.chmod(path, new_mode)
-
-def chmod_R(mode, paths):
-    """ Apply the given permissions recursively to the given paths. The
-        "chmod" function documentation describes the mode argument.
-    """
-    for path in _list(paths):
-        if not os.path.exists(path):
-            raise OSError("no such file or directory: '%s'" % path)
-        chmod(mode, path)
-        if os.path.isdir(path):
-            child_paths = (os.path.join(path, c) for c in os.listdir(path))
-            for child_path in child_paths:
-                chmod_R(mode, child_path)
-
-def mv(paths, dest):
-    """ Move the given files or directories to the destination path. If more
-        that one element is being moved, the destination must be a directory.
-    """
-    paths = _list(paths)
-    if len(paths) > 1:
-        if not os.path.exists(dest):
-            raise OSError("no such file or directory: '%s'" % dest)
-        if not os.path.isdir(dest):
-            raise OSError("target '%s' is not a directory" % dest)
-    for path in paths:
-        if not os.path.exists(path):
-            raise OSError('no such file or directory: %s' % path)
-        shutil.move(path, dest)
-
-def touch(paths):
-    """ Update the access and modification times of the given path or list of
-        paths. Any non-existant files will be created.
-    """
-    for path in _list(paths):
-        if os.path.exists(path) and not is_writeable(path):
-            raise OSError("can't touch write-protected path: %s" % path)
-        with open(path, 'a'):
-            os.utime(path, None)
-
-def chown(user, group, paths):
-    """ Set the user and group ownership of the given path or list 
-        of paths. If the user or group is None, that attribute is unchanged.
-    """
-    paths = _list(paths)
-    user_id = group_id = -1 # defaults which leave ownership unchanged
-    if user is not None:
-        try:
-            user_id = password_db.getpwnam(user)[2]
-        except KeyError:
-            raise OSError("no such user: %s" % user)
-    if group is not None:
-        try:
-            group_id = grp.getgrnam(group)[2]
-        except KeyError:
-            raise OSError("no such group: %s" % group)
-
-    for path in paths:
-        os.chown(path, user_id, group_id)
-
-def chown_R(user, group, paths):
-    """ Recursively set the user and group ownership of the given path or
-        list of paths.
-    """
-    for path in _list(paths):
-        if not os.path.exists(path):
-            raise OSError("no such file or directory: '%s'" % path)
-        chown(user, group, path)
-        if os.path.isdir(path):
-            child_paths = (os.path.join(path, c) for c in os.listdir(path))
-            for child_path in child_paths:
-                chown_R(user, group, child_path)
-        
-def _path_has_permissions(path, modes):
-    """ Return True if the given path has each of the permissions
-        corresponding to the given stat modes (e.g stat.S_IXOTH).
-    """
-    if not os.path.exists(path):
-        msg = "no such file or directory: %s" % path
-        raise OSError(msg)
-    if not modes:
-        raise OSError("must specify permissions to check")
-    return all((os.stat(path).st_mode & m for m in modes))
-
-def _get_modes_for_target(target, u_mode, g_mode, o_mode):
-    modes = []
-    target = target.lower()
-    all_ = 'a' in target
-    if all_ or 'u' in target:
-        modes.append(u_mode)
-    if all_ or 'g' in target:
-        modes.append(g_mode)
-    if all_ or 'o' in target:
-        modes.append(o_mode)
-    return modes
-
-def is_readable(path, by='u'):
-    """ Return True if the path is readable by all of the populations
-    specified, False otherwise.
-    """
-    modes = _get_modes_for_target(by, *READ_MODES)
-    return _path_has_permissions(path, modes)
-
-def is_writeable(path, by='u'):
-    """ Return True if the path is writeable by all of the populations
-    specified, False otherwise.
-    """
-    modes = _get_modes_for_target(by, *WRITE_MODES)
-    return _path_has_permissions(path, modes)
-
-def is_executable(path, by='u'):
-    """ Return True if the path is executable by all of the populations
-    specified, False otherwise.
-    """
-    modes = _get_modes_for_target(by, *EXEC_MODES)
-    return _path_has_permissions(path, modes)
diff --git a/Tools/PyUtils/python/merge_join.py b/Tools/PyUtils/python/merge_join.py
deleted file mode 100644
index 0e8387a150d7..000000000000
--- a/Tools/PyUtils/python/merge_join.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-"""For data stored by a sorted key, perform a merge join over parallel
-iteration through multiple data sources.
-
-Author: Joel Nothman, me@joelnothman.com
-        http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/576371
-        
-Some sequences to join:
->>> fathers = [
-...     ('Abe', 'Jim'),
-...     ('Benny', 'John'),
-...     ('David', 'Jacob'),
-...     ('Evan', 'Jonas'),
-... ]
->>> mothers = [
-...     ('Abe', 'Michelle'),
-...     ('Benny', 'Mary'),
-...     ('Caleb', 'Madeline'),
-...     ('Evan', 'Marna'),
-... ]
->>> phones = [
-...     ('Benny', '000-000-0002'),
-...     ('David', '000-000-0004'),
-... ]
-
-We wish to retrieve row data combining each of these columns:
-
->>> for t in merge_join(fathers, mothers, phones):
-...     print t
-('Abe', 'Jim', 'Michelle', None)
-('Benny', 'John', 'Mary', '000-000-0002')
-('Caleb', None, 'Madeline', None)
-('David', 'Jacob', None, '000-000-0004')
-('Evan', 'Jonas', 'Marna', None)
-
-"""
-
-def _first_iter_vals(iters):
-    """Generate the first values of each iterator."""
-    for it in iters:
-        try:
-            yield it.next()
-        except StopIteration:
-            yield None
-
-class OutOfDataError: pass
-
-def _merge_join_next(iters, cur_pairs):
-    """Generate the values of the next tuple (key, v1, ..., vn) by finding the
-    minimum key available, and returning the corresponding values where
-    available while advancing the respective iterators."""
-
-    # Find the next key, or quit if all keys are None
-    try:
-        min_key = min(p[0] for p in cur_pairs if p)
-    except ValueError:
-        raise OutOfDataError
-
-    # Yield the key as the first tuple element
-    yield min_key
-
-    for i, (it, p) in enumerate(zip(iters, cur_pairs)):
-        try:
-            k, v = p
-        except TypeError:
-            # p is None => the iterator has stopped
-            yield None
-            continue
-
-        if k != min_key:
-            # No data for this key
-            yield None
-            continue
-
-        # Yes data for this key: yield it
-        yield v
-
-        # Update cur_pairs for this iterator
-        try:
-            cur_pairs[i] = it.next()
-        except StopIteration:
-            cur_pairs[i] = None
-
-
-def merge_join(*iters):
-    """Given a series of n iterators whose data are of form ``(key, value)``,
-    where the keys are sorted and unique for each iterator, generates tuples
-    ``(key, val_1, val_2, ..., val_n)`` for all keys, where ``val_i`` is the
-    value corresponding to ``key`` in the ``i``th iterator, or None if no such
-    pair exists for the ``i``th iterator."""
-
-    iters = [iter(it) for it in iters]
-    cur_pairs = list(_first_iter_vals(iters))
-    try:
-        while True:
-            yield tuple(_merge_join_next(iters, cur_pairs))
-    except OutOfDataError:
-        pass
-
-if __name__ == "__main__":
-    import doctest
-    doctest.testmod()
diff --git a/Tools/PyUtils/python/path.py b/Tools/PyUtils/python/path.py
deleted file mode 100644
index b169b306b28b..000000000000
--- a/Tools/PyUtils/python/path.py
+++ /dev/null
@@ -1,995 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-""" path.py - An object representing a path to a file or directory.
-
-Example:
-
-from path import path
-d = path('/home/guido/bin')
-for f in d.files('*.py'):
-    f.chmod(0755)
-
-This module requires Python 2.2 or later.
-
-
-URL:     http://www.jorendorff.com/articles/python/path
-Author:  Jason Orendorff <jason.orendorff\x40gmail\x2ecom> (and others - see the url!)
-Date:    9 Mar 2007
-"""
-
-
-# TODO
-#   - Tree-walking functions don't avoid symlink loops.  Matt Harrison
-#     sent me a patch for this.
-#   - Bug in write_text().  It doesn't support Universal newline mode.
-#   - Better error message in listdir() when self isn't a
-#     directory. (On Windows, the error message really sucks.)
-#   - Make sure everything has a good docstring.
-#   - Add methods for regex find and replace.
-#   - guess_content_type() method?
-#   - Perhaps support arguments to touch().
-
-from __future__ import generators
-
-import sys, warnings, os, fnmatch, glob, shutil, codecs
-try:
-    from hashlib import md5
-except ImportError:
-    md5 = None
-
-__version__ = '2.2'
-__all__ = ['path']
-
-# Platform-specific support for path.owner
-if os.name == 'nt':
-    try:
-        import win32security
-    except ImportError:
-        win32security = None
-else:
-    try:
-        import pwd
-    except ImportError:
-        pwd = None
-
-# Pre-2.3 support.  Are unicode filenames supported?
-_base = str
-_getcwd = os.getcwd
-try:
-    if os.path.supports_unicode_filenames:
-        _base = unicode
-        _getcwd = os.getcwdu
-except AttributeError:
-    pass
-
-# Universal newline support
-#_textmode = 'r'
-#if hasattr(file, 'newlines'):
-_textmode = 'U'
-
-
-class TreeWalkWarning(Warning):
-    pass
-
-class path(_base):
-    """ Represents a filesystem path.
-
-    For documentation on individual methods, consult their
-    counterparts in os.path.
-    """
-
-    # --- Special Python methods.
-
-    def __new__(typ, *args):
-        """
-        Creates a new path object concatenating the *args.  *args
-        may only contain Path objects or strings.  If *args is
-        empty, Path(os.curdir) is created.
-        """
-        if not args:
-            return typ(os.curdir)
-        for arg in args:
-            if not isinstance(arg, str):
-                raise ValueError("%s() arguments must be Path, str or "
-                                 "unicode" % typ.__name__)
-        if len(args) == 1:
-            return _base.__new__(typ, *args)
-        return typ(os.path.join(*args))
-
-    def __repr__(self):
-        return 'path(%s)' % _base.__repr__(self)
-
-    # Adding a path and a string yields a path.
-    def __add__(self, more):
-        try:
-            resultStr = _base.__add__(self, more)
-        except TypeError:  #Python bug
-            resultStr = NotImplemented
-        if resultStr is NotImplemented:
-            return resultStr
-        return self.__class__(resultStr)
-
-    def __radd__(self, other):
-        if isinstance(other, str):
-            return self.__class__(other.__add__(self))
-        else:
-            return NotImplemented
-
-    @classmethod
-    def cwd(cls):
-        """ Return the current working directory as a path object. """
-        return cls(_getcwd())
-    getcwd = cwd
-
-    # The / operator joins paths.
-    def __div__(self, rel):
-        """ fp.__div__(rel) == fp / rel == fp.joinpath(rel)
-
-        Join two path components, adding a separator character if
-        needed.
-        """
-        return self.__class__(os.path.join(self, rel))
-
-    # Make the / operator work even when true division is enabled.
-    __truediv__ = __div__
-
-    # --- Operations on path strings.
-
-    isabs = os.path.isabs
-    def abspath(self):       return self.__class__(os.path.abspath(self))
-    def normcase(self):      return self.__class__(os.path.normcase(self))
-    def normpath(self):      return self.__class__(os.path.normpath(self))
-    def realpath(self):      return self.__class__(os.path.realpath(self))
-    def expanduser(self):    return self.__class__(os.path.expanduser(self))
-    def expandvars(self):    return self.__class__(os.path.expandvars(self))
-    def dirname(self):       return self.__class__(os.path.dirname(self))
-    basename = os.path.basename
-
-    def expand(self):
-        """ Clean up a filename by calling expandvars(),
-        expanduser(), and normpath() on it.
-
-        This is commonly everything needed to clean up a filename
-        read from a configuration file, for example.
-        """
-        return self.expandvars().expanduser().normpath()
-
-    def _get_namebase(self):
-        base, ext = os.path.splitext(self.name)
-        return base
-
-    def _get_ext(self):
-        f, ext = os.path.splitext(_base(self))
-        return ext
-
-    def _get_drive(self):
-        drive, r = os.path.splitdrive(self)
-        return self.__class__(drive)
-
-    parent = property(
-        dirname, None, None,
-        """ This path's parent directory, as a new path object.
-
-        For example, path('/usr/local/lib/libpython.so').parent == path('/usr/local/lib')
-        """)
-
-    name = property(
-        basename, None, None,
-        """ The name of this file or directory without the full path.
-
-        For example, path('/usr/local/lib/libpython.so').name == 'libpython.so'
-        """)
-
-    namebase = property(
-        _get_namebase, None, None,
-        """ The same as path.name, but with one file extension stripped off.
-
-        For example, path('/home/guido/python.tar.gz').name     == 'python.tar.gz',
-        but          path('/home/guido/python.tar.gz').namebase == 'python.tar'
-        """)
-
-    ext = property(
-        _get_ext, None, None,
-        """ The file extension, for example '.py'. """)
-
-    drive = property(
-        _get_drive, None, None,
-        """ The drive specifier, for example 'C:'.
-        This is always empty on systems that don't use drive specifiers.
-        """)
-
-    def splitpath(self):
-        """ p.splitpath() -> Return (p.parent, p.name). """
-        parent, child = os.path.split(self)
-        return self.__class__(parent), child
-
-    def splitdrive(self):
-        """ p.splitdrive() -> Return (p.drive, <the rest of p>).
-
-        Split the drive specifier from this path.  If there is
-        no drive specifier, p.drive is empty, so the return value
-        is simply (path(''), p).  This is always the case on Unix.
-        """
-        drive, rel = os.path.splitdrive(self)
-        return self.__class__(drive), rel
-
-    def splitext(self):
-        """ p.splitext() -> Return (p.stripext(), p.ext).
-
-        Split the filename extension from this path and return
-        the two parts.  Either part may be empty.
-
-        The extension is everything from '.' to the end of the
-        last path segment.  This has the property that if
-        (a, b) == p.splitext(), then a + b == p.
-        """
-        filename, ext = os.path.splitext(self)
-        return self.__class__(filename), ext
-
-    def stripext(self):
-        """ p.stripext() -> Remove one file extension from the path.
-
-        For example, path('/home/guido/python.tar.gz').stripext()
-        returns path('/home/guido/python.tar').
-        """
-        return self.splitext()[0]
-
-    if hasattr(os.path, 'splitunc'):
-        def splitunc(self):
-            unc, rest = os.path.splitunc(self)
-            return self.__class__(unc), rest
-
-        def _get_uncshare(self):
-            unc, r = os.path.splitunc(self)
-            return self.__class__(unc)
-
-        uncshare = property(
-            _get_uncshare, None, None,
-            """ The UNC mount point for this path.
-            This is empty for paths on local drives. """)
-
-    def joinpath(self, *args):
-        """ Join two or more path components, adding a separator
-        character (os.sep) if needed.  Returns a new path
-        object.
-        """
-        return self.__class__(os.path.join(self, *args))
-
-    def splitall(self):
-        r""" Return a list of the path components in this path.
-
-        The first item in the list will be a path.  Its value will be
-        either os.curdir, os.pardir, empty, or the root directory of
-        this path (for example, '/' or 'C:\\').  The other items in
-        the list will be strings.
-
-        path.path.joinpath(*result) will yield the original path.
-        """
-        parts = []
-        loc = self
-        while loc != os.curdir and loc != os.pardir:
-            prev = loc
-            loc, child = prev.splitpath()
-            if loc == prev:
-                break
-            parts.append(child)
-        parts.append(loc)
-        parts.reverse()
-        return parts
-
-    def relpath(self):
-        """ Return this path as a relative path,
-        based from the current working directory.
-        """
-        cwd = self.__class__(os.getcwd())
-        return cwd.relpathto(self)
-
-    def relpathto(self, dest):
-        """ Return a relative path from self to dest.
-
-        If there is no relative path from self to dest, for example if
-        they reside on different drives in Windows, then this returns
-        dest.abspath().
-        """
-        origin = self.abspath()
-        dest = self.__class__(dest).abspath()
-
-        orig_list = origin.normcase().splitall()
-        # Don't normcase dest!  We want to preserve the case.
-        dest_list = dest.splitall()
-
-        if orig_list[0] != os.path.normcase(dest_list[0]):
-            # Can't get here from there.
-            return dest
-
-        # Find the location where the two paths start to differ.
-        i = 0
-        for start_seg, dest_seg in zip(orig_list, dest_list):
-            if start_seg != os.path.normcase(dest_seg):
-                break
-            i += 1
-
-        # Now i is the point where the two paths diverge.
-        # Need a certain number of "os.pardir"s to work up
-        # from the origin to the point of divergence.
-        segments = [os.pardir] * (len(orig_list) - i)
-        # Need to add the diverging part of dest_list.
-        segments += dest_list[i:]
-        if len(segments) == 0:
-            # If they happen to be identical, use os.curdir.
-            relpath = os.curdir
-        else:
-            relpath = os.path.join(*segments)
-        return self.__class__(relpath)
-
-    # --- Listing, searching, walking, and matching
-
-    def listdir(self, pattern=None):
-        """ D.listdir() -> List of items in this directory.
-
-        Use D.files() or D.dirs() instead if you want a listing
-        of just files or just subdirectories.
-
-        The elements of the list are path objects.
-
-        With the optional 'pattern' argument, this only lists
-        items whose names match the given pattern.
-        """
-        names = os.listdir(self)
-        if pattern is not None:
-            names = fnmatch.filter(names, pattern)
-        return [self / child for child in names]
-
-    def dirs(self, pattern=None):
-        """ D.dirs() -> List of this directory's subdirectories.
-
-        The elements of the list are path objects.
-        This does not walk recursively into subdirectories
-        (but see path.walkdirs).
-
-        With the optional 'pattern' argument, this only lists
-        directories whose names match the given pattern.  For
-        example, d.dirs('build-*').
-        """
-        return [p for p in self.listdir(pattern) if p.isdir()]
-
-    def files(self, pattern=None):
-        """ D.files() -> List of the files in this directory.
-
-        The elements of the list are path objects.
-        This does not walk into subdirectories (see path.walkfiles).
-
-        With the optional 'pattern' argument, this only lists files
-        whose names match the given pattern.  For example,
-        d.files('*.pyc').
-        """
-        
-        return [p for p in self.listdir(pattern) if p.isfile()]
-
-    def walk(self, pattern=None, errors='strict'):
-        """ D.walk() -> iterator over files and subdirs, recursively.
-
-        The iterator yields path objects naming each child item of
-        this directory and its descendants.  This requires that
-        D.isdir().
-
-        This performs a depth-first traversal of the directory tree.
-        Each directory is returned just before all its children.
-
-        The errors= keyword argument controls behavior when an
-        error occurs.  The default is 'strict', which causes an
-        exception.  The other allowed values are 'warn', which
-        reports the error via warnings.warn(), and 'ignore'.
-        """
-        if errors not in ('strict', 'warn', 'ignore'):
-            raise ValueError("invalid errors parameter")
-
-        try:
-            childList = self.listdir()
-        except Exception:
-            if errors == 'ignore':
-                return
-            elif errors == 'warn':
-                warnings.warn(
-                    "Unable to list directory '%s': %s"
-                    % (self, sys.exc_info()[1]),
-                    TreeWalkWarning)
-                return
-            else:
-                raise
-
-        for child in childList:
-            if pattern is None or child.fnmatch(pattern):
-                yield child
-            try:
-                isdir = child.isdir()
-            except Exception:
-                if errors == 'ignore':
-                    isdir = False
-                elif errors == 'warn':
-                    warnings.warn(
-                        "Unable to access '%s': %s"
-                        % (child, sys.exc_info()[1]),
-                        TreeWalkWarning)
-                    isdir = False
-                else:
-                    raise
-
-            if isdir:
-                for item in child.walk(pattern, errors):
-                    yield item
-
-    def walkdirs(self, pattern=None, errors='strict'):
-        """ D.walkdirs() -> iterator over subdirs, recursively.
-
-        With the optional 'pattern' argument, this yields only
-        directories whose names match the given pattern.  For
-        example, mydir.walkdirs('*test') yields only directories
-        with names ending in 'test'.
-
-        The errors= keyword argument controls behavior when an
-        error occurs.  The default is 'strict', which causes an
-        exception.  The other allowed values are 'warn', which
-        reports the error via warnings.warn(), and 'ignore'.
-        """
-        if errors not in ('strict', 'warn', 'ignore'):
-            raise ValueError("invalid errors parameter")
-
-        try:
-            dirs = self.dirs()
-        except Exception:
-            if errors == 'ignore':
-                return
-            elif errors == 'warn':
-                warnings.warn(
-                    "Unable to list directory '%s': %s"
-                    % (self, sys.exc_info()[1]),
-                    TreeWalkWarning)
-                return
-            else:
-                raise
-
-        for child in dirs:
-            if pattern is None or child.fnmatch(pattern):
-                yield child
-            for subsubdir in child.walkdirs(pattern, errors):
-                yield subsubdir
-
-    def walkfiles(self, pattern=None, errors='strict'):
-        """ D.walkfiles() -> iterator over files in D, recursively.
-
-        The optional argument, pattern, limits the results to files
-        with names that match the pattern.  For example,
-        mydir.walkfiles('*.tmp') yields only files with the .tmp
-        extension.
-        """
-        if errors not in ('strict', 'warn', 'ignore'):
-            raise ValueError("invalid errors parameter")
-
-        try:
-            childList = self.listdir()
-        except Exception:
-            if errors == 'ignore':
-                return
-            elif errors == 'warn':
-                warnings.warn(
-                    "Unable to list directory '%s': %s"
-                    % (self, sys.exc_info()[1]),
-                    TreeWalkWarning)
-                return
-            else:
-                raise
-
-        for child in childList:
-            try:
-                isfile = child.isfile()
-                isdir = not isfile and child.isdir()
-            except:
-                if errors == 'ignore':
-                    continue
-                elif errors == 'warn':
-                    warnings.warn(
-                        "Unable to access '%s': %s"
-                        % (self, sys.exc_info()[1]),
-                        TreeWalkWarning)
-                    continue
-                else:
-                    raise
-
-            if isfile:
-                if pattern is None or child.fnmatch(pattern):
-                    yield child
-            elif isdir:
-                for f in child.walkfiles(pattern, errors):
-                    yield f
-
-    def fnmatch(self, pattern):
-        """ Return True if self.name matches the given pattern.
-
-        pattern - A filename pattern with wildcards,
-            for example '*.py'.
-        """
-        return fnmatch.fnmatch(self.name, pattern)
-    match = fnmatch  # SB
-    
-    def matchcase(self, pattern):
-        """ Test whether the path matches pattern, returning true or
-        false; the comparison is always case-sensitive.
-        """
-        return fnmatch.fnmatchcase(self.name, pattern)
-
-    def glob(self, pattern):
-        """ Return a list of path objects that match the pattern.
-
-        pattern - a path relative to this directory, with wildcards.
-
-        For example, path('/users').glob('*/bin/*') returns a list
-        of all the files users have in their bin directories.
-        """
-        cls = self.__class__
-        return [cls(s) for s in glob.glob(_base(self / pattern))]
-
-
-    # --- Reading or writing an entire file at once.
-
-    def open(self, mode='r'):
-        """ Open this file.  Return a file object. """
-        return file(self, mode)
-
-    def bytes(self):
-        """ Open this file, read all bytes, return them as a string. """
-        f = self.open('rb')
-        try:
-            return f.read()
-        finally:
-            f.close()
-
-    def write_bytes(self, bytes, append=False):
-        """ Open this file and write the given bytes to it.
-
-        Default behavior is to overwrite any existing file.
-        Call p.write_bytes(bytes, append=True) to append instead.
-        """
-        if append:
-            mode = 'ab'
-        else:
-            mode = 'wb'
-        f = self.open(mode)
-        try:
-            f.write(bytes)
-        finally:
-            f.close()
-
-    def text(self, encoding=None, errors='strict'):
-        r""" Open this file, read it in, return the content as a string.
-
-        This uses 'U' mode in Python 2.3 and later, so '\r\n' and '\r'
-        are automatically translated to '\n'.
-
-        Optional arguments:
-
-        encoding - The Unicode encoding (or character set) of
-            the file.  If present, the content of the file is
-            decoded and returned as a unicode object; otherwise
-            it is returned as an 8-bit str.
-        errors - How to handle Unicode errors; see help(str.decode)
-            for the options.  Default is 'strict'.
-        """
-        if encoding is None:
-            # 8-bit
-            f = self.open(_textmode)
-            try:
-                return f.read()
-            finally:
-                f.close()
-        else:
-            # Unicode
-            f = codecs.open(self, 'r', encoding, errors)
-            # (Note - Can't use 'U' mode here, since codecs.open
-            # doesn't support 'U' mode, even in Python 2.3.)
-            try:
-                t = f.read()
-            finally:
-                f.close()
-            return (t.replace(u'\r\n', u'\n')
-                     .replace(u'\r\x85', u'\n')
-                     .replace(u'\r', u'\n')
-                     .replace(u'\x85', u'\n')
-                     .replace(u'\u2028', u'\n'))
-
-    def write_text(self, text, encoding=None, errors='strict', linesep=os.linesep, append=False):
-        r""" Write the given text to this file.
-
-        The default behavior is to overwrite any existing file;
-        to append instead, use the 'append=True' keyword argument.
-
-        There are two differences between path.write_text() and
-        path.write_bytes(): newline handling and Unicode handling.
-        See below.
-
-        Parameters:
-
-          - text - str/unicode - The text to be written.
-
-          - encoding - str - The Unicode encoding that will be used.
-            This is ignored if 'text' isn't a Unicode string.
-
-          - errors - str - How to handle Unicode encoding errors.
-            Default is 'strict'.  See help(unicode.encode) for the
-            options.  This is ignored if 'text' isn't a Unicode
-            string.
-
-          - linesep - keyword argument - str/unicode - The sequence of
-            characters to be used to mark end-of-line.  The default is
-            os.linesep.  You can also specify None; this means to
-            leave all newlines as they are in 'text'.
-
-          - append - keyword argument - bool - Specifies what to do if
-            the file already exists (True: append to the end of it;
-            False: overwrite it.)  The default is False.
-
-
-        --- Newline handling.
-
-        write_text() converts all standard end-of-line sequences
-        ('\n', '\r', and '\r\n') to your platform's default end-of-line
-        sequence (see os.linesep; on Windows, for example, the
-        end-of-line marker is '\r\n').
-
-        If you don't like your platform's default, you can override it
-        using the 'linesep=' keyword argument.  If you specifically want
-        write_text() to preserve the newlines as-is, use 'linesep=None'.
-
-        This applies to Unicode text the same as to 8-bit text, except
-        there are three additional standard Unicode end-of-line sequences:
-        u'\x85', u'\r\x85', and u'\u2028'.
-
-        (This is slightly different from when you open a file for
-        writing with fopen(filename, "w") in C or file(filename, 'w')
-        in Python.)
-
-
-        --- Unicode
-
-        If 'text' isn't Unicode, then apart from newline handling, the
-        bytes are written verbatim to the file.  The 'encoding' and
-        'errors' arguments are not used and must be omitted.
-
-        If 'text' is Unicode, it is first converted to bytes using the
-        specified 'encoding' (or the default encoding if 'encoding'
-        isn't specified).  The 'errors' argument applies only to this
-        conversion.
-
-        """
-        if isinstance(text, unicode):
-            if linesep is not None:
-                # Convert all standard end-of-line sequences to
-                # ordinary newline characters.
-                text = (text.replace(u'\r\n', u'\n')
-                            .replace(u'\r\x85', u'\n')
-                            .replace(u'\r', u'\n')
-                            .replace(u'\x85', u'\n')
-                            .replace(u'\u2028', u'\n'))
-                text = text.replace(u'\n', linesep)
-            if encoding is None:
-                encoding = sys.getdefaultencoding()
-            bytes = text.encode(encoding, errors)
-        else:
-            # It is an error to specify an encoding if 'text' is
-            # an 8-bit string.
-            assert encoding is None
-
-            if linesep is not None:
-                text = (text.replace('\r\n', '\n')
-                            .replace('\r', '\n'))
-                bytes = text.replace('\n', linesep)
-
-        self.write_bytes(bytes, append)
-
-    def lines(self, encoding=None, errors='strict', retain=True):
-        r""" Open this file, read all lines, return them in a list.
-
-        Optional arguments:
-            encoding - The Unicode encoding (or character set) of
-                the file.  The default is None, meaning the content
-                of the file is read as 8-bit characters and returned
-                as a list of (non-Unicode) str objects.
-            errors - How to handle Unicode errors; see help(str.decode)
-                for the options.  Default is 'strict'
-            retain - If true, retain newline characters; but all newline
-                character combinations ('\r', '\n', '\r\n') are
-                translated to '\n'.  If false, newline characters are
-                stripped off.  Default is True.
-
-        This uses 'U' mode in Python 2.3 and later.
-        """
-        if encoding is None and retain:
-            f = self.open(_textmode)
-            try:
-                return f.readlines()
-            finally:
-                f.close()
-        else:
-            return self.text(encoding, errors).splitlines(retain)
-
-    def write_lines(self, lines, encoding=None, errors='strict',
-                    linesep=os.linesep, append=False):
-        r""" Write the given lines of text to this file.
-
-        By default this overwrites any existing file at this path.
-
-        This puts a platform-specific newline sequence on every line.
-        See 'linesep' below.
-
-        lines - A list of strings.
-
-        encoding - A Unicode encoding to use.  This applies only if
-            'lines' contains any Unicode strings.
-
-        errors - How to handle errors in Unicode encoding.  This
-            also applies only to Unicode strings.
-
-        linesep - The desired line-ending.  This line-ending is
-            applied to every line.  If a line already has any
-            standard line ending ('\r', '\n', '\r\n', u'\x85',
-            u'\r\x85', u'\u2028'), that will be stripped off and
-            this will be used instead.  The default is os.linesep,
-            which is platform-dependent ('\r\n' on Windows, '\n' on
-            Unix, etc.)  Specify None to write the lines as-is,
-            like file.writelines().
-
-        Use the keyword argument append=True to append lines to the
-        file.  The default is to overwrite the file.  Warning:
-        When you use this with Unicode data, if the encoding of the
-        existing data in the file is different from the encoding
-        you specify with the encoding= parameter, the result is
-        mixed-encoding data, which can really confuse someone trying
-        to read the file later.
-        """
-        if append:
-            mode = 'ab'
-        else:
-            mode = 'wb'
-        f = self.open(mode)
-        try:
-            for line in lines:
-                isUnicode = isinstance(line, unicode)
-                if linesep is not None:
-                    # Strip off any existing line-end and add the
-                    # specified linesep string.
-                    if isUnicode:
-                        if line[-2:] in (u'\r\n', u'\x0d\x85'):
-                            line = line[:-2]
-                        elif line[-1:] in (u'\r', u'\n',
-                                           u'\x85', u'\u2028'):
-                            line = line[:-1]
-                    else:
-                        if line[-2:] == '\r\n':
-                            line = line[:-2]
-                        elif line[-1:] in ('\r', '\n'):
-                            line = line[:-1]
-                    line += linesep
-                if isUnicode:
-                    if encoding is None:
-                        encoding = sys.getdefaultencoding()
-                    line = line.encode(encoding, errors)
-                f.write(line)
-        finally:
-            f.close()
-
-    if md5 is None:
-        def read_md5(self):
-            """ Calculate the md5 hash for this file.
-            
-            This reads through the entire file.
-            """
-            raise NotImplemented('could not import md5')
-    else:
-        def read_md5(self):
-            """ Calculate the md5 hash for this file.
-
-            This reads through the entire file.
-            """
-            f = self.open('rb')
-            try:
-                m = md5.new()
-                while True:
-                    d = f.read(8192)
-                    if not d:
-                        break
-                    m.update(d)
-            finally:
-                f.close()
-            return m.digest()
-
-    # --- Methods for querying the filesystem.
-
-    exists = os.path.exists
-    isdir = os.path.isdir
-    isfile = os.path.isfile
-    islink = os.path.islink
-    ismount = os.path.ismount
-
-    if hasattr(os.path, 'samefile'):
-        samefile = os.path.samefile
-
-    getatime = os.path.getatime
-    atime = property(
-        getatime, None, None,
-        """ Last access time of the file. """)
-
-    getmtime = os.path.getmtime
-    mtime = property(
-        getmtime, None, None,
-        """ Last-modified time of the file. """)
-
-    if hasattr(os.path, 'getctime'):
-        getctime = os.path.getctime
-        ctime = property(
-            getctime, None, None,
-            """ Creation time of the file. """)
-
-    getsize = os.path.getsize
-    size = property(
-        getsize, None, None,
-        """ Size of the file, in bytes. """)
-
-    if hasattr(os, 'access'):
-        def access(self, mode):
-            """ Return true if current user has access to this path.
-
-            mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK
-            """
-            return os.access(self, mode)
-
-    def stat(self):
-        """ Perform a stat() system call on this path. """
-        return os.stat(self)
-
-    def lstat(self):
-        """ Like path.stat(), but do not follow symbolic links. """
-        return os.lstat(self)
-
-    def get_owner(self):
-        r""" Return the name of the owner of this file or directory.
-
-        This follows symbolic links.
-
-        On Windows, this returns a name of the form ur'DOMAIN\User Name'.
-        On Windows, a group can own a file or directory.
-        """
-        if os.name == 'nt':
-            if win32security is None:
-                raise Exception("path.owner requires win32all to be installed")
-            desc = win32security.GetFileSecurity(
-                self, win32security.OWNER_SECURITY_INFORMATION)
-            sid = desc.GetSecurityDescriptorOwner()
-            account, domain, typecode = win32security.LookupAccountSid(None, sid)
-            return domain + u'\\' + account
-        else:
-            if pwd is None:
-                raise NotImplementedError("path.owner is not implemented on this platform.")
-            st = self.stat()
-            return pwd.getpwuid(st.st_uid).pw_name
-
-    owner = property(
-        get_owner, None, None,
-        """ Name of the owner of this file or directory. """)
-
-    if hasattr(os, 'statvfs'):
-        def statvfs(self):
-            """ Perform a statvfs() system call on this path. """
-            return os.statvfs(self)
-
-    if hasattr(os, 'pathconf'):
-        def pathconf(self, name):
-            return os.pathconf(self, name)
-
-
-    # --- Modifying operations on files and directories
-
-    def utime(self, times):
-        """ Set the access and modified times of this file. """
-        os.utime(self, times)
-
-    def chmod(self, mode):
-        os.chmod(self, mode)
-
-    if hasattr(os, 'chown'):
-        def chown(self, uid, gid):
-            os.chown(self, uid, gid)
-
-    def rename(self, new):
-        os.rename(self, new)
-
-    def renames(self, new):
-        os.renames(self, new)
-
-
-    # --- Create/delete operations on directories
-
-    def mkdir(self, mode=0o777):
-        os.mkdir(self, mode)
-
-    def makedirs(self, mode=0o777):
-        os.makedirs(self, mode)
-
-    def rmdir(self):
-        os.rmdir(self)
-
-    def removedirs(self):
-        os.removedirs(self)
-
-
-    # --- Modifying operations on files
-
-    def touch(self):
-        """ Set the access/modified times of this file to the current time.
-        Create the file if it does not exist.
-        """
-        fd = os.open(self, os.O_WRONLY | os.O_CREAT, 0o666)
-        os.close(fd)
-        os.utime(self, None)
-
-    def remove(self):
-        os.remove(self)
-
-    def unlink(self):
-        os.unlink(self)
-
-
-    # --- Links
-
-    if hasattr(os, 'link'):
-        def link(self, newpath):
-            """ Create a hard link at 'newpath', pointing to this file. """
-            os.link(self, newpath)
-
-    if hasattr(os, 'symlink'):
-        def symlink(self, newlink):
-            """ Create a symbolic link at 'newlink', pointing here. """
-            os.symlink(self, newlink)
-
-    if hasattr(os, 'readlink'):
-        def readlink(self):
-            """ Return the path to which this symbolic link points.
-
-            The result may be an absolute or a relative path.
-            """
-            return self.__class__(os.readlink(self))
-
-        def readlinkabs(self):
-            """ Return the path to which this symbolic link points.
-
-            The result is always an absolute path.
-            """
-            p = self.readlink()
-            if p.isabs():
-                return p
-            else:
-                return (self.parent / p).abspath()
-
-
-    # --- High-level functions from shutil
-
-    copyfile = shutil.copyfile
-    copymode = shutil.copymode
-    copystat = shutil.copystat
-    copy = shutil.copy
-    copy2 = shutil.copy2
-    copytree = shutil.copytree
-    if hasattr(shutil, 'move'):
-        move = shutil.move
-    rmtree = shutil.rmtree
-
-
-    # --- Special stuff from os
-
-    if hasattr(os, 'chroot'):
-        def chroot(self):
-            os.chroot(self)
-
-    if hasattr(os, 'startfile'):
-        def startfile(self):
-            os.startfile(self)
-
diff --git a/Tools/PyUtils/python/scripts/ath_dump.py b/Tools/PyUtils/python/scripts/ath_dump.py
index 8563176b6e52..175df4e6aa7a 100644
--- a/Tools/PyUtils/python/scripts/ath_dump.py
+++ b/Tools/PyUtils/python/scripts/ath_dump.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.ath_dump
 # @purpose entry point for ath-dump command, the dump-athfile cousin
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 279982 $"
 __author__ = "Sebastien Binet"
 __doc__ = "entry point for ath-dump command, the dump-athfile cousin"
 
@@ -80,7 +79,7 @@ def main(args):
             exitcode = 1
             pass
 
-        except :
+        except Exception:
             msg.error("Caught something !! (don't know what)")
             msg.error("\n%s\n%s",sys.exc_info()[0], sys.exc_info()[1])
             exitcode = 10
@@ -91,7 +90,7 @@ def main(args):
     
     if args.output:
         oname = args.output
-        msg.info("saving report into [%s]..." % oname)
+        msg.info("saving report into [%s]...", oname)
         if osp.exists(oname):
             os.rename(oname, oname+'.bak')
         af.server.save_cache(oname)
diff --git a/Tools/PyUtils/python/scripts/check_file.py b/Tools/PyUtils/python/scripts/check_file.py
index 5aede904dc1a..1ec1321bc5f5 100644
--- a/Tools/PyUtils/python/scripts/check_file.py
+++ b/Tools/PyUtils/python/scripts/check_file.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.check_file
 # @purpose read a POOL file and dump its content.
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 276362 $"
 __doc__ = "read a POOL file and dump its content."
 __author__ = "Sebastien Binet"
 
@@ -49,10 +48,9 @@ def main(args):
 
     import sys
     import os
-    import os.path as osp
 
     for i,f in enumerate(files):
-        files[i] = osp.expandvars(osp.expanduser(f))
+        files[i] = os.path.expandvars(os.path.expanduser(f))
 
     exitcode = 0
     for fname in files:
@@ -62,7 +60,7 @@ def main(args):
             pool_file = PF.PoolFile(fname)
             pool_file.checkFile(sorting=args.sort_fct)
             if args.detailed_dump:
-                dump_file = osp.basename(fname) + '.txt'
+                dump_file = os.path.basename(fname) + '.txt'
                 print ("## dumping details into [%s]" % (dump_file,))
                 pool_file.detailedDump(dump_file)
             if args.output:
@@ -79,7 +77,7 @@ def main(args):
             exitcode = 1
             pass
 
-        except :
+        except Exception:
             print ("## Caught something !! (don't know what)")
             print (sys.exc_info()[0])
             print (sys.exc_info()[1])
diff --git a/Tools/PyUtils/python/scripts/check_reflex.py b/Tools/PyUtils/python/scripts/check_reflex.py
index 4c7f166e35b4..93c4505a3565 100644
--- a/Tools/PyUtils/python/scripts/check_reflex.py
+++ b/Tools/PyUtils/python/scripts/check_reflex.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.check_reflex
 # @purpose a script to check the definitions of (reflex) plugins
@@ -8,7 +8,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 276362 $"
 __doc__ = """
 a script to check the definitions of (reflex) plugins across multiple so-called 'rootmap' files
 """
@@ -127,7 +126,6 @@ def main(args):
                 print ("  ",fct(lib))
         return
 
-    import PyUtils.Dso as Dso
     dsodb = Dso.DsoDb()
 
     if args.capabilities:
@@ -136,7 +134,7 @@ def main(args):
             capabilities = dsodb.capabilities(libname)
             print ("::: capabilities of [%s]" % (libname,))
             print (os.linesep.join([" %s"%c for c in capabilities]))
-        except ValueError as err:
+        except ValueError:
             exitcode = 1
             pass
 
@@ -150,7 +148,7 @@ def main(args):
                 print (os.linesep.join([" %s"%v for v in dups[k]]))
             if len(dups.keys())>0:
                 exitcode = 1
-        except ValueError as err:
+        except ValueError:
             exitcode = 1
             pass
 
@@ -188,9 +186,7 @@ def main(args):
                 suppressed = [os.path.basename(ii) in _suppression_dct[k]
                               for ii in v]
                 if all(suppressed):
-                    msg = "---> ignoring [%s]" % (k,)
                     suppression_log.append(k[:])
-                    #print (msg)
                     pass
                 else:
                     # that's a new one !!
@@ -220,9 +216,7 @@ def main(args):
                 suppressed = [os.path.basename(ii) in _suppression_dct[k]
                               for ii in v]
                 if all(suppressed):
-                    msg = "---> ignoring [%s]" % (k,)
                     suppression_log.append(k[:])
-                    #print (msg)
                     pass
                 else:
                     # that's a new one !!
@@ -254,9 +248,7 @@ def main(args):
                 suppressed = [os.path.basename(ii) in _suppression_dct[k]
                               for ii in v]
                 if all(suppressed):
-                    msg = "---> ignoring [%s]" % (k,)
                     suppression_log.append(k[:])
-                    #print (msg)
                     pass
                 else:
                     # that's a new one !!
diff --git a/Tools/PyUtils/python/scripts/check_sg.py b/Tools/PyUtils/python/scripts/check_sg.py
index 27efbf1e09ab..e9b49c24cac6 100644
--- a/Tools/PyUtils/python/scripts/check_sg.py
+++ b/Tools/PyUtils/python/scripts/check_sg.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.check_sg
 # @purpose read a POOL file and dump the DataHeader's content
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 276362 $"
 __doc__ = "read a POOL file and dump the DataHeader's content"
 __author__ = "Sebastien Binet"
 
@@ -39,9 +38,11 @@ def main(args):
     if isinstance(files, basestring):
         files = [files]
 
-    import os.path as osp
+    import os
+    import sys
+
     for i,f in enumerate(files):
-        files[i] = osp.expandvars(osp.expanduser(f))
+        files[i] = os.path.expandvars(os.path.expanduser(f))
 
     exitcode = 0
     for fname in files:
@@ -49,7 +50,7 @@ def main(args):
             import AthenaCommon.KeyStore as acks
             print ("## checking [%s]..." % (fname,))
             ks = acks.loadKeyStoreFromPoolFile(
-                keyStore=osp.basename(fname),
+                keyStore=os.path.basename(fname),
                 pool_file=fname,
                 label='inputFile')
 
@@ -61,13 +62,13 @@ def main(args):
             print ("="*80)
             if args.output:
                 outFileName = args.output
-                outFileName = osp.expanduser(outFileName)
-                outFileName = osp.expandvars(outFileName)
+                outFileName = os.path.expanduser(outFileName)
+                outFileName = os.path.expandvars(outFileName)
                 print ("## saving report into [%s]..." % (outFileName,))
-                if osp.splitext(outFileName)[1] in ('.pkl', '.dat'):
+                if os.path.splitext(outFileName)[1] in ('.pkl', '.dat'):
                     # we explicitely import 'bsddb' to try to always
                     # get that particular backend for the shelve...
-                    import bsddb
+                    import bsddb   # noqa: F401
                     import shelve
                     if os.path.exists(outFileName):
                         os.remove(outFileName)
@@ -86,7 +87,7 @@ def main(args):
             exitcode = 1
             pass
 
-        except :
+        except Exception:
             print ("## Caught something !! (don't know what)")
             print (sys.exc_info()[0])
             print (sys.exc_info()[1])
diff --git a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py b/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
index ba52ac515d01..db945efeb73b 100644
--- a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
+++ b/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.cmt_newanalysisalg
 # @purpose streamline and ease the creation of new athena algs
@@ -9,7 +9,6 @@
 
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision: 795362 $"
 __author__ = "Will Buttinger"
 __doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm"
 
@@ -288,7 +287,7 @@ def main(args):
 
     #now add the algorithm to the _entries.cxx file in the components folder 
     #first check they exist
-    if not os.path.exists("src/components"): os.mkdir("src/components"); 
+    if not os.path.exists("src/components"): os.mkdir("src/components")
     if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name):
        print (":::  INFO Creating src/components/%s_load.cxx"%full_pkg_name)
        loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w')
@@ -342,7 +341,7 @@ DECLARE_FACTORY_ENTRIES( %(pkg)s )
          print (":::  INFO Adding %s to src/components/%s_entries.cxx"% (args.algname,full_pkg_name))
          nextAdd=False
          for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1):
-            if nextAdd and not "{" in line:
+            if nextAdd and "{" not in line:
                nextAdd=False
                if len(namespace_begin)>0:
                   print ("""  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );"""%d)
@@ -392,7 +391,7 @@ DECLARE_ALGORITHM_FACTORY( %(klass)s )
     #need to reconfigure cmake so it knows about the new files
     #rely on the WorkDir_DIR env var for this
     workDir = os.environ.get("WorkDir_DIR")
-    if workDir == None:
+    if workDir is None:
         print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
         print ("::: ERROR Please do this and reconfigure cmake manually!")
     else:
diff --git a/Tools/PyUtils/python/scripts/cmake_newpkg.py b/Tools/PyUtils/python/scripts/cmake_newpkg.py
index 8661f1df8473..3451bd557cb1 100644
--- a/Tools/PyUtils/python/scripts/cmake_newpkg.py
+++ b/Tools/PyUtils/python/scripts/cmake_newpkg.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.cmake_newpkg
 # @purpose streamline and ease the creation of new cmake packages
@@ -7,7 +7,6 @@
 
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision: 795362 $"
 __author__ = "Will buttinger"
 __doc__ = "streamline and ease the creation of new cmake packages"
 
@@ -68,8 +67,8 @@ def main(args):
         os.makedirs(pkg_path+"/"+pkg_name+"/src")
         os.makedirs(pkg_path+"/"+pkg_name+"/share")
         os.makedirs(pkg_path+"/"+pkg_name+"/python")
-        os.makedirs(pkg_path+"/"+pkg_name+"/data");
-        os.makedirs(pkg_path+"/"+pkg_name+"/util");
+        os.makedirs(pkg_path+"/"+pkg_name+"/data")
+        os.makedirs(pkg_path+"/"+pkg_name+"/util")
     except OSError:
         print ("ERROR while making directories for " % (pkg_path+"/"+pkg_name+"/src"))
         return -1
@@ -137,7 +136,7 @@ def main(args):
     #need to reconfigure cmake so it knows about the new files
     #rely on the WorkDir_DIR env var for this
     workDir = os.environ.get("WorkDir_DIR")
-    if workDir == None:
+    if workDir is None:
         print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
         print ("::: ERROR Please do this and reconfigure cmake manually!")
     else:
diff --git a/Tools/PyUtils/python/scripts/cmake_newskeleton.py b/Tools/PyUtils/python/scripts/cmake_newskeleton.py
index 56ed6dec2bed..b48dd07188cc 100644
--- a/Tools/PyUtils/python/scripts/cmake_newskeleton.py
+++ b/Tools/PyUtils/python/scripts/cmake_newskeleton.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.cmt_newanalysisalg
 # @purpose streamline and ease the creation of new athena algs
@@ -9,7 +9,6 @@
 
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision: 795362 $"
 __author__ = "Will Buttinger"
 __doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm in a new package"
 
@@ -17,7 +16,6 @@ __doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm in a new
 import os
 import textwrap
 import PyUtils.acmdlib as acmdlib
-import fileinput
 
 from future import standard_library
 standard_library.install_aliases()
@@ -121,7 +119,7 @@ def main(args):
     #need to reconfigure cmake so it knows about the new files
     #rely on the WorkDir_DIR env var for this
     workDir = os.environ.get("WorkDir_DIR")
-    if workDir == None:
+    if workDir is None:
         print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
         print ("::: ERROR Please do this and reconfigure cmake manually!")
     else:
diff --git a/Tools/PyUtils/python/scripts/cmt_newjobo.py b/Tools/PyUtils/python/scripts/cmt_newjobo.py
index a727170f47ab..4d09dd880f44 100644
--- a/Tools/PyUtils/python/scripts/cmt_newjobo.py
+++ b/Tools/PyUtils/python/scripts/cmt_newjobo.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.cmt_newalg
 # @purpose streamline and ease the creation of a skeleton joboption
@@ -9,16 +9,13 @@
 
 from __future__ import with_statement, print_function
 
-__version__ = "$Revision: 801598 $"
 __author__ = "Will Buttinger"
 __doc__ = "streamline and ease the creation of new skeleton joboption for analysis"
 
 ### imports -------------------------------------------------------------------
 import os
 import textwrap
-import commands
 import PyUtils.acmdlib as acmdlib
-import fileinput
 
 class Templates:
     jobo_template = """\
diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py
index 11c6b678dae7..33797a6742ef 100644
--- a/Tools/PyUtils/python/scripts/diff_root_files.py
+++ b/Tools/PyUtils/python/scripts/diff_root_files.py
@@ -1,11 +1,10 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.diff_root_files
 # @purpose check that 2 ROOT files have same content (containers and sizes).
 # @author Sebastien Binet
 # @date February 2010
 
-__version__ = "$Revision: 681245 $"
 __doc__ = "check that 2 ROOT files have same content (containers and sizes)."
 __author__ = "Sebastien Binet"
 
@@ -103,7 +102,7 @@ def main(args):
     g_args = args
     
     import PyUtils.RootUtils as ru
-    root = ru.import_root()
+    root = ru.import_root()  # noqa: F841
 
     import PyUtils.Logging as L
     msg = L.logging.getLogger('diff-root')
@@ -112,7 +111,7 @@ def main(args):
     else:
         msg.setLevel(L.logging.INFO)
 
-    from PyUtils.Helpers import ShutUp
+    from PyUtils.Helpers import ShutUp  # noqa: F401
 
     if args.entries == '':
         args.entries = -1
@@ -228,7 +227,6 @@ def main(args):
 
         leaves = infos['old']['leaves'] & infos['new']['leaves']
         msg.info('comparing [%s] leaves over entries...', len(leaves))
-        all_good = True
         n_good = 0
         n_bad = 0
         import collections
@@ -405,7 +403,6 @@ def main(args):
 
             if name[0] in args.enforce_leaves:
                 msg.info("don't compare further")
-                all_good = False
                 break
             pass # loop over events/branches
         
diff --git a/Tools/PyUtils/python/scripts/dump_root_file.py b/Tools/PyUtils/python/scripts/dump_root_file.py
index f1e3d1cff3c7..1de26d0a04eb 100644
--- a/Tools/PyUtils/python/scripts/dump_root_file.py
+++ b/Tools/PyUtils/python/scripts/dump_root_file.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.dump_root_file
 # @purpose ascii-fy a ROOT file
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 438720 $"
 __doc__ = "ASCII-fy a ROOT file"
 __author__ = "Sebastien Binet"
 
@@ -41,7 +40,7 @@ def main(args):
     import PyUtils.RootUtils as ru
     root = ru.import_root()
 
-    _inspect = root.RootUtils.PyROOTInspector.pyroot_inspect2
+    _inspect = root.RootUtils.PyROOTInspector.pyroot_inspect2  # noqa: F841
 
     import PyUtils.Logging as L
     msg = L.logging.getLogger('dump-root')
@@ -50,8 +49,7 @@ def main(args):
     msg.info('fname: [%s]', args.fname)
     root_file = root.TFile.Open(args.fname)
     if (root_file is None or
-        not isinstance(root_file, root.TFile) or
-        not root_file.IsOpen()):
+        not isinstance(root_file, root.TFile) or not root_file.IsOpen()):
         msg.error('could not open [%s]', args.fname)
         return 1
 
@@ -68,7 +66,6 @@ def main(args):
                 
     msg.info('dumping trees:  %s', tree_names)
 
-    rc = 0
     for tree_name in tree_names:
         f = ru.RootFileDumper(args.fname, tree_name)
         nentries = f.tree.GetEntries()
diff --git a/Tools/PyUtils/python/scripts/filter_files.py b/Tools/PyUtils/python/scripts/filter_files.py
index 179ae8f5d4b4..ad9336e5fa69 100644
--- a/Tools/PyUtils/python/scripts/filter_files.py
+++ b/Tools/PyUtils/python/scripts/filter_files.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.filter_files
 # @purpose take a bunch of input (pool/bs) files and produce a filtered one
@@ -7,7 +7,6 @@
 # @date March 2010
 from __future__ import with_statement
 
-__version__ = "$Revision: 523884 $"
 __doc__ = "take a bunch of input (pool/bs) files and produce a filtered one"
 __author__ = "Sebastien Binet"
 
@@ -43,7 +42,6 @@ def main(args):
     msg.setLevel(L.logging.INFO)
 
     msg.info(':'*40)
-    msg.info('welcome to filter-files version %s', __version__)
 
     import os.path as osp
     args.files = [ osp.expandvars(osp.expanduser(fname))
@@ -120,7 +118,7 @@ def main(args):
             '%(files)s',
             ])
         evt_list = [str(i) for _,i in args.selection]
-        run_list = [str(i) for i,_ in args.selection if not i is None]
+        run_list = [str(i) for i,_ in args.selection if i is not None]
         cmd = cmd % {
             'evt-list': ','.join(evt_list),
             'run-list': '' if len(run_list)==0 else '-r '+','.join(run_list),
diff --git a/Tools/PyUtils/python/scripts/jira_issues.py b/Tools/PyUtils/python/scripts/jira_issues.py
index bf1afd706fa7..c5fa55d513a2 100644
--- a/Tools/PyUtils/python/scripts/jira_issues.py
+++ b/Tools/PyUtils/python/scripts/jira_issues.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.jira
 # @purpose Interface with CERN JIRA instance
@@ -7,7 +7,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 717788 $"
 __doc__ = "Interface with CERN JIRA instance."
 __author__ = "Edward Moyse"
 
@@ -15,7 +14,6 @@ __author__ = "Edward Moyse"
 
 # pip install --user requests
 import requests
-import os
 import PyUtils.acmdlib as acmdlib
 
 ### functions -----------------------------------------------------------------
@@ -60,8 +58,6 @@ def queryJira(querystring, cookies):
 def main(args):
     """Interface to the CERN JIRA instance"""
 
-    import requests
-    
     #authentication
     try: 
         cookiesFile = file(args.cookies, 'r')
@@ -72,7 +68,7 @@ def main(args):
                 cookies['JSESSIONID'] = text[-1]
             if 'atlassian.xsrf.token' in line:
                 cookies['atlassian.xsrf.token'] = text[-1]   
-    except:
+    except Exception:
          print ("Problems opening cookie file at ", args.cookies)
          return 1
     
diff --git a/Tools/PyUtils/python/xmldict.py b/Tools/PyUtils/python/xmldict.py
index 298f0756da48..df8b48e2201c 100644
--- a/Tools/PyUtils/python/xmldict.py
+++ b/Tools/PyUtils/python/xmldict.py
@@ -1,11 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils/python/xmldict.py
 # @purpose converts an XML file into a python dict, back and forth
 # @author http://code.activestate.com/recipes/573463
 #         slightly adapted to follow PEP8 conventions
 
-__version__ = "$Revision$"
 __doc__ = """\
 functions to convert an XML file into a python dict, back and forth
 """
@@ -23,7 +22,7 @@ def import_etree():
     except ImportError:
         pass
     # do it by hook or by crook...
-    import sys, os, imp
+    import os, imp
     xml_site_package = os.path.join(os.path.dirname(os.__file__), 'xml')
     m = imp.find_module('etree', [xml_site_package])
 
@@ -137,7 +136,7 @@ def _xml2dict_recurse (node, dictclass):
         newitem = _xml2dict_recurse (child, dictclass)
         if isinstance(newitem, basestring):
             newitem = _xml_unescape(newitem)
-        if nodedict.has_key(child.tag):
+        if child.tag in nodedict:
             # found duplicate tag, force a list
             if isinstance(nodedict[child.tag], list):
                 # append to existing list
-- 
GitLab


From 1ae4d2ba870f74eb989c83b125e542f1c1139c86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Mon, 8 Jun 2020 14:46:34 +0200
Subject: [PATCH 040/266] check for nullptr in MuonPhiHitSelector

---
 .../python/MuonTrackBuildingConfig.py         |   2 +-
 .../MuonRecToolInterfaces/IMuonHitSelector.h  |   6 +-
 .../MuonSegmentCleaner/MuonPhiHitSelector.h   |   9 -
 .../src/MuonPhiHitSelector.cxx                | 211 +++++++++---------
 .../src/MuPatCandidateTool.cxx                |   4 +-
 5 files changed, 111 insertions(+), 121 deletions(-)

diff --git a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
index 65666dadbd4d..262bdcda5800 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
@@ -517,7 +517,7 @@ if __name__=="__main__":
     itemsToRecord = ["TrackCollection#MuonSpectrometerTracks"] 
     SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
     
-    cfg.printConfig(withDetails = True, summariseProps = True)
+    cfg.printConfig(withDetails = True)
               
     f=open("MuonTrackBuilding.pkl","wb")
     cfg.store(f)
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHitSelector.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHitSelector.h
index 1c011fe0b9af..c166cd20fd46 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHitSelector.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonHitSelector.h
@@ -1,14 +1,15 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUON_IMUONHITSELECTOR_H
 #define MUON_IMUONHITSELECTOR_H
 
-#include <vector>
 #include "GaudiKernel/IAlgTool.h"
 #include "TrkMeasurementBase/MeasurementBase.h"
 
+#include <vector>
+
 static const InterfaceID IID_IMuonHitSelector
     ("Muon::IMuonHitSelector",1,0);
 
@@ -34,7 +35,6 @@ namespace Muon {
     
     virtual std::vector<const Trk::MeasurementBase*>* select_rio( const double pmom, const std::vector<const Trk::RIO_OnTrack*>& associatedHits,
 								  const std::vector<const Trk::PrepRawData*>& unassociatedHits ) const = 0;
-    virtual double getPhi() const = 0;	
 
   };
   
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/MuonSegmentCleaner/MuonPhiHitSelector.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/MuonSegmentCleaner/MuonPhiHitSelector.h
index f3f056dc874b..4f0e992d93f7 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/MuonSegmentCleaner/MuonPhiHitSelector.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/MuonSegmentCleaner/MuonPhiHitSelector.h
@@ -33,9 +33,6 @@ class MuonPhiHitSelector : public AthAlgTool, virtual public Muon::IMuonHitSelec
   virtual std::vector<const Trk::MeasurementBase*>* select_rio( const double pmom, const std::vector<const Trk::RIO_OnTrack*>& associatedHits,
 								const std::vector<const Trk::PrepRawData*>& unassociatedHits ) const;
 
-  /** return fitted phi */
-  virtual double getPhi()const;
-
  private:
   ServiceHandle<Muon::IMuonIdHelperSvc>     m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
@@ -44,8 +41,6 @@ class MuonPhiHitSelector : public AthAlgTool, virtual public Muon::IMuonHitSelec
   /** Toolhandle to ClusterOnTrackTool creator */
   ToolHandle<Muon::IMuonClusterOnTrackCreator>                   m_clusterCreator;
 
-  /** flag to print out debugging information */
-  bool m_debug;
   /** flag to print out a summary of what comes in and what comes out */
   bool m_summary; 
   /** flag for use of cosmics, straight line model will be used, no interaction point constraint */
@@ -55,9 +50,6 @@ class MuonPhiHitSelector : public AthAlgTool, virtual public Muon::IMuonHitSelec
   /** flag that build competing rios on track for amibguous trigger hits (default: false) */
   bool m_competingRios;
 
-  /** fitted phi value */
-  mutable double m_phi;
-
   /** fit method curved track model */
   void fitRecPhi( const double pmom, const std::vector<Identifier> & phiId,  const std::vector<double> & phiHitx,  const std::vector<double> & phiHity,  const std::vector<double> & phiHitz, const std::vector<double> & phiError, std::vector<int> & quality, const int nphi, std::vector<double> & phiPull, std::vector<int> & phiMult, std::vector<int> & phiSelect, double & chi2, double & r0, double & phi,  std::vector<double> & errorM, int & nfit) const;
 
@@ -92,6 +84,5 @@ class MuonPhiHitSelector : public AthAlgTool, virtual public Muon::IMuonHitSelec
 void clusterPhi( const std::vector<Identifier> & id,  const std::vector<double> & hitx,  const std::vector<double> & hity,  const std::vector<double> & hitz, const std::vector<double> & error, const std::vector<double> & pull, std::vector<int> & select, const int n, std::vector<double> & clusterX , std::vector<double> & clusterY ,std::vector<double> & clusterZ , std::vector<double> & clusterError , std::vector<Identifier> & clusterId, std::vector<int> & clusterHits, std::vector<int> & clusterSelect, std::vector<int> & clusterInt, int & ncl ) const;
 
 };
-inline double MuonPhiHitSelector::getPhi()const{ return m_phi; }
 
 #endif // MuonSegmentCleaner_MuonPhiHitSelector_H
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/src/MuonPhiHitSelector.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/src/MuonPhiHitSelector.cxx
index ed416fa16fbc..0c170f6e7141 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/src/MuonPhiHitSelector.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/src/MuonPhiHitSelector.cxx
@@ -30,16 +30,12 @@
 MuonPhiHitSelector::MuonPhiHitSelector(const std::string& type,const std::string& name,const IInterface* parent) :
     AthAlgTool(type,name,parent),
     m_competingRIOsOnTrackTool("Muon::MuonCompetingClustersOnTrackCreator/MuonCompetingClustersOnTrackCreator"),
-    m_clusterCreator("Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"),
-    m_phi(0) {
+    m_clusterCreator("Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator") {
   declareInterface<IMuonHitSelector>(this);
 
   m_cosmics = false;
   declareProperty("DoCosmics",m_cosmics);
 
-  m_debug = false; 
-  declareProperty("DoDebug",m_debug);
-
   m_summary = false;  
   declareProperty("DoSummary",m_summary);
 
@@ -53,10 +49,10 @@ MuonPhiHitSelector::MuonPhiHitSelector(const std::string& type,const std::string
 
 StatusCode MuonPhiHitSelector::initialize()
 {
-  ATH_MSG_VERBOSE(" MuonPhiHitSelector::Initializing ");
-  ATH_CHECK( m_competingRIOsOnTrackTool.retrieve() );
-  ATH_CHECK( m_clusterCreator.retrieve() );
-  ATH_CHECK( m_idHelperSvc.retrieve() );
+  ATH_MSG_VERBOSE("MuonPhiHitSelector::Initializing");
+  ATH_CHECK(m_competingRIOsOnTrackTool.retrieve());
+  ATH_CHECK(m_clusterCreator.retrieve());
+  ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_MSG_VERBOSE("End of Initializing");
   return StatusCode::SUCCESS;
 }
@@ -70,12 +66,11 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
   std::vector<const Trk::MeasurementBase*>* selectedHits = new std::vector<const Trk::MeasurementBase*>() ;
   std::vector<const Trk::MeasurementBase*>* selectedClusters = new std::vector<const Trk::MeasurementBase*>() ;
 
-  ATH_MSG_VERBOSE(" Executing MuonPhiHitSelectorTool select_rio ");
+  ATH_MSG_VERBOSE("Executing MuonPhiHitSelectorTool select_rio ");
 
-  m_phi =0.; 
   int nhits = associatedHits.size() + unassociatedHits.size();
 
-  if (m_debug) std::cout << " Executing MuonPhiHitSelectorTool nhits select_rio " << nhits << std::endl;  
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Executing MuonPhiHitSelectorTool nhits select_rio " << nhits);
 
   std::vector<double> phiHitx(nhits);
   std::vector<double> phiHity(nhits);
@@ -95,6 +90,10 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
 
   for(; it != it_end ; ++it )  {
     const Trk::PrepRawData* prd = (*it)->prepRawData();
+    if (!prd) {
+      ATH_MSG_WARNING("prepRawData of associatedHits is nullptr, continuing...");
+      continue;
+    }
     Identifier id = prd->identify(); 
     phiId[nphi] = id;  
     Amg::Vector3D gHitPos = (*it)->globalPosition();
@@ -122,7 +121,7 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
       Er(1,1) = cov(1,1);
       Er(1,0) = Er(0,1);   
      
-      double chi = Er(0,0) != Er(1,1) ? atan(-2*Er(0,1)/(Er(0,0)-Er(1,1)))/2. : 0.;
+      double chi = Er(0,0) != Er(1,1) ? std::atan(-2*Er(0,1)/(Er(0,0)-Er(1,1)))/2. : 0.;
 
       CxxUtils::sincos scchi(chi);
 
@@ -132,15 +131,15 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
       Rot(0,1) = scchi.sn;
       Rot(1,0) = -Rot(0,1);
       AmgMatrix(2,2) D = Rot.transpose()*Er*Rot;
-      if (m_debug) std::cout << " Diagonalized error matrix " << D << std::endl; 
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Diagonalized error matrix " << D);
       error = D(0,0) < D(1,1) ? D(0,0) : D(1,1);
     }
-    phiError[nphi] = sqrt(error);
+    phiError[nphi] = std::sqrt(error);
     quality[nphi] = 1000;
     phiMapId[id] = 1;
     phiPrep[nphi] = prd;
-    double phipos = atan2(phiHity[nphi],phiHitx[nphi]);
-    if (m_debug) std::cout << " phi Segment Hit " << nphi << " det " << phiSelect[nphi] << " phi " << phipos << std::endl;
+    double phipos = std::atan2(phiHity[nphi],phiHitx[nphi]);
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("phi Segment Hit " << nphi << " det " << phiSelect[nphi] << " phi " << phipos);
     nphi++;
   }
   int nphiseg = nphi;
@@ -165,16 +164,17 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
     phiError[nphi] = (*itu)->localCovariance()(Trk::locX);
     quality[nphi] = 10;
     phiPrep[nphi] = *itu;
-    double phipos = atan2(phiHity[nphi],phiHitx[nphi]);
-    if (m_debug) std::cout << " phi Pattern Hit " << nphi << " phi " << phipos << std::endl;
+    double phipos = std::atan2(phiHity[nphi],phiHitx[nphi]);
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("phi Pattern Hit " << nphi << " phi " << phipos);
     nphi++;
   }
 
-  double chi2,r0;
+  double chi2(0);
+  double r0(0);
   int nfit;
   std::vector<double> errorM(4);
-
-  fitRecPhi( pmom, phiId, phiHitx, phiHity, phiHitz, phiError, quality, nphi, phiPull, phiMult, phiSelect, chi2, r0, m_phi, errorM, nfit);
+  double phi(DBL_MAX);
+  fitRecPhi( pmom, phiId, phiHitx, phiHity, phiHitz, phiError, quality, nphi, phiPull, phiMult, phiSelect, chi2, r0, phi, errorM, nfit);
   
   // Define global track parameters (not used 27-8 JS)
 
@@ -199,11 +199,11 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
 	if (rio) selectedHits->push_back(rio);
       }
 
-      if (m_debug) std::cout << " Make ONE rio per PrepData " << std::endl;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Make ONE rio per PrepData");
     }
   } 
-  if (m_debug||m_summary) { 
-    std::cout << " Fit hit results phi " << m_phi << " chi2 " << chi2 <<  " segment hits  " << nphiseg << " pattern hits " << nphi-nphiseg << " nfit " << nfit << " rio size " << selectedHits->size() << std::endl;
+  if (msgLvl(MSG::DEBUG)||m_summary) {
+    ATH_MSG_DEBUG("Fit hit results phi " << phi << " chi2 " << chi2 <<  " segment hits  " << nphiseg << " pattern hits " << nphi-nphiseg << " nfit " << nfit << " rio size " << selectedHits->size());
   } 
 
   std::vector<double> clusterX(nphi);
@@ -239,24 +239,24 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
       }
     }
     if (iic > -1) {
-      if (m_debug) std::cout << " Phi cluster found np " << np << " ip " << ip << std::endl;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi cluster found np " << np << " ip " << ip);
       if (np ==1) {
 	// Only one PrepData: create RIO on Track
 	const Amg::Vector3D globalpos(clusterX[ic],clusterY[ic],clusterZ[ic]);
 	if (phiSelect[ip] == 1) {
-	  if (m_debug) std::cout << " Phi RPC rio " << std::endl;
+	  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi RPC rio");
 	  const Muon::RpcPrepData* prd = dynamic_cast <const Muon::RpcPrepData*> (phiPrep[ip]);
 	  const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
 	  if (rio) selectedClusters->push_back(rio);
         }
         else if (phiSelect[ip] == 2) {
-	  if (m_debug) std::cout << " Phi TGC rio " << std::endl;
+	  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi TGC rio");
 	  const Muon::TgcPrepData* prd = dynamic_cast <const Muon::TgcPrepData*> (phiPrep[ip]);
 	  const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
 	  if (rio) selectedClusters->push_back(rio);
         }
         else if (phiSelect[ip] == 3) {
-	  if (m_debug) std::cout << " Phi CSC rio " << std::endl;
+	  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi CSC rio");
 	  const Muon::CscPrepData* prd = dynamic_cast <const Muon::CscPrepData*> (phiPrep[ip]);
 	  const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
 	  if (rio) selectedClusters->push_back(rio);
@@ -265,29 +265,29 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
 
         if (m_competingRios) {
 	  // More PrepData's: create Competing RIOs on Track
-	  avError = sqrt(1./avError);
+	  avError = std::sqrt(1./avError);
 	  double scaleFactor = clusterError[ic]/avError;
 	  const Trk::CompetingRIOsOnTrack*  rio = m_competingRIOsOnTrackTool->createBroadCluster(prdList,scaleFactor);
 	  if (rio) selectedClusters->push_back(rio);
-	  if (m_debug) std::cout << " Make competing rio/cluster " << " scale factor " << scaleFactor << " number of rios " << prdList.size() << std::endl;
+	  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Make competing rio/cluster " << " scale factor " << scaleFactor << " number of rios " << prdList.size());
         } else {
 	  // Make one Rio for central cluster
           ip = iic;
           const Amg::Vector3D globalpos(clusterX[ic],clusterY[ic],clusterZ[ic]);
           if (phiSelect[ip] == 1) {
-            if (m_debug) std::cout << " Phi RPC rio central cluster" << std::endl;
+            if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi RPC rio central cluster");
             const Muon::RpcPrepData* prd = dynamic_cast <const Muon::RpcPrepData*> (phiPrep[ip]);
             const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
             if (rio) selectedClusters->push_back(rio);
 	  }
 	  else if (phiSelect[ip] == 2) {
-            if (m_debug) std::cout << " Phi TGC rio central cluster" << std::endl;
+            if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi TGC rio central cluster");
             const Muon::TgcPrepData* prd = dynamic_cast <const Muon::TgcPrepData*> (phiPrep[ip]);
             const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
             if (rio) selectedClusters->push_back(rio);
 	  }
 	  else if (phiSelect[ip] == 3) {
-            if (m_debug) std::cout << " Phi CSC rio central cluster" << std::endl;
+            if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi CSC rio central cluster");
             const Muon::CscPrepData* prd = dynamic_cast <const Muon::CscPrepData*> (phiPrep[ip]);
             const Muon::MuonClusterOnTrack* rio = m_clusterCreator->createRIO_OnTrack(*prd,globalpos);
             if (rio) selectedClusters->push_back(rio);
@@ -295,20 +295,18 @@ std::vector<const Trk::MeasurementBase*>* MuonPhiHitSelector::select_rio( const
         }
       }
     }else {
-      if (m_debug) std::cout << " Phi cluster NOT found " << std::endl;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Phi cluster NOT found ");
     }
   }      
 
   fitPhiSL(pmom, clusterId, clusterX, clusterY, clusterZ, clusterError, clusterSelect, ncl, clusterPull, imax, chi2cl, r0cl, phicl, errorMcl , false );
 
 
-  if (m_debug||m_summary) { 
-    std::cout << " PhiHitSelector Time spent "  << std::clock()/1000-time_start << " nhits " << nhits << " segment hits " << associatedHits.size() << " nfit " << nfit << " nclusters " << ncl << std::endl;
-    std::cout << " Fit cluster results phi " << phicl << " chi2 " << chi2cl <<  " number of clusters  " << ncl << " size cluster Hits " << selectedClusters->size() << std::endl;
+  if (msgLvl(MSG::DEBUG)||m_summary) {
+    ATH_MSG_DEBUG("PhiHitSelector Time spent "  << std::clock()/1000-time_start << " nhits " << nhits << " segment hits " << associatedHits.size() << " nfit " << nfit << " nclusters " << ncl);
+    ATH_MSG_DEBUG("Fit cluster results phi " << phicl << " chi2 " << chi2cl <<  " number of clusters  " << ncl << " size cluster Hits " << selectedClusters->size());
   }
   if (m_makeClusters) {
-    m_phi = phicl;
-
     std::vector<const Trk::MeasurementBase*>::iterator mit = selectedHits->begin();
     for (;mit!=selectedHits->end();++mit){
       delete *mit;
@@ -351,7 +349,7 @@ void MuonPhiHitSelector::clusterPhi( const std::vector<Identifier> & id,  const
   //         phi           = azimuthal angle of fit at perigee
 
 
-  if (m_debug) std::cout << " Start phi clustering " << std::endl;
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Start phi clustering");
 
   ncl = 0;
   if (n ==0) return;
@@ -422,7 +420,7 @@ void MuonPhiHitSelector::clusterPhi( const std::vector<Identifier> & id,  const
 	  clusterY[ic]+= hity[i]*w; 
 	  clusterZ[ic]+= hitz[i]*w; 
 	  clusterError[ic]+= w; 
-	  if ( fabs(pull[i]) < fabs(pullMax)) {
+	  if ( std::abs(pull[i]) < std::abs(pullMax)) {
 	    pullMax = pull[i];
 	    clusterId[ic] = id[i];
 	    clusterCode[ic] = scode[i];
@@ -437,9 +435,9 @@ void MuonPhiHitSelector::clusterPhi( const std::vector<Identifier> & id,  const
     clusterY[ic] = clusterY[ic]/clusterError[ic]; 
     clusterZ[ic] = clusterZ[ic]/clusterError[ic]; 
 // Don't assume improvement on errors due to clustering 
-    clusterError[ic]= sqrt(clusterHits[ic])/sqrt(clusterError[ic]); 
-    if (m_debug) {
-      std::cout << " cluster phi " << ic << " x " << clusterX[ic] << " y " << clusterY[ic] << " z " << clusterZ[ic] << " error " << clusterError[ic] << " hits " << clusterHits[ic] <<  " select " << clusterSelect[ic] << " Code " << clusterCode[ic] << std::endl;  
+    clusterError[ic]= std::sqrt(clusterHits[ic])/std::sqrt(clusterError[ic]);
+    if (msgLvl(MSG::DEBUG)) {
+      ATH_MSG_DEBUG("cluster phi " << ic << " x " << clusterX[ic] << " y " << clusterY[ic] << " z " << clusterZ[ic] << " error " << clusterError[ic] << " hits " << clusterHits[ic] <<  " select " << clusterSelect[ic] << " Code " << clusterCode[ic]);
     }
   }
   
@@ -450,7 +448,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
   // Use reconstructed hits to perform fit for phi
   //
 
-  if (m_debug) std::cout << " Start phi fit reconstruction " << std::endl;
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Start phi fit reconstruction");
 
   chi2 =0.;
   r0 = 0.;
@@ -528,7 +526,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
   }
 
   // Assign errors according to multiplicities
-    if(m_debug) std::cout << " phi hits " << nphi << " segment clusters " << clusters.size() << " pattern clusters " << clusterspat.size() << std::endl;
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("phi hits " << nphi << " segment clusters " << clusters.size() << " pattern clusters " << clusterspat.size());
 
   for(int i = 0; i < nphi  ; ++i )  {
     error0[i] = 0;
@@ -558,14 +556,14 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       else if (m_idHelperSvc->isTgc(id)) n = 1;
       else if (m_idHelperSvc->isCsc(id)) n = 1;
            
-      error0[i]=phiError[i]*sqrt(n)*fact;  
-      error[i]=phiError[i]*sqrt(n)*fact;  
-      double phiHit = atan2 ( phiHity[i], phiHitx[i] );
-      if (m_debug) {
-	std::cout << i << " Station " << int(scode[i]/1000000) << " Hit x " << phiHitx[i] << " Hit y " << phiHity[i] << " Hit z " << phiHitz[i] << " error " << phiError[i] << " phi Hit " << phiHit << std::endl; 
-	std::cout << " station " << phiSelect[i] << std::endl;
-	std::cout << " code " << scode[i] << " multiplicity " << n << " error " << error0[i] << " quality " << quality[i] << std::endl;
-	if ( error0[i] < 1. ) std::cout << " TOO small error " << std::endl;
+      error0[i]=phiError[i]*std::sqrt(n)*fact;
+      error[i]=phiError[i]*std::sqrt(n)*fact;
+      double phiHit = std::atan2 ( phiHity[i], phiHitx[i] );
+      if (msgLvl(MSG::DEBUG)) {
+	ATH_MSG_DEBUG(i << " Station " << int(scode[i]/1000000) << " Hit x " << phiHitx[i] << " Hit y " << phiHity[i] << " Hit z " << phiHitz[i] << " error " << phiError[i] << " phi Hit " << phiHit);
+	ATH_MSG_DEBUG("station " << phiSelect[i]);
+	ATH_MSG_DEBUG("code " << scode[i] << " multiplicity " << n << " error " << error0[i] << " quality " << quality[i]);
+	if ( error0[i] < 1. ) ATH_MSG_DEBUG("TOO small error ");
       }
     }
   }
@@ -591,7 +589,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       pfit = pmom;
     } 
 
-    if (m_debug) std::cout << " Quality loop " << iqua << " quality cut " << quacut << std::endl;
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Quality loop " << iqua << " quality cut " << quacut);
     int nsel = 0;
     int nselseg = 0;   
     for(int i = 0; i < nphi  ; ++i )  {
@@ -605,7 +603,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       } else {
 	phiSelect[i] = 0;
       }
-      if (m_debug) std::cout << " index i " << i << " phiSelect " <<  phiSelect[i] << " Quality " << quality[i] << " error " << error[i]  << std::endl;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("index i " << i << " phiSelect " <<  phiSelect[i] << " Quality " << quality[i] << " error " << error[i]);
     }
 
     int imax = -1;
@@ -619,22 +617,21 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
           phiPatSelect[i] = 1;
           error[i] = errorScaleFactor*error[i];
         }
-        if (m_debug) std::cout << " select " << phiSelect[i] << " quality " << quality[i] << " error " << error[i] << std::endl;
+        if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("select " << phiSelect[i] << " quality " << quality[i] << " error " << error[i]);
       }
-      if (m_debug) std::cout << " performing outlier removal for pattern hits " << std::endl; 
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("performing outlier removal for pattern hits ");
       fitPhiSL(pfit, phiId,  phiHitx,  phiHity,  phiHitz, error, phiSelect, nphi, phiPull, imax, chi2, r0, phi, errorM , false);
       for(int i = 0; i < nphi  ; ++i )  {
         if(phiPatSelect[i] == 1) {
           error[i] = error[i]/errorScaleFactor;
 	  double rescaledPull = phiPull[i]*errorScaleFactor;
 	  // 3 sigma cut  
-          if (fabs(rescaledPull) < 3.) {
+          if (std::abs(rescaledPull) < 3.) {
             phiSelect[i] = phiSelectKeep[i];
           } else {
             phiSelect[i] = 0;
             phiSelectKeep[i] = 0;
-       	    if (m_debug) std::cout << " Drop Pattern Hits with Quality == 1 " << i << " quality " << quality[i] 
-				   << " Pull " << rescaledPull << " phiSelect " << phiSelect[i] << std::endl;
+       	    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Drop Pattern Hits with Quality == 1 " << i << " quality " << quality[i] << " Pull " << rescaledPull << " phiSelect " << phiSelect[i]);
 	  }
         }
       }
@@ -647,7 +644,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       // low momentum fit with scaled error (factor 10) for dropped segment hits 
       std::vector<int> phiReSelect(nphi);
       for(int i = 0; i < nphi  ; ++i )  {
-        if (m_debug) std::cout << " select " << phiSelect[i] << " quality " << quality[i] << std::endl;
+        if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("select " << phiSelect[i] << " quality " << quality[i]);
         phiReSelect[i] = 0;
         if(phiSelect[i] == 0 && quality[i] > 99) {
           phiReSelect[i] = 1;
@@ -660,16 +657,16 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
         if(phiReSelect[i] == 1) {
           error[i] = error[i]/10.;
 	  // 10 sigma cut (error rescale = 10) 
-          if (fabs(phiPull[i]) < 1) {
+          if (std::abs(phiPull[i]) < 1) {
             phiSelect[i] = phiSelectKeep[i];
           } else {
             phiSelect[i] = 0;
           } 
-          if (m_debug) std::cout << " Low momentum Quality == 2 add hit  nr " << i << " quality " << quality[i] << " Pull " << phiPull[i] << " phiSelect " << phiSelect[i] << std::endl;
+          if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Low momentum Quality == 2 add hit  nr " << i << " quality " << quality[i] << " Pull " << phiPull[i] << " phiSelect " << phiSelect[i]);
         }
       }
     }
-    if (iqua == 1 && m_debug) std::cout << " Quality loop " << std::endl;
+    if (iqua == 1 && msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Quality loop ");
     nsel = 0;
     for(int i = 0; i < nphi  ; ++i )  {
       errorf[i] = error[i];
@@ -683,7 +680,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       }
     } 
 
-    if(m_debug) std::cout << " Selected PHI hits in fit " << nsel << " iqua " << iqua << std::endl; 
+    if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Selected PHI hits in fit " << nsel << " iqua " << iqua);
     if (nsel == 0) continue;
 
     int niter = -1;
@@ -698,7 +695,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       if (iter > 10) {
 // Shower treatment inflate errors with multiplicity
         for(int i = 0; i < nphi  ; ++i )  {
-         errorf[i] = error[i]*pow(phiMult[i],power);
+         errorf[i] = error[i]*std::pow(phiMult[i],power);
         }
       } 
       fitPhiSL(pfitc, phiId,  phiHitx,  phiHity,  phiHitz, errorf, phiSelect, nphi, phiPull, imax, chi2, r0, phi, errorM, false );
@@ -716,7 +713,7 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
 	if ( error[i] == 0 || quality[i] < quacut) phiSelect[i] = 0;
 	if ( error[i] != 0 && quality[i] > quacut) {
 	  layersRecoHit[srcode[i]]++;
-	  if (m_debug) {
+	  if (msgLvl(MSG::DEBUG)) {
 	    if (m_idHelperSvc->isRpc(id)) nrpc++;
 	    else if (m_idHelperSvc->isTgc(id)) ntgc++;
 	    else if (m_idHelperSvc->isCsc(id)) ncsc++;
@@ -730,26 +727,26 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
       if (nfit == 1) break;
 
       if (imax < 0 || imax > nphi ) {
-	if (m_debug) std::cout << " Fitphi imax " << imax << std::endl;
+	if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Fitphi imax " << imax);
 	break;
       }
 
-      if (chi2 < 5*(nfit+1) || fabs(phiPull[imax]) < 3.0 ) {
+      if (chi2 < 5*(nfit+1) || std::abs(phiPull[imax]) < 3.0 ) {
  
-	if (m_debug) std::cout << " Final phi " << phi << " frac " << frac << " chi2 " << chi2 << std::endl; 
+	if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Final phi " << phi << " frac " << frac << " chi2 " << chi2);
 	break;
       } 
 
       phiSelect[imax] = 0;
 
-      if (m_debug) { 
-	std::cout << " = Start hit dropping " << imax << " pullmax " << phiPull[imax] << " phi " << phi << " chi2 " << chi2 << std::endl; 
+      if (msgLvl(MSG::DEBUG)) {
+	ATH_MSG_DEBUG("Start hit dropping " << imax << " pullmax " << phiPull[imax] << " phi " << phi << " chi2 " << chi2);
       }
     }
 
-    if (m_debug) { 
-      std::cout << " Fit results phi " << phi << " chi2 " << chi2 <<  " ndof " << nfit << std::endl;
-      std::cout << " Reco RPC " << nrpc << " TGC " << ntgc << " CSC " << ncsc << std::endl;
+    if (msgLvl(MSG::DEBUG)) {
+      ATH_MSG_DEBUG("Fit results phi " << phi << " chi2 " << chi2 <<  " ndof " << nfit);
+      ATH_MSG_DEBUG("Reco RPC " << nrpc << " TGC " << ntgc << " CSC " << ncsc);
     }
 
     
@@ -758,16 +755,16 @@ void MuonPhiHitSelector::fitRecPhi( const double pmom, const std::vector<Identif
     for(int i = 0; i < nphi  ; ++i )  {
       double power = (niter - 10)/20.;
       if (power< 0.) power = 0.;
-      double pull = phiPull[i]*pow(phiMult[i],power);
-      if (niter > 10 && fabs(pull) > 3.0 && phiSelect[i] > 0 ) {
+      double pull = phiPull[i]*std::pow(phiMult[i],power);
+      if (niter > 10 && std::abs(pull) > 3.0 && phiSelect[i] > 0 ) {
         phiSelect[i] = 0;
         quality[i] = 0;
         nshowerdrop++;
-        if (m_debug) std::cout << " Drop shower hit i " << i << " with pull " << pull << " iterations " << niter  << " power " << power << std::endl;  
+        if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Drop shower hit i " << i << " with pull " << pull << " iterations " << niter  << " power " << power);
       }
       if( phiSelect[i] != 0) nacc++;
     }
-    if(m_debug) std::cout << " phi hits " << nphi << " selected for fit " << nfit << " iqua " << iqua << " iterations " << niter << " accepted hits " << nacc << " nshower drop " << nshowerdrop << std::endl; 
+    if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("phi hits " << nphi << " selected for fit " << nfit << " iqua " << iqua << " iterations " << niter << " accepted hits " << nacc << " nshower drop " << nshowerdrop);
   }
 }
 
@@ -812,7 +809,7 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
       double inver2 = 1./(error[i]*error[i]); 
       xm +=  hitx[i]*inver2;
       ym +=  hity[i]*inver2;
-      dtot +=  sqrt (hitx[i]*hitx[i] + hity[i]*hity[i] + hitz[i]*hitz[i] )*inver2 ;
+      dtot +=  std::sqrt (hitx[i]*hitx[i] + hity[i]*hity[i] + hitz[i]*hitz[i] )*inver2 ;
       em +=  inver2;
     }
   }
@@ -826,7 +823,7 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
   double ebs = 0.1;
   if (m_cosmics) ebs = 10000.;
 
-  if (m_debug) std::cout << " pmom " << pmom << " error beam " << ebs << std::endl;
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("pmom " << pmom << " error beam " << ebs);
   double ebs2 = ebs*ebs;
   double invebs2 = 1./ebs2;
   double xmc = xm / ( em + invebs2); 
@@ -858,14 +855,14 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
     }
   }
     
-  if (em>0) phi = atan2(ycc,xcc);
+  if (em>0) phi = std::atan2(ycc,xcc);
   CxxUtils::sincos scphi(phi);
 
   r0 = xmc*scphi.sn - ymc*scphi.cs; 
   double x0 = r0*scphi.sn;
   double y0 = -r0*scphi.cs; 
 
-  if(m_debug) std::cout << " Constraint r0 " << r0 << " xpos " << xmc << " ypos " << ymc << " phi " << phi << std::endl; 
+  if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Constraint r0 " << r0 << " xpos " << xmc << " ypos " << ymc << " phi " << phi);
   // assume 0,0
   std::vector<double> d(n);       
   std::vector<double> dist(n);       
@@ -877,11 +874,11 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
       double ydiff = hity[i]-y0;
       double xdiff2 = xdiff*xdiff;
       double ydiff2 = ydiff*ydiff;
-      d[i] = sqrt(xdiff2 + ydiff2);
-      dist[i] = sqrt(xdiff2 + ydiff2 + hitz[i]*hitz[i]);
+      d[i] = std::sqrt(xdiff2 + ydiff2);
+      dist[i] = std::sqrt(xdiff2 + ydiff2 + hitz[i]*hitz[i]);
       distanceSort[dist[i]] = i;
       pull[i] = hitx[i]*scphi.sn - hity[i]*scphi.cs - r0;
-      if (fabs(pull[i])> fabs(pullmax)) {
+      if (std::abs(pull[i])> std::abs(pullmax)) {
        pullmax = pull[i];
        imax = i;
       } 
@@ -934,7 +931,7 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
   Amg::MatrixX v(nfit+1,1);
   v.setIdentity();
 
-  if (m_debug) std::cout << "  fitPhiSL " << " nfit " << nfit << std::endl;
+  if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("fitPhiSL " << " nfit " << nfit);
 
   for(int i = 0; i < nfit+1 ; ++i )  {
     v(i,0) = 0.;
@@ -996,10 +993,10 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
   // Solution for Track parameters
   t = covTI*v;
    
-  if (m_debug && fabs(t(1,0))> 0.2 ) {
-    std::cout << " Don't trust fit result " << t(1,0) << " Keep Old result "  << std::endl;
+  if (msgLvl(MSG::DEBUG) && std::abs(t(1,0))> 0.2 ) {
+    ATH_MSG_DEBUG("Don't trust fit result " << t(1,0) << " Keep Old result");
   }
-  if (fabs(t(1,0))> 0.2) return;
+  if (std::abs(t(1,0))> 0.2) return;
     
   // calculate residuals and chi2
   std::vector <double> resi(2*nfit); 
@@ -1023,9 +1020,11 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
      }
   }
 
-  if(m_debug) {
-    if (nfit>=3) {  std::cout << " Error angle " << covTI(3,3) << std::endl;} // covTI has dim nfit+1
-    std::cout << " errorM[3] " << errorM[3] << std::endl;
+  if(msgLvl(MSG::DEBUG)) {
+    if (nfit>=3) {
+     ATH_MSG_DEBUG("Error angle " << covTI(3,3));
+     } // covTI has dim nfit+1
+    ATH_MSG_DEBUG("errorM[3] " << errorM[3]);
   }
 
   for(int i = 0; i < 2*nfit ; ++i )  {
@@ -1035,8 +1034,8 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
     double error2 = 0.;
     double ypred = 0.;
     for(int j = 0; j < nfit+1 ; ++j )  {
-      if(m_debug && i == 0) std::cout << " Parameter j " << j << " t(j,0) " << t(j,0) << std::endl;
-      if(m_debug && model(j,i) != 0) std::cout << " i " << i << " model ij " << model(j,i) << std::endl;
+      if(msgLvl(MSG::DEBUG) && i == 0) ATH_MSG_DEBUG("Parameter j " << j << " t(j,0) " << t(j,0));
+      if(msgLvl(MSG::DEBUG) && model(j,i) != 0) ATH_MSG_DEBUG("i " << i << " model ij " << model(j,i));
       ypred += model(j,i)*t(j,0);
       for(int k = 0; k < nfit+1 ; ++k )  {
 	error2 += model(j,i)*covTI(j,k)*model(k,i);
@@ -1049,20 +1048,18 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
     pulli[i] = resi[i]/ef[i];
 
     // errf propagated error and pullf
-    errf[i] = sqrt(error2);
+    errf[i] = std::sqrt(error2);
     pullf[i] = resi[i]/errf[i];
 
     // calculate residual without hit and error without hit
     //    Think of Kalmanm method to exclude hit and error
     double err2invOut = 1./error2 - inv_ef_i2;
     if (err2invOut > 0) {
-      //        double errinvOut = sqrt(err2invOut);
       resiOut[i] = (ypred/error2 - yf[i]*inv_ef_i2)/err2invOut - yf[i];
-      //        pullOut[i] = resiOut[i]*errinvOut;
-      pullOut[i] = resiOut[i]/sqrt(1./err2invOut+ef_i2);
+      pullOut[i] = resiOut[i]/std::sqrt(1./err2invOut+ef_i2);
     }
 
-    if (fabs(pullOut[i]) > fabs(pullmax) && i < nfit ) {
+    if (std::abs(pullOut[i]) > std::abs(pullmax) && i < nfit ) {
       imax = indexf[i];
       jmax = i;
       pullmax = pullOut[i];
@@ -1072,16 +1069,16 @@ void MuonPhiHitSelector::fitPhiSL(const double pmom, const std::vector<Identifie
     if (i < nfit ) {
       pull[indexf[i]] = pullOut[i];
     }
-    if (m_debug&& i < nfit) std::cout << " i " << i << " index " << indexf[i] << " det " << select[indexf[i]] << " ypred " << ypred << " mst " << yf[i] << " residual " <<  resi[i] << " error " << ef[i] << " dist " << dist[i] << " hitz " << hitz[i] << " Pull " << pulli[i] << " Pullf " << pullf[i] << " resi out " << resiOut[i] << " pull out " << pullOut[i] << std::endl;   
-    if (m_debug&& i > nfit) std::cout << " i " << i <<  " ypred " << ypred << " mst " << yf[i] << " residual " <<  resi[i] << " error " << ef[i] << std::endl;   
+    if (msgLvl(MSG::DEBUG)&& i < nfit) ATH_MSG_DEBUG("i " << i << " index " << indexf[i] << " det " << select[indexf[i]] << " ypred " << ypred << " mst " << yf[i] << " residual " <<  resi[i] << " error " << ef[i] << " dist " << dist[i] << " hitz " << hitz[i] << " Pull " << pulli[i] << " Pullf " << pullf[i] << " resi out " << resiOut[i] << " pull out " << pullOut[i]);
+    if (msgLvl(MSG::DEBUG)&& i > nfit) ATH_MSG_DEBUG("i " << i <<  " ypred " << ypred << " mst " << yf[i] << " residual " <<  resi[i] << " error " << ef[i]);
   }   
   r0 = r0 + t(0,0);
   phi = phi + t(1,0);
 
-  if (m_debug ) std::cout << " delta phi " << t(1,0) << std::endl;
-  if (m_debug && fabs(t(1,0))> 0.1 ) std::cout << " ALARM delta phi " << t(1,0) << std::endl;
+  if (msgLvl(MSG::DEBUG) ) ATH_MSG_DEBUG("delta phi " << t(1,0));
+  if (msgLvl(MSG::DEBUG) && std::abs(t(1,0))> 0.1 ) ATH_MSG_DEBUG("ALARM delta phi " << t(1,0));
  
-  if(m_debug) std:: cout<< " Track parameters r0 " << r0 << " phi " << phi  <<   " chi2 " << chi2 << " jmax " << jmax << " imax " << imax << " pullmax " << pullmax << std::endl;     
+  if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Track parameters r0 " << r0 << " phi " << phi  <<   " chi2 " << chi2 << " jmax " << jmax << " imax " << imax << " pullmax " << pullmax);
       
 }
   
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
index 17d8facbf3ec..10bb2098dd76 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
@@ -374,7 +374,9 @@ namespace Muon {
     entry.nrpcHitsPhi = nrpcHitsPhi;
     entry.ntgcHitsEta = ntgcHitsEta;
     entry.ntgcHitsPhi = ntgcHitsPhi;
+    if (!triggerHitsEta.empty() && etaHits.size()==0) ATH_MSG_WARNING("did not find any eta hits");
     entry.setEtaHits(etaHits);
+    if (!triggerHitsPhi.empty() && phiHits.size()==0) ATH_MSG_WARNING("did not find any phi hits");
     entry.setPhiHits(phiHits);
     entry.setFakePhiHits(fakePhiHits);
     entry.setAllHits(allHits);
@@ -462,7 +464,7 @@ namespace Muon {
         if (prd){ 
           prds.push_back( prd );
         } else {
-          ATH_MSG_ERROR("MuonClusterOnTrack has no PRD.");
+          ATH_MSG_WARNING("MuonClusterOnTrack has no PRD.");
         }
       }
 
-- 
GitLab


From e2f2993a05b15952f149739d7714ab6ce509ea37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Mon, 8 Jun 2020 16:22:46 +0200
Subject: [PATCH 041/266] remove atomic TrackingVolume pointer by setting it in
 initialize

---
 .../CombinedMuonTrackBuilder.h                |  7 ++---
 .../src/CombinedMuonTrackBuilder.cxx          | 29 +++++++++----------
 2 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
index 32a3cc6e9ed3..6846bb641070 100755
--- a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
+++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
@@ -221,8 +221,7 @@ class CombinedMuonTrackBuilder : public AthAlgTool, virtual public ICombinedMuon
     ToolHandle<Trk::ITrackSummaryTool>              m_trackSummary;
     ToolHandle<Trk::ITrkMaterialProviderTool>       m_materialUpdator;
 
-    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc",
-                                                        "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
     // Read handle for conditions object to get the field cache
     SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
@@ -265,9 +264,7 @@ class CombinedMuonTrackBuilder : public AthAlgTool, virtual public ICombinedMuon
     // constants
     const Trk::Volume* m_calorimeterVolume;
     const Trk::Volume* m_indetVolume;
-
-    // constant initialized the first time it's needed
-    mutable std::atomic<const Trk::TrackingVolume*> m_spectrometerEntrance{nullptr};
+    const Trk::TrackingVolume* m_spectrometerEntrance;
 
     // vertex region and phi modularity for pseudo-measurement constraints
     Trk::RecVertex*      m_beamAxis;
diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
index bbeeef5eb042..bf8204a11ef2 100755
--- a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
+++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
@@ -107,6 +107,7 @@ CombinedMuonTrackBuilder::CombinedMuonTrackBuilder(const std::string& type, cons
       m_inputSlimming(false),
       m_calorimeterVolume(nullptr),
       m_indetVolume(nullptr),
+      m_spectrometerEntrance(nullptr),
       m_beamAxis(nullptr),
       m_perigeeSurface(nullptr),
       m_sigmaPhiSector(0),
@@ -366,6 +367,15 @@ CombinedMuonTrackBuilder::initialize()
     m_vertex->dump(msg(MSG::DEBUG));
 #endif
 
+    if (!m_trackingGeometrySvc) {
+        m_perigeeAtSpectrometerEntranceLocal = false;
+        // missing TrackingGeometrySvc - no perigee will be added at MS entrance
+        m_messageHelper->printWarning(41);
+    } else {
+      const Trk::TrackingGeometry* trkGeo = m_trackingGeometrySvc->trackingGeometry();
+      if (trkGeo) m_spectrometerEntrance = trkGeo->trackingVolume("MuonSpectrometerEntrance");
+    }
+
     return StatusCode::SUCCESS;
 }
 
@@ -3916,27 +3926,14 @@ CombinedMuonTrackBuilder::entrancePerigee(const Trk::TrackParameters* parameters
     // make sure the spectrometer entrance volume is available
     if (!parameters) return nullptr;
 
-    if (!m_spectrometerEntrance.load()) {
-        if (!m_trackingGeometrySvc) {
-            m_perigeeAtSpectrometerEntranceLocal = false;
-            // missing TrackingGeometrySvc - no perigee will be added at MS entrance
-            m_messageHelper->printWarning(41);
-        } else {
-            m_spectrometerEntrance.store(
-                m_trackingGeometrySvc->trackingGeometry()->trackingVolume("MuonSpectrometerEntrance"));
-        }
-    }
-
-    if (!m_spectrometerEntrance.load()) {
-        return nullptr;
-    }
+    if (!m_spectrometerEntrance) return nullptr;
 
     const Trk::TrackParameters* entranceParameters = m_extrapolator->extrapolateToVolume(
-        *parameters, *m_spectrometerEntrance.load(), Trk::anyDirection, Trk::nonInteracting);
+        *parameters, *m_spectrometerEntrance, Trk::anyDirection, Trk::nonInteracting);
 
     if (!entranceParameters) return nullptr;
 
-    Trk::PerigeeSurface         surface(entranceParameters->position());
+    Trk::PerigeeSurface surface(entranceParameters->position());
     const Trk::TrackParameters* trackParameters = m_extrapolator->extrapolateDirectly(*entranceParameters, surface);
     delete entranceParameters;
 
-- 
GitLab


From 34bf961161796a54d92d508f46e7d055f612b55e Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Mon, 8 Jun 2020 16:44:21 +0200
Subject: [PATCH 042/266] Change muon trigger input maker to merge by feature

Since we can find multiple SA muons in a single view, changing the input maker for the subsequent steps to merge-by-feature instead of merge-by-roi as discussed in ATR-21548.
Reference updated since this affects the way the features are counted.
---
 .../share/ref_RDOtoRDOTrig_mt1_build.ref      | 26 +++++++++----------
 .../HLTMenuConfig/Muon/MuonSequenceSetup.py   |  1 +
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
index d126bbd2492b..869acfa17a01 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
@@ -39,31 +39,31 @@ TrigSignatureMoniMT                                INFO -- #557204938 Events
 TrigSignatureMoniMT                                INFO -- #557204938 Features                              12         4          4          4          -          -
 TrigSignatureMoniMT                                INFO HLT_2mu4_bDimu_L12MU4 #1730084172
 TrigSignatureMoniMT                                INFO -- #1730084172 Events         4          4          4          4          4          4          -          -          1
-TrigSignatureMoniMT                                INFO -- #1730084172 Features                             16         16         24         11         -          -
+TrigSignatureMoniMT                                INFO -- #1730084172 Features                             16         16         24         19         -          -
 TrigSignatureMoniMT                                INFO HLT_2mu4_bJpsimumu_L12MU4 #4276347155
 TrigSignatureMoniMT                                INFO -- #4276347155 Events         4          4          4          4          4          4          -          -          1
-TrigSignatureMoniMT                                INFO -- #4276347155 Features                             16         16         24         11         -          -
+TrigSignatureMoniMT                                INFO -- #4276347155 Features                             16         16         24         19         -          -
 TrigSignatureMoniMT                                INFO HLT_2mu4_bUpsimumu_L12MU4 #4008168535
 TrigSignatureMoniMT                                INFO -- #4008168535 Events         4          4          4          4          4          4          -          -          0
-TrigSignatureMoniMT                                INFO -- #4008168535 Features                             16         16         24         10         -          -
+TrigSignatureMoniMT                                INFO -- #4008168535 Features                             16         16         24         18         -          -
 TrigSignatureMoniMT                                INFO HLT_2mu4_muonqual_L12MU4 #1584776935
 TrigSignatureMoniMT                                INFO -- #1584776935 Events         4          4          4          4          4          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1584776935 Features                             16         16         24         20         -          -
+TrigSignatureMoniMT                                INFO -- #1584776935 Features                             16         16         24         36         -          -
 TrigSignatureMoniMT                                INFO HLT_2mu6Comb_L12MU6 #2046267508
 TrigSignatureMoniMT                                INFO -- #2046267508 Events         4          4          4          3          -          -          -          -          3
 TrigSignatureMoniMT                                INFO -- #2046267508 Features                             16         12         -          -          -          -
 TrigSignatureMoniMT                                INFO HLT_2mu6_10invm70_L1MU6 #1316992871
 TrigSignatureMoniMT                                INFO -- #1316992871 Events         10         10         4          3          3          3          2          -          0
-TrigSignatureMoniMT                                INFO -- #1316992871 Features                             16         12         18         16         2          -
+TrigSignatureMoniMT                                INFO -- #1316992871 Features                             16         12         18         28         2          -
 TrigSignatureMoniMT                                INFO HLT_2mu6_Dr_L12MU4 #3304584056
 TrigSignatureMoniMT                                INFO -- #3304584056 Events         4          4          4          3          -          -          -          -          3
 TrigSignatureMoniMT                                INFO -- #3304584056 Features                             16         12         -          -          -          -
 TrigSignatureMoniMT                                INFO HLT_2mu6_L12MU6 #1747073535
 TrigSignatureMoniMT                                INFO -- #1747073535 Events         4          4          4          3          3          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #1747073535 Features                             16         12         18         16         -          -
+TrigSignatureMoniMT                                INFO -- #1747073535 Features                             16         12         18         28         -          -
 TrigSignatureMoniMT                                INFO HLT_2mu6_muonqual_L12MU6 #2398136098
 TrigSignatureMoniMT                                INFO -- #2398136098 Events         4          4          4          3          3          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #2398136098 Features                             16         12         18         16         -          -
+TrigSignatureMoniMT                                INFO -- #2398136098 Features                             16         12         18         28         -          -
 TrigSignatureMoniMT                                INFO HLT_3j200_L1J100 #2199422919
 TrigSignatureMoniMT                                INFO -- #2199422919 Events         3          3          0          -          -          -          -          -          0
 TrigSignatureMoniMT                                INFO -- #2199422919 Features                             0          -          -          -          -          -
@@ -366,22 +366,22 @@ TrigSignatureMoniMT                                INFO -- #996392590 Events
 TrigSignatureMoniMT                                INFO -- #996392590 Features                              14         13         -          -          -          -
 TrigSignatureMoniMT                                INFO HLT_mu6_L1MU6 #2560542253
 TrigSignatureMoniMT                                INFO -- #2560542253 Events         10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #2560542253 Features                             14         13         16         15         -          -
+TrigSignatureMoniMT                                INFO -- #2560542253 Features                             14         13         16         21         -          -
 TrigSignatureMoniMT                                INFO HLT_mu6_idperf_L1MU6 #934918532
 TrigSignatureMoniMT                                INFO -- #934918532 Events          10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #934918532 Features                              14         14         17         18         -          -
+TrigSignatureMoniMT                                INFO -- #934918532 Features                              14         14         17         27         -          -
 TrigSignatureMoniMT                                INFO HLT_mu6_ivarmedium_L1MU6 #1012713062
 TrigSignatureMoniMT                                INFO -- #1012713062 Events         10         10         10         10         10         10         6          -          6
-TrigSignatureMoniMT                                INFO -- #1012713062 Features                             14         13         16         15         6          -
+TrigSignatureMoniMT                                INFO -- #1012713062 Features                             14         13         16         21         6          -
 TrigSignatureMoniMT                                INFO HLT_mu6_msonly_L1MU6 #3895421032
 TrigSignatureMoniMT                                INFO -- #3895421032 Events         10         10         10         0          10         -          -          -          10
 TrigSignatureMoniMT                                INFO -- #3895421032 Features                             14         0          17         -          -          -
 TrigSignatureMoniMT                                INFO HLT_mu6_mu4_L12MU4 #1713982776
 TrigSignatureMoniMT                                INFO -- #1713982776 Events         4          4          4          4          4          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1713982776 Features                             8          8          12         10         -          -
+TrigSignatureMoniMT                                INFO -- #1713982776 Features                             8          8          12         18         -          -
 TrigSignatureMoniMT                                INFO HLT_mu6_mu6noL1_L1MU6 #451489897
 TrigSignatureMoniMT                                INFO -- #451489897 Events          10         10         10         10         10         10         6          4          4
-TrigSignatureMoniMT                                INFO -- #451489897 Features                              14         13         16         15         9          7
+TrigSignatureMoniMT                                INFO -- #451489897 Features                              14         13         16         21         9          7
 TrigSignatureMoniMT                                INFO HLT_mu6fast_L1MU6 #3518031697
 TrigSignatureMoniMT                                INFO -- #3518031697 Events         10         10         10         -          -          -          -          -          10
 TrigSignatureMoniMT                                INFO -- #3518031697 Features                             14         -          -          -          -          -
@@ -390,7 +390,7 @@ TrigSignatureMoniMT                                INFO -- #761101109 Events
 TrigSignatureMoniMT                                INFO -- #761101109 Features                              10         0          0          -          -          -
 TrigSignatureMoniMT                                INFO HLT_mu8_L1MU6 #1467711434
 TrigSignatureMoniMT                                INFO -- #1467711434 Events         10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #1467711434 Features                             14         13         15         15         -          -
+TrigSignatureMoniMT                                INFO -- #1467711434 Features                             14         13         15         19         -          -
 TrigSignatureMoniMT                                INFO HLT_noalg_L1EM10VH #314199913
 TrigSignatureMoniMT                                INFO -- #314199913 Events          11         11         -          -          -          -          -          -          11
 TrigSignatureMoniMT                                INFO -- #314199913 Features                              -          -          -          -          -          -
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
index 1d49eeb29e5e..b2b522ddb746 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
@@ -269,6 +269,7 @@ def muEFCBAlgSequence(ConfigFlags):
     #
     efcbViewsMaker.RequireParentView = True
     efcbViewsMaker.ViewFallThrough = True
+    efcbViewsMaker.mergeUsingFeature = True
 
     #outside-in reco sequence
     muEFCBRecoSequence, sequenceOutCB = muEFCBRecoSequence( efcbViewsMaker.InViewRoIs, "RoI" )
-- 
GitLab


From 16037089691fd0d0858612fe4f61e65dd2655ea1 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Mon, 8 Jun 2020 14:49:36 +0000
Subject: [PATCH 043/266] Use more free functions in the HepMC namespace
 instead of the HepMC2 specific

---
 Generators/AtlasHepMC/AtlasHepMC/GenEvent.h   |  5 ++
 .../AtlasHepMC/AtlasHepMC/GenParticle.h       |  4 ++
 Generators/EvgenProdTools/src/TestHepMC.cxx   | 51 +++++++++----------
 Generators/EvtGen_i/src/EvtInclusiveDecay.cxx |  2 +-
 Generators/HforTool/src/HforTool.cxx          |  5 +-
 .../ParticleDecayer/src/ParticleDecayer.cxx   |  4 +-
 Generators/Pythia8B_i/src/Pythia8B_i.cxx      |  2 +-
 .../TruthIO/src/ReadHepEvtFromAscii.cxx       | 14 ++---
 8 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
index df51a269bd71..cb9bceff26c1 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
@@ -26,6 +26,11 @@ template <class T> void set_random_states(GenEvent* e, std::vector<T> a) {
 template <class T> void set_signal_process_vertex(GenEvent* e, T v) {
     e->set_signal_process_vertex(v);
 }
+namespace Print {
+inline void line(std::ostream& os,const GenEvent& e){e.print(os);}
+inline void line(std::ostream& os,const GenEvent* e){e->print(os);}
+}
+inline bool valid_beam_particles(const GenEvent* e){return e->valid_beam_particles();}
 }
 #include "AtlasHepMC/SimpleVector.h"
 #endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
index 2d0aaae21d5a..d96e0e501729 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
@@ -14,5 +14,9 @@ inline int barcode(GenParticle p) {   return    p.barcode(); }
 template <class T> inline int barcode(T p) {   return    p->barcode(); }
 inline void suggest_barcode(GenParticle p, int i){p.suggest_barcode(i);}
 template <class T> void suggest_barcode(T* p, int i){p->suggest_barcode(i);}
+namespace Print {
+inline void line(std::ostream& os,const GenParticle& p){p.print(os);}
+inline void line(std::ostream& os,const GenParticle* p){p->print(os);}
+}
 }
 #endif
diff --git a/Generators/EvgenProdTools/src/TestHepMC.cxx b/Generators/EvgenProdTools/src/TestHepMC.cxx
index 60a430e052cf..17bf49ddbeae 100644
--- a/Generators/EvgenProdTools/src/TestHepMC.cxx
+++ b/Generators/EvgenProdTools/src/TestHepMC.cxx
@@ -280,7 +280,7 @@ StatusCode TestHepMC::execute() {
     // Check beams and work out per-event beam energy
     const pair<HepMC::GenParticlePtr, HepMC::GenParticlePtr> beams = evt->beam_particles();
     double cmenergy = m_cm_energy;
-    if (!evt->valid_beam_particles()) {
+    if (!HepMC::valid_beam_particles(evt)) {
       ATH_MSG_WARNING("Invalid beam particle pointers -- this generator interface should be fixed");
       if (cmenergy < 0) ATH_MSG_WARNING("Invalid expected beam energy: " << cmenergy << " MeV");
       ++m_invalidBeamParticlesCheckRate;
@@ -321,7 +321,7 @@ StatusCode TestHepMC::execute() {
         ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record vertex positions");
         
         ++m_vtxNANandINFCheckRate;
-        if (m_dumpEvent) (*itr)->print();
+        if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
         if (m_vtxNaNTest) {
           filter_pass = false;
         }
@@ -344,18 +344,16 @@ StatusCode TestHepMC::execute() {
       if (dist_trans2 > m_max_dist_trans*m_max_dist_trans) {
         ATH_MSG_WARNING("Found vertex position displaced by more than " << m_max_dist_trans << "mm in transverse distance: " << dist_trans << "mm");
 
-        HepMC::GenVertex::particle_iterator par = (*vitr)->particles_begin(HepMC::parents);
-        for (; par != (*vitr)->particles_end(HepMC::parents); ++par) {
+        for (auto par = vtx->particles_in_const_begin(); par != vtx->particles_in_const_end(); ++par) {
           ATH_MSG_WARNING("Outgoing particle : ");
-          if (m_dumpEvent) (*par)->print();
+          if (m_dumpEvent) HepMC::Print::line(std::cout,*par);
           ATH_MSG_WARNING("production vertex = " << (*par)->production_vertex()->position().x() << ", " << (*par)->production_vertex()->position().y() << ", " << (*par)->production_vertex()->position().z());
           ATH_MSG_WARNING("end vertex        = " << (*par)->end_vertex()->position().x() << ", " << (*par)->end_vertex()->position().y() << ", " << (*par)->end_vertex()->position().z());
           ATH_MSG_WARNING("parents info: ");
           if ((*par)->production_vertex()) {
-            HepMC::GenVertex::particle_iterator p_parents = (*par)->production_vertex()->particles_begin(HepMC::parents);
-            for(; p_parents != (*par)->production_vertex()->particles_end(HepMC::parents); ++p_parents) {
+            for(auto p_parents = (*par)->production_vertex()->particles_in_const_begin(); p_parents != (*par)->production_vertex()->particles_in_const_end(); ++p_parents) {
               // cout << "\t";
-              if (m_dumpEvent) (*p_parents)->print();
+              if (m_dumpEvent) HepMC::Print::line(std::cout,*p_parents);
               ATH_MSG_WARNING("\t");
             }
           } // Done with fancy print
@@ -400,13 +398,13 @@ StatusCode TestHepMC::execute() {
     if (vtxDisplacedstatuscodenot12CheckRateCnt>0) ++m_vtxDisplacedstatuscodenot12CheckRate;
 
     // Check particles
-    for (HepMC::GenEvent::particle_const_iterator pitr = evt->particles_begin(); pitr != evt->particles_end(); ++pitr ) {
+    for (auto pitr = evt->particles_begin(); pitr != evt->particles_end(); ++pitr ) {
 
       // Local loop variables to clean up the check code
       const HepMC::FourVector pmom = (*pitr)->momentum();
       const int pstatus = (*pitr)->status();
       const int ppdgid = (*pitr)->pdg_id();
-      const int pbarcode = (*pitr)->barcode();
+      const int pbarcode = HepMC::barcode(*pitr);
 
       // Check for NaNs and infs in momentum components
       if ( std::isnan(pmom.px()) || std::isinf(pmom.px()) ||
@@ -416,7 +414,7 @@ StatusCode TestHepMC::execute() {
         ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record momenta");
         ++m_partMomentumNANandINFCheckRate;
         
-        if (m_dumpEvent) (*pitr)->print();
+        if (m_dumpEvent) HepMC::Print::line(std::cout,*pitr);
         if (m_momNaNTest) {
           filter_pass = false;
         }
@@ -437,7 +435,7 @@ StatusCode TestHepMC::execute() {
           double plifetime = pd->lifetime()*1e+12;  // why lifetime doesn't come in common units???
           if (plifetime != 0 && plifetime < m_min_tau) { // particles with infinite lifetime get a 0 in the PDT
             ATH_MSG_WARNING("Stable particle found with lifetime = " << plifetime << "~ns!!");
-            if (m_dumpEvent) (*pitr)->print();
+            if (m_dumpEvent) HepMC::Print::line(std::cout,*pitr);
 
             ++m_Status1ShortLifetime;
             
@@ -458,7 +456,7 @@ StatusCode TestHepMC::execute() {
           } // Look through the SUSY table to see if this one should be counted
           if (susyPart==0){
             ATH_MSG_WARNING("Stable particle not found in PDT, no lifetime check done");
-            if (m_dumpEvent) (*pitr)->print();
+            if (m_dumpEvent) HepMC::Print::line(std::cout,*pitr);
           } // It's a SUSY particle -- skip the lifetime check
         } // The particle has no data table
       } // Test if the particle is stable
@@ -523,8 +521,7 @@ StatusCode TestHepMC::execute() {
         auto vtx = (*pitr)->end_vertex();
         if (vtx) {
           double p_energy = 0;
-          HepMC::GenVertex::particle_iterator desc = vtx->particles_begin(HepMC::descendants);
-          for ( ; desc != vtx->particles_end(HepMC::descendants); ++desc) {
+          for (auto  desc = vtx->particles_begin(HepMC::descendants); desc != vtx->particles_end(HepMC::descendants); ++desc) {
             if (abs((*desc)->pdg_id()) == m_pdg) tau_child = 1;
             if ((*desc)->status() == 1) p_energy += (*desc)->momentum().e();
           }
@@ -534,7 +531,7 @@ StatusCode TestHepMC::execute() {
                             << "Event #" << evt->event_number() << ", "
                             << "Barcode of the original particle = " << pbarcode);
             ++m_decayCheckRate;
-            if (m_dumpEvent) (*itr)->print();
+            if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
           }
           //most taus should not decay immediately
           const HepMC::FourVector tau_decaypos = vtx->position();
@@ -544,7 +541,7 @@ StatusCode TestHepMC::execute() {
         } else {
           ATH_MSG_WARNING("UNDECAYED PARTICLE WITH PDG_ID = " << m_pdg);
           ++m_decayCheckRate;
-          if (m_dumpEvent) (*itr)->print();
+          if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
         }
       } // End of checks for specific particle (tau by default)
 
@@ -560,12 +557,12 @@ StatusCode TestHepMC::execute() {
             const HepMC::FourVector pos2 = (*ip)->production_vertex()->position();
             const double displacement2 = pos2.x()*pos2.x() + pos2.y()*pos2.y() + pos2.z()*pos2.z();
             if (displacement2 < 1e-6) {
-              const int pbarcode2 = (*ip)->barcode();
-              const int vbarcode2 = (*ip)->production_vertex()->barcode();
+              const int pbarcode2 = HepMC::barcode(*ip);
+              const int vbarcode2 = HepMC::barcode((*ip)->production_vertex());
               ATH_MSG_WARNING("Decay child " << pbarcode2 << " from " << pbarcode
                               << " has undisplaced vertex (" << vbarcode2
                               << " @ " << displacement2 << "mm) "
-                              << " but parent vertex is displaced (" << decayvtx->barcode()
+                              << " but parent vertex is displaced (" << HepMC::barcode(decayvtx)
                               << " @ " << displacement << "mm)");
               undisplaceds.push_back(pbarcode2);
               ++m_undisplacedLLHdaughtersCheckRate;
@@ -605,7 +602,7 @@ StatusCode TestHepMC::execute() {
       if (m_doHist){
         m_h_energyImbalance->Fill(lostE*1.E-03);
       }
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_energyImbalanceTest) {
         filter_pass = false;
       }
@@ -620,7 +617,7 @@ StatusCode TestHepMC::execute() {
         m_h_momentumImbalance_py->Fill(fabs(totalPy)*1.E-03);
         m_h_momentumImbalance_pz->Fill(fabs(totalPz)*1.E-03);
       }
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_momImbalanceTest) {
         filter_pass = false;
       }
@@ -635,7 +632,7 @@ StatusCode TestHepMC::execute() {
         ss << " " << *b;
       }
       ATH_MSG_WARNING(ss.str());
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_negativeEnergyTest) {
         filter_pass = false;
       }
@@ -650,7 +647,7 @@ StatusCode TestHepMC::execute() {
         ss << " " << *b;
       }
       ATH_MSG_WARNING(ss.str());
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_tachyonsTest) {
         filter_pass = false;
       }
@@ -665,7 +662,7 @@ StatusCode TestHepMC::execute() {
         ss << " " << *b;
       }
       ATH_MSG_WARNING(ss.str());
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_unstableNoVtxTest) {
         filter_pass = false;
       }
@@ -680,7 +677,7 @@ StatusCode TestHepMC::execute() {
         ss << " " << *b;
       }
       ATH_MSG_WARNING(ss.str());
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_pi0NoVtxTest) {
         filter_pass = false;
       }
@@ -695,7 +692,7 @@ StatusCode TestHepMC::execute() {
         ss << " " << *b;
       }
       ATH_MSG_WARNING(ss.str());
-      if (m_dumpEvent) (*itr)->print();
+      if (m_dumpEvent) HepMC::Print::line(std::cout,**itr);
       if (m_undisplacedDaughtersTest) {
         filter_pass = false;
       }
diff --git a/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx b/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx
index 3e5cab71b668..215ae262fb91 100644
--- a/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx
+++ b/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx
@@ -404,7 +404,7 @@ void EvtInclusiveDecay::removeDecayTree(HepMC::GenEvent* hepMC, HepMC::GenPartic
 //
 void EvtInclusiveDecay::decayParticle(HepMC::GenEvent* hepMC, HepMC::GenParticlePtr part) {
   ATH_MSG_DEBUG("Decaying particle " << pdgName(part) << " (barcode " << HepMC::barcode(part) << ")");
-  if (msgLvl(MSG::VERBOSE)) part->print();
+  if (msgLvl(MSG::VERBOSE)) HepMC::Print::line(std::cout,part);
 
   // Remove existing decay tree, if any, and flag particle as being decayed by EvtGen
   removeDecayTree(hepMC,part);
diff --git a/Generators/HforTool/src/HforTool.cxx b/Generators/HforTool/src/HforTool.cxx
index b5fab1f73d85..b296e3195179 100644
--- a/Generators/HforTool/src/HforTool.cxx
+++ b/Generators/HforTool/src/HforTool.cxx
@@ -445,8 +445,9 @@ void HforTool::findHFQuarksHerwig
 	isPDF = true ;
       }
       if ( !isPDF && prodvtx ) {
-	HepMC::GenVertex::particle_iterator pin = prodvtx->particles_begin(HepMC::ancestors) ;
-	for ( ; pin != prodvtx->particles_end(HepMC::ancestors) && !iscquarkfromb && !isPDF ; pin++ ) {
+	HepMC::GenVertex::particle_iterator prodvtx_particles_begin = prodvtx->particles_begin(HepMC::ancestors) ;
+	HepMC::GenVertex::particle_iterator prodvtx_particles_end =    prodvtx->particles_end(HepMC::ancestors) ;
+	for (auto  pin=prodvtx_particles_begin;  pin!= prodvtx_particles_end && !iscquarkfromb && !isPDF ; pin++ ) {
 	  int apdgin = std::abs((*pin)->pdg_id()) ;
 	  if (apdgin != apdg ) {
 	    ATH_MSG_DEBUG("  non b/c parent " << *(*pin));
diff --git a/Generators/ParticleDecayer/src/ParticleDecayer.cxx b/Generators/ParticleDecayer/src/ParticleDecayer.cxx
index a563ae9b18ab..2313facde42d 100644
--- a/Generators/ParticleDecayer/src/ParticleDecayer.cxx
+++ b/Generators/ParticleDecayer/src/ParticleDecayer.cxx
@@ -403,9 +403,9 @@ StatusCode ParticleDecayer::fillEvt(HepMC::GenEvent* event) {
            //lifetime handling of the dark photons
            std::vector<HepMC::GenVertexPtr> dp_end_vertices;
            int polarizationSwitch = 1;
-           HepMC::GenVertex::particles_out_const_iterator pIt    = genpart->end_vertex()->particles_out_const_begin();
+           HepMC::GenVertex::particles_out_const_iterator pItBegin    = genpart->end_vertex()->particles_out_const_begin();
            HepMC::GenVertex::particles_out_const_iterator pItEnd = genpart->end_vertex()->particles_out_const_end();
-           for ( ; pIt != pItEnd; ++pIt )
+           for ( auto pIt=pItBegin ; pIt != pItEnd; ++pIt )
               {
                  //Add decay position to the event
                  CHECK( setDecayPosition( *pIt, event ) );
diff --git a/Generators/Pythia8B_i/src/Pythia8B_i.cxx b/Generators/Pythia8B_i/src/Pythia8B_i.cxx
index 8104add9e995..ccaf8ea9d37c 100644
--- a/Generators/Pythia8B_i/src/Pythia8B_i.cxx
+++ b/Generators/Pythia8B_i/src/Pythia8B_i.cxx
@@ -360,7 +360,7 @@ StatusCode Pythia8B_i::fillEvt(HepMC::GenEvent *evt){
     
     // set the randomseeds
     if(useRndmGenSvc() && Pythia8B_i::p_AtRndmGenSvc)
-        evt->set_random_states(m_seeds);
+        HepMC::set_random_states(evt,m_seeds);
     
     // set the event weight
     evt->weights().push_back(m_pythia->info.weight());
diff --git a/Generators/TruthIO/src/ReadHepEvtFromAscii.cxx b/Generators/TruthIO/src/ReadHepEvtFromAscii.cxx
index 795d640bce94..30189e7c356d 100644
--- a/Generators/TruthIO/src/ReadHepEvtFromAscii.cxx
+++ b/Generators/TruthIO/src/ReadHepEvtFromAscii.cxx
@@ -131,14 +131,14 @@ StatusCode ReadHepEvtFromAscii::execute() {
   hepio.fill_next_event(evt);
  
   // Convert GeV to MeV 
-  for ( HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p )
-      {
+  for ( auto ip = evt->particles_begin(); ip != evt->particles_end(); ++ip ){
+      auto p=*ip;
 	  HepMC::FourVector newMomentum(0.,0.,0.,0.);
-	  newMomentum.setPx( (*p)->momentum().px() * 1000. );
-	  newMomentum.setPy( (*p)->momentum().py() * 1000. );
-	  newMomentum.setPz( (*p)->momentum().pz() * 1000. );
-	  newMomentum.setE( (*p)->momentum().e() * 1000. );
-	  (*p)->set_momentum(newMomentum);
+	  newMomentum.setPx( p->momentum().px() * 1000. );
+	  newMomentum.setPy( p->momentum().py() * 1000. );
+	  newMomentum.setPz( p->momentum().pz() * 1000. );
+	  newMomentum.setE( p->momentum().e() * 1000. );
+	  p->set_momentum(newMomentum);
 
       }
   mcEvtColl->push_back(evt);
-- 
GitLab


From 21952e6a04e160fe925665c3b329f38faf04c378 Mon Sep 17 00:00:00 2001
From: Nils Erik Krumnack <nils.erik.krumnack@cern.ch>
Date: Mon, 8 Jun 2020 15:06:55 +0000
Subject: [PATCH 044/266] fixes for clang on MacOS

Apparently the __attribute__ call doesn't work that way on MacOS.
---
 .../AsgDataHandles/ReadHandleKey.h            |  2 +-
 .../AsgDataHandles/VarHandleBase.h            |  2 +-
 Control/CxxUtils/CxxUtils/features.h          |  2 +-
 .../Root/UtilFunctions.cxx                    |  1 +
 .../IInDetTrackBiasingTool.h                  |  1 -
 .../IInDetTrackTruthFilterTool.h              |  1 -
 .../IInDetTrackTruthOriginTool.h              |  1 -
 .../IJetTrackFilterTool.h                     |  1 -
 .../InDetTrackBiasingTool.h                   | 13 +++--
 .../InDetTrackSmearingTool.h                  | 20 ++++----
 .../InDetTrackSystematicsTool.h               | 10 ++--
 .../InDetTrackTruthFilterTool.h               | 11 ++---
 .../InDetTrackTruthOriginTool.h               |  1 -
 .../JetTrackFilterTool.h                      | 11 ++---
 .../Root/InDetTrackBiasingTool.cxx            |  5 +-
 .../Root/InDetTrackSmearingTool.cxx           |  3 +-
 .../Root/InDetTrackTruthFilterTool.cxx        |  4 +-
 .../Root/InDetTrackTruthOriginTool.cxx        |  4 --
 .../Root/JetTrackFilterTool.cxx               |  3 +-
 .../TrigBunchCrossingTool/CMakeLists.txt      | 13 ++++-
 .../Root/BunchCrossingToolBase.cxx            | 47 +++++++++----------
 .../Root/count_bunch_neighbors.cxx            | 14 +++---
 22 files changed, 80 insertions(+), 90 deletions(-)

diff --git a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandleKey.h b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandleKey.h
index 3eef7f60d9d2..8dd83d975bbd 100644
--- a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandleKey.h
+++ b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandleKey.h
@@ -16,7 +16,7 @@
 #define ASG_DATA_HANDLES_READ_HANDLE_KEY_H
 
 #ifndef XAOD_STANDALONE
-#include <StoreGate/ReadHandle.h>
+#include <StoreGate/ReadHandleKey.h>
 #else
 
 #include "AsgDataHandles/VarHandleKey.h"
diff --git a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleBase.h b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleBase.h
index 319acd82d2b9..4813b8d60e8d 100644
--- a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleBase.h
+++ b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleBase.h
@@ -16,7 +16,7 @@
 #define ASG_DATA_HANDLES_VAR_HANDLE_BASE_H
 
 #ifndef XAOD_STANDALONE
-#incldue <StoreGate/VarHandleBase.h>
+#include <StoreGate/VarHandleBase.h>
 #else
 
 // STL includes
diff --git a/Control/CxxUtils/CxxUtils/features.h b/Control/CxxUtils/CxxUtils/features.h
index 12382afdfeed..94d4e915e0e8 100644
--- a/Control/CxxUtils/CxxUtils/features.h
+++ b/Control/CxxUtils/CxxUtils/features.h
@@ -17,7 +17,7 @@
 
 
 /// Do we have function multiversioning  GCC and Clang > 7 support __attribute__ target
-#if defined(__GNUC__) && !defined(__CLING__) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
+#if defined(__ELF__) && defined(__GNUC__) && !defined(__CLING__) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
 # define HAVE_FUNCTION_MULTIVERSIONING 1
 #else
 # define HAVE_FUNCTION_MULTIVERSIONING 0
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx
index 08a799d16d1d..9253cda73d09 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx
@@ -4,6 +4,7 @@
 
 #include "TH1.h"
 #include "TLorentzVector.h" // needed for Warning()
+#include <locale>
 
 namespace CP{
 
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h
index 4029de8f6052..cc54d41d6564 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h
@@ -28,7 +28,6 @@ namespace InDet {
   public:
     virtual StatusCode initialize() = 0;
     virtual void prepare() = 0;
-    virtual StatusCode finalize() = 0;
     
     /** Computes the tracks origin */
     virtual CP::CorrectionCode applyCorrection(xAOD::TrackParticle& track) = 0;
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h
index bc827ba70c69..bd847e4e304d 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h
@@ -30,7 +30,6 @@ namespace InDet {
 	
     virtual StatusCode initialize() = 0;
     virtual void prepare() = 0; // not sure if/why this function is necessary - felix
-    virtual StatusCode finalize() = 0;
 
     virtual bool accept(const xAOD::TrackParticle* track) const = 0;
       
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthOriginTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthOriginTool.h
index 20ca7f49623b..52fe0c2616f6 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthOriginTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthOriginTool.h
@@ -25,7 +25,6 @@ namespace InDet {
     
   virtual StatusCode initialize() = 0;
   virtual void prepare() = 0;
-  virtual StatusCode finalize() = 0;
 
   /** Computes the tracks origin */
   virtual int getTrackOrigin(const xAOD::TrackParticle* track) const = 0;
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h
index 5e4b74ae3d03..2028e34e11ad 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h
@@ -28,7 +28,6 @@ namespace InDet {
 	
     virtual StatusCode initialize() = 0;
     virtual void prepare() = 0; // not sure if/why this function is necessary - felix
-    virtual StatusCode finalize() = 0;
 
     virtual bool accept( const xAOD::TrackParticle*, const xAOD::Jet* ) const = 0;
     virtual bool accept( const xAOD::TrackParticle*, const xAOD::JetContainer* ) const = 0;
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h
index 52e80bf1cb0e..8713b983a5bb 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h
@@ -45,23 +45,22 @@ namespace InDet {
 
     virtual StatusCode initialize() override;
     virtual void prepare() override {};
-    virtual StatusCode finalize() override;
 
     /// Computes the tracks origin
     virtual CP::CorrectionCode applyCorrection(xAOD::TrackParticle& track) override;
     virtual CP::CorrectionCode correctedCopy( const xAOD::TrackParticle& in,
-					      xAOD::TrackParticle*& out );
-    virtual CP::CorrectionCode applyContainerCorrection( xAOD::TrackParticleContainer& cont );
+					      xAOD::TrackParticle*& out ) override;
+    virtual CP::CorrectionCode applyContainerCorrection( xAOD::TrackParticleContainer& cont ) override;
 
 
     /// returns: whether the tool is affected by the systematic
-    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const;
+    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
     /// returns: list of systematics this tool can be affected by
-    virtual CP::SystematicSet affectingSystematics() const;
+    virtual CP::SystematicSet affectingSystematics() const override;
     /// returns: list of recommended systematics to use with this tool
-    virtual CP::SystematicSet recommendedSystematics() const;
+    virtual CP::SystematicSet recommendedSystematics() const override;
     /// configure the tool to apply a given list of systematic variations
-    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& );
+    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override;
 
   protected:
     
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h
index 06f13fd91374..947589f02bd6 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h
@@ -37,31 +37,29 @@ namespace InDet {
     public:
     /// Create a constructor for standalone usage
     InDetTrackSmearingTool( const std::string& name );
-    virtual ~InDetTrackSmearingTool() = default;
+    virtual ~InDetTrackSmearingTool();
 
     /// Function initialising the tool
-    virtual StatusCode initialize();
-    /// Function finalising the tool
-    virtual StatusCode finalize();
+    virtual StatusCode initialize() override;
     /// Smearing method
-    virtual CP::CorrectionCode applyCorrection( xAOD::TrackParticle& ID );
+    virtual CP::CorrectionCode applyCorrection( xAOD::TrackParticle& ID ) override;
 
     // we need explicit forwarding calls because CP::CorrectionTool does not have a pure interface
     // this isn't really elegant (ideally these would come automatically) but we'd need IInDetTrackSmearingTool
     //  to inherit from CP::CorrectionTool, which would make it not pure-virtual.
     // at least, forwarding calls are easy enough to read and understand.
     virtual CP::CorrectionCode correctedCopy( const xAOD::TrackParticle& in,
-					      xAOD::TrackParticle*& out );
-    virtual CP::CorrectionCode applyContainerCorrection( xAOD::TrackParticleContainer& cont );
+					      xAOD::TrackParticle*& out ) override;
+    virtual CP::CorrectionCode applyContainerCorrection( xAOD::TrackParticleContainer& cont ) override;
     
     /// returns: whether the tool is affected by the systematic
-    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const;
+    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
     /// returns: list of systematics this tool can be affected by
-    virtual CP::SystematicSet affectingSystematics() const;
+    virtual CP::SystematicSet affectingSystematics() const override;
     /// returns: list of recommended systematics to use with this tool
-    virtual CP::SystematicSet recommendedSystematics() const;
+    virtual CP::SystematicSet recommendedSystematics() const override;
     /// configure the tool to apply a given list of systematic variations
-    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& );
+    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override;
 
     /// Get smearing widths to add to IPs
     float GetSmearD0Sigma(const xAOD::TrackParticle&);
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h
index 8c34f8f347aa..084afdd973ea 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h
@@ -27,16 +27,16 @@ namespace InDet {
     InDetTrackSystematicsTool( const std::string& );
     virtual ~InDetTrackSystematicsTool() = default;
 
-    virtual StatusCode initialize();
+    virtual StatusCode initialize() override;
 
     /// returns: whether the tool is affected by the systematic
-    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const;
+    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
     /// returns: list of systematics this tool can be affected by
-    virtual CP::SystematicSet affectingSystematics() const = 0;
+    virtual CP::SystematicSet affectingSystematics() const override = 0;
     /// returns: list of recommended systematics to use with this tool
-    virtual CP::SystematicSet recommendedSystematics() const;
+    virtual CP::SystematicSet recommendedSystematics() const override;
     /// configure the tool to apply a given list of systematic variations
-    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& );
+    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override;
 
 
   protected:
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h
index d71e64e4b7b1..fc51c89298e8 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h
@@ -42,24 +42,23 @@ namespace InDet {
   public:
     // create constructor for standalone Root
     InDetTrackTruthFilterTool( const std::string& name );
-    virtual ~InDetTrackTruthFilterTool() = default;
+    virtual ~InDetTrackTruthFilterTool();
     
     //  static const InterfaceID& interfaceID();
     virtual StatusCode initialize() override;
     virtual void prepare() override {};
-    virtual StatusCode finalize() override;
 
     // right now this returns a bool; if we want to implement the ASG selection tool interface then this will need to change to a TAccept
     virtual bool accept(const xAOD::TrackParticle* track) const override;
 
     /// returns: whether the tool is affected by the systematic
-    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const;
+    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
     /// returns: list of systematics this tool can be affected by
-    virtual CP::SystematicSet affectingSystematics() const;
+    virtual CP::SystematicSet affectingSystematics() const override;
     /// returns: list of recommended systematics to use with this tool
-    virtual CP::SystematicSet recommendedSystematics() const;
+    virtual CP::SystematicSet recommendedSystematics() const override;
     /// configure the tool to apply a given list of systematic variations
-    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& );
+    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override;
 
   private:
 
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h
index 31238bd1df19..d1095ec7dc77 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h
@@ -34,7 +34,6 @@ namespace InDet {
 
   virtual StatusCode initialize() override;
   virtual void prepare() override {};
-  virtual StatusCode finalize() override;
 
   /** Computes the tracks origin */
   virtual int getTrackOrigin(const xAOD::TrackParticle* track) const override;
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h
index c4be7d2a93da..2566aafdd193 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h
@@ -41,25 +41,24 @@ namespace InDet {
   public:
     // create constructor for standalone Root
     JetTrackFilterTool( const std::string& name );
-    virtual ~JetTrackFilterTool() = default;
+    virtual ~JetTrackFilterTool();
     
     //  static const InterfaceID& interfaceID();
     virtual StatusCode initialize() override;
     virtual void prepare() override {};
-    virtual StatusCode finalize() override;
 
     // right now this returns a bool; if we want to implement the ASG selection tool interface then this will need to change to a TAccept
     virtual bool accept( const xAOD::TrackParticle*, const xAOD::Jet* ) const override;
     virtual bool accept( const xAOD::TrackParticle*, const xAOD::JetContainer* ) const override;
 
     /// returns: whether the tool is affected by the systematic
-    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const;
+    virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
     /// returns: list of systematics this tool can be affected by
-    virtual CP::SystematicSet affectingSystematics() const;
+    virtual CP::SystematicSet affectingSystematics() const override;
     /// returns: list of recommended systematics to use with this tool
-    virtual CP::SystematicSet recommendedSystematics() const;
+    virtual CP::SystematicSet recommendedSystematics() const override;
     /// configure the tool to apply a given list of systematic variations
-    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& );
+    virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override;
 
   private:
 
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx
index a15ba820e107..d94f207dc13a 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx
@@ -40,8 +40,6 @@ namespace InDet {
     declareProperty("isSimulation", m_isSimulation);
   }
 
-  InDetTrackBiasingTool::~InDetTrackBiasingTool() = default;
-
   StatusCode InDetTrackBiasingTool::initialize()
   {
     
@@ -68,7 +66,7 @@ namespace InDet {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode InDetTrackBiasingTool::finalize() {
+  InDetTrackBiasingTool::~InDetTrackBiasingTool() {
     m_runNumber = -1;
     delete m_biasD0Histogram; m_biasD0Histogram = nullptr;
     delete m_biasZ0Histogram; m_biasZ0Histogram = nullptr;
@@ -76,7 +74,6 @@ namespace InDet {
     delete m_biasD0HistError; m_biasD0HistError = nullptr;
     delete m_biasZ0HistError; m_biasZ0HistError = nullptr;
     delete m_biasQoverPsagittaHistError; m_biasQoverPsagittaHistError = nullptr;
-    return StatusCode::SUCCESS;
   }
 
   CP::CorrectionCode InDetTrackBiasingTool::applyCorrection(xAOD::TrackParticle& track) {
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx
index 0c9f89e377eb..c932652448f8 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx
@@ -85,7 +85,7 @@ namespace InDet {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode InDetTrackSmearingTool::finalize()
+  InDetTrackSmearingTool::~InDetTrackSmearingTool()
   {
     delete m_smearD0Dead; m_smearD0Dead = nullptr;
     delete m_smearZ0Dead; m_smearZ0Dead = nullptr;
@@ -96,7 +96,6 @@ namespace InDet {
     delete m_smearZ0_sys_up; m_smearZ0_sys_up = nullptr;
     delete m_smearD0_sys_dw; m_smearD0_sys_dw = nullptr;
     delete m_smearZ0_sys_dw; m_smearZ0_sys_dw = nullptr;
-    return StatusCode::SUCCESS;
   }
 
   float InDetTrackSmearingTool::GetSmearD0Sigma(const xAOD::TrackParticle& track) {
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx
index d27103bf78b4..494bc7c773ed 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx
@@ -100,7 +100,7 @@ namespace InDet {
   }
 
 
-  StatusCode InDetTrackTruthFilterTool::finalize() {
+  InDetTrackTruthFilterTool::~InDetTrackTruthFilterTool() {
     
     delete m_fPrimHistogram;
     delete m_fSecHistogram;
@@ -133,8 +133,6 @@ namespace InDet {
     m_trkEffHistTightIBL = nullptr;
     m_trkEffHistTightPP0 = nullptr;
     m_trkEffHistTightPhysModel = nullptr;
-
-    return StatusCode::SUCCESS;
   }
 
   bool InDetTrackTruthFilterTool::accept(const xAOD::TrackParticle* track) const {
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthOriginTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthOriginTool.cxx
index bd0bf0a7dfd6..29fb22b83534 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthOriginTool.cxx
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthOriginTool.cxx
@@ -32,10 +32,6 @@ namespace InDet {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode InDetTrackTruthOriginTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
-
   int InDetTrackTruthOriginTool::getTrackOrigin(const xAOD::TrackParticle* track) const {
 
     const xAOD::TruthParticle* truth = nullptr;
diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx
index ec90d21a56b3..e4d1aaa85a8d 100644
--- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx
+++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx
@@ -51,11 +51,10 @@ namespace InDet {
   }
 
 
-  StatusCode JetTrackFilterTool::finalize()
+  JetTrackFilterTool::~JetTrackFilterTool()
   {
     delete m_effForJetPt; m_effForJetPt = nullptr;
     delete m_trkNomEff; m_trkNomEff = nullptr;
-    return StatusCode::SUCCESS;
   }
 
   bool JetTrackFilterTool::accept(const xAOD::TrackParticle* track, const xAOD::Jet* jet) const
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
index 4e05b729c533..a7d2d72a45eb 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
@@ -54,4 +54,15 @@ atlas_add_test( ut_web_bunch_tool_test
    PROPERTIES TIMEOUT 300 )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+
+# temporarily disabling FLAKE8 in AnalysisBase until it becomes
+# available there.
+if( XAOD_STANDALONE )
+atlas_install_python_modules( python/*.py )
+else()
+atlas_install_python_modules( python/*.py  POST_BUILD_CMD ${ATLAS_FLAKE8} )
+
+atlas_add_test( flake8_scripts
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/scripts
+                POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx
index 83b3ce54b0ca..5b7c21240f8d 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.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
 */
 
 // STL include(s):
@@ -259,20 +259,20 @@ namespace Trig {
                if( *( itr->train_front() ) > *( itr->train_back() ) ) {
                   if( BunchCrossing( bcid ) <= *( itr->train_back() ) ) {
                      return ( std::count_if( itr->begin(), element,
-                                             std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                           *element ) ) +
+                                             std::bind( std::not_equal_to< BunchCrossing >(),
+                                                        *element, std::placeholders::_1 ) ) +
                               std::count_if( itr->train_front(), itr->end(),
-                                             std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                           *element ) ) );
+                                             std::bind( std::not_equal_to< BunchCrossing >(),
+                                                        *element, std::placeholders::_1 ) ) );
                   } else {
                      return std::count_if( itr->train_front(), element,
-                                           std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                         *element ) );
+                                           std::bind( std::not_equal_to< BunchCrossing >(),
+                                                      *element, std::placeholders::_1 ) );
                   }
                } else {
                   return std::count_if( itr->begin(), element,
-                                        std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                      *element ) );
+                                        std::bind( std::not_equal_to< BunchCrossing >(),
+                                                   *element, std::placeholders::_1 ) );
                }
                break;
             default:
@@ -336,20 +336,20 @@ namespace Trig {
                if( *( itr->train_front() ) > *( itr->train_back() ) ) {
                   if( BunchCrossing( bcid ) > *( itr->train_back() ) ) {
                      return ( std::count_if( element, itr->end(),
-                                             std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                           *element ) ) +
+                                             std::bind( std::not_equal_to< BunchCrossing >(),
+                                                        *element, std::placeholders::_1 ) ) +
                               std::count_if( itr->begin(), ++( itr->train_back() ),
-                                             std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                           *element ) ) );
+                                             std::bind( std::not_equal_to< BunchCrossing >(),
+                                                        *element, std::placeholders::_1 ) ) );
                   } else {
                      return std::count_if( element, ++( itr->train_back() ),
-                                           std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                         *element ) );
+                                           std::bind( std::not_equal_to< BunchCrossing >(),
+                                                      *element, std::placeholders::_1 ) );
                   }
                } else {
                   return std::count_if( element, itr->end(),
-                                        std::bind1st( std::not_equal_to< BunchCrossing >(),
-                                                      *element ) );
+                                        std::bind( std::not_equal_to< BunchCrossing >(),
+                                                   *element, std::placeholders::_1 ) );
                }
                break;
             default:
@@ -918,8 +918,7 @@ namespace Trig {
          ATH_MSG_VERBOSE( "Evaluating bunch crossing: " << *b_itr );
 
          //
-         // This is some STL magic. This expression counts how many of the
-         // paired bunches fulfill:
+         // This expression counts how many of the paired bunches fulfill:
          //
          //      distance( ref_bcid,  bcid ) <= maxBCSpacing
          //
@@ -933,12 +932,12 @@ namespace Trig {
          // bcid numbering. (When evaluating bcid 1 and
          // BunchCrossing::MAX_BCID.)
          //
-         int neighbours =
+         const int neighbours =
             std::count_if( bunches.begin(), bunches.end(),
-                           compose1( std::bind2nd( std::less_equal< int >(),
-                                                   maxBCSpacing ),
-                                     std::bind1st( std::ptr_fun( Trig::distance ),
-                                                   *b_itr ) ) );
+                           [ maxBCSpacing, &b_itr ]( int bunch ) {
+                              return ( Trig::distance( bunch, *b_itr ) <=
+                                       maxBCSpacing );
+                           } );
 
          //
          // Now decide if we want to consider this bunch crossing as a single
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/count_bunch_neighbors.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/count_bunch_neighbors.cxx
index 9cd1b2d36a55..d3ecb10dc1e7 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/count_bunch_neighbors.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/count_bunch_neighbors.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
 */
 
 // System include(s):
@@ -9,7 +9,6 @@
 // Local include(s):
 #include "count_bunch_neighbors.h"
 #include "TrigBunchCrossingTool/BunchCrossing.h"
-#include "unary_compose.h"
 
 namespace Trig {
 
@@ -23,12 +22,13 @@ namespace Trig {
    int count_bunch_neighbors::operator()( int bunch ) const {
 
       // Count how many neighbors the bunch has:
-      int neighbors =
+      const int maxBunchSpacing = m_maxBunchSpacing;
+      const int neighbors =
          std::count_if( m_bunches.begin(), m_bunches.end(),
-                        compose1( std::bind2nd( std::less_equal< int >(),
-                                                m_maxBunchSpacing ),
-                                  std::bind1st( std::ptr_fun( Trig::distance ),
-                                                bunch ) ) );
+                        [ maxBunchSpacing, bunch ]( int b ) {
+                           return ( Trig::distance( bunch, b ) <=
+                                    maxBunchSpacing );
+                        } );
 
       // Remember that the above expression always counts the bunch itself
       // as its own neighbor. So the real value we're looking for is 1 less.
-- 
GitLab


From 3fc806ffd1a1f957256f0d80375734e1835b1ed1 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Mon, 8 Jun 2020 15:14:36 +0000
Subject: [PATCH 045/266] Expand Rio types try to avoid dynamic casts

---
 .../InDetRIO_OnTrack/PixelClusterOnTrack.h    | 30 +++++++++++--------
 .../InDetRIO_OnTrack/SCT_ClusterOnTrack.h     | 25 +++++++++-------
 .../InDetRIO_OnTrack/SiClusterOnTrack.h       |  7 ++---
 .../PixelToTPIDTool/src/PixelToTPIDTool.cxx   | 10 +++++--
 .../TrkRIO_OnTrack/RIO_OnTrack.h              | 13 ++++----
 5 files changed, 50 insertions(+), 35 deletions(-)

diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h
index 7d94549755eb..61f4c710a210 100755
--- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h
+++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -105,47 +105,53 @@ namespace InDet {
       virtual ~PixelClusterOnTrack();
 	
       /** Pseudo-constructor : needed to avoid excessive RTTI*/
-      virtual PixelClusterOnTrack* clone() const;
+      virtual PixelClusterOnTrack* clone() const override;
     
     /** returns the surface for the local to global transformation 
       - fullfills Trk::MeasurementBase interface*/
-      const Trk::Surface& associatedSurface() const;
+      virtual const Trk::Surface& associatedSurface() const override;
+
+      virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override
+      {
+        return (type == Trk::RIO_OnTrackType::PixelCluster);
+      }
+
 
     /** returns the PrepRawData - is a SiCluster in this scope
       - fullfills Trk::RIO_OnTrack interface*/
-      const PixelCluster* prepRawData() const;
+      virtual const PixelCluster* prepRawData() const override;
 
       const ElementLinkToIDCPixelClusterContainer& prepRawDataLink() const;
        
     /** returns the detector element, assoicated with the PRD of this class
       - fullfills Trk::RIO_OnTrack interface*/
-      const InDetDD::SiDetectorElement* detectorElement() const;
+      virtual const InDetDD::SiDetectorElement* detectorElement() const override;
    
       
 	  /** returns whether there was an ambiguity associated with this pixel cluster.
       - extends the Trk::RIO_OnTrack interface*/
       bool hasClusterAmbiguity() const;
-      /** returns whether this cluster is likely to be the fake mirror 
-	  image of a ganged pixel.
-	  Is it set if the cluster is a single hit cluster and the ganged
-	  pixel instead is part of a bigger cluster.*/
+      /** returns whether this cluster is likely to be the fake mirror
+          image of a ganged pixel.
+          Is it set if the cluster is a single hit cluster and the ganged
+          pixel instead is part of a bigger cluster.*/
       bool isFake() const;
       /** returns the energy loss in MeV associated to this cluster.
 	  It is 0 if no calibration data is used in clusterization*/
       float energyLoss() const;
 		
       /**returns some information about this RIO_OnTrack.*/
-      MsgStream&  dump( MsgStream& out ) const;	
+      virtual MsgStream&  dump( MsgStream& out ) const override;	
 	
       /**returns some information about this RIO_OnTrack.*/
-      std::ostream& dump( std::ostream& out ) const;
+      virtual std::ostream& dump( std::ostream& out ) const override;
 
     private:
       friend class PixelClusterOnTrackCnv_p1;
       friend class ::FakeTrackBuilder;
       /** ONLY for use in custom convertor
       Allows the custom convertor to reset values when persistying/reading back RoTs*/
-      virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd);
+      virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd) override;
 
       /** PixelCluster - the RIO (PRD, PrepRawData)*/
       ElementLinkToIDCPixelClusterContainer m_rio;
diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h
index 80b7ed1384c6..d5c7d61c9e0d 100755
--- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h
+++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -112,21 +112,26 @@ namespace InDet{
       /** returns global position (gathered through Surface constraint)
       - fullfills Trk::MeasurementBase interface
         Overload of the method in parent class */
-      virtual const Amg::Vector3D& globalPosition() const final;
+      virtual const Amg::Vector3D& globalPosition() const override final;
      
       /** Pseudo-constructor */
-      SCT_ClusterOnTrack* clone() const ;
+      virtual SCT_ClusterOnTrack* clone() const override;
 
     /** returns the surface for the local to global transformation
       - fullfills the Trk::MeasurementBase interface
      */
-      const Trk::Surface& associatedSurface() const;
+      virtual const Trk::Surface& associatedSurface() const override;
+
+      virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override
+      {
+        return (type == Trk::RIO_OnTrackType::SCTCluster);
+      }
+
 
-    	
     /** returns the PrepRawData - is a SCT_Cluster in this scope
       - fullfills the Trk::RIO_OnTrack interface
      */
-      virtual const InDet::SCT_Cluster* prepRawData() const;
+      virtual const InDet::SCT_Cluster* prepRawData() const override;
 
     const ElementLinkToIDCSCT_ClusterContainer& prepRawDataLink() const;
      
@@ -134,20 +139,20 @@ namespace InDet{
     /** returns the detector element, assoicated with the PRD of this class
       - fullfills the Trk::RIO_OnTrack interface
      */
-      virtual const InDetDD::SiDetectorElement* detectorElement() const;
+      virtual const InDetDD::SiDetectorElement* detectorElement() const override;
     
       /**returns some information about this RIO_OnTrack.*/
-      virtual MsgStream&    dump( MsgStream& out ) const;	
+      virtual MsgStream&    dump( MsgStream& out ) const override;	
 	
       /**returns some information about this RIO_OnTrack.*/
-      virtual std::ostream& dump( std::ostream& out ) const;
+      virtual std::ostream& dump( std::ostream& out ) const override;
 
       double positionAlongStrip() const;
 
     private:
     /** ONLY for use in custom convertor
       Allows the custom convertor to reset values when persistying/reading back RoTs*/
-      virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd);
+      virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd) override;
  
       /** SCT_Cluster - the RIO (PRD, PrepRawData)*/
       ElementLinkToIDCSCT_ClusterContainer m_rio; 
diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h
index 2130c7ef7fa2..f6aa3bc12b31 100755
--- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h
+++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -78,10 +78,7 @@ namespace InDet {
       - fullfills Trk::MeasurementBase interface */
       virtual const Amg::Vector3D& globalPosition() const override;
 
-      virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override
-      {
-        return (type == Trk::RIO_OnTrackType::SiCluster);
-      }
+      virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override = 0;
 
       /** returns the DE hashID* 
       - fullfills Trk::RIO_OnTrack interface*/
diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx
index f7f4895cc169..43d2f58d9a8b 100644
--- a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx
+++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelToTPIDTool/PixelToTPIDTool.h"
@@ -111,7 +111,13 @@ float InDet::PixelToTPIDTool::dEdx(const Trk::Track& track, int& nUsedHits, int&
           return -1;
         }
 
-        const InDet::PixelClusterOnTrack *pixclus = dynamic_cast<const InDet::PixelClusterOnTrack*>(measurement);
+        const InDet::PixelClusterOnTrack* pixclus = nullptr;
+        if (measurement->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
+          const Trk::RIO_OnTrack* tmpRio = static_cast<const Trk::RIO_OnTrack*>(measurement);
+          if (tmpRio->rioType(Trk::RIO_OnTrackType::PixelCluster)) {
+            pixclus = static_cast<const InDet::PixelClusterOnTrack*>(tmpRio);
+          }
+        }
         if (pixclus) {
           //bool isok=false;
           double locx=pixclus->localParameters()[Trk::locX];
diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
index ccb5a1e16e96..09ef5587d6a9 100755
--- a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
+++ b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -50,11 +50,12 @@ namespace Trk {
 
   namespace RIO_OnTrackType{
     enum Type{
-        SiCluster=0,
-        TRT_DriftCircle=1,
-        MdtDriftCircle=2,
-        MuonCluster=3,
-        PlanarCluster=4
+        PixelCluster=0,
+        SCTCluster=1,
+        TRT_DriftCircle=2,
+        MdtDriftCircle=3,
+        MuonCluster=4,
+        PlanarCluster=5
     };
   }
 
-- 
GitLab


From 6002fc5f156bb2232671f3ddf53938ad74586a52 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Mon, 8 Jun 2020 17:15:57 +0200
Subject: [PATCH 046/266] Bug fix to remove RDO from list of output files.

---
 .../test/test_reco_tf_compare_SerialAndThreadedAthenas.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
index abfa1f3e0ade..be3c32849b05 100755
--- a/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
@@ -2,7 +2,7 @@
 
 echo "Creating new serial directory"
 mkdir serial; cd serial
-Reco_tf.py --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaSerial.log
+Reco_tf.py --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaSerial.log
 rc=${PIPESTATUS[0]}
 echo "art-result: $rc Serial"
 
@@ -12,7 +12,7 @@ cd ../
 echo "Creating new threadOne directory"
 mkdir threadOne; cd threadOne
 
-Reco_tf.py --athenaopts="--threads=1" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaOneThread.log
+Reco_tf.py --athenaopts="--threads=1" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaOneThread.log
 rc1=${PIPESTATUS[0]}
 echo "art-result: $rc1 OneThread"
 
@@ -33,7 +33,7 @@ cd ../
 echo "Creating new threadTwo directory"
 mkdir threadTwo; cd threadTwo
 
-Reco_tf.py --athenaopts="--threads=2" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaTwoThreads.log
+Reco_tf.py --athenaopts="--threads=2" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaTwoThreads.log
 rc2=${PIPESTATUS[0]}
 echo "art-result: $rc2 TwoThreads"
 
@@ -50,7 +50,7 @@ cd ../
 echo "Creating new threadFive directory"
 mkdir threadFive; cd threadFive
 
-Reco_tf.py --athenaopts="--threads=5" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaFiveThreads.log
+Reco_tf.py --athenaopts="--threads=5" --AMI=$1 --preExec='RAWtoESD:from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)' --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaFiveThreads.log
 rc5=${PIPESTATUS[0]}
 echo "art-result: $rc5 FiveThreads"
 
-- 
GitLab


From a6cc8dd8c167860443bffe406e6e743f1134dd82 Mon Sep 17 00:00:00 2001
From: Nora Emilia Pettersson <npetters@pcumass4.dyndns.cern.ch>
Date: Mon, 8 Jun 2020 17:50:03 +0200
Subject: [PATCH 047/266] Increasing CaloClusterEt from 3 to 4.5GeV for TRT
 Segmentfinding

---
 .../TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder.h           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder.h b/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder.h
index a735d8e59707..ce378e6f6d0c 100755
--- a/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder.h
+++ b/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder/TRT_TrackSegmentsFinder.h
@@ -50,7 +50,7 @@ namespace InDet {
        {this, "MinNumberDriftCircles", 9,      "Minimum number of DriftCircles for a TRT segment."};
 
       Gaudi::Property<double>                       m_ClusterEt
-       {this, "CaloClusterEt",         3000.0, "Minimum ET of calo clusters in MeV too seed the TRT segment finder."};
+       {this, "CaloClusterEt",         4500.0, "Minimum ET of calo clusters in MeV too seed the TRT segment finder."};
 
       SG::ReadHandleKey<CaloClusterROI_Collection>  m_caloKey
        {this, "InputClusterContainerName", "InDetCaloClusterROIs", "Location of the optional Calo cluster seeds."};
-- 
GitLab


From 8edd88a689410ea46174a01fe308860720d9e908 Mon Sep 17 00:00:00 2001
From: Charles Leggett <charles.g.leggett@gmail.com>
Date: Mon, 8 Jun 2020 16:51:08 +0000
Subject: [PATCH 048/266] update Gaudi to v33r1.002

---
 .../python/AtlasSemantics.py                  |  51 +-
 .../python/ComponentAccumulator.py            |  14 +-
 .../share/AthExHelloWorldMT_1.ref             | 399 ++++----
 .../share/AthExHelloWorldMT_2.ref             | 395 ++++----
 .../AthExJobOptions/share/BasicJobOptions.ref |  57 +-
 .../share/CustomToolJobOptions.ref            |  54 +-
 .../share/CustomTopAlgorithmJobOptions.ref    |  39 +-
 .../python/GenericMonitoringTool.py           |   8 +-
 .../AthenaServices/src/AthenaOutputStream.h   |   2 +-
 .../DataModelRunTests/share/CondReaderMT.ref  | 795 ++++++++-------
 .../share/xAODTestDecorHandle1MT.ref          | 355 ++++---
 .../share/xAODTestDecorHandle2MT.ref          | 459 +++++----
 .../share/xAODTestRead3MT.ref                 | 124 +--
 .../share/xAODTestReadRenameMT.ref            | 920 +++++++++---------
 .../share/xAODTestSymlinks1MT.ref             |  32 +-
 .../share/xAODTestSymlinks2MT.ref             | 339 ++++---
 Control/IOVSvc/src/CondInputLoader.h          |   2 +-
 Control/RngComps/src/AtDSFMTGenSvc.h          |   2 +-
 Control/RngComps/src/AtRanluxGenSvc.h         |   2 +-
 Control/RngComps/src/AtRndmGenSvc.h           |   2 +-
 Control/SGComps/src/AddressRemappingSvc.h     |   4 +-
 Control/SGComps/src/ProxyProviderSvc.h        |   2 +-
 .../SGComps/test/AddressRemappingSvc_test.cxx |   8 +-
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h   |   2 +-
 Database/AthenaPOOL/PoolSvc/src/PoolSvc.h     |   2 +-
 Database/IOVDbSvc/src/IOVDbSvc.h              |   6 +-
 .../ByteStreamAddressProviderSvc.h            |   2 +-
 .../MuonCondAlg/MuonAlignmentCondAlg.h        |   2 +-
 Projects/AthGeneration/externals.txt          |   2 +-
 Projects/AthSimulation/externals.txt          |   2 +-
 Projects/Athena/externals.txt                 |   2 +-
 .../test/G4GeometryToolConfig_Simtest.py      |   2 +
 .../TileBeamElemContByteStreamCnv_test.ref    | 169 ++--
 .../TileDigitsContByteStreamCnv_test.ref      | 463 ++++-----
 .../share/TileL2ContByteStreamCnv_test.ref    | 173 ++--
 .../share/TileLaserObjByteStreamCnv_test.ref  | 455 ++++-----
 .../share/TileMuRcvContByteStreamCnv_test.ref | 477 ++++-----
 .../TileRawChannelContByteStreamCnv_test.ref  | 513 +++++-----
 38 files changed, 3128 insertions(+), 3209 deletions(-)

diff --git a/Control/AthenaConfiguration/python/AtlasSemantics.py b/Control/AthenaConfiguration/python/AtlasSemantics.py
index 1dd6ff8b710e..083f5f913907 100644
--- a/Control/AthenaConfiguration/python/AtlasSemantics.py
+++ b/Control/AthenaConfiguration/python/AtlasSemantics.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from past.builtins import basestring
 import GaudiConfig2.semantics
@@ -22,26 +22,6 @@ class AppendListSemantics(GaudiConfig2.semantics.SequenceSemantics):
         a.extend(b)
         return a
 
-class SetSemantics(GaudiConfig2.semantics.SequenceSemantics):
-    '''
-    Extend the sequence-semantics with a merge-method that treats the like 
-    sets, eg creating a list with unique values. 
-    Use 'Set<T>' as fifth parameter of the Gaudi::Property<T> constructor 
-    to invoke this merging method. The template parameter is important, also
-    in the string that forms the fifth argument. 
-    '''
-    __handled_types__ = (re.compile(r"^Set<.*>$"),)
-    def __init__(self, cpp_type, name=None):
-        super(SetSemantics, self).__init__(cpp_type, name)
-
-    def merge(self,bb,aa):
-        for b in bb:
-            if b not in aa:
-                aa.append(b) 
-        return aa
-        #union=set(a) | set(b)
-        #return union#GaudiConfig2.semantics._ListHelper(union)
-
 
 class VarHandleSematics(GaudiConfig2.semantics.StringSemantics):
     '''
@@ -208,7 +188,6 @@ class SubAlgoSemantics(GaudiConfig2.semantics.PropertySemantics):
         return []
 
 
-GaudiConfig2.semantics.SEMANTICS.append(SetSemantics)
 GaudiConfig2.semantics.SEMANTICS.append(AppendListSemantics)
 GaudiConfig2.semantics.SEMANTICS.append(VarHandleSematics)
 GaudiConfig2.semantics.SEMANTICS.append(VarHandleArraySematics)
@@ -219,34 +198,6 @@ GaudiConfig2.semantics.SEMANTICS.append(PublicHandleArraySemantics)
 GaudiConfig2.semantics.SEMANTICS.append(SubAlgoSemantics)
 
 
-#Hack until Gaudi::Property<std::set> arrives...
-
-from GaudiConfig2 import Configurables as _cfgs
-epsvc=_cfgs.EvtPersistencySvc
-epsvc._descriptors["CnvServices"].semantics=SetSemantics(cpp_type="Set<std::string>")
-epsvc._descriptors["CnvServices"].semantics.name="CnvServices"
-
-audSvc=_cfgs.AuditorSvc
-audSvc._descriptors["Auditors"].semantics=SetSemantics(cpp_type="Set<std::string>")
-audSvc._descriptors["Auditors"].semantics.name="Auditors"
-del _cfgs
-
-from GaudiConfig2._configurables import Configurable
-Configurable.getFullJobOptName= lambda self: "{}/{}".format(self.__cpp_type__,self.name)
-
-
-#GaudiConfig2._DictHelper misses the update method that sets is_dirty to true
-
-def _DictHelperUpdate(self,otherMap):
-    self.is_dirty=True
-    #Fixme: A proper implementation should invoke the value-semantics and key-semantics at this point
-    self.data.update(otherMap)
-    return
-
-GaudiConfig2.semantics._DictHelper.update=_DictHelperUpdate
-del _DictHelperUpdate
-
-
 #For some obscure reason, _ListHelper object never compare equal. Therefore PropertySemantics merge() method fails
 def _sequencemerge(instance,a,b):
     if a.data != b.data:
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index 50d4323dcf81..b16ad935f1c3 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -34,7 +34,8 @@ def printProperties(msg, c, nestLevel = 0):
             continue
         propval=getattr(c,propname)
         # Ignore empty lists
-        if isinstance(propval,GaudiConfig2.semantics._ListHelper) and propval.data is None:
+        
+        if isinstance(propval,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)) and propval.data is None:
             continue
         # Printing EvtStore could be relevant for Views?
         if propname in ["DetStore","EvtStore"]:
@@ -156,7 +157,7 @@ class ComponentAccumulator(object):
         self._msg.info( "Event Algorithm Sequences" )
 
 
-        if False: #withDetails: The WithDetails option does work with GaudiConfi2 (for now) 
+        if withDetails:# The WithDetails option does work with GaudiConfi2 (for now) 
             self._msg.info( self._sequence )
         else:
             def printSeqAndAlgs(seq, nestLevel = 0,
@@ -822,6 +823,8 @@ def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ):
             _log.debug( "{}Set the property {}  that is private tool {} ".format( indent,  pname, destConfigurableInstance.name() ) )
             setattr( destConfigurableInstance, pname, conf2toConfigurable( pvalue, indent=__indent( indent ) ) )
         else: # plain data
+            if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
+                pvalue=pvalue.data
             try: #sometimes values are not printable
                 _log.debug( "{}Setting property {} to value {}".format( indent, pname, pvalue ) )
             except Exception:
@@ -874,6 +877,8 @@ def conf2toConfigurable( comp, indent="" ):
                 if instance:
                     setattr( destConf2Instance, prop, __configurableToConf2(instance, __indent(indent)) )
             else:
+                if isinstance(value,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
+                    value=value.data
                 setattr( destConf2Instance, prop, value )
 
     def __findConfigurableClass( name ):
@@ -913,12 +918,17 @@ def conf2toConfigurable( comp, indent="" ):
                 _log.debug( "{} {}".format( indent, dir(pvalue) ) )
                 __areSettingsSame( getattr(existingConfigurableInstance, pname), pvalue, __indent(indent))
             else:
+                if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
+                    pvalue=pvalue.data
+
                 if alreadySetProperties[pname] != pvalue:
                     _log.info("{}Merging property: {} for {}".format(__indent(indent), pname, newConf2Instance.getName() ))
                     # create surrogate
                     clone = newConf2Instance.getInstance("Clone")
                     setattr(clone, pname, alreadySetProperties[pname])
                     updatedPropValue = newConf2Instance._descriptors[pname].semantics.merge( getattr(newConf2Instance, pname), getattr(clone, pname))
+                    if isinstance(updatedPropValue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
+                        updatedPropValue=updatedPropValue.data
                     setattr(existingConfigurable, pname, updatedPropValue)
                     del clone
                     _log.info("{} invoked GaudiConf2 semantics to merge the {} and the {} to {} for property {} of {}".format(
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
index 64056c83acb0..b7883440fabd 100644
--- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
+++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:36:59 CEST 2019
+Wed Jun  3 15:38:42 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-dbg] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1714]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,212 +9,209 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "AthExHelloWorld/HelloWorldOptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 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       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus796.cern.ch on Fri Sep 13 19:37:22 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 15:38:48 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1060 CLIDRegistry entries for module ALL
-xAODMaker::EventInfoCnvAlg                  0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Beam conditions service not available
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Will not fill beam spot information into xAOD::EventInfo
-HelloWorld                                  0      INFO initialize()
-HelloWorld                                  0      INFO   MyInt =    42
-HelloWorld                                  0      INFO   MyBool =   1
-HelloWorld                                  0      INFO   MyDouble = 3.14159
-HelloWorld                                  0      INFO   MyStringVec[0] = Welcome
-HelloWorld                                  0      INFO   MyStringVec[1] = to
-HelloWorld                                  0      INFO   MyStringVec[2] = Athena
-HelloWorld                                  0      INFO   MyStringVec[3] = Framework
-HelloWorld                                  0      INFO   MyStringVec[4] = Tutorial
-HelloWorld                                  0      INFO   MyStringVec[5] = !
-HelloWorld                                  0      INFO   MyDict['Bonjour'] = 'Guten Tag'
-HelloWorld                                  0      INFO   MyDict['Goeiedag'] = 'Ni Hao'
-HelloWorld                                  0      INFO   MyDict['Good Morning'] = 'Bonjour'
-HelloWorld                                  0      INFO   MyDict['one'] = 'ein'
-HelloWorld                                  0      INFO   MyDict['three'] = 'trois'
-HelloWorld                                  0      INFO   MyDict['two'] = 'dos'
-HelloWorld                                  0      INFO   MyTable['1'] = '1'
-HelloWorld                                  0      INFO   MyTable['2'] = '4'
-HelloWorld                                  0      INFO   MyTable['3'] = '9'
-HelloWorld                                  0      INFO   MyTable['4'] = '16'
-HelloWorld                                  0      INFO   MyMatrix[0] = [ 1 2 3 ]
-HelloWorld                                  0      INFO   MyMatrix[1] = [ 4 5 6 ]
-HelloWorld                                  0      INFO   MyMatrix[2] = [ 7 8 9 ]
-HelloWorld                                  0      INFO   MyPrivateHelloTool = HelloTool
-HelloWorld                                  0      INFO   MyPublicHelloTool = HelloTool
-HelloWorld                                  0      INFO MyPrivateHelloTool: Retrieved tool HelloTool
-HelloWorld                                  0      INFO MyPublicHelloTool: Retrieved tool HelloTool
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 7 algorithms
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg                     0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service not available
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Will not fill beam spot information into xAOD::EventInfo
+HelloWorld                                     0    INFO initialize()
+HelloWorld                                     0    INFO   MyInt =    42
+HelloWorld                                     0    INFO   MyBool =   1
+HelloWorld                                     0    INFO   MyDouble = 3.14159
+HelloWorld                                     0    INFO   MyStringVec[0] = Welcome
+HelloWorld                                     0    INFO   MyStringVec[1] = to
+HelloWorld                                     0    INFO   MyStringVec[2] = Athena
+HelloWorld                                     0    INFO   MyStringVec[3] = Framework
+HelloWorld                                     0    INFO   MyStringVec[4] = Tutorial
+HelloWorld                                     0    INFO   MyStringVec[5] = !
+HelloWorld                                     0    INFO   MyDict['Bonjour'] = 'Guten Tag'
+HelloWorld                                     0    INFO   MyDict['Goeiedag'] = 'Ni Hao'
+HelloWorld                                     0    INFO   MyDict['Good Morning'] = 'Bonjour'
+HelloWorld                                     0    INFO   MyDict['one'] = 'ein'
+HelloWorld                                     0    INFO   MyDict['three'] = 'trois'
+HelloWorld                                     0    INFO   MyDict['two'] = 'dos'
+HelloWorld                                     0    INFO   MyTable['1'] = '1'
+HelloWorld                                     0    INFO   MyTable['2'] = '4'
+HelloWorld                                     0    INFO   MyTable['3'] = '9'
+HelloWorld                                     0    INFO   MyTable['4'] = '16'
+HelloWorld                                     0    INFO   MyMatrix[0] = [ 1 2 3 ]
+HelloWorld                                     0    INFO   MyMatrix[1] = [ 4 5 6 ]
+HelloWorld                                     0    INFO   MyMatrix[2] = [ 7 8 9 ]
+HelloWorld                                     0    INFO   MyPrivateHelloTool = HelloTool
+HelloWorld                                     0    INFO   MyPublicHelloTool = HelloTool
+HelloWorld                                     0    INFO MyPrivateHelloTool: Retrieved tool HelloTool
+HelloWorld                                     0    INFO MyPublicHelloTool: Retrieved tool HelloTool
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 7 algorithms
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'EventInfo' , 'StoreGateSvc+McEventInfo' )     required by Algorithm: 
        * xAODMaker::EventInfoCnvAlg
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-EventSelector                               0      INFO  Enter McEventSelector Initialization 
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-HelloWorld                                  0      INFO start()
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
-HelloWorld                              0   0      INFO execute()
-HelloWorld                              0   0      INFO An INFO message
-HelloWorld                              0   0   WARNING A WARNING message
-HelloWorld                              0   0     ERROR An ERROR message
-HelloWorld                              0   0     FATAL A FATAL error message
-HelloWorld                              0   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     0   0      INFO my message to the world: A Public Message!
-HelloWorld                              0   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    0   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-HelloWorld                              1   0      INFO execute()
-HelloWorld                              1   0      INFO An INFO message
-HelloWorld                              1   0   WARNING A WARNING message
-HelloWorld                              1   0     ERROR An ERROR message
-HelloWorld                              1   0     FATAL A FATAL error message
-HelloWorld                              1   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     1   0      INFO my message to the world: A Public Message!
-HelloWorld                              1   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    1   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-HelloWorld                              2   0      INFO execute()
-HelloWorld                              2   0      INFO An INFO message
-HelloWorld                              2   0   WARNING A WARNING message
-HelloWorld                              2   0     ERROR An ERROR message
-HelloWorld                              2   0     FATAL A FATAL error message
-HelloWorld                              2   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     2   0      INFO my message to the world: A Public Message!
-HelloWorld                              2   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    2   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-HelloWorld                              3   0      INFO execute()
-HelloWorld                              3   0      INFO An INFO message
-HelloWorld                              3   0   WARNING A WARNING message
-HelloWorld                              3   0     ERROR An ERROR message
-HelloWorld                              3   0     FATAL A FATAL error message
-HelloWorld                              3   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     3   0      INFO my message to the world: A Public Message!
-HelloWorld                              3   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    3   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-HelloWorld                              4   0      INFO execute()
-HelloWorld                              4   0      INFO An INFO message
-HelloWorld                              4   0   WARNING A WARNING message
-HelloWorld                              4   0     ERROR An ERROR message
-HelloWorld                              4   0     FATAL A FATAL error message
-HelloWorld                              4   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     4   0      INFO my message to the world: A Public Message!
-HelloWorld                              4   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    4   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-HelloWorld                              5   0      INFO execute()
-HelloWorld                              5   0      INFO An INFO message
-HelloWorld                              5   0   WARNING A WARNING message
-HelloWorld                              5   0     ERROR An ERROR message
-HelloWorld                              5   0     FATAL A FATAL error message
-HelloWorld                              5   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     5   0      INFO my message to the world: A Public Message!
-HelloWorld                              5   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    5   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-HelloWorld                              6   0      INFO execute()
-HelloWorld                              6   0      INFO An INFO message
-HelloWorld                              6   0   WARNING A WARNING message
-HelloWorld                              6   0     ERROR An ERROR message
-HelloWorld                              6   0     FATAL A FATAL error message
-HelloWorld                              6   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     6   0      INFO my message to the world: A Public Message!
-HelloWorld                              6   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    6   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-HelloWorld                              7   0      INFO execute()
-HelloWorld                              7   0      INFO An INFO message
-HelloWorld                              7   0   WARNING A WARNING message
-HelloWorld                              7   0     ERROR An ERROR message
-HelloWorld                              7   0     FATAL A FATAL error message
-HelloWorld                              7   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     7   0      INFO my message to the world: A Public Message!
-HelloWorld                              7   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    7   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-HelloWorld                              8   0      INFO execute()
-HelloWorld                              8   0      INFO An INFO message
-HelloWorld                              8   0   WARNING A WARNING message
-HelloWorld                              8   0     ERROR An ERROR message
-HelloWorld                              8   0     FATAL A FATAL error message
-HelloWorld                              8   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     8   0      INFO my message to the world: A Public Message!
-HelloWorld                              8   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    8   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-HelloWorld                              9   0      INFO execute()
-HelloWorld                              9   0      INFO An INFO message
-HelloWorld                              9   0   WARNING A WARNING message
-HelloWorld                              9   0     ERROR An ERROR message
-HelloWorld                              9   0     FATAL A FATAL error message
-HelloWorld                              9   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     9   0      INFO my message to the world: A Public Message!
-HelloWorld                              9   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    9   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO ---> Loop Finished (seconds): 0.0700742
-HelloWorld                                         INFO stop()
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-HelloWorld                                         INFO finalize()
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-*****Chrono*****                                   INFO ****************************************************************************************************
-*****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc                                      INFO Time User   : Tot=  200 [ms]                                             #=  1
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+EventSelector                                  0    INFO  Enter McEventSelector Initialization 
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+HelloWorld                                     0    INFO start()
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:McCnvSvc
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+HelloWorld                                 0   0    INFO execute()
+HelloWorld                                 0   0    INFO An INFO message
+HelloWorld                                 0   0 WARNING A WARNING message
+HelloWorld                                 0   0   ERROR An ERROR message
+HelloWorld                                 0   0   FATAL A FATAL error message
+HelloWorld                                 0   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        0   0    INFO my message to the world: A Public Message!
+HelloWorld                                 0   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       0   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+HelloWorld                                 1   0    INFO execute()
+HelloWorld                                 1   0    INFO An INFO message
+HelloWorld                                 1   0 WARNING A WARNING message
+HelloWorld                                 1   0   ERROR An ERROR message
+HelloWorld                                 1   0   FATAL A FATAL error message
+HelloWorld                                 1   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        1   0    INFO my message to the world: A Public Message!
+HelloWorld                                 1   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       1   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+HelloWorld                                 2   0    INFO execute()
+HelloWorld                                 2   0    INFO An INFO message
+HelloWorld                                 2   0 WARNING A WARNING message
+HelloWorld                                 2   0   ERROR An ERROR message
+HelloWorld                                 2   0   FATAL A FATAL error message
+HelloWorld                                 2   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        2   0    INFO my message to the world: A Public Message!
+HelloWorld                                 2   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       2   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+HelloWorld                                 3   0    INFO execute()
+HelloWorld                                 3   0    INFO An INFO message
+HelloWorld                                 3   0 WARNING A WARNING message
+HelloWorld                                 3   0   ERROR An ERROR message
+HelloWorld                                 3   0   FATAL A FATAL error message
+HelloWorld                                 3   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        3   0    INFO my message to the world: A Public Message!
+HelloWorld                                 3   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       3   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+HelloWorld                                 4   0    INFO execute()
+HelloWorld                                 4   0    INFO An INFO message
+HelloWorld                                 4   0 WARNING A WARNING message
+HelloWorld                                 4   0   ERROR An ERROR message
+HelloWorld                                 4   0   FATAL A FATAL error message
+HelloWorld                                 4   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        4   0    INFO my message to the world: A Public Message!
+HelloWorld                                 4   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       4   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+HelloWorld                                 5   0    INFO execute()
+HelloWorld                                 5   0    INFO An INFO message
+HelloWorld                                 5   0 WARNING A WARNING message
+HelloWorld                                 5   0   ERROR An ERROR message
+HelloWorld                                 5   0   FATAL A FATAL error message
+HelloWorld                                 5   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        5   0    INFO my message to the world: A Public Message!
+HelloWorld                                 5   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       5   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+HelloWorld                                 6   0    INFO execute()
+HelloWorld                                 6   0    INFO An INFO message
+HelloWorld                                 6   0 WARNING A WARNING message
+HelloWorld                                 6   0   ERROR An ERROR message
+HelloWorld                                 6   0   FATAL A FATAL error message
+HelloWorld                                 6   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        6   0    INFO my message to the world: A Public Message!
+HelloWorld                                 6   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       6   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+HelloWorld                                 7   0    INFO execute()
+HelloWorld                                 7   0    INFO An INFO message
+HelloWorld                                 7   0 WARNING A WARNING message
+HelloWorld                                 7   0   ERROR An ERROR message
+HelloWorld                                 7   0   FATAL A FATAL error message
+HelloWorld                                 7   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        7   0    INFO my message to the world: A Public Message!
+HelloWorld                                 7   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       7   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+HelloWorld                                 8   0    INFO execute()
+HelloWorld                                 8   0    INFO An INFO message
+HelloWorld                                 8   0 WARNING A WARNING message
+HelloWorld                                 8   0   ERROR An ERROR message
+HelloWorld                                 8   0   FATAL A FATAL error message
+HelloWorld                                 8   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        8   0    INFO my message to the world: A Public Message!
+HelloWorld                                 8   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       8   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+HelloWorld                                 9   0    INFO execute()
+HelloWorld                                 9   0    INFO An INFO message
+HelloWorld                                 9   0 WARNING A WARNING message
+HelloWorld                                 9   0   ERROR An ERROR message
+HelloWorld                                 9   0   FATAL A FATAL error message
+HelloWorld                                 9   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        9   0    INFO my message to the world: A Public Message!
+HelloWorld                                 9   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       9   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO ---> Loop Finished (seconds): 0.0119807
+HelloWorld                                          INFO stop()
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+HelloWorld                                          INFO finalize()
+IncidentProcAlg2                                    INFO Finalize
+EventSelector                                       INFO finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+*****Chrono*****                                    INFO ****************************************************************************************************
+*****Chrono*****                                    INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****                                    INFO ****************************************************************************************************
+ChronoStatSvc                                       INFO Time User   : Tot=   80 [ms]                                             #=  1
+*****Chrono*****                                    INFO ****************************************************************************************************
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
index f949b94b920a..69758b5cba10 100644
--- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
+++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
@@ -1,7 +1,7 @@
-Wed Feb 27 04:49:09 CET 2019
+Wed Jun  3 15:38:51 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-centos7-gcc8-opt] [atlas-work3/aba582d739d] -- built on [2019-02-27T0219]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [2] concurrent threads and [2] concurrent events
@@ -9,209 +9,210 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "AthExHelloWorld/HelloWorldOptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-Py:ConfigurableDb    INFO Read module info for 5463 configurables from 45 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 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       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus057.cern.ch on Wed Feb 27 04:49:23 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 15:38:57 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3750 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1193 CLIDRegistry entries for module ALL
-xAODMaker::EventInfoCnvAlg                  0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Beam conditions service not available
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Will not fill beam spot information into xAOD::EventInfo
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Luminosity information not available
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Will take information from the EventInfo object
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
-HelloWorld                                  0      INFO initialize()
-HelloWorld                                  0      INFO   MyInt =    42
-HelloWorld                                  0      INFO   MyBool =   1
-HelloWorld                                  0      INFO   MyDouble = 3.14159
-HelloWorld                                  0      INFO   MyStringVec[0] = Welcome
-HelloWorld                                  0      INFO   MyStringVec[1] = to
-HelloWorld                                  0      INFO   MyStringVec[2] = Athena
-HelloWorld                                  0      INFO   MyStringVec[3] = Framework
-HelloWorld                                  0      INFO   MyStringVec[4] = Tutorial
-HelloWorld                                  0      INFO   MyStringVec[5] = !
-HelloWorld                                  0      INFO   MyDict['Bonjour'] = 'Guten Tag'
-HelloWorld                                  0      INFO   MyDict['Goeiedag'] = 'Ni Hao'
-HelloWorld                                  0      INFO   MyDict['Good Morning'] = 'Bonjour'
-HelloWorld                                  0      INFO   MyDict['one'] = 'ein'
-HelloWorld                                  0      INFO   MyDict['three'] = 'trois'
-HelloWorld                                  0      INFO   MyDict['two'] = 'dos'
-HelloWorld                                  0      INFO   MyTable['1'] = '1'
-HelloWorld                                  0      INFO   MyTable['2'] = '4'
-HelloWorld                                  0      INFO   MyTable['3'] = '9'
-HelloWorld                                  0      INFO   MyTable['4'] = '16'
-HelloWorld                                  0      INFO   MyMatrix[0] = [ 1 2 3 ]
-HelloWorld                                  0      INFO   MyMatrix[1] = [ 4 5 6 ]
-HelloWorld                                  0      INFO   MyMatrix[2] = [ 7 8 9 ]
-HelloWorld                                  0      INFO   MyPrivateHelloTool = HelloTool
-HelloWorld                                  0      INFO   MyPublicHelloTool = HelloTool
-HelloWorld                                  0      INFO MyPrivateHelloTool: Retrieved tool HelloTool
-HelloWorld                                  0      INFO MyPublicHelloTool: Retrieved tool HelloTool
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 7 algorithms
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg                     0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service not available
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Will not fill beam spot information into xAOD::EventInfo
+HelloWorld                                     0    INFO initialize()
+HelloWorld                                     0    INFO   MyInt =    42
+HelloWorld                                     0    INFO   MyBool =   1
+HelloWorld                                     0    INFO   MyDouble = 3.14159
+HelloWorld                                     0    INFO   MyStringVec[0] = Welcome
+HelloWorld                                     0    INFO   MyStringVec[1] = to
+HelloWorld                                     0    INFO   MyStringVec[2] = Athena
+HelloWorld                                     0    INFO   MyStringVec[3] = Framework
+HelloWorld                                     0    INFO   MyStringVec[4] = Tutorial
+HelloWorld                                     0    INFO   MyStringVec[5] = !
+HelloWorld                                     0    INFO   MyDict['Bonjour'] = 'Guten Tag'
+HelloWorld                                     0    INFO   MyDict['Goeiedag'] = 'Ni Hao'
+HelloWorld                                     0    INFO   MyDict['Good Morning'] = 'Bonjour'
+HelloWorld                                     0    INFO   MyDict['one'] = 'ein'
+HelloWorld                                     0    INFO   MyDict['three'] = 'trois'
+HelloWorld                                     0    INFO   MyDict['two'] = 'dos'
+HelloWorld                                     0    INFO   MyTable['1'] = '1'
+HelloWorld                                     0    INFO   MyTable['2'] = '4'
+HelloWorld                                     0    INFO   MyTable['3'] = '9'
+HelloWorld                                     0    INFO   MyTable['4'] = '16'
+HelloWorld                                     0    INFO   MyMatrix[0] = [ 1 2 3 ]
+HelloWorld                                     0    INFO   MyMatrix[1] = [ 4 5 6 ]
+HelloWorld                                     0    INFO   MyMatrix[2] = [ 7 8 9 ]
+HelloWorld                                     0    INFO   MyPrivateHelloTool = HelloTool
+HelloWorld                                     0    INFO   MyPublicHelloTool = HelloTool
+HelloWorld                                     0    INFO MyPrivateHelloTool: Retrieved tool HelloTool
+HelloWorld                                     0    INFO MyPublicHelloTool: Retrieved tool HelloTool
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 7 algorithms
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'EventInfo' , 'StoreGateSvc+McEventInfo' )     required by Algorithm: 
        * xAODMaker::EventInfoCnvAlg
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 2
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':2
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-EventSelector                               0      INFO  Enter McEventSelector Initialization 
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-HelloWorld                                  0      INFO start()
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #1, run #0 on slot 1,  0 events processed so far  <<<===
-HelloWorld                              0   0      INFO execute()
-HelloWorld                              0   0      INFO An INFO message
-HelloWorld                              0   0   WARNING A WARNING message
-HelloWorld                              0   0     ERROR An ERROR message
-HelloWorld                              0   0     FATAL A FATAL error message
-HelloWorld                              0   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     0   0      INFO my message to the world: A Public Message!
-HelloWorld                              0   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    0   0      INFO my message to the world: A Private Message!
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
-HelloWorld                              1   1      INFO execute()
-HelloWorld                              1   1      INFO An INFO message
-HelloWorld                              1   1   WARNING A WARNING message
-HelloWorld                              1   1     ERROR An ERROR message
-HelloWorld                              1   1     FATAL A FATAL error message
-HelloWorld                              1   1      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     1   1      INFO my message to the world: A Public Message!
-HelloWorld                              1   1      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    1   1      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #0 on slot 1,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   1      INFO   ===>>>  start processing event #3, run #0 on slot 1,  2 events processed so far  <<<===
-HelloWorld                              2   0      INFO execute()
-HelloWorld                              2   0      INFO An INFO message
-HelloWorld                              2   0   WARNING A WARNING message
-HelloWorld                              2   0     ERROR An ERROR message
-HelloWorld                              2   0     FATAL A FATAL error message
-HelloWorld                              2   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     2   0      INFO my message to the world: A Public Message!
-HelloWorld                              2   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    2   0      INFO my message to the world: A Private Message!
-HelloWorld                              3   1      INFO execute()
-HelloWorld                              3   1      INFO An INFO message
-HelloWorld                              3   1   WARNING A WARNING message
-HelloWorld                              3   1     ERROR An ERROR message
-HelloWorld                              3   1     FATAL A FATAL error message
-HelloWorld                              3   1      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     3   1      INFO my message to the world: A Public Message!
-HelloWorld                              3   1      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    3   1      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #0 on slot 1,  4 events processed so far  <<<===
-HelloWorld                              4   0      INFO execute()
-HelloWorld                              4   0      INFO An INFO message
-HelloWorld                              4   0   WARNING A WARNING message
-HelloWorld                              4   0     ERROR An ERROR message
-HelloWorld                              4   0     FATAL A FATAL error message
-HelloWorld                              4   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     4   0      INFO my message to the world: A Public Message!
-HelloWorld                              4   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    4   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  5   1      INFO   ===>>>  start processing event #5, run #0 on slot 1,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-HelloWorld                              5   1      INFO execute()
-HelloWorld                              5   1      INFO An INFO message
-HelloWorld                              5   1   WARNING A WARNING message
-HelloWorld                              5   1     ERROR An ERROR message
-HelloWorld                              5   1     FATAL A FATAL error message
-HelloWorld                              5   1      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     5   1      INFO my message to the world: A Public Message!
-HelloWorld                              5   1      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    5   1      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #5, run #0 on slot 1,  6 events processed so far  <<<===
-HelloWorld                              6   0      INFO execute()
-HelloWorld                              6   0      INFO An INFO message
-HelloWorld                              6   0   WARNING A WARNING message
-HelloWorld                              6   0     ERROR An ERROR message
-HelloWorld                              6   0     FATAL A FATAL error message
-HelloWorld                              6   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     6   0      INFO my message to the world: A Public Message!
-HelloWorld                              6   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    6   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  7   1      INFO   ===>>>  start processing event #7, run #0 on slot 1,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-HelloWorld                              7   1      INFO execute()
-HelloWorld                              7   1      INFO An INFO message
-HelloWorld                              7   1   WARNING A WARNING message
-HelloWorld                              7   1     ERROR An ERROR message
-HelloWorld                              7   1     FATAL A FATAL error message
-HelloWorld                              7   1      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     7   1      INFO my message to the world: A Public Message!
-HelloWorld                              7   1      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    7   1      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #7, run #0 on slot 1,  8 events processed so far  <<<===
-HelloWorld                              8   0      INFO execute()
-HelloWorld                              8   0      INFO An INFO message
-HelloWorld                              8   0   WARNING A WARNING message
-HelloWorld                              8   0     ERROR An ERROR message
-HelloWorld                              8   0     FATAL A FATAL error message
-HelloWorld                              8   0      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     8   0      INFO my message to the world: A Public Message!
-HelloWorld                              8   0      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    8   0      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                  9   1      INFO   ===>>>  start processing event #9, run #0 on slot 1,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-HelloWorld                              9   1      INFO execute()
-HelloWorld                              9   1      INFO An INFO message
-HelloWorld                              9   1   WARNING A WARNING message
-HelloWorld                              9   1     ERROR An ERROR message
-HelloWorld                              9   1     FATAL A FATAL error message
-HelloWorld                              9   1      INFO Let the tool MyPublicHelloTool say something:
-ToolSvc.PublicHello                     9   1      INFO my message to the world: A Public Message!
-HelloWorld                              9   1      INFO Let the tool MyPrivateHelloTool say something:
-HelloWorld.HelloTool                    9   1      INFO my message to the world: A Private Message!
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #9, run #0 on slot 1,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.0229208
-HelloWorld                              9   1      INFO stop()
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-HelloWorld                                         INFO finalize()
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-*****Chrono*****                                   INFO ****************************************************************************************************
-*****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
-*****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc                                      INFO Time User   : Tot=  120 [ms]                                             #=  1
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 2
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':2
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+EventSelector                                  0    INFO  Enter McEventSelector Initialization 
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+HelloWorld                                     0    INFO start()
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:McCnvSvc
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #1, run #0 on slot 1,  0 events processed so far  <<<===
+HelloWorld                                 0   0    INFO execute()
+HelloWorld                                 0   0    INFO An INFO message
+HelloWorld                                 0   0 WARNING A WARNING message
+HelloWorld                                 0   0   ERROR An ERROR message
+HelloWorld                                 0   0   FATAL A FATAL error message
+HelloWorld                                 0   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        0   0    INFO my message to the world: A Public Message!
+HelloWorld                                 0   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       0   0    INFO my message to the world: A Private Message!
+HelloWorld                                 1   1    INFO execute()
+HelloWorld                                 1   1    INFO An INFO message
+HelloWorld                                 1   1 WARNING A WARNING message
+HelloWorld                                 1   1   ERROR An ERROR message
+HelloWorld                                 1   1   FATAL A FATAL error message
+HelloWorld                                 1   1    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        1   1    INFO my message to the world: A Public Message!
+HelloWorld                                 1   1    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       1   1    INFO my message to the world: A Private Message!
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #1, run #0 on slot 1,  2 events processed so far  <<<===
+HelloWorld                                 2   0    INFO execute()
+HelloWorld                                 2   0    INFO An INFO message
+HelloWorld                                 2   0 WARNING A WARNING message
+HelloWorld                                 2   0   ERROR An ERROR message
+HelloWorld                                 2   0   FATAL A FATAL error message
+HelloWorld                                 2   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        2   0    INFO my message to the world: A Public Message!
+HelloWorld                                 2   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       2   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     3   1    INFO   ===>>>  start processing event #3, run #0 on slot 1,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+HelloWorld                                 3   1    INFO execute()
+HelloWorld                                 3   1    INFO An INFO message
+HelloWorld                                 3   1 WARNING A WARNING message
+HelloWorld                                 3   1   ERROR An ERROR message
+HelloWorld                                 3   1   FATAL A FATAL error message
+HelloWorld                                 3   1    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        3   1    INFO my message to the world: A Public Message!
+HelloWorld                                 3   1    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       3   1    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  3 events processed so far  <<<===
+HelloWorld                                 4   0    INFO execute()
+HelloWorld                                 4   0    INFO An INFO message
+HelloWorld                                 4   0 WARNING A WARNING message
+HelloWorld                                 4   0   ERROR An ERROR message
+HelloWorld                                 4   0   FATAL A FATAL error message
+HelloWorld                                 4   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        4   0    INFO my message to the world: A Public Message!
+HelloWorld                                 4   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       4   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     3   1    INFO   ===>>>  done processing event #3, run #0 on slot 1,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  start processing event #5, run #0 on slot 1,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+HelloWorld                                 5   1    INFO execute()
+HelloWorld                                 5   1    INFO An INFO message
+HelloWorld                                 5   1 WARNING A WARNING message
+HelloWorld                                 5   1   ERROR An ERROR message
+HelloWorld                                 5   1   FATAL A FATAL error message
+HelloWorld                                 5   1    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        5   1    INFO my message to the world: A Public Message!
+HelloWorld                                 5   1    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       5   1    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  5 events processed so far  <<<===
+HelloWorld                                 6   0    INFO execute()
+HelloWorld                                 6   0    INFO An INFO message
+HelloWorld                                 6   0 WARNING A WARNING message
+HelloWorld                                 6   0   ERROR An ERROR message
+HelloWorld                                 6   0   FATAL A FATAL error message
+HelloWorld                                 6   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        6   0    INFO my message to the world: A Public Message!
+HelloWorld                                 6   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       6   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  done processing event #5, run #0 on slot 1,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   1    INFO   ===>>>  start processing event #7, run #0 on slot 1,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+HelloWorld                                 7   1    INFO execute()
+HelloWorld                                 7   1    INFO An INFO message
+HelloWorld                                 7   1 WARNING A WARNING message
+HelloWorld                                 7   1   ERROR An ERROR message
+HelloWorld                                 7   1   FATAL A FATAL error message
+HelloWorld                                 7   1    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        7   1    INFO my message to the world: A Public Message!
+HelloWorld                                 7   1    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       7   1    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  7 events processed so far  <<<===
+HelloWorld                                 8   0    INFO execute()
+HelloWorld                                 8   0    INFO An INFO message
+HelloWorld                                 8   0 WARNING A WARNING message
+HelloWorld                                 8   0   ERROR An ERROR message
+HelloWorld                                 8   0   FATAL A FATAL error message
+HelloWorld                                 8   0    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        8   0    INFO my message to the world: A Public Message!
+HelloWorld                                 8   0    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       8   0    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     7   1    INFO   ===>>>  done processing event #7, run #0 on slot 1,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  start processing event #9, run #0 on slot 1,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+HelloWorld                                 9   1    INFO execute()
+HelloWorld                                 9   1    INFO An INFO message
+HelloWorld                                 9   1 WARNING A WARNING message
+HelloWorld                                 9   1   ERROR An ERROR message
+HelloWorld                                 9   1   FATAL A FATAL error message
+HelloWorld                                 9   1    INFO Let the tool MyPublicHelloTool say something:
+ToolSvc.PublicHello                        9   1    INFO my message to the world: A Public Message!
+HelloWorld                                 9   1    INFO Let the tool MyPrivateHelloTool say something:
+HelloWorld.HelloTool                       9   1    INFO my message to the world: A Private Message!
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  done processing event #9, run #0 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO ---> Loop Finished (seconds): 0.00976964
+HelloWorld                                          INFO stop()
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+HelloWorld                                          INFO finalize()
+IncidentProcAlg2                                    INFO Finalize
+EventSelector                                       INFO finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+*****Chrono*****                                    INFO ****************************************************************************************************
+*****Chrono*****                                    INFO WARNING: MT job; statistics are unreliable
+*****Chrono*****                                    INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****                                    INFO ****************************************************************************************************
+ChronoStatSvc                                       INFO Time User   : Tot=   80 [ms]                                             #=  1
+*****Chrono*****                                    INFO ****************************************************************************************************
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
index 6890e1b70485..698cc76231ca 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
@@ -1,19 +1,13 @@
-Mon Feb 26 04:15:51 CET 2018
+Wed Jun  3 15:41:40 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-dbg] [atlas-work3/29795b37319] -- built on [2018-02-25T2039]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 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 "AthExJobOptions/AthExJobOptions_BasicJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5459 configurables from 61 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 61 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -IDTrackCaloDepositsDecoratorTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING   -MuonTPExtrapolationTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO Can't set int to string property (this is correct)
 Py:Athena            INFO Can't set non-existing property (this is correct)
 /***** Algorithm AthSequencer/TopAlg ***************************************************************
@@ -26,8 +20,8 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 |-AuditRestart               = False
 |-AuditStart                 = False
 |-AuditStop                  = False
-|-AutoRetrieveTools          = True
-|-Cardinality                = 1
+|-Blocking                   = False
+|-Cardinality                = 0
 |-ContinueEventloopOnFPE     = False
 |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 |-Enable                     = True
@@ -38,7 +32,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 |-ExtraOutputs               = []  (default: [])
 |-FilterCircularDependencies = True
 |-IgnoreFilterPassed         = False
-|-IsIOBound                  = False
 |-Members                    = ['TopAlgorithm/TopAlgorithm', 'TopAlgorithm/MyAlg']  (default: [])
 |-ModeOR                     = False
 |-MonitorService             = 'MonitorSvc'
@@ -58,7 +51,7 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | |-AuditRestart               = False
 | |-AuditStart                 = False
 | |-AuditStop                  = False
-| |-AutoRetrieveTools          = True
+| |-Blocking                   = False
 | |-Cardinality                = 1
 | |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EmptyPrivateTool           = PrivateToolHandle('')
@@ -71,7 +64,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | |-ExtraOutputs               = []  (default: [])
 | |-FilterCircularDependencies = True
 | |-InputKey                   = ''  (default: '')
-| |-IsIOBound                  = False
 | |-MonitorService             = 'MonitorSvc'
 | |-NeededResources            = []  (default: [])
 | |-OutputKey                  = 'AAA'  (default: 'outkey')
@@ -93,7 +85,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -110,7 +101,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -127,7 +117,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -146,7 +135,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -163,7 +151,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -181,7 +168,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -200,7 +186,7 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | |-AuditRestart               = False
 | |-AuditStart                 = False
 | |-AuditStop                  = False
-| |-AutoRetrieveTools          = True
+| |-Blocking                   = False
 | |-Cardinality                = 1
 | |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EmptyPrivateTool           = PrivateToolHandle('')
@@ -213,7 +199,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | |-ExtraOutputs               = []  (default: [])
 | |-FilterCircularDependencies = True
 | |-InputKey                   = 'AAA'  (default: '')
-| |-IsIOBound                  = False
 | |-MonitorService             = 'MonitorSvc'
 | |-NeededResources            = []  (default: [])
 | |-OutputKey                  = 'BBB'  (default: 'outkey')
@@ -236,7 +221,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -253,7 +237,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -270,7 +253,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -287,7 +269,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -304,7 +285,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -325,7 +305,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -342,7 +321,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -360,7 +338,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -379,7 +356,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -396,7 +372,6 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -409,20 +384,18 @@ Py:Athena            INFO Can't set non-existing property (this is correct)
 | \----- (End of Algorithm TopAlgorithm/MyAlg) -------------------------------------------------------
 \----- (End of Algorithm AthSequencer/TopAlg) ------------------------------------------------------
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+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 v30r1)
-                                          running on lxplus066.cern.ch on Mon Feb 26 04:16:04 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 15:41:45 2020
 ====================================================================================================================================
-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 2322 CLIDRegistry entries for module ALL
-ChronoStatSvc                      INFO  Number of skipped events for MemStat-1
+ClassIDSvc                         INFO  getRegistryEntries: read 3463 CLIDRegistry entries for module ALL
 CoreDumpSvc                        INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr                 INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
@@ -514,10 +487,8 @@ MyAlg                             DEBUG Adding public ToolHandle tool ToolSvc.Py
 MyAlg                             DEBUG Adding private ToolHandle tool MyAlg.ToolUsingTool (ToolUsingTool)
 MyAlg                             DEBUG Adding public ToolHandle tool ToolSvc.ConcreteTool (ConcreteTool)
 MyAlg                             DEBUG Data Deps for MyAlg
-HistogramPersistencySvc         WARNING Histograms saving not required.
 ApplicationMgr                     INFO Application Manager Initialized successfully
 ApplicationMgr                     INFO Application Manager Started successfully
-ClassIDSvc                         INFO  getRegistryEntries: read 1357 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr                 INFO   ===>>>  start of run 1    <<<===
 AthenaEventLoopMgr                 INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
 TopAlgorithm                       INFO got this quote [Your day will be somewhat dictated by authority].
@@ -706,7 +677,7 @@ ToolSvc                            INFO Removing all tools created by ToolSvc
 *****Chrono*****                   INFO ****************************************************************************************************
 *****Chrono*****                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                   INFO ****************************************************************************************************
-ChronoStatSvc                      INFO Time User   : Tot=  220 [ms]                                             #=  1
+ChronoStatSvc                      INFO Time User   : Tot=   40 [ms]                                             #=  1
 *****Chrono*****                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()           INFO  Service finalized successfully 
 ApplicationMgr                     INFO Application Manager Finalized successfully
diff --git a/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
index 013158a57b1d..e9366ecd654f 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
@@ -1,20 +1,14 @@
-Mon Feb 26 04:12:09 CET 2018
+Wed Jun  3 15:45:12 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-dbg] [atlas-work3/29795b37319] -- built on [2018-02-25T2039]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 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 "AthExJobOptions/AthExJobOptions_CustomToolJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5459 configurables from 61 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 61 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -IDTrackCaloDepositsDecoratorTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING   -MuonTPExtrapolationTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
-{'TheTool': <ToolUsingTool/YourTopAlg.ToolUsingTool at 0x7fed06ae9470>, 'ErrorMax': '<no value>', 'RndmFactor': '<no value>', 'PublicToolList': PublicToolHandleArray(['ConcreteTool/Tool4','ToolUsingTool/Tool5','ToolSpace::TemplatedTool<double>/Tool6']), 'AuditExecute': '<no value>', 'EmptyPublicTool': PublicToolHandle(''), 'AuditReinitialize': '<no value>', 'EmptyPrivateTool': PrivateToolHandle(''), 'InputKey': '<no value>', 'AuditRestart': '<no value>', 'OutputKey': '<no value>', 'MonitorService': '<no value>', 'Enable': '<no value>', 'Timeline': '<no value>', 'AuditFinalize': '<no value>', 'PrivateToolList': PrivateToolHandleArray(['ConcreteTool/Tool1','ToolUsingTool/Tool2','ToolSpace::TemplatedTool<double>/Tool3']), 'NeededResources': [], 'AutoRetrieveTools': '<no value>', 'FilterCircularDependencies': '<no value>', 'ExtraOutputs': [], 'IsIOBound': '<no value>', 'AuditInitialize': '<no value>', 'OutputLevel': '<no value>', 'ExtraInputs': [], 'AuditStop': '<no value>', 'DetStore': ServiceHandle('StoreGateSvc/DetectorStore'), 'TheSvc': ServiceHandle('ConcreteSvc'), 'Cardinality': '<no value>', 'EvtStore': ServiceHandle('StoreGateSvc'), 'AuditStart': '<no value>', 'RegisterForContextService': '<no value>', 'AuditAlgorithms': '<no value>', 'ThePublicTool': PublicToolHandle('ConcreteTool'), 'ErrorCounter': '<no value>'}
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+{'TheTool': <ToolUsingTool/YourTopAlg.ToolUsingTool at 0x7fde69481c50>, 'ErrorMax': '<no value>', 'RndmFactor': '<no value>', 'PublicToolList': PublicToolHandleArray(['ConcreteTool/Tool4','ToolUsingTool/Tool5','ToolSpace::TemplatedTool<double>/Tool6']), 'AuditExecute': '<no value>', 'EmptyPublicTool': PublicToolHandle(''), 'AuditReinitialize': '<no value>', 'EmptyPrivateTool': PrivateToolHandle(''), 'InputKey': '<no value>', 'AuditRestart': '<no value>', 'MonitorService': '<no value>', 'Enable': '<no value>', 'Timeline': '<no value>', 'AuditFinalize': '<no value>', 'PrivateToolList': PrivateToolHandleArray(['ConcreteTool/Tool1','ToolUsingTool/Tool2','ToolSpace::TemplatedTool<double>/Tool3']), 'NeededResources': [], 'Cardinality': '<no value>', 'FilterCircularDependencies': '<no value>', 'Blocking': '<no value>', 'ExtraOutputs': [], 'OutputKey': '<no value>', 'AuditInitialize': '<no value>', 'OutputLevel': '<no value>', 'ExtraInputs': [], 'AuditStop': '<no value>', 'DetStore': ServiceHandle('StoreGateSvc/DetectorStore'), 'TheSvc': ServiceHandle('ConcreteSvc'), 'EvtStore': ServiceHandle('StoreGateSvc'), 'AuditStart': '<no value>', 'RegisterForContextService': '<no value>', 'AuditAlgorithms': '<no value>', 'ThePublicTool': PublicToolHandle('ConcreteTool'), 'ErrorCounter': '<no value>'}
 /***** Algorithm AthSequencer/TopAlg ***************************************************************
 |-Atomic                     = False
 |-AuditAlgorithms            = False
@@ -25,8 +19,8 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 |-AuditRestart               = False
 |-AuditStart                 = False
 |-AuditStop                  = False
-|-AutoRetrieveTools          = True
-|-Cardinality                = 1
+|-Blocking                   = False
+|-Cardinality                = 0
 |-ContinueEventloopOnFPE     = False
 |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 |-Enable                     = True
@@ -37,7 +31,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 |-ExtraOutputs               = []  (default: [])
 |-FilterCircularDependencies = True
 |-IgnoreFilterPassed         = False
-|-IsIOBound                  = False
 |-Members                    = ['TopAlgorithm/MyTopAlg', 'TopAlgorithm/YourTopAlg']  (default: [])
 |-ModeOR                     = False
 |-MonitorService             = 'MonitorSvc'
@@ -57,7 +50,7 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | |-AuditRestart               = False
 | |-AuditStart                 = False
 | |-AuditStop                  = False
-| |-AutoRetrieveTools          = True
+| |-Blocking                   = False
 | |-Cardinality                = 1
 | |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EmptyPrivateTool           = PrivateToolHandle('')
@@ -70,7 +63,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | |-ExtraOutputs               = []  (default: [])
 | |-FilterCircularDependencies = True
 | |-InputKey                   = ''
-| |-IsIOBound                  = False
 | |-MonitorService             = 'MonitorSvc'
 | |-NeededResources            = []  (default: [])
 | |-OutputKey                  = 'outkey'
@@ -91,7 +83,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -110,7 +101,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -127,7 +117,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -147,7 +136,7 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | |-AuditRestart               = False
 | |-AuditStart                 = False
 | |-AuditStop                  = False
-| |-AutoRetrieveTools          = True
+| |-Blocking                   = False
 | |-Cardinality                = 1
 | |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EmptyPrivateTool           = PrivateToolHandle('')
@@ -160,7 +149,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | |-ExtraOutputs               = []  (default: [])
 | |-FilterCircularDependencies = True
 | |-InputKey                   = ''
-| |-IsIOBound                  = False
 | |-MonitorService             = 'MonitorSvc'
 | |-NeededResources            = []  (default: [])
 | |-OutputKey                  = 'YourKey'  (default: 'outkey')
@@ -181,7 +169,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -200,7 +187,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -217,7 +203,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -235,7 +220,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -252,7 +236,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -271,7 +254,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -288,7 +270,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | | |-AuditStart        = False
 | | | |-AuditStop         = False
 | | | |-AuditTools        = False
-| | | |-AutoRetrieveTools = True
 | | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | | |-ExtraInputs       = []  (default: [])
@@ -306,7 +287,6 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -318,20 +298,18 @@ Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
 | \----- (End of Algorithm TopAlgorithm/YourTopAlg) --------------------------------------------------
 \----- (End of Algorithm AthSequencer/TopAlg) ------------------------------------------------------
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+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 v30r1)
-                                          running on lxplus066.cern.ch on Mon Feb 26 04:12:22 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 15:45:19 2020
 ====================================================================================================================================
-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 2322 CLIDRegistry entries for module ALL
-ChronoStatSvc        INFO  Number of skipped events for MemStat-1
+ClassIDSvc           INFO  getRegistryEntries: read 3463 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
@@ -364,10 +342,8 @@ YourTopAlg           INFO Retrieved PublicToolList = PublicToolHandleArray(['Con
 YourTopAlg           INFO Retrieved TheSvc = ServiceHandle('ConcreteSvc')
 YourTopAlg           INFO Empty private tool is empty (OK)
 YourTopAlg           INFO Empty public tool is empty (OK)
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1357 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
 MyTopAlg             INFO got this quote [Your day will be somewhat dictated by authority].
@@ -525,7 +501,7 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-ChronoStatSvc        INFO Time User   : Tot=  200 [ms]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot=   50 [ms]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
index 4b5c9074d9cc..8d9d4990363c 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
@@ -1,7 +1,7 @@
-Mon Feb 26 04:10:28 CET 2018
+Wed Jun  3 16:34:00 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-dbg] [atlas-work3/29795b37319] -- built on [2018-02-25T2039]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -16,8 +16,8 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 |-AuditRestart               = False
 |-AuditStart                 = False
 |-AuditStop                  = False
-|-AutoRetrieveTools          = True
-|-Cardinality                = 1
+|-Blocking                   = False
+|-Cardinality                = 0
 |-ContinueEventloopOnFPE     = False
 |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 |-Enable                     = True
@@ -28,7 +28,6 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 |-ExtraOutputs               = []  (default: [])
 |-FilterCircularDependencies = True
 |-IgnoreFilterPassed         = False
-|-IsIOBound                  = False
 |-Members                    = ['TopAlgorithm/MyCustomAlg']  (default: [])
 |-ModeOR                     = False
 |-MonitorService             = 'MonitorSvc'
@@ -48,7 +47,7 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 | |-AuditRestart               = False
 | |-AuditStart                 = False
 | |-AuditStop                  = False
-| |-AutoRetrieveTools          = True
+| |-Blocking                   = False
 | |-Cardinality                = 1
 | |-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EmptyPrivateTool           = PrivateToolHandle('')
@@ -61,7 +60,6 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 | |-ExtraOutputs               = []  (default: [])
 | |-FilterCircularDependencies = True
 | |-InputKey                   = ''
-| |-IsIOBound                  = False
 | |-MonitorService             = 'MonitorSvc'
 | |-NeededResources            = []  (default: [])
 | |-OutputKey                  = 'outkey'
@@ -82,7 +80,6 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 | | |-AuditStart        = False
 | | |-AuditStop         = False
 | | |-AuditTools        = False
-| | |-AutoRetrieveTools = True
 | | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EvtStore          = ServiceHandle('StoreGateSvc')
 | | |-ExtraInputs       = []  (default: [])
@@ -94,28 +91,20 @@ Py:Athena            INFO including file "AthExJobOptions/AthExJobOptions_Custom
 | \----- (End of Algorithm TopAlgorithm/MyCustomAlg) -------------------------------------------------
 \----- (End of Algorithm AthSequencer/TopAlg) ------------------------------------------------------
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-Py:ConfigurableDb    INFO Read module info for 5459 configurables from 61 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 61 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -IDTrackCaloDepositsDecoratorTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING   -MuonTPExtrapolationTool: MuonTPTools.MuonTPToolsConf - ['DerivationFrameworkMuons.DerivationFrameworkMuonsConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
-[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 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       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r1)
-                                          running on lxplus066.cern.ch on Mon Feb 26 04:10:41 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:34:07 2020
 ====================================================================================================================================
-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 2322 CLIDRegistry entries for module ALL
-ChronoStatSvc        INFO  Number of skipped events for MemStat-1
+ClassIDSvc           INFO  getRegistryEntries: read 3463 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
@@ -133,10 +122,8 @@ ConcreteSvc          INFO Quote of the day: [Your day will be somewhat dictated
 MyCustomAlg          INFO Retrieved TheSvc = ServiceHandle('ConcreteSvc')
 MyCustomAlg          INFO Empty private tool is empty (OK)
 MyCustomAlg          INFO Empty public tool is empty (OK)
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1357 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
 MyCustomAlg          INFO got this quote [Your day will be somewhat dictated by authority].
@@ -212,7 +199,7 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-ChronoStatSvc        INFO Time User   : Tot=  230 [ms]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot=   40 [ms]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py
index b3566a6910cb..8e026a770bbe 100644
--- a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py
+++ b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py
@@ -156,8 +156,12 @@ class GenericMonitoringArray:
         import collections
         assert isinstance(dimensions,list) and len(dimensions)>0, \
             'GenericMonitoringArray must have list of dimensions.'
-        if dimensions==[1]:
-            return [''], {'': ['']}
+        try:
+            if dimensions==[1]:
+                return [''], {'': ['']}
+        except AttributeError: 
+            #Evidently not [1]
+            pass
         postList = []
         accessorDict = collections.OrderedDict()
         first = dimensions[0]
diff --git a/Control/AthenaServices/src/AthenaOutputStream.h b/Control/AthenaServices/src/AthenaOutputStream.h
index 5085056a2bf3..e0fd7883212b 100644
--- a/Control/AthenaServices/src/AthenaOutputStream.h
+++ b/Control/AthenaServices/src/AthenaOutputStream.h
@@ -76,7 +76,7 @@ protected:
    ServiceHandle<OutputStreamSequencerSvc>  m_outSeqSvc;
   
    /// Vector of item names
-   StringArrayProperty      m_itemList{this,"ItemList",{},"List of items to write","Set<std::string>"};
+   StringArrayProperty      m_itemList{this,"ItemList",{},"List of items to write","OrderedSet<std::string>"};
    /// Vector of item names
    StringArrayProperty      m_metadataItemList;
    /// Vector of item names
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
index 78b2439a9718..b9b84056afff 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:38:21 CEST 2019
+Wed Jun  3 16:05:38 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-opt] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1706]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -10,89 +10,86 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/CondReaderMT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/CondReader_jo.py"
 Py:Athena            INFO including file "AthenaPoolCnvSvc/AthenaPool_jobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
-EventInfoMgtInit: Got release version  Athena-22.0.5
+EventInfoMgtInit: Got release version  Athena-22.0.15
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
+Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus737.cern.ch on Fri Sep 13 19:38:31 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:05:46 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-MetaDataSvc                                        INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
-PoolSvc                                            INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
-PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
-PoolSvc                                            INFO Frontier compression level set to 5
-DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://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-09-12T2129/Athena/22.0.5/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus737.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 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
-IOVDbFolder                                        INFO Read from meta data only for folder /TagInfo
-IOVDbSvc                                           INFO Initialised with 2 connections and 5 folders
-IOVDbSvc                                           INFO Service IOVDbSvc initialised successfully
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 2489 CLIDRegistry entries for module ALL
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1059 CLIDRegistry entries for module ALL
-xAODMaker::EventInfoCnvAlg                  0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-IOVDbSvc                                    0      INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
-IOVDbSvc                                    0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
-IOVSvc                                      0      INFO No IOVSvcTool associated with store "StoreGateSvc"
-IOVSvc.IOVSvcTool                           0      INFO IOVRanges will be checked at every Event
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 326 CLIDRegistry entries for module ALL
-IOVDbSvc                                    0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                    0      INFO Added taginfo remove for /DMTest/RLTest
-IOVDbSvc                                    0      INFO Added taginfo remove for /DMTest/S2
-IOVDbSvc                                    0      INFO Added taginfo remove for /DMTest/TSTest
-IOVDbSvc                                    0      INFO Added taginfo remove for /DMTest/TestAttrList
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Beam conditions service not available
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Will not fill beam spot information into xAOD::EventInfo
-PyComponentMgr                              0      INFO Initializing PyComponentMgr...
-LoadReadDicts                               0      INFO Initializing LoadReadDicts...
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 6902 CLIDRegistry entries for module ALL
-CondInputLoader                             0      INFO Initializing CondInputLoader...
-CondInputLoader                             0      INFO Adding base classes:
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc                                             INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc                                             INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc                                             INFO Frontier compression level set to 5
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
+PoolSvc                                             INFO Successfully setup replica sorting algorithm
+PoolSvc                                             INFO Setting up APR FileCatalog and Streams
+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
+IOVDbFolder                                         INFO Read from meta data only for folder /TagInfo
+IOVDbSvc                                            INFO Initialised with 2 connections and 5 folders
+IOVDbSvc                                            INFO Service IOVDbSvc initialised successfully
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 2133 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1454 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg                     0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+IOVDbSvc                                       0    INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
+IOVDbSvc                                       0    INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVSvc                                         0    INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvc.IOVSvcTool                              0    INFO IOVRanges will be checked at every Event
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+IOVDbSvc                                       0    INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                       0    INFO Added taginfo remove for /DMTest/RLTest
+IOVDbSvc                                       0    INFO Added taginfo remove for /DMTest/S2
+IOVDbSvc                                       0    INFO Added taginfo remove for /DMTest/TSTest
+IOVDbSvc                                       0    INFO Added taginfo remove for /DMTest/TestAttrList
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service not available
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Will not fill beam spot information into xAOD::EventInfo
+PyComponentMgr                                 0    INFO Initializing PyComponentMgr...
+LoadReadDicts                                  0    INFO Initializing LoadReadDicts...
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 9186 CLIDRegistry entries for module ALL
+CondInputLoader                                0    INFO Initializing CondInputLoader...
+CondInputLoader                                0    INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/RLTest' )   ->
   +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TSTest' )   ->
   +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TestAttrList' )   ->
   +  ( 'DMTest::S2' , 'ConditionStore+/DMTest/S2' )   -> DMTest::S1 (243020043)
-CondInputLoader                             0      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+CondInputLoader                                0    INFO Will create WriteCondHandle dependencies for the following DataObjects:
     +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/RLTest' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TSTest' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TestAttrList' ) 
     +  ( 'DMTest::S1' , 'ConditionStore+/DMTest/S2' ) 
     +  ( 'DMTest::S2' , 'ConditionStore+/DMTest/S2' ) 
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 11 algorithms
-AvalancheSchedulerSvc                       0      INFO Data Dependencies for Algorithms:
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 11 algorithms
+AvalancheSchedulerSvc                          0    INFO Data Dependencies for Algorithms:
   BeginIncFiringAlg
       none
   IncidentProcAlg1
@@ -133,339 +130,341 @@ AvalancheSchedulerSvc                       0      INFO Data Dependencies for Al
       none
   IncidentProcAlg2
       none
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'EventInfo' , 'StoreGateSvc+McEventInfo' )     required by Algorithm: 
        * DMTest::CondReaderAlg
        * xAODMaker::EventInfoCnvAlg
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceRulesGraph                        0      INFO CondSvc found. DF precedence rules will be augmented with 'Conditions'
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-EventSelector                               0      INFO  Enter McEventSelector Initialization 
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-PoolSvc                                     0      INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
-CondInputLoader                             0      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/RLTest'
-CondInputLoader                             0      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TSTest'
-CondInputLoader                             0      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TestAttrList'
-CondInputLoader                             0      INFO created CondCont<DMTest::S2> with key 'ConditionStore+/DMTest/S2'
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:AthenaPoolCnvSvc
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
-IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-Domain[ROOT_All]                        0   0      INFO ->  Access   DbDatabase   READ      [ROOT_All] 2705E180-6B42-E241-9733-7761B18F9298
-Domain[ROOT_All]                        0   0      INFO                           condtest.pool.root
-RootDatabase.open                       0   0      INFO condtest.pool.root File version:61800
-DMTest::CondReaderAlg                   0   0      INFO Event 0 LBN 0
-DMTest::CondReaderAlg                   0   0      INFO   xint xint (int) : 10
-DMTest::CondReaderAlg                   0   0      INFO   scond 1000
-DMTest::CondReaderAlg                   0   0      INFO   s2 0
-DMTest::CondReaderAlg                   0   0      INFO   rl xint (int) : 1
-DMTest::CondReaderAlg                   0   0      INFO   ts xint (int) : 100
-DMTest::CondReaderAlg                   0   0      INFO   s3 101
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-ClassIDSvc                              1   0      INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
-DMTest::CondReaderAlg                   1   0      INFO Event 1 LBN 0
-DMTest::CondReaderAlg                   1   0      INFO   xint xint (int) : 10
-DMTest::CondReaderAlg                   1   0      INFO   scond 1000
-DMTest::CondReaderAlg                   1   0      INFO   s2 0
-DMTest::CondReaderAlg                   1   0      INFO   rl xint (int) : 1
-DMTest::CondReaderAlg                   1   0      INFO   ts xint (int) : 100
-DMTest::CondReaderAlg                   1   0      INFO   s3 101
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-DMTest::CondReaderAlg                   2   0      INFO Event 2 LBN 0
-DMTest::CondReaderAlg                   2   0      INFO   xint xint (int) : 10
-DMTest::CondReaderAlg                   2   0      INFO   scond 1000
-DMTest::CondReaderAlg                   2   0      INFO   s2 0
-DMTest::CondReaderAlg                   2   0      INFO   rl xint (int) : 1
-DMTest::CondReaderAlg                   2   0      INFO   ts xint (int) : 100
-DMTest::CondReaderAlg                   2   0      INFO   s3 101
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-DMTest::CondReaderAlg                   3   0      INFO Event 3 LBN 1
-DMTest::CondReaderAlg                   3   0      INFO   xint xint (int) : 20
-DMTest::CondReaderAlg                   3   0      INFO   scond 2000
-DMTest::CondReaderAlg                   3   0      INFO   s2 0
-DMTest::CondReaderAlg                   3   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   3   0      INFO   ts xint (int) : 200
-DMTest::CondReaderAlg                   3   0      INFO   s3 202
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-DMTest::CondReaderAlg                   4   0      INFO Event 4 LBN 1
-DMTest::CondReaderAlg                   4   0      INFO   xint xint (int) : 20
-DMTest::CondReaderAlg                   4   0      INFO   scond 2000
-DMTest::CondReaderAlg                   4   0      INFO   s2 0
-DMTest::CondReaderAlg                   4   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   4   0      INFO   ts xint (int) : 200
-DMTest::CondReaderAlg                   4   0      INFO   s3 202
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-DMTest::CondReaderAlg                   5   0      INFO Event 5 LBN 1
-DMTest::CondReaderAlg                   5   0      INFO   xint xint (int) : 20
-DMTest::CondReaderAlg                   5   0      INFO   scond 2000
-DMTest::CondReaderAlg                   5   0      INFO   s2 0
-DMTest::CondReaderAlg                   5   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   5   0      INFO   ts xint (int) : 200
-DMTest::CondReaderAlg                   5   0      INFO   s3 202
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-DMTest::CondReaderAlg                   6   0      INFO Event 6 LBN 2
-DMTest::CondReaderAlg                   6   0      INFO   xint xint (int) : 30
-DMTest::CondReaderAlg                   6   0      INFO   scond 3000
-DMTest::CondReaderAlg                   6   0      INFO   s2 100
-DMTest::CondReaderAlg                   6   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   6   0      INFO   ts xint (int) : 300
-DMTest::CondReaderAlg                   6   0      INFO   s3 302
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-DMTest::CondReaderAlg                   7   0      INFO Event 7 LBN 2
-DMTest::CondReaderAlg                   7   0      INFO   xint xint (int) : 30
-DMTest::CondReaderAlg                   7   0      INFO   scond 3000
-DMTest::CondReaderAlg                   7   0      INFO   s2 100
-DMTest::CondReaderAlg                   7   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   7   0      INFO   ts xint (int) : 400
-DMTest::CondReaderAlg                   7   0      INFO   s3 402
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-DMTest::CondReaderAlg                   8   0      INFO Event 8 LBN 2
-DMTest::CondReaderAlg                   8   0      INFO   xint xint (int) : 30
-DMTest::CondReaderAlg                   8   0      INFO   scond 3000
-DMTest::CondReaderAlg                   8   0      INFO   s2 100
-DMTest::CondReaderAlg                   8   0      INFO   rl xint (int) : 2
-DMTest::CondReaderAlg                   8   0      INFO   ts xint (int) : 400
-DMTest::CondReaderAlg                   8   0      INFO   s3 402
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-DMTest::CondReaderAlg                   9   0      INFO Event 9 LBN 3
-DMTest::CondReaderAlg                   9   0      INFO   xint xint (int) : 40
-DMTest::CondReaderAlg                   9   0      INFO   scond 4000
-DMTest::CondReaderAlg                   9   0      INFO   s2 100
-DMTest::CondReaderAlg                   9   0      INFO   rl xint (int) : 3
-DMTest::CondReaderAlg                   9   0      INFO   ts xint (int) : 400
-DMTest::CondReaderAlg                   9   0      INFO   s3 403
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
-DMTest::CondReaderAlg                   10  0      INFO Event 10 LBN 3
-DMTest::CondReaderAlg                   10  0      INFO   xint xint (int) : 40
-DMTest::CondReaderAlg                   10  0      INFO   scond 4000
-DMTest::CondReaderAlg                   10  0      INFO   s2 100
-DMTest::CondReaderAlg                   10  0      INFO   rl xint (int) : 3
-DMTest::CondReaderAlg                   10  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   10  0      INFO   s3 503
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
-DMTest::CondReaderAlg                   11  0      INFO Event 11 LBN 3
-DMTest::CondReaderAlg                   11  0      INFO   xint xint (int) : 40
-DMTest::CondReaderAlg                   11  0      INFO   scond 4000
-DMTest::CondReaderAlg                   11  0      INFO   s2 100
-DMTest::CondReaderAlg                   11  0      INFO   rl xint (int) : 3
-DMTest::CondReaderAlg                   11  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   11  0      INFO   s3 503
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
-DMTest::CondReaderAlg                   12  0      INFO Event 12 LBN 4
-DMTest::CondReaderAlg                   12  0      INFO   xint xint (int) : 50
-DMTest::CondReaderAlg                   12  0      INFO   scond 5000
-DMTest::CondReaderAlg                   12  0      INFO   s2 200
-DMTest::CondReaderAlg                   12  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   12  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   12  0      INFO   s3 504
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
-DMTest::CondReaderAlg                   13  0      INFO Event 13 LBN 4
-DMTest::CondReaderAlg                   13  0      INFO   xint xint (int) : 50
-DMTest::CondReaderAlg                   13  0      INFO   scond 5000
-DMTest::CondReaderAlg                   13  0      INFO   s2 200
-DMTest::CondReaderAlg                   13  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   13  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   13  0      INFO   s3 504
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
-DMTest::CondReaderAlg                   14  0      INFO Event 14 LBN 4
-DMTest::CondReaderAlg                   14  0      INFO   xint xint (int) : 50
-DMTest::CondReaderAlg                   14  0      INFO   scond 5000
-DMTest::CondReaderAlg                   14  0      INFO   s2 200
-DMTest::CondReaderAlg                   14  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   14  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   14  0      INFO   s3 504
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
-DMTest::CondReaderAlg                   15  0      INFO Event 15 LBN 5
-DMTest::CondReaderAlg                   15  0      INFO   xint xint (int) : 60
-DMTest::CondReaderAlg                   15  0      INFO   scond 6000
-DMTest::CondReaderAlg                   15  0      INFO   s2 200
-DMTest::CondReaderAlg                   15  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   15  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   15  0      INFO   s3 504
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
-DMTest::CondReaderAlg                   16  0      INFO Event 16 LBN 5
-DMTest::CondReaderAlg                   16  0      INFO   xint xint (int) : 60
-DMTest::CondReaderAlg                   16  0      INFO   scond 6000
-DMTest::CondReaderAlg                   16  0      INFO   s2 200
-DMTest::CondReaderAlg                   16  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   16  0      INFO   ts xint (int) : 500
-DMTest::CondReaderAlg                   16  0      INFO   s3 504
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
-DMTest::CondReaderAlg                   17  0      INFO Event 17 LBN 5
-DMTest::CondReaderAlg                   17  0      INFO   xint xint (int) : 60
-DMTest::CondReaderAlg                   17  0      INFO   scond 6000
-DMTest::CondReaderAlg                   17  0      INFO   s2 200
-DMTest::CondReaderAlg                   17  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   17  0      INFO   ts xint (int) : 600
-DMTest::CondReaderAlg                   17  0      INFO   s3 604
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
-DMTest::CondReaderAlg                   18  0      INFO Event 18 LBN 6
-DMTest::CondReaderAlg                   18  0      INFO   xint xint (int) : 70
-DMTest::CondReaderAlg                   18  0      INFO   scond 7000
-DMTest::CondReaderAlg                   18  0      INFO   s2 300
-DMTest::CondReaderAlg                   18  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   18  0      INFO   ts xint (int) : 600
-DMTest::CondReaderAlg                   18  0      INFO   s3 604
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
-DMTest::CondReaderAlg                   19  0      INFO Event 19 LBN 6
-DMTest::CondReaderAlg                   19  0      INFO   xint xint (int) : 70
-DMTest::CondReaderAlg                   19  0      INFO   scond 7000
-DMTest::CondReaderAlg                   19  0      INFO   s2 300
-DMTest::CondReaderAlg                   19  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   19  0      INFO   ts xint (int) : 700
-DMTest::CondReaderAlg                   19  0      INFO   s3 704
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  20  0      INFO   ===>>>  start processing event #20, run #0 on slot 0,  20 events processed so far  <<<===
-DMTest::CondReaderAlg                   20  0      INFO Event 20 LBN 6
-DMTest::CondReaderAlg                   20  0      INFO   xint xint (int) : 70
-DMTest::CondReaderAlg                   20  0      INFO   scond 7000
-DMTest::CondReaderAlg                   20  0      INFO   s2 300
-DMTest::CondReaderAlg                   20  0      INFO   rl xint (int) : 4
-DMTest::CondReaderAlg                   20  0      INFO   ts xint (int) : 700
-DMTest::CondReaderAlg                   20  0      INFO   s3 704
-AthenaHiveEventLoopMgr                  20  0      INFO   ===>>>  done processing event #20, run #0 on slot 0,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  21  0      INFO   ===>>>  start processing event #21, run #0 on slot 0,  21 events processed so far  <<<===
-DMTest::CondReaderAlg                   21  0      INFO Event 21 LBN 7
-DMTest::CondReaderAlg                   21  0      INFO   xint xint (int) : 80
-DMTest::CondReaderAlg                   21  0      INFO   scond 8000
-DMTest::CondReaderAlg                   21  0      INFO   s2 300
-DMTest::CondReaderAlg                   21  0      INFO   rl xint (int) : 5
-DMTest::CondReaderAlg                   21  0      INFO   ts xint (int) : 700
-DMTest::CondReaderAlg                   21  0      INFO   s3 705
-AthenaHiveEventLoopMgr                  21  0      INFO   ===>>>  done processing event #21, run #0 on slot 0,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  22  0      INFO   ===>>>  start processing event #22, run #0 on slot 0,  22 events processed so far  <<<===
-DMTest::CondReaderAlg                   22  0      INFO Event 22 LBN 7
-DMTest::CondReaderAlg                   22  0      INFO   xint xint (int) : 80
-DMTest::CondReaderAlg                   22  0      INFO   scond 8000
-DMTest::CondReaderAlg                   22  0      INFO   s2 300
-DMTest::CondReaderAlg                   22  0      INFO   rl xint (int) : 5
-DMTest::CondReaderAlg                   22  0      INFO   ts xint (int) : 800
-DMTest::CondReaderAlg                   22  0      INFO   s3 805
-AthenaHiveEventLoopMgr                  22  0      INFO   ===>>>  done processing event #22, run #0 on slot 0,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  23  0      INFO   ===>>>  start processing event #23, run #0 on slot 0,  23 events processed so far  <<<===
-DMTest::CondReaderAlg                   23  0      INFO Event 23 LBN 7
-DMTest::CondReaderAlg                   23  0      INFO   xint xint (int) : 80
-DMTest::CondReaderAlg                   23  0      INFO   scond 8000
-DMTest::CondReaderAlg                   23  0      INFO   s2 300
-DMTest::CondReaderAlg                   23  0      INFO   rl xint (int) : 5
-DMTest::CondReaderAlg                   23  0      INFO   ts xint (int) : 800
-DMTest::CondReaderAlg                   23  0      INFO   s3 805
-AthenaHiveEventLoopMgr                  23  0      INFO   ===>>>  done processing event #23, run #0 on slot 0,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  24  0      INFO   ===>>>  start processing event #24, run #0 on slot 0,  24 events processed so far  <<<===
-DMTest::CondReaderAlg                   24  0      INFO Event 24 LBN 8
-DMTest::CondReaderAlg                   24  0      INFO   xint xint (int) : 90
-DMTest::CondReaderAlg                   24  0      INFO   scond 9000
-DMTest::CondReaderAlg                   24  0      INFO   s2 400
-DMTest::CondReaderAlg                   24  0      INFO   rl xint (int) : 6
-DMTest::CondReaderAlg                   24  0      INFO   ts xint (int) : 800
-DMTest::CondReaderAlg                   24  0      INFO   s3 806
-AthenaHiveEventLoopMgr                  24  0      INFO   ===>>>  done processing event #24, run #0 on slot 0,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  25  0      INFO   ===>>>  start processing event #25, run #0 on slot 0,  25 events processed so far  <<<===
-DMTest::CondReaderAlg                   25  0      INFO Event 25 LBN 8
-DMTest::CondReaderAlg                   25  0      INFO   xint xint (int) : 90
-DMTest::CondReaderAlg                   25  0      INFO   scond 9000
-DMTest::CondReaderAlg                   25  0      INFO   s2 400
-DMTest::CondReaderAlg                   25  0      INFO   rl xint (int) : 6
-DMTest::CondReaderAlg                   25  0      INFO   ts xint (int) : 800
-DMTest::CondReaderAlg                   25  0      INFO   s3 806
-AthenaHiveEventLoopMgr                  25  0      INFO   ===>>>  done processing event #25, run #0 on slot 0,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  26  0      INFO   ===>>>  start processing event #26, run #0 on slot 0,  26 events processed so far  <<<===
-DMTest::CondReaderAlg                   26  0      INFO Event 26 LBN 8
-DMTest::CondReaderAlg                   26  0      INFO   xint xint (int) : 90
-DMTest::CondReaderAlg                   26  0      INFO   scond 9000
-DMTest::CondReaderAlg                   26  0      INFO   s2 400
-DMTest::CondReaderAlg                   26  0      INFO   rl xint (int) : 6
-DMTest::CondReaderAlg                   26  0      INFO   ts xint (int) : 900
-DMTest::CondReaderAlg                   26  0      INFO   s3 906
-AthenaHiveEventLoopMgr                  26  0      INFO   ===>>>  done processing event #26, run #0 on slot 0,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  27  0      INFO   ===>>>  start processing event #27, run #0 on slot 0,  27 events processed so far  <<<===
-DMTest::CondReaderAlg                   27  0      INFO Event 27 LBN 9
-DMTest::CondReaderAlg                   27  0      INFO   xint xint (int) : 100
-DMTest::CondReaderAlg                   27  0      INFO   scond 10000
-DMTest::CondReaderAlg                   27  0      INFO   s2 400
-DMTest::CondReaderAlg                   27  0      INFO   rl xint (int) : 7
-DMTest::CondReaderAlg                   27  0      INFO   ts xint (int) : 900
-DMTest::CondReaderAlg                   27  0      INFO   s3 907
-AthenaHiveEventLoopMgr                  27  0      INFO   ===>>>  done processing event #27, run #0 on slot 0,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  28  0      INFO   ===>>>  start processing event #28, run #0 on slot 0,  28 events processed so far  <<<===
-DMTest::CondReaderAlg                   28  0      INFO Event 28 LBN 9
-DMTest::CondReaderAlg                   28  0      INFO   xint xint (int) : 100
-DMTest::CondReaderAlg                   28  0      INFO   scond 10000
-DMTest::CondReaderAlg                   28  0      INFO   s2 400
-DMTest::CondReaderAlg                   28  0      INFO   rl xint (int) : 7
-DMTest::CondReaderAlg                   28  0      INFO   ts xint (int) : 900
-DMTest::CondReaderAlg                   28  0      INFO   s3 907
-AthenaHiveEventLoopMgr                  28  0      INFO   ===>>>  done processing event #28, run #0 on slot 0,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  29  0      INFO   ===>>>  start processing event #29, run #0 on slot 0,  29 events processed so far  <<<===
-DMTest::CondReaderAlg                   29  0      INFO Event 29 LBN 9
-DMTest::CondReaderAlg                   29  0      INFO   xint xint (int) : 100
-DMTest::CondReaderAlg                   29  0      INFO   scond 10000
-DMTest::CondReaderAlg                   29  0      INFO   s2 400
-DMTest::CondReaderAlg                   29  0      INFO   rl xint (int) : 7
-DMTest::CondReaderAlg                   29  0      INFO   ts xint (int) : 900
-DMTest::CondReaderAlg                   29  0      INFO   s3 907
-AthenaHiveEventLoopMgr                  29  0      INFO   ===>>>  done processing event #29, run #0 on slot 0,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  29  0      INFO ---> Loop Finished (seconds): 0.27256
-condtest.pool.root                                 INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 2705E180-6B42-E241-9733-7761B18F9298
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-LoadReadDicts                                      INFO Finalizing LoadReadDicts...
-CondInputLoader                                    INFO Finalizing CondInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-PyComponentMgr                                     INFO Finalizing PyComponentMgr...
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /DMTest/RLTest (AttrList) db-read 4/7 objs/chan/bytes 28/1/112 ((     0.02 ))s
-IOVDbFolder                                        INFO Folder /DMTest/S2 (PoolRef) db-read 4/5 objs/chan/bytes 60/1/10860 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /DMTest/TSTest (AttrList) db-read 4/9 objs/chan/bytes 36/1/144 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /DMTest/TestAttrList (AttrList) db-read 4/10 objs/chan/bytes 120/1/480 ((     0.01 ))s
-IOVDbSvc                                           INFO  bytes in ((      0.03 ))s
-IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection sqlite://;schema=condtest.db;dbname=OFLP200 : nConnect: 5 nFolders: 4 ReadTime: ((     0.03 ))s
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceRulesGraph                           0    INFO CondSvc found. DF precedence rules will be augmented with 'Conditions'
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+EventSelector                                  0    INFO  Enter McEventSelector Initialization 
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+CondInputLoader                                0    INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/RLTest'
+CondInputLoader                                0    INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TSTest'
+CondInputLoader                                0    INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TestAttrList'
+CondInputLoader                                0    INFO created CondCont<DMTest::S2> with key 'ConditionStore+/DMTest/S2'
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:McCnvSvc
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 118 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+IOVDbSvc                                   0   0    INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc                                   0   0    INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 7C834F50-C775-6244-B465-8E3C1EC9CC44
+Domain[ROOT_All]                           0   0    INFO                           condtest.pool.root
+RootDatabase.open                          0   0    INFO condtest.pool.root File version:62002
+DMTest::CondReaderAlg                      0   0    INFO Event 0 LBN 0
+DMTest::CondReaderAlg                      0   0    INFO   xint xint (int) : 10
+DMTest::CondReaderAlg                      0   0    INFO   scond 1000
+DMTest::CondReaderAlg                      0   0    INFO   s2 0
+DMTest::CondReaderAlg                      0   0    INFO   rl xint (int) : 1
+DMTest::CondReaderAlg                      0   0    INFO   ts xint (int) : 100
+DMTest::CondReaderAlg                      0   0    INFO   s3 101
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 62 CLIDRegistry entries for module ALL
+DMTest::CondReaderAlg                      1   0    INFO Event 1 LBN 0
+DMTest::CondReaderAlg                      1   0    INFO   xint xint (int) : 10
+DMTest::CondReaderAlg                      1   0    INFO   scond 1000
+DMTest::CondReaderAlg                      1   0    INFO   s2 0
+DMTest::CondReaderAlg                      1   0    INFO   rl xint (int) : 1
+DMTest::CondReaderAlg                      1   0    INFO   ts xint (int) : 100
+DMTest::CondReaderAlg                      1   0    INFO   s3 101
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+DMTest::CondReaderAlg                      2   0    INFO Event 2 LBN 0
+DMTest::CondReaderAlg                      2   0    INFO   xint xint (int) : 10
+DMTest::CondReaderAlg                      2   0    INFO   scond 1000
+DMTest::CondReaderAlg                      2   0    INFO   s2 0
+DMTest::CondReaderAlg                      2   0    INFO   rl xint (int) : 1
+DMTest::CondReaderAlg                      2   0    INFO   ts xint (int) : 100
+DMTest::CondReaderAlg                      2   0    INFO   s3 101
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+DMTest::CondReaderAlg                      3   0    INFO Event 3 LBN 1
+DMTest::CondReaderAlg                      3   0    INFO   xint xint (int) : 20
+DMTest::CondReaderAlg                      3   0    INFO   scond 2000
+DMTest::CondReaderAlg                      3   0    INFO   s2 0
+DMTest::CondReaderAlg                      3   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      3   0    INFO   ts xint (int) : 200
+DMTest::CondReaderAlg                      3   0    INFO   s3 202
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+DMTest::CondReaderAlg                      4   0    INFO Event 4 LBN 1
+DMTest::CondReaderAlg                      4   0    INFO   xint xint (int) : 20
+DMTest::CondReaderAlg                      4   0    INFO   scond 2000
+DMTest::CondReaderAlg                      4   0    INFO   s2 0
+DMTest::CondReaderAlg                      4   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      4   0    INFO   ts xint (int) : 200
+DMTest::CondReaderAlg                      4   0    INFO   s3 202
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+DMTest::CondReaderAlg                      5   0    INFO Event 5 LBN 1
+DMTest::CondReaderAlg                      5   0    INFO   xint xint (int) : 20
+DMTest::CondReaderAlg                      5   0    INFO   scond 2000
+DMTest::CondReaderAlg                      5   0    INFO   s2 0
+DMTest::CondReaderAlg                      5   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      5   0    INFO   ts xint (int) : 200
+DMTest::CondReaderAlg                      5   0    INFO   s3 202
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+DMTest::CondReaderAlg                      6   0    INFO Event 6 LBN 2
+DMTest::CondReaderAlg                      6   0    INFO   xint xint (int) : 30
+DMTest::CondReaderAlg                      6   0    INFO   scond 3000
+DMTest::CondReaderAlg                      6   0    INFO   s2 100
+DMTest::CondReaderAlg                      6   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      6   0    INFO   ts xint (int) : 300
+DMTest::CondReaderAlg                      6   0    INFO   s3 302
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+DMTest::CondReaderAlg                      7   0    INFO Event 7 LBN 2
+DMTest::CondReaderAlg                      7   0    INFO   xint xint (int) : 30
+DMTest::CondReaderAlg                      7   0    INFO   scond 3000
+DMTest::CondReaderAlg                      7   0    INFO   s2 100
+DMTest::CondReaderAlg                      7   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      7   0    INFO   ts xint (int) : 400
+DMTest::CondReaderAlg                      7   0    INFO   s3 402
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+DMTest::CondReaderAlg                      8   0    INFO Event 8 LBN 2
+DMTest::CondReaderAlg                      8   0    INFO   xint xint (int) : 30
+DMTest::CondReaderAlg                      8   0    INFO   scond 3000
+DMTest::CondReaderAlg                      8   0    INFO   s2 100
+DMTest::CondReaderAlg                      8   0    INFO   rl xint (int) : 2
+DMTest::CondReaderAlg                      8   0    INFO   ts xint (int) : 400
+DMTest::CondReaderAlg                      8   0    INFO   s3 402
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+DMTest::CondReaderAlg                      9   0    INFO Event 9 LBN 3
+DMTest::CondReaderAlg                      9   0    INFO   xint xint (int) : 40
+DMTest::CondReaderAlg                      9   0    INFO   scond 4000
+DMTest::CondReaderAlg                      9   0    INFO   s2 100
+DMTest::CondReaderAlg                      9   0    INFO   rl xint (int) : 3
+DMTest::CondReaderAlg                      9   0    INFO   ts xint (int) : 400
+DMTest::CondReaderAlg                      9   0    INFO   s3 403
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+DMTest::CondReaderAlg                     10   0    INFO Event 10 LBN 3
+DMTest::CondReaderAlg                     10   0    INFO   xint xint (int) : 40
+DMTest::CondReaderAlg                     10   0    INFO   scond 4000
+DMTest::CondReaderAlg                     10   0    INFO   s2 100
+DMTest::CondReaderAlg                     10   0    INFO   rl xint (int) : 3
+DMTest::CondReaderAlg                     10   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     10   0    INFO   s3 503
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+DMTest::CondReaderAlg                     11   0    INFO Event 11 LBN 3
+DMTest::CondReaderAlg                     11   0    INFO   xint xint (int) : 40
+DMTest::CondReaderAlg                     11   0    INFO   scond 4000
+DMTest::CondReaderAlg                     11   0    INFO   s2 100
+DMTest::CondReaderAlg                     11   0    INFO   rl xint (int) : 3
+DMTest::CondReaderAlg                     11   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     11   0    INFO   s3 503
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+DMTest::CondReaderAlg                     12   0    INFO Event 12 LBN 4
+DMTest::CondReaderAlg                     12   0    INFO   xint xint (int) : 50
+DMTest::CondReaderAlg                     12   0    INFO   scond 5000
+DMTest::CondReaderAlg                     12   0    INFO   s2 200
+DMTest::CondReaderAlg                     12   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     12   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     12   0    INFO   s3 504
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+DMTest::CondReaderAlg                     13   0    INFO Event 13 LBN 4
+DMTest::CondReaderAlg                     13   0    INFO   xint xint (int) : 50
+DMTest::CondReaderAlg                     13   0    INFO   scond 5000
+DMTest::CondReaderAlg                     13   0    INFO   s2 200
+DMTest::CondReaderAlg                     13   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     13   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     13   0    INFO   s3 504
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+DMTest::CondReaderAlg                     14   0    INFO Event 14 LBN 4
+DMTest::CondReaderAlg                     14   0    INFO   xint xint (int) : 50
+DMTest::CondReaderAlg                     14   0    INFO   scond 5000
+DMTest::CondReaderAlg                     14   0    INFO   s2 200
+DMTest::CondReaderAlg                     14   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     14   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     14   0    INFO   s3 504
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+DMTest::CondReaderAlg                     15   0    INFO Event 15 LBN 5
+DMTest::CondReaderAlg                     15   0    INFO   xint xint (int) : 60
+DMTest::CondReaderAlg                     15   0    INFO   scond 6000
+DMTest::CondReaderAlg                     15   0    INFO   s2 200
+DMTest::CondReaderAlg                     15   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     15   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     15   0    INFO   s3 504
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+DMTest::CondReaderAlg                     16   0    INFO Event 16 LBN 5
+DMTest::CondReaderAlg                     16   0    INFO   xint xint (int) : 60
+DMTest::CondReaderAlg                     16   0    INFO   scond 6000
+DMTest::CondReaderAlg                     16   0    INFO   s2 200
+DMTest::CondReaderAlg                     16   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     16   0    INFO   ts xint (int) : 500
+DMTest::CondReaderAlg                     16   0    INFO   s3 504
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+DMTest::CondReaderAlg                     17   0    INFO Event 17 LBN 5
+DMTest::CondReaderAlg                     17   0    INFO   xint xint (int) : 60
+DMTest::CondReaderAlg                     17   0    INFO   scond 6000
+DMTest::CondReaderAlg                     17   0    INFO   s2 200
+DMTest::CondReaderAlg                     17   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     17   0    INFO   ts xint (int) : 600
+DMTest::CondReaderAlg                     17   0    INFO   s3 604
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+DMTest::CondReaderAlg                     18   0    INFO Event 18 LBN 6
+DMTest::CondReaderAlg                     18   0    INFO   xint xint (int) : 70
+DMTest::CondReaderAlg                     18   0    INFO   scond 7000
+DMTest::CondReaderAlg                     18   0    INFO   s2 300
+DMTest::CondReaderAlg                     18   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     18   0    INFO   ts xint (int) : 600
+DMTest::CondReaderAlg                     18   0    INFO   s3 604
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+DMTest::CondReaderAlg                     19   0    INFO Event 19 LBN 6
+DMTest::CondReaderAlg                     19   0    INFO   xint xint (int) : 70
+DMTest::CondReaderAlg                     19   0    INFO   scond 7000
+DMTest::CondReaderAlg                     19   0    INFO   s2 300
+DMTest::CondReaderAlg                     19   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     19   0    INFO   ts xint (int) : 700
+DMTest::CondReaderAlg                     19   0    INFO   s3 704
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   0    INFO   ===>>>  start processing event #20, run #0 on slot 0,  20 events processed so far  <<<===
+DMTest::CondReaderAlg                     20   0    INFO Event 20 LBN 6
+DMTest::CondReaderAlg                     20   0    INFO   xint xint (int) : 70
+DMTest::CondReaderAlg                     20   0    INFO   scond 7000
+DMTest::CondReaderAlg                     20   0    INFO   s2 300
+DMTest::CondReaderAlg                     20   0    INFO   rl xint (int) : 4
+DMTest::CondReaderAlg                     20   0    INFO   ts xint (int) : 700
+DMTest::CondReaderAlg                     20   0    INFO   s3 704
+AthenaHiveEventLoopMgr                    20   0    INFO   ===>>>  done processing event #20, run #0 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   0    INFO   ===>>>  start processing event #21, run #0 on slot 0,  21 events processed so far  <<<===
+DMTest::CondReaderAlg                     21   0    INFO Event 21 LBN 7
+DMTest::CondReaderAlg                     21   0    INFO   xint xint (int) : 80
+DMTest::CondReaderAlg                     21   0    INFO   scond 8000
+DMTest::CondReaderAlg                     21   0    INFO   s2 300
+DMTest::CondReaderAlg                     21   0    INFO   rl xint (int) : 5
+DMTest::CondReaderAlg                     21   0    INFO   ts xint (int) : 700
+DMTest::CondReaderAlg                     21   0    INFO   s3 705
+AthenaHiveEventLoopMgr                    21   0    INFO   ===>>>  done processing event #21, run #0 on slot 0,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   0    INFO   ===>>>  start processing event #22, run #0 on slot 0,  22 events processed so far  <<<===
+DMTest::CondReaderAlg                     22   0    INFO Event 22 LBN 7
+DMTest::CondReaderAlg                     22   0    INFO   xint xint (int) : 80
+DMTest::CondReaderAlg                     22   0    INFO   scond 8000
+DMTest::CondReaderAlg                     22   0    INFO   s2 300
+DMTest::CondReaderAlg                     22   0    INFO   rl xint (int) : 5
+DMTest::CondReaderAlg                     22   0    INFO   ts xint (int) : 800
+DMTest::CondReaderAlg                     22   0    INFO   s3 805
+AthenaHiveEventLoopMgr                    22   0    INFO   ===>>>  done processing event #22, run #0 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  start processing event #23, run #0 on slot 0,  23 events processed so far  <<<===
+DMTest::CondReaderAlg                     23   0    INFO Event 23 LBN 7
+DMTest::CondReaderAlg                     23   0    INFO   xint xint (int) : 80
+DMTest::CondReaderAlg                     23   0    INFO   scond 8000
+DMTest::CondReaderAlg                     23   0    INFO   s2 300
+DMTest::CondReaderAlg                     23   0    INFO   rl xint (int) : 5
+DMTest::CondReaderAlg                     23   0    INFO   ts xint (int) : 800
+DMTest::CondReaderAlg                     23   0    INFO   s3 805
+AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  done processing event #23, run #0 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   0    INFO   ===>>>  start processing event #24, run #0 on slot 0,  24 events processed so far  <<<===
+DMTest::CondReaderAlg                     24   0    INFO Event 24 LBN 8
+DMTest::CondReaderAlg                     24   0    INFO   xint xint (int) : 90
+DMTest::CondReaderAlg                     24   0    INFO   scond 9000
+DMTest::CondReaderAlg                     24   0    INFO   s2 400
+DMTest::CondReaderAlg                     24   0    INFO   rl xint (int) : 6
+DMTest::CondReaderAlg                     24   0    INFO   ts xint (int) : 800
+DMTest::CondReaderAlg                     24   0    INFO   s3 806
+AthenaHiveEventLoopMgr                    24   0    INFO   ===>>>  done processing event #24, run #0 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   0    INFO   ===>>>  start processing event #25, run #0 on slot 0,  25 events processed so far  <<<===
+DMTest::CondReaderAlg                     25   0    INFO Event 25 LBN 8
+DMTest::CondReaderAlg                     25   0    INFO   xint xint (int) : 90
+DMTest::CondReaderAlg                     25   0    INFO   scond 9000
+DMTest::CondReaderAlg                     25   0    INFO   s2 400
+DMTest::CondReaderAlg                     25   0    INFO   rl xint (int) : 6
+DMTest::CondReaderAlg                     25   0    INFO   ts xint (int) : 800
+DMTest::CondReaderAlg                     25   0    INFO   s3 806
+AthenaHiveEventLoopMgr                    25   0    INFO   ===>>>  done processing event #25, run #0 on slot 0,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  start processing event #26, run #0 on slot 0,  26 events processed so far  <<<===
+DMTest::CondReaderAlg                     26   0    INFO Event 26 LBN 8
+DMTest::CondReaderAlg                     26   0    INFO   xint xint (int) : 90
+DMTest::CondReaderAlg                     26   0    INFO   scond 9000
+DMTest::CondReaderAlg                     26   0    INFO   s2 400
+DMTest::CondReaderAlg                     26   0    INFO   rl xint (int) : 6
+DMTest::CondReaderAlg                     26   0    INFO   ts xint (int) : 900
+DMTest::CondReaderAlg                     26   0    INFO   s3 906
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  done processing event #26, run #0 on slot 0,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  start processing event #27, run #0 on slot 0,  27 events processed so far  <<<===
+DMTest::CondReaderAlg                     27   0    INFO Event 27 LBN 9
+DMTest::CondReaderAlg                     27   0    INFO   xint xint (int) : 100
+DMTest::CondReaderAlg                     27   0    INFO   scond 10000
+DMTest::CondReaderAlg                     27   0    INFO   s2 400
+DMTest::CondReaderAlg                     27   0    INFO   rl xint (int) : 7
+DMTest::CondReaderAlg                     27   0    INFO   ts xint (int) : 900
+DMTest::CondReaderAlg                     27   0    INFO   s3 907
+AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  done processing event #27, run #0 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   0    INFO   ===>>>  start processing event #28, run #0 on slot 0,  28 events processed so far  <<<===
+DMTest::CondReaderAlg                     28   0    INFO Event 28 LBN 9
+DMTest::CondReaderAlg                     28   0    INFO   xint xint (int) : 100
+DMTest::CondReaderAlg                     28   0    INFO   scond 10000
+DMTest::CondReaderAlg                     28   0    INFO   s2 400
+DMTest::CondReaderAlg                     28   0    INFO   rl xint (int) : 7
+DMTest::CondReaderAlg                     28   0    INFO   ts xint (int) : 900
+DMTest::CondReaderAlg                     28   0    INFO   s3 907
+AthenaHiveEventLoopMgr                    28   0    INFO   ===>>>  done processing event #28, run #0 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  start processing event #29, run #0 on slot 0,  29 events processed so far  <<<===
+DMTest::CondReaderAlg                     29   0    INFO Event 29 LBN 9
+DMTest::CondReaderAlg                     29   0    INFO   xint xint (int) : 100
+DMTest::CondReaderAlg                     29   0    INFO   scond 10000
+DMTest::CondReaderAlg                     29   0    INFO   s2 400
+DMTest::CondReaderAlg                     29   0    INFO   rl xint (int) : 7
+DMTest::CondReaderAlg                     29   0    INFO   ts xint (int) : 900
+DMTest::CondReaderAlg                     29   0    INFO   s3 907
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  done processing event #29, run #0 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO ---> Loop Finished (seconds): 0.26469
+condtest.pool.root                                  INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 7C834F50-C775-6244-B465-8E3C1EC9CC44
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+LoadReadDicts                                       INFO Finalizing LoadReadDicts...
+CondInputLoader                                     INFO Finalizing CondInputLoader...
+IncidentProcAlg2                                    INFO Finalize
+EventSelector                                       INFO finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+PyComponentMgr                                      INFO Finalizing PyComponentMgr...
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+IOVDbFolder                                         INFO Folder /DMTest/RLTest (AttrList) db-read 4/7 objs/chan/bytes 28/1/112 ((     0.02 ))s
+IOVDbFolder                                         INFO Folder /DMTest/S2 (PoolRef) db-read 4/5 objs/chan/bytes 60/1/10860 ((     0.01 ))s
+IOVDbFolder                                         INFO Folder /DMTest/TSTest (AttrList) db-read 4/9 objs/chan/bytes 36/1/144 ((     0.01 ))s
+IOVDbFolder                                         INFO Folder /DMTest/TestAttrList (AttrList) db-read 4/10 objs/chan/bytes 120/1/480 ((     0.01 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.05 ))s
+IOVDbSvc                                            INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc                                            INFO Connection sqlite://;schema=condtest.db;dbname=OFLP200 : nConnect: 5 nFolders: 4 ReadTime: ((     0.05 ))s
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
index 413846bd9b4c..5666e9bb99f3 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:23:29 CEST 2019
+Wed Jun  3 16:04:05 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-opt] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1706]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,42 +9,38 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle1MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle1_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
+Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 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       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus737.cern.ch on Fri Sep 13 19:23:39 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:04:13 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1060 CLIDRegistry entries for module ALL
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1177 CLIDRegistry entries for module ALL
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 6413 CLIDRegistry entries for module ALL
-xAODMaker::EventInfoCnvAlg                  0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Beam conditions service not available
-xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Will not fill beam spot information into xAOD::EventInfo
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 11 algorithms
-AvalancheSchedulerSvc                       0      INFO Data Dependencies for Algorithms:
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1401 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 6325 CLIDRegistry entries for module ALL
+xAODMaker::EventInfoCnvAlg                     0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service not available
+xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Will not fill beam spot information into xAOD::EventInfo
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 11 algorithms
+AvalancheSchedulerSvc                          0    INFO Data Dependencies for Algorithms:
   BeginIncFiringAlg
       none
   IncidentProcAlg1
@@ -95,156 +91,159 @@ AvalancheSchedulerSvc                       0      INFO Data Dependencies for Al
       none
   IncidentProcAlg2
       none
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'EventInfo' , 'StoreGateSvc+McEventInfo' )     required by Algorithm: 
        * xAODMaker::EventInfoCnvAlg
        * xAODTestDecor
        * xAODTestWriteCInfo
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-EventSelector                               0      INFO  Enter McEventSelector Initialization 
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-EventPersistencySvc                     0   0      INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
-xAODTestReadDecor                       0   0      INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1Base: 3001
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-xAODTestReadDecor                       1   0      INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1Base: 6001
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-xAODTestReadDecor                       2   0      INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1Base: 9001
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-xAODTestReadDecor                       3   0      INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1Base: 12001
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadDecor                       4   0      INFO cvec.dInt1:
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1Base: 15001
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-xAODTestReadDecor                       5   0      INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1Base: 18001
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-xAODTestReadDecor                       6   0      INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1Base: 21001
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-xAODTestReadDecor                       7   0      INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1Base: 24001
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-xAODTestReadDecor                       8   0      INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1Base: 27001
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-xAODTestReadDecor                       9   0      INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1Base: 30001
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
-xAODTestReadDecor                       10  0      INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1Base: 33001
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
-xAODTestReadDecor                       11  0      INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1Base: 36001
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
-xAODTestReadDecor                       12  0      INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1Base: 39001
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
-xAODTestReadDecor                       13  0      INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1Base: 42001
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
-xAODTestReadDecor                       14  0      INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1Base: 45001
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
-xAODTestReadDecor                       15  0      INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1Base: 48001
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
-xAODTestReadDecor                       16  0      INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1Base: 51001
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
-xAODTestReadDecor                       17  0      INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1Base: 54001
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
-xAODTestReadDecor                       18  0      INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1Base: 57001
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
-xAODTestReadDecor                       19  0      INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1Base: 60001
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.0550938
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+EventSelector                                  0    INFO  Enter McEventSelector Initialization 
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:McCnvSvc
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+xAODTestReadDecor                          0   0    INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1: 3000
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1Base: 3001
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1: 3000
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+xAODTestReadDecor                          1   0    INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1: 6000
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1Base: 6001
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1: 6000
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+xAODTestReadDecor                          2   0    INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1: 9000
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1Base: 9001
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1: 9000
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+xAODTestReadDecor                          3   0    INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1: 12000
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1Base: 12001
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1: 12000
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadDecor                          4   0    INFO cvec.dInt1:
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1: 15000
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1Base: 15001
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1: 15000
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+xAODTestReadDecor                          5   0    INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1: 18000
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1Base: 18001
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1: 18000
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+xAODTestReadDecor                          6   0    INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1: 21000
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1Base: 21001
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1: 21000
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+xAODTestReadDecor                          7   0    INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1: 24000
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1Base: 24001
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1: 24000
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+xAODTestReadDecor                          8   0    INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1: 27000
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1Base: 27001
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1: 27000
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+xAODTestReadDecor                          9   0    INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1: 30000
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1Base: 30001
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1: 30000
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+xAODTestReadDecor                         10   0    INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1: 33000
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1Base: 33001
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1: 33000
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+xAODTestReadDecor                         11   0    INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1: 36000
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1Base: 36001
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1: 36000
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+xAODTestReadDecor                         12   0    INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1: 39000
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1Base: 39001
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1: 39000
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+xAODTestReadDecor                         13   0    INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1: 42000
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1Base: 42001
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1: 42000
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+xAODTestReadDecor                         14   0    INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1: 45000
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1Base: 45001
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1: 45000
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+xAODTestReadDecor                         15   0    INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1: 48000
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1Base: 48001
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1: 48000
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+xAODTestReadDecor                         16   0    INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1: 51000
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1Base: 51001
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1: 51000
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+xAODTestReadDecor                         17   0    INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1: 54000
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1Base: 54001
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1: 54000
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+xAODTestReadDecor                         18   0    INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1: 57000
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1Base: 57001
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1: 57000
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+xAODTestReadDecor                         19   0    INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1: 60000
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1Base: 60001
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1: 60000
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.0308177
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+IncidentProcAlg2                                    INFO Finalize
+EventSelector                                       INFO finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
index f908b6bb1811..e332deb86ee7 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:45:46 CEST 2019
+Wed Jun  3 16:04:52 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-opt] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1706]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,15 +9,10 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle2MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -25,78 +20,80 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus737.cern.ch on Fri Sep 13 19:46:00 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:04:58 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-MetaDataSvc                                        INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
-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-09-12T2129/Athena/22.0.5/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus737.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 POOL WriteCatalog is file:xAODTestDecorHandle2MT_catalog.xml
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-MetaDataSvc                                        INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
-EventSelector                                      INFO EventSelection with query 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+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://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
+PoolSvc                                             INFO Successfully setup replica sorting algorithm
+PoolSvc                                             INFO Setting up APR FileCatalog and Streams
+PoolSvc                                             INFO POOL WriteCatalog is file:xAODTestDecorHandle2MT_catalog.xml
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
+EventSelector                                       INFO EventSelection with query 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
 Warning in <TClass::Init>: no dictionary for class DMTest::CAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CInfoAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CTrigAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::GAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CVecWithData_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::H_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::H_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S2 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S1 is available
 Warning in <TClass::Init>: no dictionary for class ElementLink<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::C_v1> is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::H_v1> is available
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-ClassIDSvc                                         INFO  getRegistryEntries: read 2112 CLIDRegistry entries for module ALL
-EventPersistencySvc                                INFO Added successfully Conversion service:AthenaPoolCnvSvc
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1326 CLIDRegistry entries for module ALL
-PyComponentMgr                              0      INFO Initializing PyComponentMgr...
-LoadReadDicts                               0      INFO Initializing LoadReadDicts...
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 7 algorithms
-AvalancheSchedulerSvc                       0      INFO Data Dependencies for Algorithms:
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+ClassIDSvc                                          INFO  getRegistryEntries: read 2248 CLIDRegistry entries for module ALL
+EventPersistencySvc                                 INFO Added successfully Conversion service:AthenaPoolCnvSvc
+ClassIDSvc                                          INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+PyComponentMgr                                 0    INFO Initializing PyComponentMgr...
+LoadReadDicts                                  0    INFO Initializing LoadReadDicts...
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 7 algorithms
+AvalancheSchedulerSvc                          0    INFO Data Dependencies for Algorithms:
   BeginIncFiringAlg
       none
   IncidentProcAlg1
@@ -113,173 +110,175 @@ AvalancheSchedulerSvc                       0      INFO Data Dependencies for Al
       none
   IncidentProcAlg2
       none
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'DMTest::CVec' , 'StoreGateSvc+cvec.dInt1' )     required by Algorithm: 
        * xAODTestReadDecor
    o  ( 'SG::AuxElement' , 'StoreGateSvc+cinfo.dInt1' )     required by Algorithm: 
        * xAODTestReadDecor
    o  ( 'SG::AuxElement' , 'StoreGateSvc+cinfo.dInt1Base' )     required by Algorithm: 
        * xAODTestReadDecor
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-PoolSvc                                     0      INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
-xaoddata.root                               0      INFO Database being retired...
-Domain[ROOT_All]                            0      INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                            0      INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                   0      INFO     Open     DbSession    
-Domain[ROOT_All]                            0      INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                            0      INFO ->  Access   DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                            0      INFO                           xaoddata.root
-RootDatabase.open                           0      INFO xaoddata.root File version:61800
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 7101 CLIDRegistry entries for module ALL
-AthenaPoolConverter                     0   0      INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
-xAODTestReadDecor                       0   0      INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1Base: 3001
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-ClassIDSvc                              1   0      INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-xAODTestReadDecor                       1   0      INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1Base: 6001
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-xAODTestReadDecor                       2   0      INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1Base: 9001
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-xAODTestReadDecor                       3   0      INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1Base: 12001
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadDecor                       4   0      INFO cvec.dInt1:
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1Base: 15001
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-xAODTestReadDecor                       5   0      INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1Base: 18001
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-xAODTestReadDecor                       6   0      INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1Base: 21001
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-xAODTestReadDecor                       7   0      INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1Base: 24001
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-xAODTestReadDecor                       8   0      INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1Base: 27001
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-xAODTestReadDecor                       9   0      INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1Base: 30001
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
-xAODTestReadDecor                       10  0      INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1Base: 33001
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
-xAODTestReadDecor                       11  0      INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1Base: 36001
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
-xAODTestReadDecor                       12  0      INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1Base: 39001
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
-xAODTestReadDecor                       13  0      INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1Base: 42001
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
-xAODTestReadDecor                       14  0      INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1Base: 45001
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
-xAODTestReadDecor                       15  0      INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1Base: 48001
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
-xAODTestReadDecor                       16  0      INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1Base: 51001
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
-xAODTestReadDecor                       17  0      INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1Base: 54001
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
-xAODTestReadDecor                       18  0      INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1Base: 57001
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
-xAODTestReadDecor                       19  0      INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1Base: 60001
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.123189
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-LoadReadDicts                                      INFO Finalizing LoadReadDicts...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-PyComponentMgr                                     INFO Finalizing PyComponentMgr...
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-XMLCatalog                                         INFO File 'xAODTestDecorHandle2MT_catalog.xml' does not exist. New file created.
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+xaoddata.root                                  0    INFO Database being retired...
+Domain[ROOT_All]                               0    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                      0    INFO     Open     DbSession    
+Domain[ROOT_All]                               0    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                               0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO                           xaoddata.root
+RootDatabase.open                              0    INFO xaoddata.root File version:62002
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 8913 CLIDRegistry entries for module ALL
+AthenaPoolConverter                        0   0    INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
+xAODTestReadDecor                          0   0    INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1: 3000
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1Base: 3001
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1: 3000
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+xAODTestReadDecor                          1   0    INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1: 6000
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1Base: 6001
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1: 6000
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+xAODTestReadDecor                          2   0    INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1: 9000
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1Base: 9001
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1: 9000
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+xAODTestReadDecor                          3   0    INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1: 12000
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1Base: 12001
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1: 12000
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadDecor                          4   0    INFO cvec.dInt1:
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1: 15000
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1Base: 15001
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1: 15000
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+xAODTestReadDecor                          5   0    INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1: 18000
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1Base: 18001
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1: 18000
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+xAODTestReadDecor                          6   0    INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1: 21000
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1Base: 21001
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1: 21000
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+xAODTestReadDecor                          7   0    INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1: 24000
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1Base: 24001
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1: 24000
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+xAODTestReadDecor                          8   0    INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1: 27000
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1Base: 27001
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1: 27000
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+xAODTestReadDecor                          9   0    INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1: 30000
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1Base: 30001
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1: 30000
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+xAODTestReadDecor                         10   0    INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1: 33000
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1Base: 33001
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1: 33000
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+xAODTestReadDecor                         11   0    INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1: 36000
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1Base: 36001
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1: 36000
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+xAODTestReadDecor                         12   0    INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1: 39000
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1Base: 39001
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1: 39000
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+xAODTestReadDecor                         13   0    INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1: 42000
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1Base: 42001
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1: 42000
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+xAODTestReadDecor                         14   0    INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1: 45000
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1Base: 45001
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1: 45000
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+xAODTestReadDecor                         15   0    INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1: 48000
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1Base: 48001
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1: 48000
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+xAODTestReadDecor                         16   0    INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1: 51000
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1Base: 51001
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1: 51000
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+xAODTestReadDecor                         17   0    INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1: 54000
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1Base: 54001
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1: 54000
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+xAODTestReadDecor                         18   0    INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1: 57000
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1Base: 57001
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1: 57000
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+xAODTestReadDecor                         19   0    INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1: 60000
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1Base: 60001
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1: 60000
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.11467
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+LoadReadDicts                                       INFO Finalizing LoadReadDicts...
+IncidentProcAlg2                                    INFO Finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+PyComponentMgr                                      INFO Finalizing PyComponentMgr...
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+XMLCatalog                                          INFO File 'xAODTestDecorHandle2MT_catalog.xml' does not exist. New file created.
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
index 8dc4a74c3b8b..c7c6e0bdd44e 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
@@ -1,7 +1,7 @@
-Thu Jan  2 22:45:22 CET 2020
+Wed Jun  3 16:00:22 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-dbg] [atlas-work3/151c733158e] -- built on [2020-01-02T1802]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,7 +9,7 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestRead3MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestRead3_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5638 configurables from 49 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
 Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
@@ -20,14 +20,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r0)
-                                          running on lxplus781.cern.ch on Thu Jan  2 22:45:31 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:00:29 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 4098 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
@@ -35,9 +35,10 @@ MetaDataSvc                                         INFO Initializing MetaDataSv
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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-12-31T2133/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-dbg/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host lxplus781.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                             INFO POOL WriteCatalog is file:xAODTestRead3MT_catalog.xml
@@ -61,7 +62,7 @@ Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::H_v2> is a
 DbSession                                           INFO     Open     DbSession    
 Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
 Domain[ROOT_All]                                    INFO                           xaoddata3.root
-RootDatabase.open                                   INFO xaoddata3.root File version:61800
+RootDatabase.open                                   INFO xaoddata3.root File version:62002
 xaoddata3.root                                      INFO Database being retired...
 Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
 Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -70,24 +71,24 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
 Domain[ROOT_All]                                    INFO                           xaoddata3.root
-RootDatabase.open                                   INFO xaoddata3.root File version:61800
+RootDatabase.open                                   INFO xaoddata3.root File version:62002
 xaoddata3.root                                      INFO Database being retired...
 Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
 Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession                                           INFO     Open     DbSession    
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 22F8F210-F6F1-8B40-9730-C9C6EDEC1D8B
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] AA3CD933-E1A1-7E4D-B7EC-B4A4C0431208
 Domain[ROOT_All]                                    INFO                           xaoddata3.root
-RootDatabase.open                                   INFO xaoddata3.root File version:61800
-ClassIDSvc                                          INFO  getRegistryEntries: read 2125 CLIDRegistry entries for module ALL
+RootDatabase.open                                   INFO xaoddata3.root File version:62002
+ClassIDSvc                                          INFO  getRegistryEntries: read 2214 CLIDRegistry entries for module ALL
 EventPersistencySvc                                 INFO Added successfully Conversion service:AthenaPoolCnvSvc
 ClassIDSvc                                          INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 ClassIDSvc                                     0    INFO  getRegistryEntries: read 318 CLIDRegistry entries for module ALL
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 1220 CLIDRegistry entries for module ALL
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 6526 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1219 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 6544 CLIDRegistry entries for module ALL
 PyComponentMgr                                 0    INFO Initializing PyComponentMgr...
 LoadReadDicts                                  0    INFO Initializing LoadReadDicts...
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 849 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 2435 CLIDRegistry entries for module ALL
 ThreadPoolSvc                                  0    INFO no thread init tools attached
 AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
 AvalancheSchedulerSvc                          0    INFO Found 17 algorithms
@@ -163,6 +164,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 PrecedenceSvc                                  0    INFO 
 ==================== Control Flow Configuration ==================
 
@@ -195,15 +200,14 @@ PrecedenceSvc                                  0    INFO
 
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
 xaoddata3.root                                 0    INFO Database being retired...
-Domain[ROOT_All]                               0    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 22F8F210-F6F1-8B40-9730-C9C6EDEC1D8B
+Domain[ROOT_All]                               0    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] AA3CD933-E1A1-7E4D-B7EC-B4A4C0431208
 Domain[ROOT_All]                               0    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession                                      0    INFO     Open     DbSession    
 Domain[ROOT_All]                               0    INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                               0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 22F8F210-F6F1-8B40-9730-C9C6EDEC1D8B
+Domain[ROOT_All]                               0    INFO ->  Access   DbDatabase   READ      [ROOT_All] AA3CD933-E1A1-7E4D-B7EC-B4A4C0431208
 Domain[ROOT_All]                               0    INFO                           xaoddata3.root
-RootDatabase.open                              0    INFO xaoddata3.root File version:61800
+RootDatabase.open                              0    INFO xaoddata3.root File version:62002
 ApplicationMgr                                 0    INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
 AthenaPoolConverter                        0   0    INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
@@ -229,7 +233,7 @@ xAODTestReadHVec_copy                      0   0    INFO copy_hview: 420.5 419.5
 xAODTestReadCView_copy                     0   0    INFO copy_cview: 110 109 108 107 106 105 104 103 102 101
 xAODTestReadCVec                           0   0    INFO cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec                           0   0    INFO Type of aux store: DMTest::CAuxContainer_v1
-RootAuxDynReader                           0   0    INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=227 typename=f) has different type than the branch vector<int>
+RootAuxDynReader                           0   0    INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=234 typename=f) has different type than the branch vector<int>
 xAODTestReadCVec                           0   0    INFO  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 cEL: cvec[9]
   pvInt: []
   pvFloat: []
@@ -284,7 +288,7 @@ xAODTestReadCInfo_copy                     0   0    INFO cinfo aux items: aFloat
 xAODTestReadCInfo_copy                     0   0    INFO cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1]
 xAODTestReadCVec_copy                      0   0    INFO copy_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec_copy                      0   0    INFO Type of aux store: DMTest::CAuxContainer_v1
-RootAuxDynReader                           0   0    INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=227 typename=f) has different type than the branch vector<int>
+RootAuxDynReader                           0   0    INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=234 typename=f) has different type than the branch vector<int>
 xAODTestReadCVec_copy                      0   0    INFO  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 cEL: cvec[9]
   pvInt: []
   pvFloat: []
@@ -349,7 +353,7 @@ xAODTestRead                               0   0    INFO  anInt1 507 aFloat: 600
 xAODTestRead                               0   0    INFO  anInt1 508 aFloat: 600.7 anInt2: 708 dInt1: 488
 xAODTestRead                               0   0    INFO cvecWD 1001: 201 202 203 204 205 206 207 208 209 210
 AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
+ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
 AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
 xAODTestReadCInfo                          1   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
 xAODTestReadCInfo                          1   0    INFO cinfo  anInt1 2000 aFloat: 0.2 anInt2: 4000 dInt1: 6000 cEL: cvec[2]
@@ -627,6 +631,23 @@ xAODTestRead                               2   0    INFO  anInt1 1508 aFloat: 18
 xAODTestRead                               2   0    INFO cvecWD 1003: 601 602 603 604 605 606 607 608 609 610
 AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+xAODTestReadCInfo                          3   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
+xAODTestReadCInfo                          3   0    INFO cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4]
+xAODTestReadCView                          3   0    INFO cview: 410 409 408 407 406 405 404 403 402 401
+xAODTestRead_copy                          3   0    INFO 4
+xAODTestRead_copy                          3   0    INFO ctrig aux items: aFloat anInt anInt2 dInt1 
+xAODTestRead_copy                          3   0    INFO  anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921
+xAODTestRead_copy                          3   0    INFO  anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922
+xAODTestRead_copy                          3   0    INFO  anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923
+xAODTestRead_copy                          3   0    INFO  anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924
+xAODTestRead_copy                          3   0    INFO  anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925
+xAODTestRead_copy                          3   0    INFO  anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926
+xAODTestRead_copy                          3   0    INFO  anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927
+xAODTestRead_copy                          3   0    INFO  anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928
+xAODTestRead_copy                          3   0    INFO copy_cvecWD 1004: 801 802 803 804 805 806 807 808 809 810
+xAODTestReadHVec_copy                      3   0    INFO copy_hvec: 1601.5 1602.5 1603.5 1604.5 1605.5 1606.5 1607.5 1608.5 1609.5 1610.5 1611.5 1612.5 1613.5 1614.5 1615.5 1616.5 1617.5 1618.5 1619.5 1620.5
+xAODTestReadHVec_copy                      3   0    INFO copy_hview: 1620.5 1619.5 1618.5 1617.5 1616.5 1615.5 1614.5 1613.5 1612.5 1611.5 1610.5 1609.5 1608.5 1607.5 1606.5 1605.5 1604.5 1603.5 1602.5 1601.5
+xAODTestReadCView_copy                     3   0    INFO copy_cview: 410 409 408 407 406 405 404 403 402 401
 xAODTestReadCVec                           3   0    INFO cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec                           3   0    INFO Type of aux store: DMTest::CAuxContainer_v1
 xAODTestReadCVec                           3   0    INFO  anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dInt1: 1601 dVar1: 1801 dpInt1: 201 cEL: cvec[9]
@@ -679,23 +700,6 @@ xAODTestReadCVec                           3   0    INFO  anInt1 410 aFloat: 800
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 0.394 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 0.948 ]
 
-xAODTestReadCInfo                          3   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
-xAODTestReadCInfo                          3   0    INFO cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4]
-xAODTestReadCView                          3   0    INFO cview: 410 409 408 407 406 405 404 403 402 401
-xAODTestRead_copy                          3   0    INFO 4
-xAODTestRead_copy                          3   0    INFO ctrig aux items: aFloat anInt anInt2 dInt1 
-xAODTestRead_copy                          3   0    INFO  anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921
-xAODTestRead_copy                          3   0    INFO  anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922
-xAODTestRead_copy                          3   0    INFO  anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923
-xAODTestRead_copy                          3   0    INFO  anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924
-xAODTestRead_copy                          3   0    INFO  anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925
-xAODTestRead_copy                          3   0    INFO  anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926
-xAODTestRead_copy                          3   0    INFO  anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927
-xAODTestRead_copy                          3   0    INFO  anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928
-xAODTestRead_copy                          3   0    INFO copy_cvecWD 1004: 801 802 803 804 805 806 807 808 809 810
-xAODTestReadHVec_copy                      3   0    INFO copy_hvec: 1601.5 1602.5 1603.5 1604.5 1605.5 1606.5 1607.5 1608.5 1609.5 1610.5 1611.5 1612.5 1613.5 1614.5 1615.5 1616.5 1617.5 1618.5 1619.5 1620.5
-xAODTestReadHVec_copy                      3   0    INFO copy_hview: 1620.5 1619.5 1618.5 1617.5 1616.5 1615.5 1614.5 1613.5 1612.5 1611.5 1610.5 1609.5 1608.5 1607.5 1606.5 1605.5 1604.5 1603.5 1602.5 1601.5
-xAODTestReadCView_copy                     3   0    INFO copy_cview: 410 409 408 407 406 405 404 403 402 401
 xAODTestReadCInfo_copy                     3   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
 xAODTestReadCInfo_copy                     3   0    INFO cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4]
 xAODTestReadCVec_copy                      3   0    INFO copy_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -1631,6 +1635,23 @@ xAODTestRead                              10   0    INFO  anInt1 5508 aFloat: 66
 xAODTestRead                              10   0    INFO cvecWD 1011: 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210
 AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+xAODTestReadCInfo                         11   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
+xAODTestReadCInfo                         11   0    INFO cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2]
+xAODTestReadCView                         11   0    INFO cview: 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201
+xAODTestRead_copy                         11   0    INFO 12
+xAODTestRead_copy                         11   0    INFO ctrig aux items: aFloat anInt anInt2 dInt1 
+xAODTestRead_copy                         11   0    INFO  anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761
+xAODTestRead_copy                         11   0    INFO  anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762
+xAODTestRead_copy                         11   0    INFO  anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763
+xAODTestRead_copy                         11   0    INFO  anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764
+xAODTestRead_copy                         11   0    INFO  anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765
+xAODTestRead_copy                         11   0    INFO  anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766
+xAODTestRead_copy                         11   0    INFO  anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767
+xAODTestRead_copy                         11   0    INFO  anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768
+xAODTestRead_copy                         11   0    INFO copy_cvecWD 1012: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
+xAODTestReadHVec_copy                     11   0    INFO copy_hvec: 4801.5 4802.5 4803.5 4804.5 4805.5 4806.5 4807.5 4808.5 4809.5 4810.5 4811.5 4812.5 4813.5 4814.5 4815.5 4816.5 4817.5 4818.5 4819.5 4820.5
+xAODTestReadHVec_copy                     11   0    INFO copy_hview: 4820.5 4819.5 4818.5 4817.5 4816.5 4815.5 4814.5 4813.5 4812.5 4811.5 4810.5 4809.5 4808.5 4807.5 4806.5 4805.5 4804.5 4803.5 4802.5 4801.5
+xAODTestReadCView_copy                    11   0    INFO copy_cview: 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201
 xAODTestReadCVec                          11   0    INFO cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec                          11   0    INFO Type of aux store: DMTest::CAuxContainer_v1
 xAODTestReadCVec                          11   0    INFO  anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dInt1: 4801 dVar1: 5401 dpInt1: 601 cEL: cvec[9]
@@ -1683,23 +1704,6 @@ xAODTestReadCVec                          11   0    INFO  anInt1 1210 aFloat: 24
   pvFloat: [-0.398 -0.298 -0.198 -0.098 0.002 0.102 0.202 0.302 0.402 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadCInfo                         11   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
-xAODTestReadCInfo                         11   0    INFO cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2]
-xAODTestReadCView                         11   0    INFO cview: 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201
-xAODTestRead_copy                         11   0    INFO 12
-xAODTestRead_copy                         11   0    INFO ctrig aux items: aFloat anInt anInt2 dInt1 
-xAODTestRead_copy                         11   0    INFO  anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761
-xAODTestRead_copy                         11   0    INFO  anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762
-xAODTestRead_copy                         11   0    INFO  anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763
-xAODTestRead_copy                         11   0    INFO  anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764
-xAODTestRead_copy                         11   0    INFO  anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765
-xAODTestRead_copy                         11   0    INFO  anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766
-xAODTestRead_copy                         11   0    INFO  anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767
-xAODTestRead_copy                         11   0    INFO  anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768
-xAODTestRead_copy                         11   0    INFO copy_cvecWD 1012: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
-xAODTestReadHVec_copy                     11   0    INFO copy_hvec: 4801.5 4802.5 4803.5 4804.5 4805.5 4806.5 4807.5 4808.5 4809.5 4810.5 4811.5 4812.5 4813.5 4814.5 4815.5 4816.5 4817.5 4818.5 4819.5 4820.5
-xAODTestReadHVec_copy                     11   0    INFO copy_hview: 4820.5 4819.5 4818.5 4817.5 4816.5 4815.5 4814.5 4813.5 4812.5 4811.5 4810.5 4809.5 4808.5 4807.5 4806.5 4805.5 4804.5 4803.5 4802.5 4801.5
-xAODTestReadCView_copy                    11   0    INFO copy_cview: 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201
 xAODTestReadCInfo_copy                    11   0    INFO cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt1Base 
 xAODTestReadCInfo_copy                    11   0    INFO cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2]
 xAODTestReadCVec_copy                     11   0    INFO copy_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -2872,9 +2876,9 @@ xAODTestRead                              19   0    INFO  anInt1 10007 aFloat: 1
 xAODTestRead                              19   0    INFO  anInt1 10008 aFloat: 12000.7 anInt2: 14008 dInt1: 9608
 xAODTestRead                              19   0    INFO cvecWD 1020: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
 AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.518764
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.162228
 xaoddata3.root                                      INFO Database being retired...
-Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 22F8F210-F6F1-8B40-9730-C9C6EDEC1D8B
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] AA3CD933-E1A1-7E4D-B7EC-B4A4C0431208
 ApplicationMgr                                      INFO Application Manager Stopped successfully
 IncidentProcAlg1                                    INFO Finalize
 SGInputLoader                                       INFO Finalizing SGInputLoader...
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
index ab4a19977326..a38ab8a6545b 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:39:51 CEST 2019
+Wed Jun  3 16:01:21 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-opt] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1706]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,15 +9,10 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestReadRenameMT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestReadRename_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -25,79 +20,80 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus737.cern.ch on Fri Sep 13 19:40:01 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:01:27 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-MetaDataSvc                                        INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
-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-09-12T2129/Athena/22.0.5/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus737.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 POOL WriteCatalog is file:xAODTestReadRenameMT_catalog.xml
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-MetaDataSvc                                        INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
-EventSelector                                      INFO EventSelection with query 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+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://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
+PoolSvc                                             INFO Successfully setup replica sorting algorithm
+PoolSvc                                             INFO Setting up APR FileCatalog and Streams
+PoolSvc                                             INFO POOL WriteCatalog is file:xAODTestReadRenameMT_catalog.xml
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
+EventSelector                                       INFO EventSelection with query 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
 Warning in <TClass::Init>: no dictionary for class DMTest::CAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CInfoAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CTrigAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::GAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CVecWithData_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::H_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::H_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S2 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S1 is available
 Warning in <TClass::Init>: no dictionary for class ElementLink<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::C_v1> is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::H_v1> is available
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] D3751002-CCED-BF42-88FB-9BA4998B981D
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-ClassIDSvc                                         INFO  getRegistryEntries: read 2112 CLIDRegistry entries for module ALL
-EventPersistencySvc                                INFO Added successfully Conversion service:AthenaPoolCnvSvc
-ClassIDSvc                                         INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1324 CLIDRegistry entries for module ALL
-PyComponentMgr                              0      INFO Initializing PyComponentMgr...
-LoadReadDicts                               0      INFO Initializing LoadReadDicts...
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 8 algorithms
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+ClassIDSvc                                          INFO  getRegistryEntries: read 2248 CLIDRegistry entries for module ALL
+EventPersistencySvc                                 INFO Added successfully Conversion service:AthenaPoolCnvSvc
+ClassIDSvc                                          INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+PyComponentMgr                                 0    INFO Initializing PyComponentMgr...
+LoadReadDicts                                  0    INFO Initializing LoadReadDicts...
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 8 algorithms
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'DMTest::CVec' , 'StoreGateSvc+cvec_renamed' )     required by Algorithm: 
        * xAODTestReadCVec
    o  ( 'DMTest::CVec' , 'StoreGateSvc+cvec_renamed.dInt1_renamed' )     required by Algorithm: 
@@ -106,1157 +102,1159 @@ AvalancheSchedulerSvc                       0      INFO Will attribute the follo
        * xAODTestReadDecor
    o  ( 'SG::AuxElement' , 'StoreGateSvc+cinfo.dInt1_renamedBase' )     required by Algorithm: 
        * xAODTestReadDecor
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-PoolSvc                                     0      INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
-xaoddata.root                               0      INFO Database being retired...
-Domain[ROOT_All]                            0      INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D3751002-CCED-BF42-88FB-9BA4998B981D
-Domain[ROOT_All]                            0      INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                   0      INFO     Open     DbSession    
-Domain[ROOT_All]                            0      INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                            0      INFO ->  Access   DbDatabase   READ      [ROOT_All] D3751002-CCED-BF42-88FB-9BA4998B981D
-Domain[ROOT_All]                            0      INFO                           xaoddata.root
-RootDatabase.open                           0      INFO xaoddata.root File version:61800
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 7101 CLIDRegistry entries for module ALL
-AthenaPoolConverter                     0   0      INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
-xAODTestReadCVec                        0   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        0   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-RootAuxDynReader                        0   0      INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=225 typename=f) has different type than the branch vector<int>
-xAODTestReadCVec                        0   0      INFO  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dVar1: 451 dpInt1: 51 cEL: cvec_renamed[9]
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+xaoddata.root                                  0    INFO Database being retired...
+Domain[ROOT_All]                               0    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                      0    INFO     Open     DbSession    
+Domain[ROOT_All]                               0    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                               0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO                           xaoddata.root
+RootDatabase.open                              0    INFO xaoddata.root File version:62002
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 8913 CLIDRegistry entries for module ALL
+AthenaPoolConverter                        0   0    INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
+xAODTestReadCVec                           0   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           0   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+RootAuxDynReader                           0   0    INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=234 typename=f) has different type than the branch vector<int>
+xAODTestReadCVec                           0   0    INFO  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dVar1: 451 dpInt1: 51 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        0   0      INFO  anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dVar1: 452 dpInt1: 52 cEL: cvec_renamed[8]
+xAODTestReadCVec                           0   0    INFO  anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dVar1: 452 dpInt1: 52 cEL: cvec_renamed[8]
   pvInt: [-390 ]
   pvFloat: [-0.489 ]
   dpvFloat: [0.110 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dVar1: 453 dpInt1: 53 cEL: cvec_renamed[7]
+xAODTestReadCVec                           0   0    INFO  anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dVar1: 453 dpInt1: 53 cEL: cvec_renamed[7]
   pvInt: [-380 -379 ]
   pvFloat: [-0.479 -0.379 ]
   dpvFloat: [0.210 0.211 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dVar1: 454 dpInt1: 54 cEL: cvec_renamed[6]
+xAODTestReadCVec                           0   0    INFO  anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dVar1: 454 dpInt1: 54 cEL: cvec_renamed[6]
   pvInt: [-370 -369 -368 ]
   pvFloat: [-0.469 -0.369 -0.269 ]
   dpvFloat: [0.310 0.311 0.312 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dVar1: 455 dpInt1: 55 cEL: cvec_renamed[5]
+xAODTestReadCVec                           0   0    INFO  anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dVar1: 455 dpInt1: 55 cEL: cvec_renamed[5]
   pvInt: [-360 -359 -358 -357 ]
   pvFloat: [-0.459 -0.359 -0.259 -0.159 ]
   dpvFloat: [0.410 0.411 0.412 0.413 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dVar1: 456 dpInt1: 56 cEL: cvec_renamed[4]
+xAODTestReadCVec                           0   0    INFO  anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dVar1: 456 dpInt1: 56 cEL: cvec_renamed[4]
   pvInt: [-350 -349 -348 -347 -346 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 -0.049 ]
   dpvFloat: [0.510 0.511 0.512 0.513 0.514 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dVar1: 457 dpInt1: 57 cEL: cvec_renamed[3]
+xAODTestReadCVec                           0   0    INFO  anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dVar1: 457 dpInt1: 57 cEL: cvec_renamed[3]
   pvInt: [-340 -339 -338 -337 -336 -335 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 0.061 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 0.615 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dVar1: 458 dpInt1: 58 cEL: cvec_renamed[2]
+xAODTestReadCVec                           0   0    INFO  anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dVar1: 458 dpInt1: 58 cEL: cvec_renamed[2]
   pvInt: [-330 -329 -328 -327 -326 -325 -324 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 0.171 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 0.716 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dVar1: 459 dpInt1: 59 cEL: cvec_renamed[1]
+xAODTestReadCVec                           0   0    INFO  anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dVar1: 459 dpInt1: 59 cEL: cvec_renamed[1]
   pvInt: [-320 -319 -318 -317 -316 -315 -314 -313 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 0.281 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 0.817 ]
 
-xAODTestReadCVec                        0   0      INFO  anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dVar1: 460 dpInt1: 60 cEL: cvec_renamed[0]
+xAODTestReadCVec                           0   0    INFO  anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dVar1: 460 dpInt1: 60 cEL: cvec_renamed[0]
   pvInt: [-310 -309 -308 -307 -306 -305 -304 -303 -302 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 
-xAODTestReadDecor                       0   0      INFO cvec_renamed.dInt1_renamed: 401 402 403 404 405 406 407 408 409 410
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1_renamed: 3000
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1_renamedBase: 3001
-xAODTestReadDecor                       0   0      INFO cinfo.dInt1_renamed: 3000
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-ClassIDSvc                              1   0      INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-xAODTestReadCVec                        1   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        1   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        1   0      INFO  anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dVar1: 901 dpInt1: 101 cEL: cvec_renamed[9]
+xAODTestReadDecor                          0   0    INFO cvec_renamed.dInt1_renamed: 401 402 403 404 405 406 407 408 409 410
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1_renamed: 3000
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1_renamedBase: 3001
+xAODTestReadDecor                          0   0    INFO cinfo.dInt1_renamed: 3000
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+xAODTestReadCVec                           1   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           1   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           1   0    INFO  anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dVar1: 901 dpInt1: 101 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        1   0      INFO  anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dVar1: 902 dpInt1: 102 cEL: cvec_renamed[8]
+xAODTestReadCVec                           1   0    INFO  anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dVar1: 902 dpInt1: 102 cEL: cvec_renamed[8]
   pvInt: [-290 ]
   pvFloat: [-0.488 ]
   dpvFloat: [0.120 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dVar1: 903 dpInt1: 103 cEL: cvec_renamed[7]
+xAODTestReadCVec                           1   0    INFO  anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dVar1: 903 dpInt1: 103 cEL: cvec_renamed[7]
   pvInt: [-280 -279 ]
   pvFloat: [-0.478 -0.378 ]
   dpvFloat: [0.220 0.221 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dVar1: 904 dpInt1: 104 cEL: cvec_renamed[6]
+xAODTestReadCVec                           1   0    INFO  anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dVar1: 904 dpInt1: 104 cEL: cvec_renamed[6]
   pvInt: [-270 -269 -268 ]
   pvFloat: [-0.468 -0.368 -0.268 ]
   dpvFloat: [0.320 0.321 0.322 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dVar1: 905 dpInt1: 105 cEL: cvec_renamed[5]
+xAODTestReadCVec                           1   0    INFO  anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dVar1: 905 dpInt1: 105 cEL: cvec_renamed[5]
   pvInt: [-260 -259 -258 -257 ]
   pvFloat: [-0.458 -0.358 -0.258 -0.158 ]
   dpvFloat: [0.420 0.421 0.422 0.423 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dVar1: 906 dpInt1: 106 cEL: cvec_renamed[4]
+xAODTestReadCVec                           1   0    INFO  anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dVar1: 906 dpInt1: 106 cEL: cvec_renamed[4]
   pvInt: [-250 -249 -248 -247 -246 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 -0.048 ]
   dpvFloat: [0.520 0.521 0.522 0.523 0.524 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dVar1: 907 dpInt1: 107 cEL: cvec_renamed[3]
+xAODTestReadCVec                           1   0    INFO  anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dVar1: 907 dpInt1: 107 cEL: cvec_renamed[3]
   pvInt: [-240 -239 -238 -237 -236 -235 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 0.062 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 0.625 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dVar1: 908 dpInt1: 108 cEL: cvec_renamed[2]
+xAODTestReadCVec                           1   0    INFO  anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dVar1: 908 dpInt1: 108 cEL: cvec_renamed[2]
   pvInt: [-230 -229 -228 -227 -226 -225 -224 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 0.172 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 0.726 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dVar1: 909 dpInt1: 109 cEL: cvec_renamed[1]
+xAODTestReadCVec                           1   0    INFO  anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dVar1: 909 dpInt1: 109 cEL: cvec_renamed[1]
   pvInt: [-220 -219 -218 -217 -216 -215 -214 -213 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 0.282 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 0.827 ]
 
-xAODTestReadCVec                        1   0      INFO  anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dVar1: 910 dpInt1: 110 cEL: cvec_renamed[0]
+xAODTestReadCVec                           1   0    INFO  anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dVar1: 910 dpInt1: 110 cEL: cvec_renamed[0]
   pvInt: [-210 -209 -208 -207 -206 -205 -204 -203 -202 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 0.392 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 0.928 ]
 
-xAODTestReadDecor                       1   0      INFO cvec_renamed.dInt1_renamed: 801 802 803 804 805 806 807 808 809 810
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1_renamed: 6000
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1_renamedBase: 6001
-xAODTestReadDecor                       1   0      INFO cinfo.dInt1_renamed: 6000
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-xAODTestReadCVec                        2   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        2   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        2   0      INFO  anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dVar1: 1351 dpInt1: 151 cEL: cvec_renamed[9]
+xAODTestReadDecor                          1   0    INFO cvec_renamed.dInt1_renamed: 801 802 803 804 805 806 807 808 809 810
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1_renamed: 6000
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1_renamedBase: 6001
+xAODTestReadDecor                          1   0    INFO cinfo.dInt1_renamed: 6000
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+xAODTestReadCVec                           2   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           2   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           2   0    INFO  anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dVar1: 1351 dpInt1: 151 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        2   0      INFO  anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dVar1: 1352 dpInt1: 152 cEL: cvec_renamed[8]
+xAODTestReadCVec                           2   0    INFO  anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dVar1: 1352 dpInt1: 152 cEL: cvec_renamed[8]
   pvInt: [-190 ]
   pvFloat: [-0.487 ]
   dpvFloat: [0.130 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dVar1: 1353 dpInt1: 153 cEL: cvec_renamed[7]
+xAODTestReadCVec                           2   0    INFO  anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dVar1: 1353 dpInt1: 153 cEL: cvec_renamed[7]
   pvInt: [-180 -179 ]
   pvFloat: [-0.477 -0.377 ]
   dpvFloat: [0.230 0.231 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dVar1: 1354 dpInt1: 154 cEL: cvec_renamed[6]
+xAODTestReadCVec                           2   0    INFO  anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dVar1: 1354 dpInt1: 154 cEL: cvec_renamed[6]
   pvInt: [-170 -169 -168 ]
   pvFloat: [-0.467 -0.367 -0.267 ]
   dpvFloat: [0.330 0.331 0.332 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dVar1: 1355 dpInt1: 155 cEL: cvec_renamed[5]
+xAODTestReadCVec                           2   0    INFO  anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dVar1: 1355 dpInt1: 155 cEL: cvec_renamed[5]
   pvInt: [-160 -159 -158 -157 ]
   pvFloat: [-0.457 -0.357 -0.257 -0.157 ]
   dpvFloat: [0.430 0.431 0.432 0.433 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dVar1: 1356 dpInt1: 156 cEL: cvec_renamed[4]
+xAODTestReadCVec                           2   0    INFO  anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dVar1: 1356 dpInt1: 156 cEL: cvec_renamed[4]
   pvInt: [-150 -149 -148 -147 -146 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 -0.047 ]
   dpvFloat: [0.530 0.531 0.532 0.533 0.534 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dVar1: 1357 dpInt1: 157 cEL: cvec_renamed[3]
+xAODTestReadCVec                           2   0    INFO  anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dVar1: 1357 dpInt1: 157 cEL: cvec_renamed[3]
   pvInt: [-140 -139 -138 -137 -136 -135 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 0.063 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 0.635 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dVar1: 1358 dpInt1: 158 cEL: cvec_renamed[2]
+xAODTestReadCVec                           2   0    INFO  anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dVar1: 1358 dpInt1: 158 cEL: cvec_renamed[2]
   pvInt: [-130 -129 -128 -127 -126 -125 -124 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 0.173 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 0.736 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dVar1: 1359 dpInt1: 159 cEL: cvec_renamed[1]
+xAODTestReadCVec                           2   0    INFO  anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dVar1: 1359 dpInt1: 159 cEL: cvec_renamed[1]
   pvInt: [-120 -119 -118 -117 -116 -115 -114 -113 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 0.283 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 0.837 ]
 
-xAODTestReadCVec                        2   0      INFO  anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dVar1: 1360 dpInt1: 160 cEL: cvec_renamed[0]
+xAODTestReadCVec                           2   0    INFO  anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dVar1: 1360 dpInt1: 160 cEL: cvec_renamed[0]
   pvInt: [-110 -109 -108 -107 -106 -105 -104 -103 -102 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 0.393 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 0.938 ]
 
-xAODTestReadDecor                       2   0      INFO cvec_renamed.dInt1_renamed: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1_renamed: 9000
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1_renamedBase: 9001
-xAODTestReadDecor                       2   0      INFO cinfo.dInt1_renamed: 9000
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-xAODTestReadCVec                        3   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        3   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        3   0      INFO  anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dVar1: 1801 dpInt1: 201 cEL: cvec_renamed[9]
+xAODTestReadDecor                          2   0    INFO cvec_renamed.dInt1_renamed: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1_renamed: 9000
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1_renamedBase: 9001
+xAODTestReadDecor                          2   0    INFO cinfo.dInt1_renamed: 9000
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+xAODTestReadCVec                           3   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           3   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           3   0    INFO  anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dVar1: 1801 dpInt1: 201 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        3   0      INFO  anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dVar1: 1802 dpInt1: 202 cEL: cvec_renamed[8]
+xAODTestReadCVec                           3   0    INFO  anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dVar1: 1802 dpInt1: 202 cEL: cvec_renamed[8]
   pvInt: [-90 ]
   pvFloat: [-0.486 ]
   dpvFloat: [0.140 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dVar1: 1803 dpInt1: 203 cEL: cvec_renamed[7]
+xAODTestReadCVec                           3   0    INFO  anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dVar1: 1803 dpInt1: 203 cEL: cvec_renamed[7]
   pvInt: [-80 -79 ]
   pvFloat: [-0.476 -0.376 ]
   dpvFloat: [0.240 0.241 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dVar1: 1804 dpInt1: 204 cEL: cvec_renamed[6]
+xAODTestReadCVec                           3   0    INFO  anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dVar1: 1804 dpInt1: 204 cEL: cvec_renamed[6]
   pvInt: [-70 -69 -68 ]
   pvFloat: [-0.466 -0.366 -0.266 ]
   dpvFloat: [0.340 0.341 0.342 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dVar1: 1805 dpInt1: 205 cEL: cvec_renamed[5]
+xAODTestReadCVec                           3   0    INFO  anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dVar1: 1805 dpInt1: 205 cEL: cvec_renamed[5]
   pvInt: [-60 -59 -58 -57 ]
   pvFloat: [-0.456 -0.356 -0.256 -0.156 ]
   dpvFloat: [0.440 0.441 0.442 0.443 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dVar1: 1806 dpInt1: 206 cEL: cvec_renamed[4]
+xAODTestReadCVec                           3   0    INFO  anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dVar1: 1806 dpInt1: 206 cEL: cvec_renamed[4]
   pvInt: [-50 -49 -48 -47 -46 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 -0.046 ]
   dpvFloat: [0.540 0.541 0.542 0.543 0.544 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dVar1: 1807 dpInt1: 207 cEL: cvec_renamed[3]
+xAODTestReadCVec                           3   0    INFO  anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dVar1: 1807 dpInt1: 207 cEL: cvec_renamed[3]
   pvInt: [-40 -39 -38 -37 -36 -35 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 0.064 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 0.645 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dVar1: 1808 dpInt1: 208 cEL: cvec_renamed[2]
+xAODTestReadCVec                           3   0    INFO  anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dVar1: 1808 dpInt1: 208 cEL: cvec_renamed[2]
   pvInt: [-30 -29 -28 -27 -26 -25 -24 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 0.174 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 0.746 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dVar1: 1809 dpInt1: 209 cEL: cvec_renamed[1]
+xAODTestReadCVec                           3   0    INFO  anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dVar1: 1809 dpInt1: 209 cEL: cvec_renamed[1]
   pvInt: [-20 -19 -18 -17 -16 -15 -14 -13 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 0.284 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 0.847 ]
 
-xAODTestReadCVec                        3   0      INFO  anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dVar1: 1810 dpInt1: 210 cEL: cvec_renamed[0]
+xAODTestReadCVec                           3   0    INFO  anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dVar1: 1810 dpInt1: 210 cEL: cvec_renamed[0]
   pvInt: [-10 -9 -8 -7 -6 -5 -4 -3 -2 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 0.394 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 0.948 ]
 
-xAODTestReadDecor                       3   0      INFO cvec_renamed.dInt1_renamed: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1_renamed: 12000
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1_renamedBase: 12001
-xAODTestReadDecor                       3   0      INFO cinfo.dInt1_renamed: 12000
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadCVec                        4   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        4   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadDecor                       4   0      INFO cvec_renamed.dInt1_renamed:
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1_renamed: 15000
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1_renamedBase: 15001
-xAODTestReadDecor                       4   0      INFO cinfo.dInt1_renamed: 15000
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-xAODTestReadCVec                        5   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        5   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        5   0      INFO  anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dVar1: 2701 dpInt1: 301 cEL: cvec_renamed[9]
+xAODTestReadDecor                          3   0    INFO cvec_renamed.dInt1_renamed: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1_renamed: 12000
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1_renamedBase: 12001
+xAODTestReadDecor                          3   0    INFO cinfo.dInt1_renamed: 12000
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadCVec                           4   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           4   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadDecor                          4   0    INFO cvec_renamed.dInt1_renamed:
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1_renamed: 15000
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1_renamedBase: 15001
+xAODTestReadDecor                          4   0    INFO cinfo.dInt1_renamed: 15000
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+xAODTestReadCVec                           5   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           5   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           5   0    INFO  anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dVar1: 2701 dpInt1: 301 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        5   0      INFO  anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dVar1: 2702 dpInt1: 302 cEL: cvec_renamed[8]
+xAODTestReadCVec                           5   0    INFO  anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dVar1: 2702 dpInt1: 302 cEL: cvec_renamed[8]
   pvInt: [110 ]
   pvFloat: [-0.484 ]
   dpvFloat: [0.160 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dVar1: 2703 dpInt1: 303 cEL: cvec_renamed[7]
+xAODTestReadCVec                           5   0    INFO  anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dVar1: 2703 dpInt1: 303 cEL: cvec_renamed[7]
   pvInt: [120 121 ]
   pvFloat: [-0.474 -0.374 ]
   dpvFloat: [0.260 0.261 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dVar1: 2704 dpInt1: 304 cEL: cvec_renamed[6]
+xAODTestReadCVec                           5   0    INFO  anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dVar1: 2704 dpInt1: 304 cEL: cvec_renamed[6]
   pvInt: [130 131 132 ]
   pvFloat: [-0.464 -0.364 -0.264 ]
   dpvFloat: [0.360 0.361 0.362 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dVar1: 2705 dpInt1: 305 cEL: cvec_renamed[5]
+xAODTestReadCVec                           5   0    INFO  anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dVar1: 2705 dpInt1: 305 cEL: cvec_renamed[5]
   pvInt: [140 141 142 143 ]
   pvFloat: [-0.454 -0.354 -0.254 -0.154 ]
   dpvFloat: [0.460 0.461 0.462 0.463 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dVar1: 2706 dpInt1: 306 cEL: cvec_renamed[4]
+xAODTestReadCVec                           5   0    INFO  anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dVar1: 2706 dpInt1: 306 cEL: cvec_renamed[4]
   pvInt: [150 151 152 153 154 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 -0.044 ]
   dpvFloat: [0.560 0.561 0.562 0.563 0.564 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dVar1: 2707 dpInt1: 307 cEL: cvec_renamed[3]
+xAODTestReadCVec                           5   0    INFO  anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dVar1: 2707 dpInt1: 307 cEL: cvec_renamed[3]
   pvInt: [160 161 162 163 164 165 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 0.066 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 0.665 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dVar1: 2708 dpInt1: 308 cEL: cvec_renamed[2]
+xAODTestReadCVec                           5   0    INFO  anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dVar1: 2708 dpInt1: 308 cEL: cvec_renamed[2]
   pvInt: [170 171 172 173 174 175 176 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 0.176 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 0.766 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dVar1: 2709 dpInt1: 309 cEL: cvec_renamed[1]
+xAODTestReadCVec                           5   0    INFO  anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dVar1: 2709 dpInt1: 309 cEL: cvec_renamed[1]
   pvInt: [180 181 182 183 184 185 186 187 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 0.286 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 0.867 ]
 
-xAODTestReadCVec                        5   0      INFO  anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dVar1: 2710 dpInt1: 310 cEL: cvec_renamed[0]
+xAODTestReadCVec                           5   0    INFO  anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dVar1: 2710 dpInt1: 310 cEL: cvec_renamed[0]
   pvInt: [190 191 192 193 194 195 196 197 198 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 0.396 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 0.968 ]
 
-xAODTestReadDecor                       5   0      INFO cvec_renamed.dInt1_renamed: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1_renamed: 18000
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1_renamedBase: 18001
-xAODTestReadDecor                       5   0      INFO cinfo.dInt1_renamed: 18000
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-xAODTestReadCVec                        6   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        6   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        6   0      INFO  anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dVar1: 3151 dpInt1: 351 cEL: cvec_renamed[9]
+xAODTestReadDecor                          5   0    INFO cvec_renamed.dInt1_renamed: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1_renamed: 18000
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1_renamedBase: 18001
+xAODTestReadDecor                          5   0    INFO cinfo.dInt1_renamed: 18000
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+xAODTestReadCVec                           6   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           6   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           6   0    INFO  anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dVar1: 3151 dpInt1: 351 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        6   0      INFO  anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dVar1: 3152 dpInt1: 352 cEL: cvec_renamed[8]
+xAODTestReadCVec                           6   0    INFO  anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dVar1: 3152 dpInt1: 352 cEL: cvec_renamed[8]
   pvInt: [210 ]
   pvFloat: [-0.483 ]
   dpvFloat: [0.170 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dVar1: 3153 dpInt1: 353 cEL: cvec_renamed[7]
+xAODTestReadCVec                           6   0    INFO  anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dVar1: 3153 dpInt1: 353 cEL: cvec_renamed[7]
   pvInt: [220 221 ]
   pvFloat: [-0.473 -0.373 ]
   dpvFloat: [0.270 0.271 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dVar1: 3154 dpInt1: 354 cEL: cvec_renamed[6]
+xAODTestReadCVec                           6   0    INFO  anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dVar1: 3154 dpInt1: 354 cEL: cvec_renamed[6]
   pvInt: [230 231 232 ]
   pvFloat: [-0.463 -0.363 -0.263 ]
   dpvFloat: [0.370 0.371 0.372 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dVar1: 3155 dpInt1: 355 cEL: cvec_renamed[5]
+xAODTestReadCVec                           6   0    INFO  anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dVar1: 3155 dpInt1: 355 cEL: cvec_renamed[5]
   pvInt: [240 241 242 243 ]
   pvFloat: [-0.453 -0.353 -0.253 -0.153 ]
   dpvFloat: [0.470 0.471 0.472 0.473 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dVar1: 3156 dpInt1: 356 cEL: cvec_renamed[4]
+xAODTestReadCVec                           6   0    INFO  anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dVar1: 3156 dpInt1: 356 cEL: cvec_renamed[4]
   pvInt: [250 251 252 253 254 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 -0.043 ]
   dpvFloat: [0.570 0.571 0.572 0.573 0.574 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dVar1: 3157 dpInt1: 357 cEL: cvec_renamed[3]
+xAODTestReadCVec                           6   0    INFO  anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dVar1: 3157 dpInt1: 357 cEL: cvec_renamed[3]
   pvInt: [260 261 262 263 264 265 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 0.067 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 0.675 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dVar1: 3158 dpInt1: 358 cEL: cvec_renamed[2]
+xAODTestReadCVec                           6   0    INFO  anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dVar1: 3158 dpInt1: 358 cEL: cvec_renamed[2]
   pvInt: [270 271 272 273 274 275 276 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 0.177 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 0.776 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dVar1: 3159 dpInt1: 359 cEL: cvec_renamed[1]
+xAODTestReadCVec                           6   0    INFO  anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dVar1: 3159 dpInt1: 359 cEL: cvec_renamed[1]
   pvInt: [280 281 282 283 284 285 286 287 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 0.287 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 0.877 ]
 
-xAODTestReadCVec                        6   0      INFO  anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dVar1: 3160 dpInt1: 360 cEL: cvec_renamed[0]
+xAODTestReadCVec                           6   0    INFO  anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dVar1: 3160 dpInt1: 360 cEL: cvec_renamed[0]
   pvInt: [290 291 292 293 294 295 296 297 298 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 0.397 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 0.978 ]
 
-xAODTestReadDecor                       6   0      INFO cvec_renamed.dInt1_renamed: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1_renamed: 21000
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1_renamedBase: 21001
-xAODTestReadDecor                       6   0      INFO cinfo.dInt1_renamed: 21000
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-xAODTestReadCVec                        7   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        7   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        7   0      INFO  anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dVar1: 3601 dpInt1: 401 cEL: cvec_renamed[9]
+xAODTestReadDecor                          6   0    INFO cvec_renamed.dInt1_renamed: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1_renamed: 21000
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1_renamedBase: 21001
+xAODTestReadDecor                          6   0    INFO cinfo.dInt1_renamed: 21000
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+xAODTestReadCVec                           7   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           7   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           7   0    INFO  anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dVar1: 3601 dpInt1: 401 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        7   0      INFO  anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dVar1: 3602 dpInt1: 402 cEL: cvec_renamed[8]
+xAODTestReadCVec                           7   0    INFO  anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dVar1: 3602 dpInt1: 402 cEL: cvec_renamed[8]
   pvInt: [310 ]
   pvFloat: [-0.482 ]
   dpvFloat: [0.180 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dVar1: 3603 dpInt1: 403 cEL: cvec_renamed[7]
+xAODTestReadCVec                           7   0    INFO  anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dVar1: 3603 dpInt1: 403 cEL: cvec_renamed[7]
   pvInt: [320 321 ]
   pvFloat: [-0.472 -0.372 ]
   dpvFloat: [0.280 0.281 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dVar1: 3604 dpInt1: 404 cEL: cvec_renamed[6]
+xAODTestReadCVec                           7   0    INFO  anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dVar1: 3604 dpInt1: 404 cEL: cvec_renamed[6]
   pvInt: [330 331 332 ]
   pvFloat: [-0.462 -0.362 -0.262 ]
   dpvFloat: [0.380 0.381 0.382 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dVar1: 3605 dpInt1: 405 cEL: cvec_renamed[5]
+xAODTestReadCVec                           7   0    INFO  anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dVar1: 3605 dpInt1: 405 cEL: cvec_renamed[5]
   pvInt: [340 341 342 343 ]
   pvFloat: [-0.452 -0.352 -0.252 -0.152 ]
   dpvFloat: [0.480 0.481 0.482 0.483 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dVar1: 3606 dpInt1: 406 cEL: cvec_renamed[4]
+xAODTestReadCVec                           7   0    INFO  anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dVar1: 3606 dpInt1: 406 cEL: cvec_renamed[4]
   pvInt: [350 351 352 353 354 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 -0.042 ]
   dpvFloat: [0.580 0.581 0.582 0.583 0.584 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dVar1: 3607 dpInt1: 407 cEL: cvec_renamed[3]
+xAODTestReadCVec                           7   0    INFO  anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dVar1: 3607 dpInt1: 407 cEL: cvec_renamed[3]
   pvInt: [360 361 362 363 364 365 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 0.068 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 0.685 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dVar1: 3608 dpInt1: 408 cEL: cvec_renamed[2]
+xAODTestReadCVec                           7   0    INFO  anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dVar1: 3608 dpInt1: 408 cEL: cvec_renamed[2]
   pvInt: [370 371 372 373 374 375 376 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 0.178 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 0.786 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dVar1: 3609 dpInt1: 409 cEL: cvec_renamed[1]
+xAODTestReadCVec                           7   0    INFO  anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dVar1: 3609 dpInt1: 409 cEL: cvec_renamed[1]
   pvInt: [380 381 382 383 384 385 386 387 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 0.288 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 0.887 ]
 
-xAODTestReadCVec                        7   0      INFO  anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dVar1: 3610 dpInt1: 410 cEL: cvec_renamed[0]
+xAODTestReadCVec                           7   0    INFO  anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dVar1: 3610 dpInt1: 410 cEL: cvec_renamed[0]
   pvInt: [390 391 392 393 394 395 396 397 398 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 0.398 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 0.988 ]
 
-xAODTestReadDecor                       7   0      INFO cvec_renamed.dInt1_renamed: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1_renamed: 24000
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1_renamedBase: 24001
-xAODTestReadDecor                       7   0      INFO cinfo.dInt1_renamed: 24000
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-xAODTestReadCVec                        8   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        8   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        8   0      INFO  anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dVar1: 4051 dpInt1: 451 cEL: cvec_renamed[9]
+xAODTestReadDecor                          7   0    INFO cvec_renamed.dInt1_renamed: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1_renamed: 24000
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1_renamedBase: 24001
+xAODTestReadDecor                          7   0    INFO cinfo.dInt1_renamed: 24000
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+xAODTestReadCVec                           8   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           8   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           8   0    INFO  anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dVar1: 4051 dpInt1: 451 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        8   0      INFO  anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dVar1: 4052 dpInt1: 452 cEL: cvec_renamed[8]
+xAODTestReadCVec                           8   0    INFO  anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dVar1: 4052 dpInt1: 452 cEL: cvec_renamed[8]
   pvInt: [410 ]
   pvFloat: [-0.481 ]
   dpvFloat: [0.190 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dVar1: 4053 dpInt1: 453 cEL: cvec_renamed[7]
+xAODTestReadCVec                           8   0    INFO  anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dVar1: 4053 dpInt1: 453 cEL: cvec_renamed[7]
   pvInt: [420 421 ]
   pvFloat: [-0.471 -0.371 ]
   dpvFloat: [0.290 0.291 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dVar1: 4054 dpInt1: 454 cEL: cvec_renamed[6]
+xAODTestReadCVec                           8   0    INFO  anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dVar1: 4054 dpInt1: 454 cEL: cvec_renamed[6]
   pvInt: [430 431 432 ]
   pvFloat: [-0.461 -0.361 -0.261 ]
   dpvFloat: [0.390 0.391 0.392 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dVar1: 4055 dpInt1: 455 cEL: cvec_renamed[5]
+xAODTestReadCVec                           8   0    INFO  anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dVar1: 4055 dpInt1: 455 cEL: cvec_renamed[5]
   pvInt: [440 441 442 443 ]
   pvFloat: [-0.451 -0.351 -0.251 -0.151 ]
   dpvFloat: [0.490 0.491 0.492 0.493 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dVar1: 4056 dpInt1: 456 cEL: cvec_renamed[4]
+xAODTestReadCVec                           8   0    INFO  anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dVar1: 4056 dpInt1: 456 cEL: cvec_renamed[4]
   pvInt: [450 451 452 453 454 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 -0.041 ]
   dpvFloat: [0.590 0.591 0.592 0.593 0.594 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dVar1: 4057 dpInt1: 457 cEL: cvec_renamed[3]
+xAODTestReadCVec                           8   0    INFO  anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dVar1: 4057 dpInt1: 457 cEL: cvec_renamed[3]
   pvInt: [460 461 462 463 464 465 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 0.069 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 0.695 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dVar1: 4058 dpInt1: 458 cEL: cvec_renamed[2]
+xAODTestReadCVec                           8   0    INFO  anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dVar1: 4058 dpInt1: 458 cEL: cvec_renamed[2]
   pvInt: [470 471 472 473 474 475 476 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 0.179 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 0.796 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dVar1: 4059 dpInt1: 459 cEL: cvec_renamed[1]
+xAODTestReadCVec                           8   0    INFO  anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dVar1: 4059 dpInt1: 459 cEL: cvec_renamed[1]
   pvInt: [480 481 482 483 484 485 486 487 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 0.289 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 0.897 ]
 
-xAODTestReadCVec                        8   0      INFO  anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dVar1: 4060 dpInt1: 460 cEL: cvec_renamed[0]
+xAODTestReadCVec                           8   0    INFO  anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dVar1: 4060 dpInt1: 460 cEL: cvec_renamed[0]
   pvInt: [490 491 492 493 494 495 496 497 498 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 0.399 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 0.998 ]
 
-xAODTestReadDecor                       8   0      INFO cvec_renamed.dInt1_renamed: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1_renamed: 27000
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1_renamedBase: 27001
-xAODTestReadDecor                       8   0      INFO cinfo.dInt1_renamed: 27000
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-xAODTestReadCVec                        9   0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        9   0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        9   0      INFO  anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dVar1: 4501 dpInt1: 501 cEL: cvec_renamed[9]
+xAODTestReadDecor                          8   0    INFO cvec_renamed.dInt1_renamed: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1_renamed: 27000
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1_renamedBase: 27001
+xAODTestReadDecor                          8   0    INFO cinfo.dInt1_renamed: 27000
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+xAODTestReadCVec                           9   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                           9   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                           9   0    INFO  anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dVar1: 4501 dpInt1: 501 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dVar1: 4502 dpInt1: 502 cEL: cvec_renamed[8]
+xAODTestReadCVec                           9   0    INFO  anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dVar1: 4502 dpInt1: 502 cEL: cvec_renamed[8]
   pvInt: [510 ]
   pvFloat: [-0.480 ]
   dpvFloat: [0.200 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dVar1: 4503 dpInt1: 503 cEL: cvec_renamed[7]
+xAODTestReadCVec                           9   0    INFO  anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dVar1: 4503 dpInt1: 503 cEL: cvec_renamed[7]
   pvInt: [520 521 ]
   pvFloat: [-0.470 -0.370 ]
   dpvFloat: [0.300 0.301 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dVar1: 4504 dpInt1: 504 cEL: cvec_renamed[6]
+xAODTestReadCVec                           9   0    INFO  anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dVar1: 4504 dpInt1: 504 cEL: cvec_renamed[6]
   pvInt: [530 531 532 ]
   pvFloat: [-0.460 -0.360 -0.260 ]
   dpvFloat: [0.400 0.401 0.402 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dVar1: 4505 dpInt1: 505 cEL: cvec_renamed[5]
+xAODTestReadCVec                           9   0    INFO  anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dVar1: 4505 dpInt1: 505 cEL: cvec_renamed[5]
   pvInt: [540 541 542 543 ]
   pvFloat: [-0.450 -0.350 -0.250 -0.150 ]
   dpvFloat: [0.500 0.501 0.502 0.503 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dVar1: 4506 dpInt1: 506 cEL: cvec_renamed[4]
+xAODTestReadCVec                           9   0    INFO  anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dVar1: 4506 dpInt1: 506 cEL: cvec_renamed[4]
   pvInt: [550 551 552 553 554 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 -0.040 ]
   dpvFloat: [0.600 0.601 0.602 0.603 0.604 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dVar1: 4507 dpInt1: 507 cEL: cvec_renamed[3]
+xAODTestReadCVec                           9   0    INFO  anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dVar1: 4507 dpInt1: 507 cEL: cvec_renamed[3]
   pvInt: [560 561 562 563 564 565 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 0.070 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 0.705 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dVar1: 4508 dpInt1: 508 cEL: cvec_renamed[2]
+xAODTestReadCVec                           9   0    INFO  anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dVar1: 4508 dpInt1: 508 cEL: cvec_renamed[2]
   pvInt: [570 571 572 573 574 575 576 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 0.180 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 0.806 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dVar1: 4509 dpInt1: 509 cEL: cvec_renamed[1]
+xAODTestReadCVec                           9   0    INFO  anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dVar1: 4509 dpInt1: 509 cEL: cvec_renamed[1]
   pvInt: [580 581 582 583 584 585 586 587 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 0.290 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 0.907 ]
 
-xAODTestReadCVec                        9   0      INFO  anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dVar1: 4510 dpInt1: 510 cEL: cvec_renamed[0]
+xAODTestReadCVec                           9   0    INFO  anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dVar1: 4510 dpInt1: 510 cEL: cvec_renamed[0]
   pvInt: [590 591 592 593 594 595 596 597 598 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 0.400 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       9   0      INFO cvec_renamed.dInt1_renamed: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1_renamed: 30000
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1_renamedBase: 30001
-xAODTestReadDecor                       9   0      INFO cinfo.dInt1_renamed: 30000
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
-xAODTestReadCVec                        10  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        10  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        10  0      INFO  anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dVar1: 4951 dpInt1: 551 cEL: cvec_renamed[9]
+xAODTestReadDecor                          9   0    INFO cvec_renamed.dInt1_renamed: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1_renamed: 30000
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1_renamedBase: 30001
+xAODTestReadDecor                          9   0    INFO cinfo.dInt1_renamed: 30000
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+xAODTestReadCVec                          10   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          10   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          10   0    INFO  anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dVar1: 4951 dpInt1: 551 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dVar1: 4952 dpInt1: 552 cEL: cvec_renamed[8]
+xAODTestReadCVec                          10   0    INFO  anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dVar1: 4952 dpInt1: 552 cEL: cvec_renamed[8]
   pvInt: [610 ]
   pvFloat: [-0.479 ]
   dpvFloat: [0.210 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dVar1: 4953 dpInt1: 553 cEL: cvec_renamed[7]
+xAODTestReadCVec                          10   0    INFO  anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dVar1: 4953 dpInt1: 553 cEL: cvec_renamed[7]
   pvInt: [620 621 ]
   pvFloat: [-0.469 -0.369 ]
   dpvFloat: [0.310 0.311 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dVar1: 4954 dpInt1: 554 cEL: cvec_renamed[6]
+xAODTestReadCVec                          10   0    INFO  anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dVar1: 4954 dpInt1: 554 cEL: cvec_renamed[6]
   pvInt: [630 631 632 ]
   pvFloat: [-0.459 -0.359 -0.259 ]
   dpvFloat: [0.410 0.411 0.412 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dVar1: 4955 dpInt1: 555 cEL: cvec_renamed[5]
+xAODTestReadCVec                          10   0    INFO  anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dVar1: 4955 dpInt1: 555 cEL: cvec_renamed[5]
   pvInt: [640 641 642 643 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 ]
   dpvFloat: [0.510 0.511 0.512 0.513 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dVar1: 4956 dpInt1: 556 cEL: cvec_renamed[4]
+xAODTestReadCVec                          10   0    INFO  anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dVar1: 4956 dpInt1: 556 cEL: cvec_renamed[4]
   pvInt: [650 651 652 653 654 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dVar1: 4957 dpInt1: 557 cEL: cvec_renamed[3]
+xAODTestReadCVec                          10   0    INFO  anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dVar1: 4957 dpInt1: 557 cEL: cvec_renamed[3]
   pvInt: [660 661 662 663 664 665 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dVar1: 4958 dpInt1: 558 cEL: cvec_renamed[2]
+xAODTestReadCVec                          10   0    INFO  anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dVar1: 4958 dpInt1: 558 cEL: cvec_renamed[2]
   pvInt: [670 671 672 673 674 675 676 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dVar1: 4959 dpInt1: 559 cEL: cvec_renamed[1]
+xAODTestReadCVec                          10   0    INFO  anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dVar1: 4959 dpInt1: 559 cEL: cvec_renamed[1]
   pvInt: [680 681 682 683 684 685 686 687 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 ]
 
-xAODTestReadCVec                        10  0      INFO  anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dVar1: 4960 dpInt1: 560 cEL: cvec_renamed[0]
+xAODTestReadCVec                          10   0    INFO  anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dVar1: 4960 dpInt1: 560 cEL: cvec_renamed[0]
   pvInt: [690 691 692 693 694 695 696 697 698 ]
   pvFloat: [-0.399 -0.299 -0.199 -0.099 0.001 0.101 0.201 0.301 0.401 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       10  0      INFO cvec_renamed.dInt1_renamed: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1_renamed: 33000
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1_renamedBase: 33001
-xAODTestReadDecor                       10  0      INFO cinfo.dInt1_renamed: 33000
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
-xAODTestReadCVec                        11  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        11  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        11  0      INFO  anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dVar1: 5401 dpInt1: 601 cEL: cvec_renamed[9]
+xAODTestReadDecor                         10   0    INFO cvec_renamed.dInt1_renamed: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1_renamed: 33000
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1_renamedBase: 33001
+xAODTestReadDecor                         10   0    INFO cinfo.dInt1_renamed: 33000
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+xAODTestReadCVec                          11   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          11   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          11   0    INFO  anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dVar1: 5401 dpInt1: 601 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dVar1: 5402 dpInt1: 602 cEL: cvec_renamed[8]
+xAODTestReadCVec                          11   0    INFO  anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dVar1: 5402 dpInt1: 602 cEL: cvec_renamed[8]
   pvInt: [710 ]
   pvFloat: [-0.478 ]
   dpvFloat: [0.220 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dVar1: 5403 dpInt1: 603 cEL: cvec_renamed[7]
+xAODTestReadCVec                          11   0    INFO  anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dVar1: 5403 dpInt1: 603 cEL: cvec_renamed[7]
   pvInt: [720 721 ]
   pvFloat: [-0.468 -0.368 ]
   dpvFloat: [0.320 0.321 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dVar1: 5404 dpInt1: 604 cEL: cvec_renamed[6]
+xAODTestReadCVec                          11   0    INFO  anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dVar1: 5404 dpInt1: 604 cEL: cvec_renamed[6]
   pvInt: [730 731 732 ]
   pvFloat: [-0.458 -0.358 -0.258 ]
   dpvFloat: [0.420 0.421 0.422 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dVar1: 5405 dpInt1: 605 cEL: cvec_renamed[5]
+xAODTestReadCVec                          11   0    INFO  anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dVar1: 5405 dpInt1: 605 cEL: cvec_renamed[5]
   pvInt: [740 741 742 743 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 ]
   dpvFloat: [0.520 0.521 0.522 0.523 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dVar1: 5406 dpInt1: 606 cEL: cvec_renamed[4]
+xAODTestReadCVec                          11   0    INFO  anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dVar1: 5406 dpInt1: 606 cEL: cvec_renamed[4]
   pvInt: [750 751 752 753 754 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dVar1: 5407 dpInt1: 607 cEL: cvec_renamed[3]
+xAODTestReadCVec                          11   0    INFO  anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dVar1: 5407 dpInt1: 607 cEL: cvec_renamed[3]
   pvInt: [760 761 762 763 764 765 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dVar1: 5408 dpInt1: 608 cEL: cvec_renamed[2]
+xAODTestReadCVec                          11   0    INFO  anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dVar1: 5408 dpInt1: 608 cEL: cvec_renamed[2]
   pvInt: [770 771 772 773 774 775 776 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dVar1: 5409 dpInt1: 609 cEL: cvec_renamed[1]
+xAODTestReadCVec                          11   0    INFO  anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dVar1: 5409 dpInt1: 609 cEL: cvec_renamed[1]
   pvInt: [780 781 782 783 784 785 786 787 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 ]
 
-xAODTestReadCVec                        11  0      INFO  anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dVar1: 5410 dpInt1: 610 cEL: cvec_renamed[0]
+xAODTestReadCVec                          11   0    INFO  anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dVar1: 5410 dpInt1: 610 cEL: cvec_renamed[0]
   pvInt: [790 791 792 793 794 795 796 797 798 ]
   pvFloat: [-0.398 -0.298 -0.198 -0.098 0.002 0.102 0.202 0.302 0.402 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       11  0      INFO cvec_renamed.dInt1_renamed: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1_renamed: 36000
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1_renamedBase: 36001
-xAODTestReadDecor                       11  0      INFO cinfo.dInt1_renamed: 36000
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
-xAODTestReadCVec                        12  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        12  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        12  0      INFO  anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dVar1: 5851 dpInt1: 651 cEL: cvec_renamed[9]
+xAODTestReadDecor                         11   0    INFO cvec_renamed.dInt1_renamed: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1_renamed: 36000
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1_renamedBase: 36001
+xAODTestReadDecor                         11   0    INFO cinfo.dInt1_renamed: 36000
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+xAODTestReadCVec                          12   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          12   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          12   0    INFO  anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dVar1: 5851 dpInt1: 651 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dVar1: 5852 dpInt1: 652 cEL: cvec_renamed[8]
+xAODTestReadCVec                          12   0    INFO  anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dVar1: 5852 dpInt1: 652 cEL: cvec_renamed[8]
   pvInt: [810 ]
   pvFloat: [-0.477 ]
   dpvFloat: [0.230 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dVar1: 5853 dpInt1: 653 cEL: cvec_renamed[7]
+xAODTestReadCVec                          12   0    INFO  anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dVar1: 5853 dpInt1: 653 cEL: cvec_renamed[7]
   pvInt: [820 821 ]
   pvFloat: [-0.467 -0.367 ]
   dpvFloat: [0.330 0.331 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dVar1: 5854 dpInt1: 654 cEL: cvec_renamed[6]
+xAODTestReadCVec                          12   0    INFO  anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dVar1: 5854 dpInt1: 654 cEL: cvec_renamed[6]
   pvInt: [830 831 832 ]
   pvFloat: [-0.457 -0.357 -0.257 ]
   dpvFloat: [0.430 0.431 0.432 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dVar1: 5855 dpInt1: 655 cEL: cvec_renamed[5]
+xAODTestReadCVec                          12   0    INFO  anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dVar1: 5855 dpInt1: 655 cEL: cvec_renamed[5]
   pvInt: [840 841 842 843 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 ]
   dpvFloat: [0.530 0.531 0.532 0.533 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dVar1: 5856 dpInt1: 656 cEL: cvec_renamed[4]
+xAODTestReadCVec                          12   0    INFO  anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dVar1: 5856 dpInt1: 656 cEL: cvec_renamed[4]
   pvInt: [850 851 852 853 854 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dVar1: 5857 dpInt1: 657 cEL: cvec_renamed[3]
+xAODTestReadCVec                          12   0    INFO  anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dVar1: 5857 dpInt1: 657 cEL: cvec_renamed[3]
   pvInt: [860 861 862 863 864 865 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dVar1: 5858 dpInt1: 658 cEL: cvec_renamed[2]
+xAODTestReadCVec                          12   0    INFO  anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dVar1: 5858 dpInt1: 658 cEL: cvec_renamed[2]
   pvInt: [870 871 872 873 874 875 876 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dVar1: 5859 dpInt1: 659 cEL: cvec_renamed[1]
+xAODTestReadCVec                          12   0    INFO  anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dVar1: 5859 dpInt1: 659 cEL: cvec_renamed[1]
   pvInt: [880 881 882 883 884 885 886 887 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 ]
 
-xAODTestReadCVec                        12  0      INFO  anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dVar1: 5860 dpInt1: 660 cEL: cvec_renamed[0]
+xAODTestReadCVec                          12   0    INFO  anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dVar1: 5860 dpInt1: 660 cEL: cvec_renamed[0]
   pvInt: [890 891 892 893 894 895 896 897 898 ]
   pvFloat: [-0.397 -0.297 -0.197 -0.097 0.003 0.103 0.203 0.303 0.403 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       12  0      INFO cvec_renamed.dInt1_renamed: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1_renamed: 39000
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1_renamedBase: 39001
-xAODTestReadDecor                       12  0      INFO cinfo.dInt1_renamed: 39000
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
-xAODTestReadCVec                        13  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        13  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        13  0      INFO  anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dVar1: 6301 dpInt1: 701 cEL: cvec_renamed[9]
+xAODTestReadDecor                         12   0    INFO cvec_renamed.dInt1_renamed: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1_renamed: 39000
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1_renamedBase: 39001
+xAODTestReadDecor                         12   0    INFO cinfo.dInt1_renamed: 39000
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+xAODTestReadCVec                          13   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          13   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          13   0    INFO  anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dVar1: 6301 dpInt1: 701 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dVar1: 6302 dpInt1: 702 cEL: cvec_renamed[8]
+xAODTestReadCVec                          13   0    INFO  anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dVar1: 6302 dpInt1: 702 cEL: cvec_renamed[8]
   pvInt: [910 ]
   pvFloat: [-0.476 ]
   dpvFloat: [0.240 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dVar1: 6303 dpInt1: 703 cEL: cvec_renamed[7]
+xAODTestReadCVec                          13   0    INFO  anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dVar1: 6303 dpInt1: 703 cEL: cvec_renamed[7]
   pvInt: [920 921 ]
   pvFloat: [-0.466 -0.366 ]
   dpvFloat: [0.340 0.341 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dVar1: 6304 dpInt1: 704 cEL: cvec_renamed[6]
+xAODTestReadCVec                          13   0    INFO  anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dVar1: 6304 dpInt1: 704 cEL: cvec_renamed[6]
   pvInt: [930 931 932 ]
   pvFloat: [-0.456 -0.356 -0.256 ]
   dpvFloat: [0.440 0.441 0.442 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dVar1: 6305 dpInt1: 705 cEL: cvec_renamed[5]
+xAODTestReadCVec                          13   0    INFO  anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dVar1: 6305 dpInt1: 705 cEL: cvec_renamed[5]
   pvInt: [940 941 942 943 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 ]
   dpvFloat: [0.540 0.541 0.542 0.543 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dVar1: 6306 dpInt1: 706 cEL: cvec_renamed[4]
+xAODTestReadCVec                          13   0    INFO  anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dVar1: 6306 dpInt1: 706 cEL: cvec_renamed[4]
   pvInt: [950 951 952 953 954 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dVar1: 6307 dpInt1: 707 cEL: cvec_renamed[3]
+xAODTestReadCVec                          13   0    INFO  anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dVar1: 6307 dpInt1: 707 cEL: cvec_renamed[3]
   pvInt: [960 961 962 963 964 965 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dVar1: 6308 dpInt1: 708 cEL: cvec_renamed[2]
+xAODTestReadCVec                          13   0    INFO  anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dVar1: 6308 dpInt1: 708 cEL: cvec_renamed[2]
   pvInt: [970 971 972 973 974 975 976 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dVar1: 6309 dpInt1: 709 cEL: cvec_renamed[1]
+xAODTestReadCVec                          13   0    INFO  anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dVar1: 6309 dpInt1: 709 cEL: cvec_renamed[1]
   pvInt: [980 981 982 983 984 985 986 987 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 ]
 
-xAODTestReadCVec                        13  0      INFO  anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dVar1: 6310 dpInt1: 710 cEL: cvec_renamed[0]
+xAODTestReadCVec                          13   0    INFO  anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dVar1: 6310 dpInt1: 710 cEL: cvec_renamed[0]
   pvInt: [990 991 992 993 994 995 996 997 998 ]
   pvFloat: [-0.396 -0.296 -0.196 -0.096 0.004 0.104 0.204 0.304 0.404 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       13  0      INFO cvec_renamed.dInt1_renamed: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1_renamed: 42000
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1_renamedBase: 42001
-xAODTestReadDecor                       13  0      INFO cinfo.dInt1_renamed: 42000
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
-xAODTestReadCVec                        14  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        14  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        14  0      INFO  anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dVar1: 6751 dpInt1: 751 cEL: cvec_renamed[9]
+xAODTestReadDecor                         13   0    INFO cvec_renamed.dInt1_renamed: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1_renamed: 42000
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1_renamedBase: 42001
+xAODTestReadDecor                         13   0    INFO cinfo.dInt1_renamed: 42000
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+xAODTestReadCVec                          14   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          14   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          14   0    INFO  anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dVar1: 6751 dpInt1: 751 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dVar1: 6752 dpInt1: 752 cEL: cvec_renamed[8]
+xAODTestReadCVec                          14   0    INFO  anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dVar1: 6752 dpInt1: 752 cEL: cvec_renamed[8]
   pvInt: [1010 ]
   pvFloat: [-0.475 ]
   dpvFloat: [0.250 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dVar1: 6753 dpInt1: 753 cEL: cvec_renamed[7]
+xAODTestReadCVec                          14   0    INFO  anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dVar1: 6753 dpInt1: 753 cEL: cvec_renamed[7]
   pvInt: [1020 1021 ]
   pvFloat: [-0.465 -0.365 ]
   dpvFloat: [0.350 0.351 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dVar1: 6754 dpInt1: 754 cEL: cvec_renamed[6]
+xAODTestReadCVec                          14   0    INFO  anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dVar1: 6754 dpInt1: 754 cEL: cvec_renamed[6]
   pvInt: [1030 1031 1032 ]
   pvFloat: [-0.455 -0.355 -0.255 ]
   dpvFloat: [0.450 0.451 0.452 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dVar1: 6755 dpInt1: 755 cEL: cvec_renamed[5]
+xAODTestReadCVec                          14   0    INFO  anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dVar1: 6755 dpInt1: 755 cEL: cvec_renamed[5]
   pvInt: [1040 1041 1042 1043 ]
   pvFloat: [-0.445 -0.345 -0.245 -0.145 ]
   dpvFloat: [0.550 0.551 0.552 0.553 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dVar1: 6756 dpInt1: 756 cEL: cvec_renamed[4]
+xAODTestReadCVec                          14   0    INFO  anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dVar1: 6756 dpInt1: 756 cEL: cvec_renamed[4]
   pvInt: [1050 1051 1052 1053 1054 ]
   pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 ]
   dpvFloat: [0.650 0.651 0.652 0.653 0.654 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dVar1: 6757 dpInt1: 757 cEL: cvec_renamed[3]
+xAODTestReadCVec                          14   0    INFO  anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dVar1: 6757 dpInt1: 757 cEL: cvec_renamed[3]
   pvInt: [1060 1061 1062 1063 1064 1065 ]
   pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 ]
   dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dVar1: 6758 dpInt1: 758 cEL: cvec_renamed[2]
+xAODTestReadCVec                          14   0    INFO  anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dVar1: 6758 dpInt1: 758 cEL: cvec_renamed[2]
   pvInt: [1070 1071 1072 1073 1074 1075 1076 ]
   pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 ]
   dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dVar1: 6759 dpInt1: 759 cEL: cvec_renamed[1]
+xAODTestReadCVec                          14   0    INFO  anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dVar1: 6759 dpInt1: 759 cEL: cvec_renamed[1]
   pvInt: [1080 1081 1082 1083 1084 1085 1086 1087 ]
   pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 ]
   dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 ]
 
-xAODTestReadCVec                        14  0      INFO  anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dVar1: 6760 dpInt1: 760 cEL: cvec_renamed[0]
+xAODTestReadCVec                          14   0    INFO  anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dVar1: 6760 dpInt1: 760 cEL: cvec_renamed[0]
   pvInt: [1090 1091 1092 1093 1094 1095 1096 1097 1098 ]
   pvFloat: [-0.395 -0.295 -0.195 -0.095 0.005 0.105 0.205 0.305 0.405 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       14  0      INFO cvec_renamed.dInt1_renamed: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1_renamed: 45000
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1_renamedBase: 45001
-xAODTestReadDecor                       14  0      INFO cinfo.dInt1_renamed: 45000
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
-xAODTestReadCVec                        15  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        15  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        15  0      INFO  anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dVar1: 7201 dpInt1: 801 cEL: cvec_renamed[9]
+xAODTestReadDecor                         14   0    INFO cvec_renamed.dInt1_renamed: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1_renamed: 45000
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1_renamedBase: 45001
+xAODTestReadDecor                         14   0    INFO cinfo.dInt1_renamed: 45000
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+xAODTestReadCVec                          15   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          15   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          15   0    INFO  anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dVar1: 7201 dpInt1: 801 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dVar1: 7202 dpInt1: 802 cEL: cvec_renamed[8]
+xAODTestReadCVec                          15   0    INFO  anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dVar1: 7202 dpInt1: 802 cEL: cvec_renamed[8]
   pvInt: [1110 ]
   pvFloat: [-0.474 ]
   dpvFloat: [0.260 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dVar1: 7203 dpInt1: 803 cEL: cvec_renamed[7]
+xAODTestReadCVec                          15   0    INFO  anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dVar1: 7203 dpInt1: 803 cEL: cvec_renamed[7]
   pvInt: [1120 1121 ]
   pvFloat: [-0.464 -0.364 ]
   dpvFloat: [0.360 0.361 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dVar1: 7204 dpInt1: 804 cEL: cvec_renamed[6]
+xAODTestReadCVec                          15   0    INFO  anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dVar1: 7204 dpInt1: 804 cEL: cvec_renamed[6]
   pvInt: [1130 1131 1132 ]
   pvFloat: [-0.454 -0.354 -0.254 ]
   dpvFloat: [0.460 0.461 0.462 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dVar1: 7205 dpInt1: 805 cEL: cvec_renamed[5]
+xAODTestReadCVec                          15   0    INFO  anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dVar1: 7205 dpInt1: 805 cEL: cvec_renamed[5]
   pvInt: [1140 1141 1142 1143 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 ]
   dpvFloat: [0.560 0.561 0.562 0.563 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dVar1: 7206 dpInt1: 806 cEL: cvec_renamed[4]
+xAODTestReadCVec                          15   0    INFO  anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dVar1: 7206 dpInt1: 806 cEL: cvec_renamed[4]
   pvInt: [1150 1151 1152 1153 1154 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dVar1: 7207 dpInt1: 807 cEL: cvec_renamed[3]
+xAODTestReadCVec                          15   0    INFO  anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dVar1: 7207 dpInt1: 807 cEL: cvec_renamed[3]
   pvInt: [1160 1161 1162 1163 1164 1165 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dVar1: 7208 dpInt1: 808 cEL: cvec_renamed[2]
+xAODTestReadCVec                          15   0    INFO  anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dVar1: 7208 dpInt1: 808 cEL: cvec_renamed[2]
   pvInt: [1170 1171 1172 1173 1174 1175 1176 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dVar1: 7209 dpInt1: 809 cEL: cvec_renamed[1]
+xAODTestReadCVec                          15   0    INFO  anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dVar1: 7209 dpInt1: 809 cEL: cvec_renamed[1]
   pvInt: [1180 1181 1182 1183 1184 1185 1186 1187 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 ]
 
-xAODTestReadCVec                        15  0      INFO  anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dVar1: 7210 dpInt1: 810 cEL: cvec_renamed[0]
+xAODTestReadCVec                          15   0    INFO  anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dVar1: 7210 dpInt1: 810 cEL: cvec_renamed[0]
   pvInt: [1190 1191 1192 1193 1194 1195 1196 1197 1198 ]
   pvFloat: [-0.394 -0.294 -0.194 -0.094 0.006 0.106 0.206 0.306 0.406 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       15  0      INFO cvec_renamed.dInt1_renamed: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1_renamed: 48000
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1_renamedBase: 48001
-xAODTestReadDecor                       15  0      INFO cinfo.dInt1_renamed: 48000
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
-xAODTestReadCVec                        16  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        16  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        16  0      INFO  anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dVar1: 7651 dpInt1: 851 cEL: cvec_renamed[9]
+xAODTestReadDecor                         15   0    INFO cvec_renamed.dInt1_renamed: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1_renamed: 48000
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1_renamedBase: 48001
+xAODTestReadDecor                         15   0    INFO cinfo.dInt1_renamed: 48000
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+xAODTestReadCVec                          16   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          16   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          16   0    INFO  anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dVar1: 7651 dpInt1: 851 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dVar1: 7652 dpInt1: 852 cEL: cvec_renamed[8]
+xAODTestReadCVec                          16   0    INFO  anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dVar1: 7652 dpInt1: 852 cEL: cvec_renamed[8]
   pvInt: [1210 ]
   pvFloat: [-0.473 ]
   dpvFloat: [0.270 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dVar1: 7653 dpInt1: 853 cEL: cvec_renamed[7]
+xAODTestReadCVec                          16   0    INFO  anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dVar1: 7653 dpInt1: 853 cEL: cvec_renamed[7]
   pvInt: [1220 1221 ]
   pvFloat: [-0.463 -0.363 ]
   dpvFloat: [0.370 0.371 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dVar1: 7654 dpInt1: 854 cEL: cvec_renamed[6]
+xAODTestReadCVec                          16   0    INFO  anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dVar1: 7654 dpInt1: 854 cEL: cvec_renamed[6]
   pvInt: [1230 1231 1232 ]
   pvFloat: [-0.453 -0.353 -0.253 ]
   dpvFloat: [0.470 0.471 0.472 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dVar1: 7655 dpInt1: 855 cEL: cvec_renamed[5]
+xAODTestReadCVec                          16   0    INFO  anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dVar1: 7655 dpInt1: 855 cEL: cvec_renamed[5]
   pvInt: [1240 1241 1242 1243 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 ]
   dpvFloat: [0.570 0.571 0.572 0.573 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dVar1: 7656 dpInt1: 856 cEL: cvec_renamed[4]
+xAODTestReadCVec                          16   0    INFO  anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dVar1: 7656 dpInt1: 856 cEL: cvec_renamed[4]
   pvInt: [1250 1251 1252 1253 1254 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dVar1: 7657 dpInt1: 857 cEL: cvec_renamed[3]
+xAODTestReadCVec                          16   0    INFO  anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dVar1: 7657 dpInt1: 857 cEL: cvec_renamed[3]
   pvInt: [1260 1261 1262 1263 1264 1265 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dVar1: 7658 dpInt1: 858 cEL: cvec_renamed[2]
+xAODTestReadCVec                          16   0    INFO  anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dVar1: 7658 dpInt1: 858 cEL: cvec_renamed[2]
   pvInt: [1270 1271 1272 1273 1274 1275 1276 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dVar1: 7659 dpInt1: 859 cEL: cvec_renamed[1]
+xAODTestReadCVec                          16   0    INFO  anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dVar1: 7659 dpInt1: 859 cEL: cvec_renamed[1]
   pvInt: [1280 1281 1282 1283 1284 1285 1286 1287 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 ]
 
-xAODTestReadCVec                        16  0      INFO  anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dVar1: 7660 dpInt1: 860 cEL: cvec_renamed[0]
+xAODTestReadCVec                          16   0    INFO  anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dVar1: 7660 dpInt1: 860 cEL: cvec_renamed[0]
   pvInt: [1290 1291 1292 1293 1294 1295 1296 1297 1298 ]
   pvFloat: [-0.393 -0.293 -0.193 -0.093 0.007 0.107 0.207 0.307 0.407 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       16  0      INFO cvec_renamed.dInt1_renamed: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1_renamed: 51000
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1_renamedBase: 51001
-xAODTestReadDecor                       16  0      INFO cinfo.dInt1_renamed: 51000
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
-xAODTestReadCVec                        17  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        17  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        17  0      INFO  anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dVar1: 8101 dpInt1: 901 cEL: cvec_renamed[9]
+xAODTestReadDecor                         16   0    INFO cvec_renamed.dInt1_renamed: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1_renamed: 51000
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1_renamedBase: 51001
+xAODTestReadDecor                         16   0    INFO cinfo.dInt1_renamed: 51000
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+xAODTestReadCVec                          17   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          17   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          17   0    INFO  anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dVar1: 8101 dpInt1: 901 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dVar1: 8102 dpInt1: 902 cEL: cvec_renamed[8]
+xAODTestReadCVec                          17   0    INFO  anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dVar1: 8102 dpInt1: 902 cEL: cvec_renamed[8]
   pvInt: [1310 ]
   pvFloat: [-0.472 ]
   dpvFloat: [0.280 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dVar1: 8103 dpInt1: 903 cEL: cvec_renamed[7]
+xAODTestReadCVec                          17   0    INFO  anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dVar1: 8103 dpInt1: 903 cEL: cvec_renamed[7]
   pvInt: [1320 1321 ]
   pvFloat: [-0.462 -0.362 ]
   dpvFloat: [0.380 0.381 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dVar1: 8104 dpInt1: 904 cEL: cvec_renamed[6]
+xAODTestReadCVec                          17   0    INFO  anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dVar1: 8104 dpInt1: 904 cEL: cvec_renamed[6]
   pvInt: [1330 1331 1332 ]
   pvFloat: [-0.452 -0.352 -0.252 ]
   dpvFloat: [0.480 0.481 0.482 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dVar1: 8105 dpInt1: 905 cEL: cvec_renamed[5]
+xAODTestReadCVec                          17   0    INFO  anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dVar1: 8105 dpInt1: 905 cEL: cvec_renamed[5]
   pvInt: [1340 1341 1342 1343 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 ]
   dpvFloat: [0.580 0.581 0.582 0.583 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dVar1: 8106 dpInt1: 906 cEL: cvec_renamed[4]
+xAODTestReadCVec                          17   0    INFO  anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dVar1: 8106 dpInt1: 906 cEL: cvec_renamed[4]
   pvInt: [1350 1351 1352 1353 1354 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dVar1: 8107 dpInt1: 907 cEL: cvec_renamed[3]
+xAODTestReadCVec                          17   0    INFO  anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dVar1: 8107 dpInt1: 907 cEL: cvec_renamed[3]
   pvInt: [1360 1361 1362 1363 1364 1365 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dVar1: 8108 dpInt1: 908 cEL: cvec_renamed[2]
+xAODTestReadCVec                          17   0    INFO  anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dVar1: 8108 dpInt1: 908 cEL: cvec_renamed[2]
   pvInt: [1370 1371 1372 1373 1374 1375 1376 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dVar1: 8109 dpInt1: 909 cEL: cvec_renamed[1]
+xAODTestReadCVec                          17   0    INFO  anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dVar1: 8109 dpInt1: 909 cEL: cvec_renamed[1]
   pvInt: [1380 1381 1382 1383 1384 1385 1386 1387 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 ]
 
-xAODTestReadCVec                        17  0      INFO  anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dVar1: 8110 dpInt1: 910 cEL: cvec_renamed[0]
+xAODTestReadCVec                          17   0    INFO  anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dVar1: 8110 dpInt1: 910 cEL: cvec_renamed[0]
   pvInt: [1390 1391 1392 1393 1394 1395 1396 1397 1398 ]
   pvFloat: [-0.392 -0.292 -0.192 -0.092 0.008 0.108 0.208 0.308 0.408 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       17  0      INFO cvec_renamed.dInt1_renamed: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1_renamed: 54000
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1_renamedBase: 54001
-xAODTestReadDecor                       17  0      INFO cinfo.dInt1_renamed: 54000
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
-xAODTestReadCVec                        18  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        18  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        18  0      INFO  anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dVar1: 8551 dpInt1: 951 cEL: cvec_renamed[9]
+xAODTestReadDecor                         17   0    INFO cvec_renamed.dInt1_renamed: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1_renamed: 54000
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1_renamedBase: 54001
+xAODTestReadDecor                         17   0    INFO cinfo.dInt1_renamed: 54000
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+xAODTestReadCVec                          18   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          18   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          18   0    INFO  anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dVar1: 8551 dpInt1: 951 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dVar1: 8552 dpInt1: 952 cEL: cvec_renamed[8]
+xAODTestReadCVec                          18   0    INFO  anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dVar1: 8552 dpInt1: 952 cEL: cvec_renamed[8]
   pvInt: [1410 ]
   pvFloat: [-0.471 ]
   dpvFloat: [0.290 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dVar1: 8553 dpInt1: 953 cEL: cvec_renamed[7]
+xAODTestReadCVec                          18   0    INFO  anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dVar1: 8553 dpInt1: 953 cEL: cvec_renamed[7]
   pvInt: [1420 1421 ]
   pvFloat: [-0.461 -0.361 ]
   dpvFloat: [0.390 0.391 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dVar1: 8554 dpInt1: 954 cEL: cvec_renamed[6]
+xAODTestReadCVec                          18   0    INFO  anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dVar1: 8554 dpInt1: 954 cEL: cvec_renamed[6]
   pvInt: [1430 1431 1432 ]
   pvFloat: [-0.451 -0.351 -0.251 ]
   dpvFloat: [0.490 0.491 0.492 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dVar1: 8555 dpInt1: 955 cEL: cvec_renamed[5]
+xAODTestReadCVec                          18   0    INFO  anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dVar1: 8555 dpInt1: 955 cEL: cvec_renamed[5]
   pvInt: [1440 1441 1442 1443 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 ]
   dpvFloat: [0.590 0.591 0.592 0.593 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dVar1: 8556 dpInt1: 956 cEL: cvec_renamed[4]
+xAODTestReadCVec                          18   0    INFO  anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dVar1: 8556 dpInt1: 956 cEL: cvec_renamed[4]
   pvInt: [1450 1451 1452 1453 1454 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dVar1: 8557 dpInt1: 957 cEL: cvec_renamed[3]
+xAODTestReadCVec                          18   0    INFO  anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dVar1: 8557 dpInt1: 957 cEL: cvec_renamed[3]
   pvInt: [1460 1461 1462 1463 1464 1465 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dVar1: 8558 dpInt1: 958 cEL: cvec_renamed[2]
+xAODTestReadCVec                          18   0    INFO  anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dVar1: 8558 dpInt1: 958 cEL: cvec_renamed[2]
   pvInt: [1470 1471 1472 1473 1474 1475 1476 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dVar1: 8559 dpInt1: 959 cEL: cvec_renamed[1]
+xAODTestReadCVec                          18   0    INFO  anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dVar1: 8559 dpInt1: 959 cEL: cvec_renamed[1]
   pvInt: [1480 1481 1482 1483 1484 1485 1486 1487 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 ]
 
-xAODTestReadCVec                        18  0      INFO  anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dVar1: 8560 dpInt1: 960 cEL: cvec_renamed[0]
+xAODTestReadCVec                          18   0    INFO  anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dVar1: 8560 dpInt1: 960 cEL: cvec_renamed[0]
   pvInt: [1490 1491 1492 1493 1494 1495 1496 1497 1498 ]
   pvFloat: [-0.391 -0.291 -0.191 -0.091 0.009 0.109 0.209 0.309 0.409 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       18  0      INFO cvec_renamed.dInt1_renamed: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1_renamed: 57000
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1_renamedBase: 57001
-xAODTestReadDecor                       18  0      INFO cinfo.dInt1_renamed: 57000
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
-xAODTestReadCVec                        19  0      INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
-xAODTestReadCVec                        19  0      INFO Type of aux store: DMTest::CAuxContainer_v1
-xAODTestReadCVec                        19  0      INFO  anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dVar1: 9001 dpInt1: 1001 cEL: cvec_renamed[9]
+xAODTestReadDecor                         18   0    INFO cvec_renamed.dInt1_renamed: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1_renamed: 57000
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1_renamedBase: 57001
+xAODTestReadDecor                         18   0    INFO cinfo.dInt1_renamed: 57000
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+xAODTestReadCVec                          19   0    INFO cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+xAODTestReadCVec                          19   0    INFO Type of aux store: DMTest::CAuxContainer_v1
+xAODTestReadCVec                          19   0    INFO  anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dVar1: 9001 dpInt1: 1001 cEL: cvec_renamed[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dVar1: 9002 dpInt1: 1002 cEL: cvec_renamed[8]
+xAODTestReadCVec                          19   0    INFO  anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dVar1: 9002 dpInt1: 1002 cEL: cvec_renamed[8]
   pvInt: [1510 ]
   pvFloat: [-0.470 ]
   dpvFloat: [0.300 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dVar1: 9003 dpInt1: 1003 cEL: cvec_renamed[7]
+xAODTestReadCVec                          19   0    INFO  anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dVar1: 9003 dpInt1: 1003 cEL: cvec_renamed[7]
   pvInt: [1520 1521 ]
   pvFloat: [-0.460 -0.360 ]
   dpvFloat: [0.400 0.401 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dVar1: 9004 dpInt1: 1004 cEL: cvec_renamed[6]
+xAODTestReadCVec                          19   0    INFO  anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dVar1: 9004 dpInt1: 1004 cEL: cvec_renamed[6]
   pvInt: [1530 1531 1532 ]
   pvFloat: [-0.450 -0.350 -0.250 ]
   dpvFloat: [0.500 0.501 0.502 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dVar1: 9005 dpInt1: 1005 cEL: cvec_renamed[5]
+xAODTestReadCVec                          19   0    INFO  anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dVar1: 9005 dpInt1: 1005 cEL: cvec_renamed[5]
   pvInt: [1540 1541 1542 1543 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 ]
   dpvFloat: [0.600 0.601 0.602 0.603 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dVar1: 9006 dpInt1: 1006 cEL: cvec_renamed[4]
+xAODTestReadCVec                          19   0    INFO  anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dVar1: 9006 dpInt1: 1006 cEL: cvec_renamed[4]
   pvInt: [1550 1551 1552 1553 1554 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dVar1: 9007 dpInt1: 1007 cEL: cvec_renamed[3]
+xAODTestReadCVec                          19   0    INFO  anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dVar1: 9007 dpInt1: 1007 cEL: cvec_renamed[3]
   pvInt: [1560 1561 1562 1563 1564 1565 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dVar1: 9008 dpInt1: 1008 cEL: cvec_renamed[2]
+xAODTestReadCVec                          19   0    INFO  anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dVar1: 9008 dpInt1: 1008 cEL: cvec_renamed[2]
   pvInt: [1570 1571 1572 1573 1574 1575 1576 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dVar1: 9009 dpInt1: 1009 cEL: cvec_renamed[1]
+xAODTestReadCVec                          19   0    INFO  anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dVar1: 9009 dpInt1: 1009 cEL: cvec_renamed[1]
   pvInt: [1580 1581 1582 1583 1584 1585 1586 1587 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadCVec                        19  0      INFO  anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dVar1: 9010 dpInt1: 1010 cEL: cvec_renamed[0]
+xAODTestReadCVec                          19   0    INFO  anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dVar1: 9010 dpInt1: 1010 cEL: cvec_renamed[0]
   pvInt: [1590 1591 1592 1593 1594 1595 1596 1597 1598 ]
   pvFloat: [-0.390 -0.290 -0.190 -0.090 0.010 0.110 0.210 0.310 0.410 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 
-xAODTestReadDecor                       19  0      INFO cvec_renamed.dInt1_renamed: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1_renamed: 60000
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1_renamedBase: 60001
-xAODTestReadDecor                       19  0      INFO cinfo.dInt1_renamed: 60000
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.482688
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D3751002-CCED-BF42-88FB-9BA4998B981D
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-LoadReadDicts                                      INFO Finalizing LoadReadDicts...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-PyComponentMgr                                     INFO Finalizing PyComponentMgr...
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-XMLCatalog                                         INFO File 'xAODTestReadRenameMT_catalog.xml' does not exist. New file created.
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+xAODTestReadDecor                         19   0    INFO cvec_renamed.dInt1_renamed: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1_renamed: 60000
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1_renamedBase: 60001
+xAODTestReadDecor                         19   0    INFO cinfo.dInt1_renamed: 60000
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.115362
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+LoadReadDicts                                       INFO Finalizing LoadReadDicts...
+IncidentProcAlg2                                    INFO Finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+PyComponentMgr                                      INFO Finalizing PyComponentMgr...
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+XMLCatalog                                          INFO File 'xAODTestReadRenameMT_catalog.xml' does not exist. New file created.
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
index 83fbfcdd3a42..8bc2d62a85bc 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
@@ -1,7 +1,7 @@
-Wed Jan  1 21:03:22 CET 2020
+Wed Jun  3 16:02:30 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [atlas-work3/afd0e4f54af] -- built on [2020-01-01T1908]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,7 +9,7 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks1MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks1_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5638 configurables from 48 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
@@ -19,14 +19,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r0)
-                                          running on lxplus721.cern.ch on Wed Jan  1 21:03:35 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:02:38 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 4098 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
@@ -35,18 +35,19 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-12-31T2130/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host lxplus721.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 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([])
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 2268 CLIDRegistry entries for module ALL
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 1220 CLIDRegistry entries for module ALL
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 6252 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1782 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1401 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 6321 CLIDRegistry entries for module ALL
 xAODMaker::EventInfoCnvAlg                     0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::EventInfoCnvAlg.EventInfoC...       0    INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service not available
@@ -108,10 +109,13 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 EventSelector                                  0    INFO  Enter McEventSelector Initialization 
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
 ApplicationMgr                                 0    INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
 EventPersistencySvc                        0   0    INFO Added successfully Conversion service:McCnvSvc
@@ -197,7 +201,7 @@ AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start process
 xAODTestAlg.xAODTestReadSymlinkTool       19   0    INFO From tool: C (as AuxElement): 20000; S 1900
 xAODTestReadSymlink                       19   0    INFO C (as AuxElement): 20000; S 1900
 AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.0510393
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.0256289
 Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr                                      INFO Application Manager Stopped successfully
 IncidentProcAlg1                                    INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
index e8e362548ccd..38509da50cf6 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
@@ -1,7 +1,7 @@
-Fri Sep 13 19:45:28 CEST 2019
+Wed Jun  3 16:03:18 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.5] [x86_64-centos7-gcc8-opt] [atlas-work3/85aadd0a07c] -- built on [2019-09-13T1706]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events
@@ -9,15 +9,10 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks2MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5537 configurables from 45 genConfDb files
-Py:ConfigurableDb WARNING Found 2 duplicates among the 45 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestWriteCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataWrite.DataModelTestDataWriteConf']
-Py:ConfigurableDb WARNING   -DMTest__xAODTestReadCVec: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -25,78 +20,80 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r1)
-                                          running on lxplus737.cern.ch on Fri Sep 13 19:45:38 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:03:25 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 3920 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-MetaDataSvc                                        INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
-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-09-12T2129/Athena/22.0.5/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus737.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 POOL WriteCatalog is file:xAODTestSymlinks2MT_catalog.xml
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-MetaDataSvc                                        INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
-EventSelector                                      INFO EventSelection with query 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                    INFO in initialize...
+AthDictLoaderSvc                                    INFO acquired Dso-registry
+ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
+CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+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://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF atlas_dd ]
+PoolSvc                                             INFO Successfully setup replica sorting algorithm
+PoolSvc                                             INFO Setting up APR FileCatalog and Streams
+PoolSvc                                             INFO POOL WriteCatalog is file:xAODTestSymlinks2MT_catalog.xml
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
+EventSelector                                       INFO EventSelection with query 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
 Warning in <TClass::Init>: no dictionary for class DMTest::CAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CInfoAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CTrigAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::GAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
+Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::CVecWithData_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::H_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
 Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::H_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S2 is available
 Warning in <TClass::Init>: no dictionary for class DMTest::S1 is available
 Warning in <TClass::Init>: no dictionary for class ElementLink<DataVector<DMTest::C_v1> > is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::C_v1> is available
 Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::H_v1> is available
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc                                            INFO File is not in Catalog! Attempt to open it anyway.
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                          INFO     Open     DbSession    
-Domain[ROOT_All]                                   INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                                   INFO ->  Access   DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                                   INFO                           xaoddata.root
-RootDatabase.open                                  INFO xaoddata.root File version:61800
-ClassIDSvc                                         INFO  getRegistryEntries: read 2112 CLIDRegistry entries for module ALL
-EventPersistencySvc                                INFO Added successfully Conversion service:AthenaPoolCnvSvc
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1326 CLIDRegistry entries for module ALL
-PyComponentMgr                              0      INFO Initializing PyComponentMgr...
-LoadReadDicts                               0      INFO Initializing LoadReadDicts...
-ThreadPoolSvc                               0      INFO no thread init tools attached
-AvalancheSchedulerSvc                       0      INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                       0      INFO Found 7 algorithms
-AvalancheSchedulerSvc                       0      INFO Data Dependencies for Algorithms:
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+PoolSvc                                             INFO File is not in Catalog! Attempt to open it anyway.
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                           INFO     Open     DbSession    
+Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                                    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                                    INFO                           xaoddata.root
+RootDatabase.open                                   INFO xaoddata.root File version:62002
+ClassIDSvc                                          INFO  getRegistryEntries: read 2248 CLIDRegistry entries for module ALL
+EventPersistencySvc                                 INFO Added successfully Conversion service:AthenaPoolCnvSvc
+ClassIDSvc                                          INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+PyComponentMgr                                 0    INFO Initializing PyComponentMgr...
+LoadReadDicts                                  0    INFO Initializing LoadReadDicts...
+ThreadPoolSvc                                  0    INFO no thread init tools attached
+AvalancheSchedulerSvc                          0    INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                          0    INFO Found 7 algorithms
+AvalancheSchedulerSvc                          0    INFO Data Dependencies for Algorithms:
   BeginIncFiringAlg
       none
   IncidentProcAlg1
@@ -114,7 +111,7 @@ AvalancheSchedulerSvc                       0      INFO Data Dependencies for Al
       none
   IncidentProcAlg2
       none
-AvalancheSchedulerSvc                       0      INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+AvalancheSchedulerSvc                          0    INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'DMTest::S1' , 'StoreGateSvc+S2' )     required by Algorithm: 
        * xAODTestReadSymlink
    o  ( 'DMTest::S2' , 'StoreGateSvc+S2' )     required by Algorithm: 
@@ -123,106 +120,108 @@ AvalancheSchedulerSvc                       0      INFO Will attribute the follo
        * xAODTestReadSymlink
    o  ( 'SG::AuxElement' , 'StoreGateSvc+cinfo' )     required by Algorithm: 
        * xAODTestReadSymlink
-PrecedenceSvc                               0      INFO Assembling CF and DF task precedence rules
-PrecedenceSvc                               0      INFO PrecedenceSvc initialized successfully
-AvalancheSchedulerSvc                       0      INFO Concurrency level information:
-AvalancheSchedulerSvc                       0      INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                       0      INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                     0   WARNING Histograms saving not required.
-AthenaHiveEventLoopMgr                      0      INFO Setup EventSelector service EventSelector
-ApplicationMgr                              0      INFO Application Manager Initialized successfully
-PoolSvc                                     0      INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 1
-xaoddata.root                               0      INFO Database being retired...
-Domain[ROOT_All]                            0      INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                            0      INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession                                   0      INFO     Open     DbSession    
-Domain[ROOT_All]                            0      INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]                            0      INFO ->  Access   DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-Domain[ROOT_All]                            0      INFO                           xaoddata.root
-RootDatabase.open                           0      INFO xaoddata.root File version:61800
-ApplicationMgr                              0      INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                      0      INFO Starting loop on events
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 7101 CLIDRegistry entries for module ALL
-AthenaPoolConverter                     0   0      INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
-xAODTestReadSymlink                     0   0      INFO C (as AuxElement): 1000; S 0
-AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-ClassIDSvc                              1   0      INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
-xAODTestReadSymlink                     1   0      INFO C (as AuxElement): 2000; S 100
-AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
-xAODTestReadSymlink                     2   0      INFO C (as AuxElement): 3000; S 200
-AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
-xAODTestReadSymlink                     3   0      INFO C (as AuxElement): 4000; S 300
-AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadSymlink                     4   0      INFO C (as AuxElement): 5000; S 400
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
-xAODTestReadSymlink                     5   0      INFO C (as AuxElement): 6000; S 500
-AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
-xAODTestReadSymlink                     6   0      INFO C (as AuxElement): 7000; S 600
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
-xAODTestReadSymlink                     7   0      INFO C (as AuxElement): 8000; S 700
-AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
-xAODTestReadSymlink                     8   0      INFO C (as AuxElement): 9000; S 800
-AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
-xAODTestReadSymlink                     9   0      INFO C (as AuxElement): 10000; S 900
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
-xAODTestReadSymlink                     10  0      INFO C (as AuxElement): 11000; S 1000
-AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
-xAODTestReadSymlink                     11  0      INFO C (as AuxElement): 12000; S 1100
-AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
-xAODTestReadSymlink                     12  0      INFO C (as AuxElement): 13000; S 1200
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
-xAODTestReadSymlink                     13  0      INFO C (as AuxElement): 14000; S 1300
-AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
-xAODTestReadSymlink                     14  0      INFO C (as AuxElement): 15000; S 1400
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
-xAODTestReadSymlink                     15  0      INFO C (as AuxElement): 16000; S 1500
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
-xAODTestReadSymlink                     16  0      INFO C (as AuxElement): 17000; S 1600
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
-xAODTestReadSymlink                     17  0      INFO C (as AuxElement): 18000; S 1700
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
-xAODTestReadSymlink                     18  0      INFO C (as AuxElement): 19000; S 1800
-AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
-xAODTestReadSymlink                     19  0      INFO C (as AuxElement): 20000; S 1900
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.313385
-xaoddata.root                                      INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FF15630F-659B-5842-A6A6-3FD55164A668
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-LoadReadDicts                                      INFO Finalizing LoadReadDicts...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-PyComponentMgr                                     INFO Finalizing PyComponentMgr...
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-XMLCatalog                                         INFO File 'xAODTestSymlinks2MT_catalog.xml' does not exist. New file created.
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+PrecedenceSvc                                  0    INFO Assembling CF and DF task precedence rules
+PrecedenceSvc                                  0    INFO PrecedenceSvc initialized successfully
+AvalancheSchedulerSvc                          0    INFO Concurrency level information:
+AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':1
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
+AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
+ApplicationMgr                                 0    INFO Application Manager Initialized successfully
+xaoddata.root                                  0    INFO Database being retired...
+Domain[ROOT_All]                               0    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+DbSession                                      0    INFO     Open     DbSession    
+Domain[ROOT_All]                               0    INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]                               0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+Domain[ROOT_All]                               0    INFO                           xaoddata.root
+RootDatabase.open                              0    INFO xaoddata.root File version:62002
+ApplicationMgr                                 0    INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                         0    INFO Starting loop on events
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 8913 CLIDRegistry entries for module ALL
+AthenaPoolConverter                        0   0    INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
+xAODTestReadSymlink                        0   0    INFO C (as AuxElement): 1000; S 0
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                                 1   0    INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+xAODTestReadSymlink                        1   0    INFO C (as AuxElement): 2000; S 100
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+xAODTestReadSymlink                        2   0    INFO C (as AuxElement): 3000; S 200
+AthenaHiveEventLoopMgr                     2   0    INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+xAODTestReadSymlink                        3   0    INFO C (as AuxElement): 4000; S 300
+AthenaHiveEventLoopMgr                     3   0    INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadSymlink                        4   0    INFO C (as AuxElement): 5000; S 400
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+xAODTestReadSymlink                        5   0    INFO C (as AuxElement): 6000; S 500
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+xAODTestReadSymlink                        6   0    INFO C (as AuxElement): 7000; S 600
+AthenaHiveEventLoopMgr                     6   0    INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+xAODTestReadSymlink                        7   0    INFO C (as AuxElement): 8000; S 700
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+xAODTestReadSymlink                        8   0    INFO C (as AuxElement): 9000; S 800
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+xAODTestReadSymlink                        9   0    INFO C (as AuxElement): 10000; S 900
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+xAODTestReadSymlink                       10   0    INFO C (as AuxElement): 11000; S 1000
+AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+xAODTestReadSymlink                       11   0    INFO C (as AuxElement): 12000; S 1100
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+xAODTestReadSymlink                       12   0    INFO C (as AuxElement): 13000; S 1200
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+xAODTestReadSymlink                       13   0    INFO C (as AuxElement): 14000; S 1300
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+xAODTestReadSymlink                       14   0    INFO C (as AuxElement): 15000; S 1400
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+xAODTestReadSymlink                       15   0    INFO C (as AuxElement): 16000; S 1500
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+xAODTestReadSymlink                       16   0    INFO C (as AuxElement): 17000; S 1600
+AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+xAODTestReadSymlink                       17   0    INFO C (as AuxElement): 18000; S 1700
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+xAODTestReadSymlink                       18   0    INFO C (as AuxElement): 19000; S 1800
+AthenaHiveEventLoopMgr                    18   0    INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+xAODTestReadSymlink                       19   0    INFO C (as AuxElement): 20000; S 1900
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO ---> Loop Finished (seconds): 0.100757
+xaoddata.root                                       INFO Database being retired...
+Domain[ROOT_All]                                    INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3547F1CD-7D92-F642-8E05-67B6B000CD54
+ApplicationMgr                                      INFO Application Manager Stopped successfully
+IncidentProcAlg1                                    INFO Finalize
+SGInputLoader                                       INFO Finalizing SGInputLoader...
+LoadReadDicts                                       INFO Finalizing LoadReadDicts...
+IncidentProcAlg2                                    INFO Finalize
+AvalancheSchedulerSvc                               INFO Joining Scheduler thread
+PyComponentMgr                                      INFO Finalizing PyComponentMgr...
+EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+XMLCatalog                                          INFO File 'xAODTestSymlinks2MT_catalog.xml' does not exist. New file created.
+AthDictLoaderSvc                                    INFO in finalize...
+ToolSvc                                             INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                            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"
diff --git a/Control/IOVSvc/src/CondInputLoader.h b/Control/IOVSvc/src/CondInputLoader.h
index d0297496f69d..c35e54a4896f 100644
--- a/Control/IOVSvc/src/CondInputLoader.h
+++ b/Control/IOVSvc/src/CondInputLoader.h
@@ -76,7 +76,7 @@ class CondInputLoader
   //  void loader(Property&);
 
   /// Containers
-  Gaudi::Property<DataObjIDColl> m_load{this,"Load",{},"List of objects to be loaded","Set<std::vector<std::string> >"};
+  Gaudi::Property<DataObjIDColl> m_load{this,"Load",{},"List of objects to be loaded","OrderedSet<std::vector<std::string> >"};
   DataObjIDColl  m_handlesToCreate;
   std::vector< SG::VarHandleKey > m_vhk;
 
diff --git a/Control/RngComps/src/AtDSFMTGenSvc.h b/Control/RngComps/src/AtDSFMTGenSvc.h
index 2717a828c9da..525a574a7951 100644
--- a/Control/RngComps/src/AtDSFMTGenSvc.h
+++ b/Control/RngComps/src/AtDSFMTGenSvc.h
@@ -102,7 +102,7 @@ private:
 					   "optional integer that allows to change the sequence of randoms for a "\
 					   "given run/event no and SequenceName combination. Notice that "\
 					   "Seed1/Seed2 are dummy when EventReseeding is used",
-					   "Set<std::string>"};
+					   "OrderedSet<std::string>"};
 
 
     Gaudi::Property<bool> m_read_from_file{this,"ReadFromFile",false,"set/restore the status of the engine from file"};  ///< read engine status from file
diff --git a/Control/RngComps/src/AtRanluxGenSvc.h b/Control/RngComps/src/AtRanluxGenSvc.h
index 7b9f183eb652..4f05712f3c96 100644
--- a/Control/RngComps/src/AtRanluxGenSvc.h
+++ b/Control/RngComps/src/AtRanluxGenSvc.h
@@ -124,7 +124,7 @@ private:
 	  "[OFFSET num] Seed1 Seed2', ...] where OFFSET is an optional integer that allows to change the " \
 	  "sequence of randoms for a given run/event no and SequenceName combination. Notice that " \
 	  "Seed1/Seed2 are dummy when EventReseeding is used",
-	  "Set<std::string>"};
+	  "OrderedSet<std::string>"};
 
 
     Gaudi::Property<bool> m_read_from_file{this,"ReadFromFile",false,"set/restore the status of the engine from file"};  ///< read engine status from file
diff --git a/Control/RngComps/src/AtRndmGenSvc.h b/Control/RngComps/src/AtRndmGenSvc.h
index 5a58f7dfaa66..59fbb9c87474 100644
--- a/Control/RngComps/src/AtRndmGenSvc.h
+++ b/Control/RngComps/src/AtRndmGenSvc.h
@@ -118,7 +118,7 @@ private:
 	"seeds for the engines, this is a vector of strings of the form ['SequenceName [OFFSET num] Seed1 Seed2', ...] "\
 	  "where OFFSET is an optional integer that allows to change the sequence of randoms for a given run/event no "	\
 	  "and SequenceName combination. Notice that Seed1/Seed2 are dummy when EventReseeding is used",
-	  "Set<std::string>"};
+	  "OrderedSet<std::string>"};
 
 
       Gaudi::Property<bool> m_read_from_file{this,"ReadFromFile",false,"set/restore the status of the engine from file"};  ///< read engine status from file
diff --git a/Control/SGComps/src/AddressRemappingSvc.h b/Control/SGComps/src/AddressRemappingSvc.h
index 15a736efbb4f..51212b90dce2 100644
--- a/Control/SGComps/src/AddressRemappingSvc.h
+++ b/Control/SGComps/src/AddressRemappingSvc.h
@@ -88,7 +88,7 @@ private: // Data
       "Algorithm resource pool service."};
 
   /// TypeKeyOverwriteMaps, map for type#key overwrites.
-  StringArrayProperty m_overwriteMaps{this,"TypeKeyOverwriteMaps",{},"","Set<std::string>"};
+  StringArrayProperty m_overwriteMaps{this,"TypeKeyOverwriteMaps",{},"","OrderedSet<std::string>"};
   std::vector<SG::TransientAddress> m_oldTads;
   std::vector<SG::TransientAddress> m_newTads;
 
@@ -99,7 +99,7 @@ private: // Data
 	"TypeKeyOverwriteMaps are accessible by both the old and new names; "
 	"while for TypeKeyRenameMaps, only the new names are visible (so the old names "
 	"may be rewritten).  Overwriting may also change the visible type of an object, "
-	"while renaming may not.  Format of list elements is OLDNAME#TYPE->NEWNAME.","Set<std::string>"};
+	"while renaming may not.  Format of list elements is OLDNAME#TYPE->NEWNAME.","OrderedSet<std::string>"};
 
    /// Map of sgkey->sgkey for input renames.
    /// This object is exported via inputRenameMap and is synchronized
diff --git a/Control/SGComps/src/ProxyProviderSvc.h b/Control/SGComps/src/ProxyProviderSvc.h
index 0b0da21c65bc..cedefd94c7e0 100644
--- a/Control/SGComps/src/ProxyProviderSvc.h
+++ b/Control/SGComps/src/ProxyProviderSvc.h
@@ -101,7 +101,7 @@ private:
   
   /// property: the services declared as providers
   StringArrayProperty m_providerNames{this,"ProviderNames",{},
-      "names of the services to be use as address providers","Set<std::string>"};
+      "names of the services to be use as address providers","OrderedSet<std::string>"};
   /// the handler for m_providerNames
   void providerNamesPropertyHandler( Property& theProp );
   
diff --git a/Control/SGComps/test/AddressRemappingSvc_test.cxx b/Control/SGComps/test/AddressRemappingSvc_test.cxx
index 676418c3df25..2cbfb91da7a8 100644
--- a/Control/SGComps/test/AddressRemappingSvc_test.cxx
+++ b/Control/SGComps/test/AddressRemappingSvc_test.cxx
@@ -74,13 +74,13 @@ public:
 
   virtual StatusCode initialize() override;
 
-  virtual StatusCode acquireAlgorithm(const std::string& /*name*/,IAlgorithm*& /*algo*/, bool /*blocking*/ = false) override { std::abort(); }
-  virtual StatusCode releaseAlgorithm(const std::string& /*name*/, IAlgorithm*& /*algo*/) override { std::abort(); }
+  virtual StatusCode acquireAlgorithm(const std::string_view /*name*/,IAlgorithm*& /*algo*/, bool /*blocking*/ = false) override { std::abort(); }
+  virtual StatusCode releaseAlgorithm(const std::string_view /*name*/, IAlgorithm*& /*algo*/) override { std::abort(); }
   virtual std::list<IAlgorithm*> getTopAlgList() override { std::abort(); }
   // virtual StatusCode beginRun() override { std::abort(); }
   // virtual StatusCode endRun()  override { std::abort(); }
-  virtual StatusCode acquireResource(const std::string& /*name*/) override { std::abort(); }
-  virtual StatusCode releaseResource(const std::string& /*name*/) override { std::abort(); }
+  virtual StatusCode acquireResource(const std::string_view /*name*/) override { std::abort(); }
+  virtual StatusCode releaseResource(const std::string_view /*name*/) override { std::abort(); }
 
   virtual std::list<IAlgorithm*> getFlatAlgList() override;
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index 17fc689c4332..8b7e21d4048d 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -205,7 +205,7 @@ private: // properties
    StringProperty  m_branchNameHintProp{this,"SubLevelBranchName", "<type>/<key>"};
 
    /// Output PoolAttributes, vector with names and values of technology specific attributes for POOL
-   StringArrayProperty m_poolAttr{this,"PoolAttributes",{},"Pool Attributes","Set<std::string>"};
+   StringArrayProperty m_poolAttr{this,"PoolAttributes",{},"Pool Attributes","OrderedSet<std::string>"};
    std::vector<std::vector<std::string> > m_domainAttr;
    std::vector<std::vector<std::string> > m_databaseAttr;
    std::vector<std::vector<std::string> > m_containerAttr;
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
index 3dc2a60e17a2..900aa024c049 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
@@ -203,7 +203,7 @@ private: // properties
    ///	default = "" (use POOL default).
    StringProperty m_writeCatalog{this,"WriteCatalog","xmlcatalog_file:PoolFileCatalog.xml"};
    /// ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
-   StringArrayProperty m_readCatalog{this,"ReadCatalog",{},"List of catalog files to read from","Set<std::string>"};
+   StringArrayProperty m_readCatalog{this,"ReadCatalog",{},"List of catalog files to read from","OrderedSet<std::string>"};
    /// Use ROOT Implicit MultiThreading, default = true.
    BooleanProperty m_useROOTIMT{this,"UseROOTImplicitMT",true};
    /// AttemptCatalogPatch, option to create catalog: default = false.
diff --git a/Database/IOVDbSvc/src/IOVDbSvc.h b/Database/IOVDbSvc/src/IOVDbSvc.h
index b8a9eee79d8d..4f54810e3cdd 100644
--- a/Database/IOVDbSvc/src/IOVDbSvc.h
+++ b/Database/IOVDbSvc/src/IOVDbSvc.h
@@ -186,11 +186,11 @@ private:
   // production database instance, used to cross-check global tag
   Gaudi::Property<std::string>    m_par_dbinst{this,"DBInstance","","Database instance (like OFLP200)"};
   //  a list of folders to preload
-  Gaudi::Property<std::vector<std::string> >  m_par_folders{this,"Folders",{},"List of database folders to preload","Set<std::string>"};
+  Gaudi::Property<std::vector<std::string> >  m_par_folders{this,"Folders",{},"List of database folders to preload","OrderedSet<std::string>"};
   //  a list of overriding tags definitions
-  Gaudi::Property<std::vector<std::string> >  m_par_overrideTags{this,"overrideTags",{},"List of foolder-tag overrides","Set<std::string>"};
+  Gaudi::Property<std::vector<std::string> >  m_par_overrideTags{this,"overrideTags",{},"List of foolder-tag overrides","OrderedSet<std::string>"};
   //  a list of folders to write to file meta data
-  Gaudi::Property<std::vector<std::string> >  m_par_foldersToWrite{this,"FoldersToMetaData",{},"list of folders to write to file meta data","Set<std::string>"};    
+  Gaudi::Property<std::vector<std::string> >  m_par_foldersToWrite{this,"FoldersToMetaData",{},"list of folders to write to file meta data","OrderedSet<std::string>"};    
   //  a flag to trigger the connections management
   BooleanProperty                m_par_manageConnections{this,"ManageConnections",true,"flag to trigger the connections management"};
   //  a flag to manage pool connections
diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
index 5c1a18c997b4..686f63f0bdfb 100755
--- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
+++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
@@ -45,7 +45,7 @@ public:
 private:
    // type and name of the objects to create the address for.
    Gaudi::Property<std::vector<std::string> > m_typeNames{this,"TypeNames",{},\
-       "Type and Name of objects to create the address for","Set<std::string>"};
+       "Type and Name of objects to create the address for","OrderedSet<std::string>"};
 
 
    ServiceHandle<IClassIDSvc> m_clidSvc;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h
index 927743455c61..bfe6c5deac12 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h
@@ -35,7 +35,7 @@ class MuonAlignmentCondAlg: public AthAlgorithm {
 
   //std::vector<std::string> parlineFolder() { return m_parlineFolder; }
 
-  Gaudi::Property<std::vector<std::string>> m_parlineFolder {this, "ParlineFolders", std::vector<std::string>(), "Database folders", "Set<std::string>"};
+  Gaudi::Property<std::vector<std::string>> m_parlineFolder {this, "ParlineFolders", std::vector<std::string>(), "Database folders", "OrderedSet<std::string>"};
     
  private:
 
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index 5a0adcb132ea..06658d1ef1da 100644
--- a/Projects/AthGeneration/externals.txt
+++ b/Projects/AthGeneration/externals.txt
@@ -9,4 +9,4 @@
 AthGenerationExternalsVersion = 2.0.68
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.001
+GaudiVersion = v33r1.002
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 4ad9b91921e7..ef09ae53f009 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -9,4 +9,4 @@
 AthSimulationExternalsVersion = 2.0.68
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.001
+GaudiVersion = v33r1.002
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 3424f17230fe..f2bf542d9d92 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -9,4 +9,4 @@
 AthenaExternalsVersion = 2.0.68
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.001
+GaudiVersion = v33r1.002
diff --git a/Simulation/G4Atlas/G4AtlasTools/test/G4GeometryToolConfig_Simtest.py b/Simulation/G4Atlas/G4AtlasTools/test/G4GeometryToolConfig_Simtest.py
index 62fb3bd4d587..2c340e39e568 100755
--- a/Simulation/G4Atlas/G4AtlasTools/test/G4GeometryToolConfig_Simtest.py
+++ b/Simulation/G4Atlas/G4AtlasTools/test/G4GeometryToolConfig_Simtest.py
@@ -96,4 +96,6 @@ if __name__ == '__main__':
   cfg.store(f) 
   f.close()
 
+  print(cfg._publicTools)
+
   print ("-----------------finished----------------------")
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
index 52f6193d7b37..9ed90acaf0bb 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:10:31 CET 2019
+Wed Jun  3 16:16:34 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:10:38 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:16:43 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,9 +68,10 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -89,7 +90,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 863 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -181,7 +182,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -190,7 +191,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.46S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.7S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +202,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -213,9 +214,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -250,7 +251,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.12S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.19S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -305,11 +306,9 @@ 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 3915 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -362,12 +361,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -398,7 +397,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1129572, run #204073 1 events processed so far  <<<===
@@ -613,23 +612,23 @@ Finalize: compared 10 dumps
 IncidentProcAlg2     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.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.05 ))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.03 ))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.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.04 ))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.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.45 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.50 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.99 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.55 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.54 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.80 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.63 ))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.63 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.55 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.48 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.58 ))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.54 ))s
+IOVDbSvc             INFO  bytes in ((      7.49 ))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.40 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     6.44 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileROD...   INFO Finalizing
@@ -637,18 +636,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  280 [ms] Ave/Min/Max=  140(+-  140)/    0/  280 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  310 [ms] Ave/Min/Max= 23.8(+-   77)/    0/  290 [ms] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 5.79  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  250 [ms] Ave/Min/Max=  125(+-  115)/   10/  240 [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.53  [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"
-Fri Nov 29 11:10:46 CET 2019
+Wed Jun  3 16:17:02 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -657,9 +656,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileBeamElemContByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -679,14 +678,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:10:52 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:17:09 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -694,9 +693,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -717,9 +717,10 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -738,7 +739,7 @@ IOVDbSvc                                            INFO Added taginfo remove fo
 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 800 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 ClassIDSvc                                          INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
@@ -830,7 +831,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -839,7 +840,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.47S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 26388Kb 	 Time = 0.73S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -850,7 +851,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -862,9 +863,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -899,7 +900,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.12S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.15S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -910,7 +911,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 4
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4180 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4295 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
@@ -969,8 +970,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -979,7 +982,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1024,12 +1027,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1037,7 +1040,7 @@ Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
 RootDatabase.open                          0   0    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
 AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #1129572, run #204073 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
@@ -1240,7 +1243,7 @@ AthenaHiveEventLoopMgr                    96   2    INFO   ===>>>  done processi
 AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 4.75145
+AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 4.55942
 /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...
@@ -1257,7 +1260,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.13 ))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
@@ -1269,10 +1272,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.06 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.08 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.21 ))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_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.21 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1282,9 +1285,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  310 [ms] Ave/Min/Max=  155(+-  145)/   10/  300 [ms] #=  2
-cObj_ALL                                            INFO Time User   : Tot=  360 [ms] Ave/Min/Max=  180(+-  130)/   50/  310 [ms] #=  2
-ChronoStatSvc                                       INFO Time User   : Tot= 5.76  [s]                                             #=  1
+cObjR_ALL                                           INFO Time User   : Tot=  240 [ms] Ave/Min/Max=  120(+-  120)/    0/  240 [ms] #=  2
+cObj_ALL                                            INFO Time User   : Tot=  270 [ms] Ave/Min/Max=  135(+-  125)/   10/  260 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 6.28  [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 063684ca9b96..6cf57f1ac97e 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:09:23 CET 2019
+Wed Jun  3 16:09:45 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:09:28 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:09:55 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,10 +68,11 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 863 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -181,7 +182,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -190,7 +191,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.45S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.75S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +202,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -213,9 +214,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -250,7 +251,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.12S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.2S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -305,11 +306,9 @@ 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 3915 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -362,12 +361,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -398,7 +397,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileDig...   INFO Initializing TileDigitsContByteStreamTool
@@ -614,23 +613,23 @@ Finalize: compared 20 dumps
 IncidentProcAlg2     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.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))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.04 ))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.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.04 ))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.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.48 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.90 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     1.10 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.11 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.11 ))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 ((     0.72 ))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.63 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.75 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.63 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.72 ))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.68 ))s
+IOVDbSvc             INFO  bytes in ((      9.84 ))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.08 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.41 ))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: ((     8.26 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileDig...   INFO Finalizing TileDigitsContByteStreamTool successfuly
@@ -639,18 +638,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  310 [ms] Ave/Min/Max=  155(+-  155)/    0/  310 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  350 [ms] Ave/Min/Max= 26.9(+- 87.7)/    0/  330 [ms] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 7.42  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  270 [ms] Ave/Min/Max=  135(+-  125)/   10/  260 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  320 [ms] Ave/Min/Max= 24.6(+- 74.5)/    0/  280 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 7.88  [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"
-Fri Nov 29 11:09:39 CET 2019
+Wed Jun  3 16:10:29 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -659,9 +658,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileDigitsContByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -681,14 +680,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:09:46 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:10:38 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -696,9 +695,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -719,10 +719,11 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 800 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -832,7 +833,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -841,7 +842,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.43S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.72S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -852,7 +853,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -864,9 +865,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -901,7 +902,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.12S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.21S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -912,7 +913,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 4
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4180 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4295 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
@@ -973,8 +974,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -983,7 +986,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1028,12 +1031,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1041,7 +1044,7 @@ Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
 RootDatabase.open                          0   0    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
 AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #1129572, run #204073 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
@@ -1049,203 +1052,203 @@ ToolSvc.TileDigitsContByteStreamTool       0   0    INFO Initializing TileDigits
 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                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     2   2    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                     3   3    INFO   ===>>>  done processing event #1131086, run #204073 on slot 3,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #1130272, run #204073 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  start processing event #1132019, run #204073 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  start processing event #1132092, run #204073 on slot 3,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  done processing event #1131269, run #204073 on slot 1,  6 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                     6   2    INFO   ===>>>  done processing event #1130716, run #204073 on slot 2,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  start processing event #1130238, run #204073 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   2    INFO   ===>>>  start processing event #1134553, run #204073 on slot 2,  7 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     7   0    INFO   ===>>>  done processing event #1132019, run #204073 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   1    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                     9   3    INFO   ===>>>  done processing event #1130238, run #204073 on slot 3,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    10   0    INFO   ===>>>  done processing event #1134553, run #204073 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    11   1    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                    12   2    INFO   ===>>>  done processing event #1133461, run #204073 on slot 2,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #1131152, run #204073 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    14   1    INFO   ===>>>  done processing event #1130142, run #204073 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  done processing event #1132092, run #204073 on slot 3,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  done processing event #1130238, run #204073 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  start processing event #1130999, run #204073 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   1    INFO   ===>>>  start processing event #1133461, run #204073 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   3    INFO   ===>>>  start processing event #1131152, run #204073 on slot 3,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   2    INFO   ===>>>  done processing event #1134553, run #204073 on slot 2,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #1130999, run #204073 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #1130142, run #204073 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   2    INFO   ===>>>  start processing event #1132770, run #204073 on slot 2,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   1    INFO   ===>>>  done processing event #1133461, run #204073 on slot 1,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   3    INFO   ===>>>  done processing event #1131152, run #204073 on slot 3,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #1130142, run #204073 on slot 0,  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                    15   3    INFO   ===>>>  done processing event #1132770, run #204073 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   3    INFO   ===>>>  start processing event #1133781, run #204073 on slot 3,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   2    INFO   ===>>>  done processing event #1132770, run #204073 on slot 2,  16 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #1132365, run #204073 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #1132067, run #204073 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   2    INFO   ===>>>  start processing event #1138637, run #204073 on slot 2,  17 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    17   1    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                    18   2    INFO   ===>>>  done processing event #1133781, run #204073 on slot 2,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   3    INFO   ===>>>  done processing event #1133781, run #204073 on slot 3,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   1    INFO   ===>>>  start processing event #1139495, run #204073 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   3    INFO   ===>>>  start processing event #1140193, run #204073 on slot 3,  19 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #1132067, run #204073 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    20   1    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                    21   3    INFO   ===>>>  done processing event #1139495, run #204073 on slot 3,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    22   0    INFO   ===>>>  done processing event #1140193, run #204073 on slot 0,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    23   1    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                    20   2    INFO   ===>>>  done processing event #1138637, run #204073 on slot 2,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   1    INFO   ===>>>  done processing event #1139495, run #204073 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  start processing event #1142953, run #204073 on slot 0,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  start processing event #1139127, run #204073 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  start processing event #1141272, run #204073 on slot 2,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   3    INFO   ===>>>  done processing event #1140193, run #204073 on slot 3,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  done processing event #1142953, run #204073 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  start processing event #1137117, run #204073 on slot 0,  24 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    27   3    INFO   ===>>>  start processing event #1139599, run #204073 on slot 3,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    24   2    INFO   ===>>>  done processing event #1139127, run #204073 on slot 2,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    25   0    INFO   ===>>>  done processing event #1141272, run #204073 on slot 0,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    26   1    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  <<<===
-AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  start processing event #1143279, run #204073 on slot 2,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  done processing event #1139127, run #204073 on slot 1,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  done processing event #1141272, run #204073 on slot 2,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   1    INFO   ===>>>  start processing event #1140314, run #204073 on slot 1,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   2    INFO   ===>>>  start processing event #1133685, run #204073 on slot 2,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  done processing event #1137117, run #204073 on slot 0,  27 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    27   3    INFO   ===>>>  done processing event #1139599, run #204073 on slot 3,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    28   0    INFO   ===>>>  done processing event #1140314, run #204073 on slot 0,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    29   1    INFO   ===>>>  done processing event #1133685, run #204073 on slot 1,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  start processing event #1137563, run #204073 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   0    INFO   ===>>>  start processing event #1143279, run #204073 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   3    INFO   ===>>>  start processing event #1137563, run #204073 on slot 3,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   1    INFO   ===>>>  done processing event #1140314, run #204073 on slot 1,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   2    INFO   ===>>>  done processing event #1133685, run #204073 on slot 2,  30 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    32   1    INFO   ===>>>  start processing event #1139927, run #204073 on slot 1,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    33   3    INFO   ===>>>  start processing event #1141197, run #204073 on slot 3,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  done processing event #1143279, run #204073 on slot 2,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  done processing event #1137563, run #204073 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  start processing event #1141197, run #204073 on slot 2,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   0    INFO   ===>>>  done processing event #1143279, run #204073 on slot 0,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   3    INFO   ===>>>  done processing event #1137563, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1142531, run #204073 on slot 3,  32 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    32   1    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                    33   3    INFO   ===>>>  done processing event #1141197, run #204073 on slot 3,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  done processing event #1141197, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1139958, run #204073 on slot 2,  34 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    34   0    INFO   ===>>>  done processing event #1140039, run #204073 on slot 0,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    35   1    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                    35   3    INFO   ===>>>  done processing event #1142531, run #204073 on slot 3,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    38   0    INFO   ===>>>  start processing event #1143765, run #204073 on slot 0,  36 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    39   3    INFO   ===>>>  start processing event #1143097, run #204073 on slot 3,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    36   2    INFO   ===>>>  done processing event #1139475, run #204073 on slot 2,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    37   0    INFO   ===>>>  done processing event #1139958, run #204073 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    38   1    INFO   ===>>>  done processing event #1143765, run #204073 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    36   1    INFO   ===>>>  done processing event #1139475, run #204073 on slot 1,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    37   2    INFO   ===>>>  done processing event #1139958, run #204073 on slot 2,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    38   0    INFO   ===>>>  done processing event #1143765, run #204073 on slot 0,  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                    39   3    INFO   ===>>>  done processing event #1143097, run #204073 on slot 3,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    40   0    INFO   ===>>>  done processing event #1134147, run #204073 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   0    INFO   ===>>>  start processing event #1137842, run #204073 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   3    INFO   ===>>>  start processing event #1141705, run #204073 on slot 3,  41 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    41   1    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                    42   2    INFO   ===>>>  done processing event #1136377, run #204073 on slot 2,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  start processing event #1143410, run #204073 on slot 1,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   2    INFO   ===>>>  start processing event #1144170, run #204073 on slot 2,  43 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    43   0    INFO   ===>>>  done processing event #1137842, run #204073 on slot 0,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    44   1    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                    45   3    INFO   ===>>>  done processing event #1143410, run #204073 on slot 3,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    46   0    INFO   ===>>>  done processing event #1144170, run #204073 on slot 0,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    47   1    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                    48   2    INFO   ===>>>  done processing event #1145633, run #204073 on slot 2,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    49   0    INFO   ===>>>  done processing event #1135005, run #204073 on slot 0,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    50   1    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                    51   3    INFO   ===>>>  done processing event #1144646, run #204073 on slot 3,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    52   0    INFO   ===>>>  done processing event #1145027, run #204073 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    53   1    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                    54   2    INFO   ===>>>  done processing event #1138485, run #204073 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    55   0    INFO   ===>>>  done processing event #1144565, run #204073 on slot 0,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    56   1    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                    57   3    INFO   ===>>>  done processing event #1136546, run #204073 on slot 3,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    58   0    INFO   ===>>>  done processing event #1143799, run #204073 on slot 0,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    59   1    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                    44   3    INFO   ===>>>  done processing event #1141705, run #204073 on slot 3,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  done processing event #1143410, run #204073 on slot 1,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   0    INFO   ===>>>  start processing event #1145987, run #204073 on slot 0,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   1    INFO   ===>>>  start processing event #1145633, run #204073 on slot 1,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   3    INFO   ===>>>  start processing event #1135005, run #204073 on slot 3,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   2    INFO   ===>>>  done processing event #1144170, run #204073 on slot 2,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   0    INFO   ===>>>  done processing event #1145987, run #204073 on slot 0,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   1    INFO   ===>>>  done processing event #1145633, run #204073 on slot 1,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   0    INFO   ===>>>  start processing event #1142167, run #204073 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   1    INFO   ===>>>  start processing event #1144646, run #204073 on slot 1,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   2    INFO   ===>>>  start processing event #1145027, run #204073 on slot 2,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   3    INFO   ===>>>  done processing event #1135005, run #204073 on slot 3,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   0    INFO   ===>>>  done processing event #1142167, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #1144112, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   3    INFO   ===>>>  start processing event #1138485, run #204073 on slot 3,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   1    INFO   ===>>>  done processing event #1144646, run #204073 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   2    INFO   ===>>>  done processing event #1145027, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1139498, run #204073 on slot 2,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  done processing event #1144112, run #204073 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   3    INFO   ===>>>  done processing event #1138485, run #204073 on slot 3,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   1    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   3    INFO   ===>>>  start processing event #1142877, run #204073 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   2    INFO   ===>>>  done processing event #1139498, run #204073 on slot 2,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   0    INFO   ===>>>  done processing event #1136546, run #204073 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   0    INFO   ===>>>  start processing event #1149894, run #204073 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   2    INFO   ===>>>  start processing event #1145364, run #204073 on slot 2,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  done processing event #1143799, run #204073 on slot 1,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   3    INFO   ===>>>  done processing event #1142877, run #204073 on slot 3,  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                    60   2    INFO   ===>>>  done processing event #1149894, run #204073 on slot 2,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    61   0    INFO   ===>>>  done processing event #1145364, run #204073 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   0    INFO   ===>>>  done processing event #1149894, run #204073 on slot 0,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   2    INFO   ===>>>  done processing event #1145364, run #204073 on slot 2,  62 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    62   1    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                    63   3    INFO   ===>>>  done processing event #1148361, run #204073 on slot 3,  64 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    64   0    INFO   ===>>>  done processing event #1148167, run #204073 on slot 0,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   0    INFO   ===>>>  start processing event #1145832, run #204073 on slot 0,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  start processing event #1153100, run #204073 on slot 3,  65 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    65   1    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                    66   2    INFO   ===>>>  done processing event #1144808, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1138294, run #204073 on slot 2,  67 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    67   0    INFO   ===>>>  done processing event #1145832, run #204073 on slot 0,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    68   1    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                    69   3    INFO   ===>>>  done processing event #1142524, run #204073 on slot 3,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    70   0    INFO   ===>>>  done processing event #1138294, run #204073 on slot 0,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    71   1    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                    72   2    INFO   ===>>>  done processing event #1149424, run #204073 on slot 2,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    73   0    INFO   ===>>>  done processing event #1151102, run #204073 on slot 0,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    74   1    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                    75   3    INFO   ===>>>  done processing event #1148416, run #204073 on slot 3,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    76   0    INFO   ===>>>  done processing event #1142753, run #204073 on slot 0,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    77   1    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                    68   3    INFO   ===>>>  done processing event #1153100, run #204073 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   1    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   3    INFO   ===>>>  start processing event #1151102, run #204073 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   2    INFO   ===>>>  done processing event #1138294, run #204073 on slot 2,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   0    INFO   ===>>>  done processing event #1138350, run #204073 on slot 0,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   0    INFO   ===>>>  start processing event #1152242, run #204073 on slot 0,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  start processing event #1148416, run #204073 on slot 2,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   1    INFO   ===>>>  done processing event #1149424, run #204073 on slot 1,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   3    INFO   ===>>>  done processing event #1151102, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1149997, run #204073 on slot 3,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   0    INFO   ===>>>  done processing event #1152242, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  done processing event #1148416, run #204073 on slot 2,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   0    INFO   ===>>>  start processing event #1151617, run #204073 on slot 0,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   2    INFO   ===>>>  start processing event #1149794, run #204073 on slot 2,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   1    INFO   ===>>>  done processing event #1142753, run #204073 on slot 1,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   3    INFO   ===>>>  done processing event #1149997, run #204073 on slot 3,  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                    78   2    INFO   ===>>>  done processing event #1151617, run #204073 on slot 2,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    79   0    INFO   ===>>>  done processing event #1149794, run #204073 on slot 0,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   0    INFO   ===>>>  done processing event #1151617, run #204073 on slot 0,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   2    INFO   ===>>>  done processing event #1149794, run #204073 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   0    INFO   ===>>>  start processing event #1151364, run #204073 on slot 0,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   2    INFO   ===>>>  start processing event #1143901, run #204073 on slot 2,  80 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    80   1    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                    81   3    INFO   ===>>>  done processing event #1142485, run #204073 on slot 3,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   1    INFO   ===>>>  start processing event #1153979, run #204073 on slot 1,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   3    INFO   ===>>>  start processing event #1150212, run #204073 on slot 3,  82 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    82   0    INFO   ===>>>  done processing event #1151364, run #204073 on slot 0,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    83   1    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                    84   2    INFO   ===>>>  done processing event #1153979, run #204073 on slot 2,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    85   0    INFO   ===>>>  done processing event #1150212, run #204073 on slot 0,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    86   1    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                    87   3    INFO   ===>>>  done processing event #1155482, run #204073 on slot 3,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    88   0    INFO   ===>>>  done processing event #1150472, run #204073 on slot 0,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    89   1    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                    83   2    INFO   ===>>>  done processing event #1143901, run #204073 on slot 2,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   0    INFO   ===>>>  start processing event #1152633, run #204073 on slot 0,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  start processing event #1155482, run #204073 on slot 2,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   1    INFO   ===>>>  done processing event #1153979, run #204073 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   3    INFO   ===>>>  done processing event #1150212, run #204073 on slot 3,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   1    INFO   ===>>>  start processing event #1150472, run #204073 on slot 1,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   3    INFO   ===>>>  start processing event #1140275, run #204073 on slot 3,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   0    INFO   ===>>>  done processing event #1152633, run #204073 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  done processing event #1155482, run #204073 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   0    INFO   ===>>>  start processing event #1145882, run #204073 on slot 0,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  start processing event #1151732, run #204073 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   1    INFO   ===>>>  done processing event #1150472, run #204073 on slot 1,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   3    INFO   ===>>>  done processing event #1140275, run #204073 on slot 3,  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                    90   2    INFO   ===>>>  done processing event #1145882, run #204073 on slot 2,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    91   0    INFO   ===>>>  done processing event #1151732, run #204073 on slot 0,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   0    INFO   ===>>>  done processing event #1145882, run #204073 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  done processing event #1151732, run #204073 on slot 2,  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                    92   1    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                    93   3    INFO   ===>>>  done processing event #1156381, run #204073 on slot 3,  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                    94   0    INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    95   1    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                    96   2    INFO   ===>>>  done processing event #1151312, run #204073 on slot 2,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 3.84317
+AthenaHiveEventLoopMgr                    95   2    INFO   ===>>>  done processing event #1153794, run #204073 on slot 2,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  start processing event #1156351, run #204073 on slot 2,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  done processing event #1151312, run #204073 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   3    INFO   ===>>>  done processing event #1148893, run #204073 on slot 3,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  done processing event #1156938, run #204073 on slot 0,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  done processing event #1156351, run #204073 on slot 2,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO ---> Loop Finished (seconds): 5.47151
 /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...
@@ -1262,7 +1265,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.05 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.65 ))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
@@ -1274,10 +1277,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.07 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.54 ))s
+IOVDbSvc                                            INFO  bytes in ((      1.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: ((     0.07 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.19 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1288,9 +1291,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  310 [ms] Ave/Min/Max=  155(+-  145)/   10/  300 [ms] #=  2
-cObj_ALL                                            INFO Time User   : Tot=  350 [ms] Ave/Min/Max=  175(+-  145)/   30/  320 [ms] #=  2
-ChronoStatSvc                                       INFO Time User   : Tot= 7.07  [s]                                             #=  1
+cObjR_ALL                                           INFO Time User   : Tot=  270 [ms] Ave/Min/Max=  135(+-  125)/   10/  260 [ms] #=  2
+cObj_ALL                                            INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  130)/   20/  280 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 9.51  [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 0e31448e044b..9afe1fdd345d 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:11:03 CET 2019
+Wed Jun  3 16:17:59 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:11:09 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:18:07 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,9 +68,10 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -89,7 +90,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 863 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2586 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -181,7 +182,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -190,7 +191,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.44S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24340Kb 	 Time = 0.71S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +202,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -213,9 +214,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -250,7 +251,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.12S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.18S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -305,11 +306,9 @@ 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 3915 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -362,12 +361,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -398,7 +397,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileL2C...   INFO Initializing TileL2ContByteStreamTool
@@ -614,23 +613,23 @@ Finalize: compared 10 dumps
 IncidentProcAlg2     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.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.04 ))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.04 ))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.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.44 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.45 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.44 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.59 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.57 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.38 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.39 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.40 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.40 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.55 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.48 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.58 ))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.54 ))s
+IOVDbSvc             INFO  bytes in ((      5.84 ))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.07 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.37 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.99 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     4.85 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileROD...   INFO Finalizing
@@ -638,18 +637,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [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= 6.46  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  240 [ms] Ave/Min/Max=  120(+-  110)/   10/  230 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  270 [ms] Ave/Min/Max= 20.8(+- 66.4)/    0/  250 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 6.93  [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"
-Fri Nov 29 11:11:18 CET 2019
+Wed Jun  3 16:18:31 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -658,9 +657,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileL2ContByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -680,14 +679,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:11:24 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:18:37 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -695,9 +694,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -718,9 +718,10 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -739,7 +740,7 @@ IOVDbSvc                                            INFO Added taginfo remove fo
 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 800 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2586 CLIDRegistry entries for module ALL
 ClassIDSvc                                          INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
@@ -831,7 +832,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -840,7 +841,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.43S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.68S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -851,7 +852,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -863,9 +864,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -900,7 +901,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.12S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.15S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -911,7 +912,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 4
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4180 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4295 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
@@ -970,8 +971,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -980,7 +983,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1025,12 +1028,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1038,7 +1041,7 @@ Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
 RootDatabase.open                          0   0    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
 AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #1129572, run #204073 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
@@ -1046,8 +1049,8 @@ ToolSvc.TileL2ContByteStreamTool           0   0    INFO Initializing TileL2Cont
 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                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     2   2    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  <<<===
@@ -1242,7 +1245,7 @@ AthenaHiveEventLoopMgr                    96   2    INFO   ===>>>  done processi
 AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 4.04525
+AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 4.16024
 /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...
@@ -1259,7 +1262,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.05 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.13 ))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
@@ -1271,10 +1274,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.03 ))s
-IOVDbSvc                                            INFO  bytes in ((      0.08 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.07 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.20 ))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.08 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.20 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1284,9 +1287,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [ms] #=  2
-cObj_ALL                                            INFO Time User   : Tot=  330 [ms] Ave/Min/Max=  165(+-  145)/   20/  310 [ms] #=  2
-ChronoStatSvc                                       INFO Time User   : Tot= 6.03  [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(+-  130)/   20/  280 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 7.53  [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 ce636be69c23..74564973e68c 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:11:34 CET 2019
+Wed Jun  3 16:19:25 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:11:40 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:19:34 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,9 +68,10 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -180,7 +181,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2988 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2990 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -189,7 +190,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.56S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.69S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -200,7 +201,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -212,9 +213,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -249,7 +250,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.12S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.18S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -304,11 +305,9 @@ 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 4586 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4701 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -361,12 +360,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -397,7 +396,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18124, run #363899 1 events processed so far  <<<===
@@ -612,23 +611,23 @@ Finalize: compared 10 dumps
 IncidentProcAlg2     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.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.03 ))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.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     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.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.40 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.18 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.48 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.41 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.41 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.45 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.40 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.40 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.38 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.49 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.49 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.56 ))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.12 ))s
+IOVDbSvc             INFO  bytes in ((      4.81 ))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.07 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.33 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.30 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     4.51 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileROD...   INFO Finalizing
@@ -636,18 +635,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  150)/    0/  300 [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= 3.24  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  240 [ms] Ave/Min/Max=  120(+-  120)/    0/  240 [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= 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"
-Fri Nov 29 11:11:45 CET 2019
+Wed Jun  3 16:19:46 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -656,9 +655,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileLaserObjByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -678,14 +677,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:11:51 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:19:53 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -693,9 +692,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -716,9 +716,10 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -828,7 +829,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2925 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2990 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -837,7 +838,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24344Kb 	 Time = 0.52S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 26388Kb 	 Time = 0.68S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -848,7 +849,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -860,9 +861,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -897,7 +898,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.12S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.18S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -908,7 +909,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2a (2018) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 5
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4851 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4966 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
@@ -967,8 +968,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -977,7 +980,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1022,12 +1025,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1038,207 +1041,207 @@ AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start process
 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  <<<===
 AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
-ClassIDSvc                                 1   1    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
-ClassIDSvc                                 1   1    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileL2Builder      1   1    INFO TileL2Builder initialization completed
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     4   1    INFO   ===>>>  start processing event #18128, run #363899 on slot 1,  1 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #18124, run #363899 on slot 0,  1 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  done processing event #18127, run #363899 on slot 3,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #18124, run #363899 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #18129, run #363899 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     6   2    INFO   ===>>>  start processing event #18130, run #363899 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #18128, run #363899 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   2    INFO   ===>>>  start processing event #18129, run #363899 on slot 2,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  done processing event #18127, run #363899 on slot 3,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  start processing event #18130, run #363899 on slot 1,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     7   3    INFO   ===>>>  start processing event #18131, run #363899 on slot 3,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     4   1    INFO   ===>>>  done processing event #18128, run #363899 on slot 1,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   1    INFO   ===>>>  start processing event #18132, run #363899 on slot 1,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #18129, run #363899 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #18133, run #363899 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     6   2    INFO   ===>>>  done processing event #18130, run #363899 on slot 2,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    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                     5   2    INFO   ===>>>  done processing event #18129, run #363899 on slot 2,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   2    INFO   ===>>>  start processing event #18133, run #363899 on slot 2,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  done processing event #18130, run #363899 on slot 1,  7 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     7   3    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                    10   1    INFO   ===>>>  start processing event #18134, run #363899 on slot 1,  8 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    11   3    INFO   ===>>>  start processing event #18135, run #363899 on slot 3,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   1    INFO   ===>>>  done processing event #18132, run #363899 on slot 1,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #18133, run #363899 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #18132, run #363899 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   2    INFO   ===>>>  done processing event #18133, run #363899 on slot 2,  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                    10   2    INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    11   3    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                    12   0    INFO   ===>>>  done processing event #18136, run #363899 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    13   1    INFO   ===>>>  done processing event #18137, run #363899 on slot 1,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   2    INFO   ===>>>  start processing event #18137, run #363899 on slot 2,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   3    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                    10   1    INFO   ===>>>  done processing event #18134, run #363899 on slot 1,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  start processing event #18139, run #363899 on slot 1,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   2    INFO   ===>>>  done processing event #18137, run #363899 on slot 2,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #18136, run #363899 on slot 0,  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                    14   2    INFO   ===>>>  done processing event #18138, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  start processing event #18142, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    15   3    INFO   ===>>>  done processing event #18139, run #363899 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   2    INFO   ===>>>  start processing event #18141, run #363899 on slot 2,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   3    INFO   ===>>>  done processing event #18138, run #363899 on slot 3,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   3    INFO   ===>>>  start processing event #18142, run #363899 on slot 3,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  done processing event #18139, run #363899 on slot 1,  16 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #18140, run #363899 on slot 0,  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                    17   1    INFO   ===>>>  done processing event #18141, run #363899 on slot 1,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  done processing event #18142, run #363899 on slot 2,  19 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                    20   1    INFO   ===>>>  start processing event #18144, run #363899 on slot 1,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   2    INFO   ===>>>  done processing event #18141, run #363899 on slot 2,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   2    INFO   ===>>>  start processing event #18145, run #363899 on slot 2,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   3    INFO   ===>>>  done processing event #18142, run #363899 on slot 3,  19 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #18143, run #363899 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    20   3    INFO   ===>>>  done processing event #18144, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18148, run #363899 on slot 3,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    21   1    INFO   ===>>>  done processing event #18145, run #363899 on slot 1,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    22   2    INFO   ===>>>  done processing event #18146, run #363899 on slot 2,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  start processing event #18149, run #363899 on slot 1,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    26   2    INFO   ===>>>  start processing event #18150, run #363899 on slot 2,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  done processing event #18147, run #363899 on slot 0,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    24   3    INFO   ===>>>  done processing event #18148, run #363899 on slot 3,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  start processing event #18151, run #363899 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   0    INFO   ===>>>  start processing event #18146, run #363899 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   3    INFO   ===>>>  start processing event #18147, run #363899 on slot 3,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   2    INFO   ===>>>  done processing event #18145, run #363899 on slot 2,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   1    INFO   ===>>>  done processing event #18144, run #363899 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  start processing event #18148, run #363899 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  start processing event #18149, run #363899 on slot 2,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   0    INFO   ===>>>  done processing event #18146, run #363899 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  start processing event #18150, run #363899 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   3    INFO   ===>>>  done processing event #18147, run #363899 on slot 3,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  done processing event #18148, run #363899 on slot 1,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   1    INFO   ===>>>  start processing event #18151, run #363899 on slot 1,  25 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  start processing event #18152, run #363899 on slot 3,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  done processing event #18149, run #363899 on slot 1,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    26   2    INFO   ===>>>  done processing event #18150, run #363899 on slot 2,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    29   1    INFO   ===>>>  start processing event #18153, run #363899 on slot 1,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  done processing event #18149, run #363899 on slot 2,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  done processing event #18150, run #363899 on slot 0,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  start processing event #18153, run #363899 on slot 0,  27 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  start processing event #18154, run #363899 on slot 2,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  done processing event #18151, run #363899 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   1    INFO   ===>>>  done processing event #18151, run #363899 on slot 1,  28 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  done processing event #18152, run #363899 on slot 3,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  start processing event #18155, run #363899 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   1    INFO   ===>>>  start processing event #18155, run #363899 on slot 1,  29 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    32   3    INFO   ===>>>  start processing event #18156, run #363899 on slot 3,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    29   1    INFO   ===>>>  done processing event #18153, run #363899 on slot 1,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  done processing event #18154, run #363899 on slot 2,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  start processing event #18157, run #363899 on slot 1,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    34   2    INFO   ===>>>  start processing event #18158, run #363899 on slot 2,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  done processing event #18155, run #363899 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  done processing event #18154, run #363899 on slot 2,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  start processing event #18157, run #363899 on slot 2,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  done processing event #18153, run #363899 on slot 0,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   1    INFO   ===>>>  done processing event #18155, run #363899 on slot 1,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   0    INFO   ===>>>  start processing event #18158, run #363899 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   1    INFO   ===>>>  start processing event #18159, run #363899 on slot 1,  32 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    32   3    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                    33   1    INFO   ===>>>  done processing event #18157, run #363899 on slot 1,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    34   2    INFO   ===>>>  done processing event #18158, run #363899 on slot 2,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    37   1    INFO   ===>>>  start processing event #18161, run #363899 on slot 1,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  done processing event #18157, run #363899 on slot 2,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   0    INFO   ===>>>  done processing event #18158, run #363899 on slot 0,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    37   0    INFO   ===>>>  start processing event #18161, run #363899 on slot 0,  35 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    38   2    INFO   ===>>>  start processing event #18162, run #363899 on slot 2,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    35   0    INFO   ===>>>  done processing event #18159, run #363899 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   1    INFO   ===>>>  done processing event #18159, run #363899 on slot 1,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   1    INFO   ===>>>  start processing event #18163, run #363899 on slot 1,  36 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    36   3    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                    37   1    INFO   ===>>>  done processing event #18161, run #363899 on slot 1,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    37   0    INFO   ===>>>  done processing event #18161, run #363899 on slot 0,  38 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    38   2    INFO   ===>>>  done processing event #18162, run #363899 on slot 2,  39 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    41   1    INFO   ===>>>  start processing event #18165, run #363899 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   0    INFO   ===>>>  start processing event #18165, run #363899 on slot 0,  39 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    42   2    INFO   ===>>>  start processing event #18166, run #363899 on slot 2,  39 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    39   0    INFO   ===>>>  done processing event #18163, run #363899 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   1    INFO   ===>>>  done processing event #18163, run #363899 on slot 1,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    40   3    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                    43   1    INFO   ===>>>  start processing event #18167, run #363899 on slot 1,  41 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    44   3    INFO   ===>>>  start processing event #18168, run #363899 on slot 3,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    41   1    INFO   ===>>>  done processing event #18165, run #363899 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   0    INFO   ===>>>  done processing event #18165, run #363899 on slot 0,  42 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    42   2    INFO   ===>>>  done processing event #18166, run #363899 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  start processing event #18169, run #363899 on slot 1,  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                    43   0    INFO   ===>>>  done processing event #18167, run #363899 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   1    INFO   ===>>>  done processing event #18167, run #363899 on slot 1,  44 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    44   3    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                    47   1    INFO   ===>>>  start processing event #18171, run #363899 on slot 1,  45 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    48   3    INFO   ===>>>  start processing event #18172, run #363899 on slot 3,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  done processing event #18169, run #363899 on slot 1,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   0    INFO   ===>>>  done processing event #18169, run #363899 on slot 0,  46 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    46   2    INFO   ===>>>  done processing event #18170, run #363899 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    49   1    INFO   ===>>>  start processing event #18173, run #363899 on slot 1,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   0    INFO   ===>>>  start processing event #18173, run #363899 on slot 0,  47 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    50   2    INFO   ===>>>  start processing event #18174, run #363899 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    47   0    INFO   ===>>>  done processing event #18171, run #363899 on slot 0,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    48   3    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                    49   1    INFO   ===>>>  done processing event #18173, run #363899 on slot 1,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   1    INFO   ===>>>  done processing event #18171, run #363899 on slot 1,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   1    INFO   ===>>>  start processing event #18175, run #363899 on slot 1,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   0    INFO   ===>>>  done processing event #18173, run #363899 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   3    INFO   ===>>>  done processing event #18172, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18177, run #363899 on slot 3,  50 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    50   2    INFO   ===>>>  done processing event #18174, run #363899 on slot 2,  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                    51   0    INFO   ===>>>  done processing event #18175, run #363899 on slot 0,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    52   3    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                    51   1    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                    53   3    INFO   ===>>>  done processing event #18177, 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                    53   1    INFO   ===>>>  done processing event #18177, run #363899 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   0    INFO   ===>>>  done processing event #18176, run #363899 on slot 0,  54 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    54   2    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                    57   0    INFO   ===>>>  start processing event #18181, run #363899 on slot 0,  55 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    58   2    INFO   ===>>>  start processing event #18182, run #363899 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    55   0    INFO   ===>>>  done processing event #18179, run #363899 on slot 0,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   1    INFO   ===>>>  done processing event #18179, run #363899 on slot 1,  56 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    56   3    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                    59   1    INFO   ===>>>  start processing event #18183, run #363899 on slot 1,  57 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    60   3    INFO   ===>>>  start processing event #18184, run #363899 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    57   1    INFO   ===>>>  done processing event #18181, run #363899 on slot 1,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    58   2    INFO   ===>>>  done processing event #18182, run #363899 on slot 2,  59 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                    59   0    INFO   ===>>>  done processing event #18183, run #363899 on slot 0,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    60   3    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                    58   2    INFO   ===>>>  done processing event #18182, run #363899 on slot 2,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   2    INFO   ===>>>  start processing event #18185, run #363899 on slot 2,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   0    INFO   ===>>>  done processing event #18181, run #363899 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  start processing event #18186, run #363899 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   3    INFO   ===>>>  done processing event #18184, run #363899 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   1    INFO   ===>>>  done processing event #18183, run #363899 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  start processing event #18187, run #363899 on slot 1,  61 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    64   3    INFO   ===>>>  start processing event #18188, run #363899 on slot 3,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    61   1    INFO   ===>>>  done processing event #18185, run #363899 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    62   2    INFO   ===>>>  done processing event #18186, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    65   1    INFO   ===>>>  start processing event #18189, run #363899 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  done processing event #18186, run #363899 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   2    INFO   ===>>>  done processing event #18185, run #363899 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  start processing event #18189, run #363899 on slot 0,  63 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    66   2    INFO   ===>>>  start processing event #18190, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    63   0    INFO   ===>>>  done processing event #18187, run #363899 on slot 0,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    64   3    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                    64   3    INFO   ===>>>  done processing event #18188, run #363899 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  done processing event #18187, run #363899 on slot 1,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   1    INFO   ===>>>  start processing event #18191, run #363899 on slot 1,  65 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  start processing event #18192, run #363899 on slot 3,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    65   1    INFO   ===>>>  done processing event #18189, run #363899 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    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                    66   2    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                    67   0    INFO   ===>>>  done processing event #18191, run #363899 on slot 0,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  done processing event #18192, run #363899 on slot 3,  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                    69   1    INFO   ===>>>  done processing event #18193, run #363899 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  done processing event #18193, run #363899 on slot 0,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   0    INFO   ===>>>  start processing event #18195, run #363899 on slot 0,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   1    INFO   ===>>>  done processing event #18191, run #363899 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  done processing event #18192, run #363899 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   1    INFO   ===>>>  start processing event #18196, run #363899 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   3    INFO   ===>>>  start processing event #18197, run #363899 on slot 3,  70 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    70   2    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                    71   0    INFO   ===>>>  done processing event #18195, run #363899 on slot 0,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  done processing event #18196, run #363899 on slot 3,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   1    INFO   ===>>>  done processing event #18196, run #363899 on slot 1,  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                    73   1    INFO   ===>>>  done processing event #18197, run #363899 on slot 1,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   1    INFO   ===>>>  start processing event #18200, run #363899 on slot 1,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   3    INFO   ===>>>  done processing event #18197, run #363899 on slot 3,  74 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    74   2    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                    77   2    INFO   ===>>>  start processing event #18201, run #363899 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   3    INFO   ===>>>  start processing event #18202, run #363899 on slot 3,  75 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    75   0    INFO   ===>>>  done processing event #18199, run #363899 on slot 0,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    76   3    INFO   ===>>>  done processing event #18200, run #363899 on slot 3,  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                    77   1    INFO   ===>>>  done processing event #18201, run #363899 on slot 1,  78 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    78   2    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                    79   0    INFO   ===>>>  start processing event #18203, run #363899 on slot 0,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   1    INFO   ===>>>  done processing event #18200, run #363899 on slot 1,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   1    INFO   ===>>>  start processing event #18204, run #363899 on slot 1,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   3    INFO   ===>>>  done processing event #18202, run #363899 on slot 3,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   3    INFO   ===>>>  start processing event #18205, run #363899 on slot 3,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   2    INFO   ===>>>  done processing event #18201, 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                    79   0    INFO   ===>>>  done processing event #18203, run #363899 on slot 0,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    80   3    INFO   ===>>>  done processing event #18204, run #363899 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   1    INFO   ===>>>  done processing event #18204, run #363899 on slot 1,  81 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                    81   1    INFO   ===>>>  done processing event #18205, run #363899 on slot 1,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    85   1    INFO   ===>>>  start processing event #18209, run #363899 on slot 1,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   1    INFO   ===>>>  start processing event #18208, run #363899 on slot 1,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   3    INFO   ===>>>  done processing event #18205, run #363899 on slot 3,  82 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    82   2    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                    85   2    INFO   ===>>>  start processing event #18209, run #363899 on slot 2,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   3    INFO   ===>>>  start processing event #18210, run #363899 on slot 3,  83 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  done processing event #18207, run #363899 on slot 0,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    84   3    INFO   ===>>>  done processing event #18208, run #363899 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   1    INFO   ===>>>  done processing event #18208, run #363899 on slot 1,  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                    85   1    INFO   ===>>>  done processing event #18209, run #363899 on slot 1,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    86   2    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                    87   0    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                    88   3    INFO   ===>>>  done processing event #18212, run #363899 on slot 3,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  start processing event #18216, run #363899 on slot 3,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    89   1    INFO   ===>>>  done processing event #18213, run #363899 on slot 1,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    90   2    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   2    INFO   ===>>>  start processing event #18218, run #363899 on slot 2,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   1    INFO   ===>>>  start processing event #18212, run #363899 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   2    INFO   ===>>>  done processing event #18209, run #363899 on slot 2,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   2    INFO   ===>>>  start processing event #18213, run #363899 on slot 2,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   3    INFO   ===>>>  done processing event #18210, run #363899 on slot 3,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   3    INFO   ===>>>  start processing event #18214, run #363899 on slot 3,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   1    INFO   ===>>>  done processing event #18212, run #363899 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   0    INFO   ===>>>  done processing event #18211, run #363899 on slot 0,  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   1    INFO   ===>>>  start processing event #18216, run #363899 on slot 1,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   2    INFO   ===>>>  done processing event #18213, run #363899 on slot 2,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   3    INFO   ===>>>  done processing event #18214, run #363899 on slot 3,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   2    INFO   ===>>>  start processing event #18217, run #363899 on slot 2,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   3    INFO   ===>>>  start processing event #18218, run #363899 on slot 3,  91 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    91   0    INFO   ===>>>  done processing event #18215, run #363899 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  start processing event #18219, run #363899 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  done processing event #18216, run #363899 on slot 3,  93 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  start processing event #18220, run #363899 on slot 3,  93 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    93   1    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                    94   2    INFO   ===>>>  done processing event #18218, run #363899 on slot 2,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    98   2    INFO   ===>>>  start processing event #18222, run #363899 on slot 2,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   1    INFO   ===>>>  done processing event #18216, run #363899 on slot 1,  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   1    INFO   ===>>>  start processing event #18220, run #363899 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   2    INFO   ===>>>  done processing event #18217, run #363899 on slot 2,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   2    INFO   ===>>>  start processing event #18221, run #363899 on slot 2,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   3    INFO   ===>>>  done processing event #18218, run #363899 on slot 3,  95 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  done processing event #18219, run #363899 on slot 0,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   0    INFO   ===>>>  start processing event #18223, run #363899 on slot 0,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  done processing event #18220, run #363899 on slot 3,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    97   1    INFO   ===>>>  done processing event #18221, run #363899 on slot 1,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    98   2    INFO   ===>>>  done processing event #18222, run #363899 on slot 2,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   0    INFO   ===>>>  done processing event #18223, run #363899 on slot 0,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   0    INFO ---> Loop Finished (seconds): 0.821119
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #18222, run #363899 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  start processing event #18223, run #363899 on slot 3,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  done processing event #18220, run #363899 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   2    INFO   ===>>>  done processing event #18221, run #363899 on slot 2,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #18223, run #363899 on slot 3,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  done processing event #18222, run #363899 on slot 0,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO ---> Loop Finished (seconds): 1.93978
 /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...
@@ -1255,7 +1258,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.50 ))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
@@ -1267,10 +1270,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.06 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.39 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.88 ))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_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.88 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1280,9 +1283,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  300 [ms] Ave/Min/Max=  150(+-  150)/    0/  300 [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.25  [s]                                             #=  1
+cObjR_ALL                                           INFO Time User   : Tot=  290 [ms] Ave/Min/Max=  145(+-  135)/   10/  280 [ms] #=  2
+cObj_ALL                                            INFO Time User   : Tot=  320 [ms] Ave/Min/Max=  160(+-  140)/   20/  300 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 2.81  [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 fa85dc1e422a..6b3dceaa3d35 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:11:58 CET 2019
+Wed Jun  3 16:20:37 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:12:04 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:20:46 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,9 +68,10 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -89,7 +90,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 863 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2586 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -181,7 +182,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -190,7 +191,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.44S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24340Kb 	 Time = 0.7S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +202,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -213,9 +214,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -250,7 +251,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.13S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.17S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -305,11 +306,9 @@ 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 3915 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -362,12 +361,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -398,7 +397,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileMuR...   INFO Initializing TileMuRcvContByteStreamTool
@@ -614,23 +613,23 @@ Finalize: compared 10 dumps
 IncidentProcAlg2     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.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))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.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     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.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.44 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.18 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.20 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.18 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.17 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.15 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.16 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.16 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.16 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.18 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.15 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.16 ))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.12 ))s
+IOVDbSvc             INFO  bytes in ((      2.02 ))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.05 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.39 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.30 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     1.72 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileMuR...   INFO Finalizing TileMuRcvContByteStreamTool successfuly
@@ -639,18 +638,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  280 [ms] Ave/Min/Max=  140(+-  140)/    0/  280 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  310 [ms] Ave/Min/Max= 23.8(+-   77)/    0/  290 [ms] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 3.13  [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=  290 [ms] Ave/Min/Max= 22.3(+- 71.7)/    0/  270 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 3.53  [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"
-Fri Nov 29 11:12:10 CET 2019
+Wed Jun  3 16:20:55 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -659,9 +658,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileMuRcvContByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -681,14 +680,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:12:16 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:21:02 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -696,9 +695,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -719,9 +719,10 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -740,7 +741,7 @@ IOVDbSvc                                            INFO Added taginfo remove fo
 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 800 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2586 CLIDRegistry entries for module ALL
 ClassIDSvc                                          INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
@@ -832,7 +833,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -841,7 +842,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.53S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.71S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -852,7 +853,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -864,9 +865,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -901,7 +902,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.14S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.18S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -912,7 +913,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2a (2018) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 5
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4180 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4295 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
@@ -971,8 +972,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -981,7 +984,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1026,12 +1029,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1042,208 +1045,208 @@ AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start process
 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  <<<===
 AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
-ClassIDSvc                                 1   1    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
-ClassIDSvc                                 1   1    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileL2Builder      1   1    INFO TileL2Builder initialization completed
-ToolSvc.TileMuRcvContByteStreamTool        1   1    INFO Initializing TileMuRcvContByteStreamTool
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #18124, run #363899 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #18128, run #363899 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  start processing event #18129, run #363899 on slot 1,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  done processing event #18127, run #363899 on slot 3,  4 events processed so far  <<<===
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
+ToolSvc.TileMuRcvContByteStreamTool        0   0    INFO Initializing TileMuRcvContByteStreamTool
+AthenaHiveEventLoopMgr                     0   0    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                     3   3    INFO   ===>>>  done processing event #18127, run #363899 on slot 3,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  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  <<<===
 AthenaHiveEventLoopMgr                     7   3    INFO   ===>>>  start processing event #18131, run #363899 on slot 3,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     4   0    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                     5   1    INFO   ===>>>  done processing event #18129, run #363899 on slot 1,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #18132, run #363899 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  start processing event #18133, run #363899 on slot 1,  6 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     6   2    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                     7   3    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                     8   0    INFO   ===>>>  done processing event #18132, 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                     9   1    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                    10   2    INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    11   3    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                    12   0    INFO   ===>>>  done processing event #18136, 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                    11   0    INFO   ===>>>  done processing event #18135, run #363899 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   3    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                    13   1    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                    14   2    INFO   ===>>>  done processing event #18138, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    15   3    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                    16   0    INFO   ===>>>  done processing event #18140, run #363899 on slot 0,  17 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                    15   0    INFO   ===>>>  done processing event #18139, run #363899 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   3    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                    17   1    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                    18   2    INFO   ===>>>  done processing event #18142, run #363899 on slot 2,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    19   3    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                    20   0    INFO   ===>>>  done processing event #18144, 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                    19   0    INFO   ===>>>  done processing event #18143, run #363899 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   3    INFO   ===>>>  done processing event #18144, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18148, run #363899 on slot 3,  21 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    21   1    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                    22   2    INFO   ===>>>  done processing event #18146, run #363899 on slot 2,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    23   3    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                    24   0    INFO   ===>>>  done processing event #18148, run #363899 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  start processing event #18149, run #363899 on slot 1,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   2    INFO   ===>>>  start processing event #18150, run #363899 on slot 2,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  done processing event #18147, run #363899 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   3    INFO   ===>>>  done processing event #18148, run #363899 on slot 3,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  start processing event #18151, run #363899 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  start processing event #18152, run #363899 on slot 3,  25 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    25   1    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                    26   2    INFO   ===>>>  done processing event #18150, run #363899 on slot 2,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    27   3    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                    28   0    INFO   ===>>>  done processing event #18152, run #363899 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   1    INFO   ===>>>  start processing event #18153, run #363899 on slot 1,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  start processing event #18154, run #363899 on slot 2,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  done processing event #18151, run #363899 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  done processing event #18152, run #363899 on slot 3,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  start processing event #18155, run #363899 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   3    INFO   ===>>>  start processing event #18156, run #363899 on slot 3,  29 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    29   1    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                    30   2    INFO   ===>>>  done processing event #18154, run #363899 on slot 2,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   3    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                    32   0    INFO   ===>>>  done processing event #18156, run #363899 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  start processing event #18157, run #363899 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   2    INFO   ===>>>  start processing event #18158, run #363899 on slot 2,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  done processing event #18155, run #363899 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   3    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                    33   1    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                    34   2    INFO   ===>>>  done processing event #18158, run #363899 on slot 2,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    35   3    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                    36   0    INFO   ===>>>  done processing event #18160, 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                    35   0    INFO   ===>>>  done processing event #18159, run #363899 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    36   3    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                    37   1    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                    38   2    INFO   ===>>>  done processing event #18162, run #363899 on slot 2,  39 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    39   3    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                    40   0    INFO   ===>>>  done processing event #18164, 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                    39   0    INFO   ===>>>  done processing event #18163, run #363899 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    40   3    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                    41   1    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                    42   2    INFO   ===>>>  done processing event #18166, run #363899 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    43   3    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                    44   0    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                    43   0    INFO   ===>>>  done processing event #18167, run #363899 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   3    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                    45   1    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                    46   2    INFO   ===>>>  done processing event #18170, run #363899 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    47   3    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                    48   0    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                    47   0    INFO   ===>>>  done processing event #18171, run #363899 on slot 0,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   3    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                    49   1    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                    50   2    INFO   ===>>>  done processing event #18174, run #363899 on slot 2,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    51   3    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                    52   0    INFO   ===>>>  done processing event #18176, run #363899 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    53   1    INFO   ===>>>  done processing event #18177, run #363899 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   0    INFO   ===>>>  done processing event #18175, run #363899 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #18177, run #363899 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  start processing event #18178, run #363899 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   2    INFO   ===>>>  start processing event #18179, run #363899 on slot 2,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   3    INFO   ===>>>  done processing event #18176, run #363899 on slot 3,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  done processing event #18177, run #363899 on slot 0,  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                    54   2    INFO   ===>>>  done processing event #18178, run #363899 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    55   3    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                    57   3    INFO   ===>>>  start processing event #18181, run #363899 on slot 3,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  done processing event #18178, run #363899 on slot 1,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   2    INFO   ===>>>  done processing event #18179, run #363899 on slot 2,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  start processing event #18182, run #363899 on slot 1,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   2    INFO   ===>>>  start processing event #18183, run #363899 on slot 2,  56 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    56   0    INFO   ===>>>  done processing event #18180, run #363899 on slot 0,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    57   1    INFO   ===>>>  done processing event #18181, run #363899 on slot 1,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   3    INFO   ===>>>  done processing event #18181, run #363899 on slot 3,  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                    58   2    INFO   ===>>>  done processing event #18182, run #363899 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    59   3    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                    61   3    INFO   ===>>>  start processing event #18185, run #363899 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  done processing event #18182, run #363899 on slot 1,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   2    INFO   ===>>>  done processing event #18183, run #363899 on slot 2,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  start processing event #18186, run #363899 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   2    INFO   ===>>>  start processing event #18187, run #363899 on slot 2,  60 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    60   0    INFO   ===>>>  done processing event #18184, run #363899 on slot 0,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    61   1    INFO   ===>>>  done processing event #18185, run #363899 on slot 1,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   3    INFO   ===>>>  done processing event #18185, run #363899 on slot 3,  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                    62   2    INFO   ===>>>  done processing event #18186, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    63   3    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                    65   3    INFO   ===>>>  start processing event #18189, run #363899 on slot 3,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  done processing event #18186, run #363899 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   2    INFO   ===>>>  done processing event #18187, run #363899 on slot 2,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  start processing event #18190, run #363899 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  start processing event #18191, run #363899 on slot 2,  64 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    64   0    INFO   ===>>>  done processing event #18188, run #363899 on slot 0,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    65   1    INFO   ===>>>  done processing event #18189, run #363899 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   3    INFO   ===>>>  done processing event #18189, run #363899 on slot 3,  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                    66   2    INFO   ===>>>  done processing event #18190, run #363899 on slot 2,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    67   3    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                    69   3    INFO   ===>>>  start processing event #18193, run #363899 on slot 3,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  done processing event #18190, run #363899 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  done processing event #18191, run #363899 on slot 2,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  start processing event #18194, run #363899 on slot 1,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   2    INFO   ===>>>  start processing event #18195, run #363899 on slot 2,  68 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    68   0    INFO   ===>>>  done processing event #18192, run #363899 on slot 0,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    69   1    INFO   ===>>>  done processing event #18193, run #363899 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   3    INFO   ===>>>  done processing event #18193, run #363899 on slot 3,  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                    70   2    INFO   ===>>>  done processing event #18194, run #363899 on slot 2,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    71   3    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                    73   3    INFO   ===>>>  start processing event #18197, run #363899 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  done processing event #18194, run #363899 on slot 1,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   2    INFO   ===>>>  done processing event #18195, run #363899 on slot 2,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   1    INFO   ===>>>  start processing event #18198, run #363899 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  start processing event #18199, run #363899 on slot 2,  72 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    72   0    INFO   ===>>>  done processing event #18196, run #363899 on slot 0,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    73   1    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                    74   2    INFO   ===>>>  done processing event #18198, run #363899 on slot 2,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    75   3    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                    73   3    INFO   ===>>>  done processing event #18197, run #363899 on slot 3,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   1    INFO   ===>>>  done processing event #18198, run #363899 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   0    INFO   ===>>>  start processing event #18200, run #363899 on slot 0,  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   3    INFO   ===>>>  start processing event #18202, run #363899 on slot 3,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  done processing event #18199, run #363899 on slot 2,  76 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    76   0    INFO   ===>>>  done processing event #18200, run #363899 on slot 0,  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   2    INFO   ===>>>  start processing event #18204, run #363899 on slot 2,  77 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    77   1    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                    78   2    INFO   ===>>>  done processing event #18202, run #363899 on slot 2,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    79   3    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                    80   0    INFO   ===>>>  done processing event #18204, run #363899 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   3    INFO   ===>>>  done processing event #18202, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18206, run #363899 on slot 3,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   0    INFO   ===>>>  done processing event #18203, run #363899 on slot 0,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   2    INFO   ===>>>  done processing event #18204, run #363899 on slot 2,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  start processing event #18207, run #363899 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   2    INFO   ===>>>  start processing event #18208, run #363899 on slot 2,  81 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    81   1    INFO   ===>>>  done processing event #18205, run #363899 on slot 1,  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                    82   2    INFO   ===>>>  done processing event #18206, run #363899 on slot 2,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    83   3    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                    84   0    INFO   ===>>>  done processing event #18208, run #363899 on slot 0,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   3    INFO   ===>>>  done processing event #18206, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18210, run #363899 on slot 3,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  done processing event #18207, run #363899 on slot 0,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   2    INFO   ===>>>  done processing event #18208, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18212, run #363899 on slot 2,  85 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    85   1    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                    86   2    INFO   ===>>>  done processing event #18210, run #363899 on slot 2,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    87   3    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                    88   0    INFO   ===>>>  done processing event #18212, run #363899 on slot 0,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   3    INFO   ===>>>  done processing event #18210, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18214, run #363899 on slot 3,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   0    INFO   ===>>>  done processing event #18211, run #363899 on slot 0,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   2    INFO   ===>>>  done processing event #18212, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18216, run #363899 on slot 2,  89 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    89   1    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                    90   2    INFO   ===>>>  done processing event #18214, run #363899 on slot 2,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    91   3    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                    92   0    INFO   ===>>>  done processing event #18216, run #363899 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   3    INFO   ===>>>  done processing event #18214, run #363899 on slot 3,  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                    91   0    INFO   ===>>>  done processing event #18215, run #363899 on slot 0,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   2    INFO   ===>>>  done processing event #18216, run #363899 on slot 2,  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                    93   1    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                    94   2    INFO   ===>>>  done processing event #18218, run #363899 on slot 2,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    95   3    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                    96   0    INFO   ===>>>  done processing event #18220, run #363899 on slot 0,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   3    INFO   ===>>>  done processing event #18218, run #363899 on slot 3,  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   3    INFO   ===>>>  start processing event #18222, run #363899 on slot 3,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  done processing event #18219, run #363899 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   2    INFO   ===>>>  done processing event #18220, run #363899 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   0    INFO   ===>>>  start processing event #18223, run #363899 on slot 0,  97 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    97   1    INFO   ===>>>  done processing event #18221, run #363899 on slot 1,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    98   2    INFO   ===>>>  done processing event #18222, run #363899 on slot 2,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #18223, run #363899 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 0.947698
+AthenaHiveEventLoopMgr                    98   3    INFO   ===>>>  done processing event #18222, run #363899 on slot 3,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   0    INFO   ===>>>  done processing event #18223, run #363899 on slot 0,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   0    INFO ---> Loop Finished (seconds): 1.38422
 /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...
@@ -1260,7 +1263,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.23 ))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
@@ -1272,10 +1275,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.06 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.13 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.36 ))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_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.36 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1286,9 +1289,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  300 [ms] Ave/Min/Max=  150(+-  150)/    0/  300 [ms] #=  2
-cObj_ALL                                            INFO Time User   : Tot=  340 [ms] Ave/Min/Max=  170(+-  150)/   20/  320 [ms] #=  2
-ChronoStatSvc                                       INFO Time User   : Tot= 2.45  [s]                                             #=  1
+cObjR_ALL                                           INFO Time User   : Tot=  290 [ms] Ave/Min/Max=  145(+-  145)/    0/  290 [ms] #=  2
+cObj_ALL                                            INFO Time User   : Tot=  320 [ms] Ave/Min/Max=  160(+-  150)/   10/  310 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 2.99  [s]                                             #=  1
 *****Chrono*****                                    INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                            INFO  Service finalized successfully 
 ApplicationMgr                                      INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
index acf21f976619..75d978955253 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:09:56 CET 2019
+Wed Jun  3 16:11:56 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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,15 +29,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:10:02 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:12:05 2020
 ====================================================================================================================================
 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 7151 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,9 +44,10 @@ 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host zeus [ATLF 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
@@ -68,10 +68,11 @@ IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddre...   INFO initialized 
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
+ClassIDSvc           INFO  getRegistryEntries: read 2725 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
-ClassIDSvc           INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 863 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -181,7 +182,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
 EMECConstruction     INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction     INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc           INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -190,7 +191,7 @@ EMECConstruction     INFO multi-layered version of absorbers activated, paramete
 EMECConstruction     INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction     INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.51S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.71S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +202,7 @@ TileDddbManager      INFO n_tilb = 21
 TileDddbManager      INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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
@@ -213,9 +214,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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.
@@ -250,7 +251,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.19S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.2S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader       INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -305,11 +306,9 @@ 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 3915 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
-HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -362,12 +361,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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/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 
@@ -398,7 +397,7 @@ TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 2265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2266 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileRaw...   INFO Initializing TileRawChannelContByteStreamTool
@@ -614,23 +613,23 @@ Finalize: compared 20 dumps
 IncidentProcAlg2     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.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.04 ))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/641504 ((     0.05 ))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.03 ))s
-IOVDbSvc             INFO  bytes in ((      0.46 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.60 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.16 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.13 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.13 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.10 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.12 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.12 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.12 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.19 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.63 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.72 ))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.50 ))s
+IOVDbSvc             INFO  bytes in ((      3.56 ))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.07 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.39 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.10 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     2.47 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileRaw...   INFO Finalizing TileRawChannelContByteStreamTool successfuly
@@ -639,18 +638,18 @@ ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  290 [ms] Ave/Min/Max=  145(+-  145)/    0/  290 [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= 9.95  [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=  290 [ms] Ave/Min/Max= 22.3(+- 71.7)/    0/  270 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 9.64  [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"
-Fri Nov 29 11:10:15 CET 2019
+Wed Jun  3 16:12:29 PDT 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.9] [x86_64-centos7-gcc8-opt] [tilecal-12bit/82699bf159] -- built on [2019-11-29T1101]
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
 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
@@ -659,9 +658,9 @@ Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileRawChannelContByteStreamCnv_test.py"
 Py:Athena            INFO SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5635 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5530 configurables from 19 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.9
+EventInfoMgtInit: Got release version  Athena-22.0.15
 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
@@ -681,14 +680,14 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:10:21 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on zeus on Wed Jun  3 16:12:36 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                      INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
-ClassIDSvc                                          INFO  getRegistryEntries: read 7790 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -696,9 +695,10 @@ AthenaPoolCnvSvc                                    INFO Initializing AthenaPool
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                        INFO Total of 10 servers found for host pcpraha5.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas1.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas2.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://frontier-atlas3.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://frontiercache.nersc.gov:3128)(proxyurl=http://atlsquid.slac.stanford.edu:3128)(proxyurl=http://atlasbpfrontier.fnal.gov:3127)(proxyurl=http://atlasbpfrontier.cern.ch:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                        INFO Total of 2 servers found for host zeus [ATLF 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
@@ -719,10 +719,11 @@ IOVDbSvc                                            INFO Service IOVDbSvc initia
 ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ByteStreamAddressProviderSvc                        INFO initialized 
 ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ClassIDSvc                                          INFO  getRegistryEntries: read 2725 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
-ClassIDSvc                                          INFO  getRegistryEntries: read 3291 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 800 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
 IOVSvc                                              INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool                                   INFO IOVRanges will be checked at every Event
 IOVDbSvc                                            INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -832,7 +833,7 @@ BarrelConstruction                                  INFO   Use sagging in geomet
 EMECConstruction                                    INFO multi-layered version of absorbers activated, parameter value is 1
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Pos::OuterWheel
-ClassIDSvc                                          INFO  getRegistryEntries: read 2901 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a TileTBID helper object in the detector store
 TileTBID                                            INFO initialize_from_dictionary 
 AtlasDetectorID                                     INFO initialize_from_dictionary - OK
@@ -841,7 +842,7 @@ EMECConstruction                                    INFO multi-layered version o
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::InnerWheel
 EMECConstruction                                    INFO activating LAr::EMEC::Neg::OuterWheel
 EndcapDMConstruction                                INFO Start building EC electronics geometry
-GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25368Kb 	 Time = 0.45S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25364Kb 	 Time = 0.73S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -852,7 +853,7 @@ TileDddbManager                                     INFO n_tilb = 21
 TileDddbManager                                     INFO n_tileSwitches = 1
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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
@@ -864,9 +865,9 @@ CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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.
@@ -901,7 +902,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.11S
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.19S
 ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                      INFO Changing TTL1 calib from 4.1 to 6.9
 TileInfoLoader                                      INFO Changing TTL1 noise sigma from 2.5 to 2.8
@@ -912,7 +913,7 @@ TileCablingSvc                                      INFO RUN2 ATLAS geometry fla
 TileCablingSvc                                      INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc                                      INFO Setting Cabling type to 4
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                     0    INFO  getRegistryEntries: read 4180 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4295 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
@@ -973,8 +974,10 @@ PrecedenceSvc                                  0    INFO PrecedenceSvc initializ
 AvalancheSchedulerSvc                          0    INFO Concurrency level information:
 AvalancheSchedulerSvc                          0    INFO  o Number of events in flight: 4
 AvalancheSchedulerSvc                          0    INFO  o TBB thread pool size:  'ThreadPoolSize':4
-HistogramPersistencySvc                        0 WARNING Histograms saving not required.
-EventSelector                                  0    INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+AvalancheSchedulerSvc                          0    INFO Task scheduling settings:
+AvalancheSchedulerSvc                          0    INFO  o Avalanche generation mode: disabled
+AvalancheSchedulerSvc                          0    INFO  o Preemptive scheduling of CPU-blocking tasks: disabled
+AvalancheSchedulerSvc                          0    INFO  o Scheduling of condition tasks: disabled
 ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
 ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc                             0    INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -983,7 +986,7 @@ ROBDataProviderSvc                             0    INFO  ---> Filter out Sub De
 EventSelector                                  0    INFO reinitialization...
 AthenaHiveEventLoopMgr                         0    INFO Setup EventSelector service EventSelector
 ApplicationMgr                                 0    INFO Application Manager Initialized successfully
-PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 4
+PoolSvc                                        0    INFO Enabled implicit multithreading in ROOT via PersistencySvc to: 3
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader                                0    INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -1028,12 +1031,12 @@ CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating
 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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                            0   0    INFO Reading file /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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-11-28T2131/Athena/22.0.9/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-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 
@@ -1041,7 +1044,7 @@ Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
 RootDatabase.open                          0   0    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
 AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  start processing event #1129572, run #204073 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 470 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 471 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
 ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
@@ -1049,203 +1052,203 @@ ToolSvc.TileRawChannelContByteStreamTool   0   0    INFO Initializing TileRawCha
 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                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     4   1    INFO   ===>>>  start processing event #1130272, run #204073 on slot 1,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     0   0    INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  start processing event #1130272, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  start processing event #1131269, run #204073 on slot 1,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  done processing event #1131212, run #204073 on slot 2,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #1131269, run #204073 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     6   2    INFO   ===>>>  start processing event #1130716, run #204073 on slot 2,  3 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  done processing event #1131086, run #204073 on slot 3,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     4   1    INFO   ===>>>  done processing event #1130272, run #204073 on slot 1,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     7   1    INFO   ===>>>  start processing event #1132019, run #204073 on slot 1,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  start processing event #1132092, run #204073 on slot 3,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #1131269, run #204073 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   2    INFO   ===>>>  start processing event #1130716, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   3    INFO   ===>>>  start processing event #1132019, run #204073 on slot 3,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   1    INFO   ===>>>  done processing event #1131269, run #204073 on slot 1,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   0    INFO   ===>>>  done processing event #1130272, run #204073 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #1132092, run #204073 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  start processing event #1130238, run #204073 on slot 1,  6 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     6   2    INFO   ===>>>  done processing event #1130716, run #204073 on slot 2,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #1130238, run #204073 on slot 0,  7 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    10   2    INFO   ===>>>  start processing event #1134553, run #204073 on slot 2,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     7   1    INFO   ===>>>  done processing event #1132019, run #204073 on slot 1,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    11   1    INFO   ===>>>  start processing event #1130999, run #204073 on slot 1,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  done processing event #1132092, run #204073 on slot 3,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    12   3    INFO   ===>>>  start processing event #1133461, run #204073 on slot 3,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  done processing event #1130238, run #204073 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    10   2    INFO   ===>>>  done processing event #1134553, run #204073 on slot 2,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #1131152, run #204073 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    14   2    INFO   ===>>>  start processing event #1130142, run #204073 on slot 2,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    11   1    INFO   ===>>>  done processing event #1130999, run #204073 on slot 1,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  start processing event #1132770, run #204073 on slot 1,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    12   3    INFO   ===>>>  done processing event #1133461, run #204073 on slot 3,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #1131152, run #204073 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   3    INFO   ===>>>  done processing event #1132019, run #204073 on slot 3,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   3    INFO   ===>>>  start processing event #1130999, run #204073 on slot 3,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  done processing event #1132092, run #204073 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   1    INFO   ===>>>  done processing event #1130238, run #204073 on slot 1,  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   1    INFO   ===>>>  start processing event #1131152, run #204073 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   3    INFO   ===>>>  done processing event #1130999, run #204073 on slot 3,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   2    INFO   ===>>>  done processing event #1134553, run #204073 on slot 2,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   2    INFO   ===>>>  start processing event #1130142, run #204073 on slot 2,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   3    INFO   ===>>>  start processing event #1132770, run #204073 on slot 3,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   1    INFO   ===>>>  done processing event #1131152, run #204073 on slot 1,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #1133461, run #204073 on slot 0,  14 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  start processing event #1132365, run #204073 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    17   3    INFO   ===>>>  start processing event #1136791, run #204073 on slot 3,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   1    INFO   ===>>>  start processing event #1136791, run #204073 on slot 1,  14 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    14   2    INFO   ===>>>  done processing event #1130142, run #204073 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  start processing event #1133781, run #204073 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  done processing event #1132770, run #204073 on slot 1,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   3    INFO   ===>>>  done processing event #1132770, run #204073 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  start processing event #1133781, run #204073 on slot 2,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   3    INFO   ===>>>  start processing event #1132067, run #204073 on slot 3,  16 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    16   0    INFO   ===>>>  done processing event #1132365, run #204073 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  start processing event #1132067, run #204073 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    20   1    INFO   ===>>>  start processing event #1138637, run #204073 on slot 1,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    17   3    INFO   ===>>>  done processing event #1136791, run #204073 on slot 3,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  done processing event #1133781, run #204073 on slot 2,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    21   2    INFO   ===>>>  start processing event #1139495, run #204073 on slot 2,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    22   3    INFO   ===>>>  start processing event #1140193, run #204073 on slot 3,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    19   0    INFO   ===>>>  done processing event #1132067, run #204073 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    20   1    INFO   ===>>>  done processing event #1138637, run #204073 on slot 1,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  start processing event #1142953, run #204073 on slot 0,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  start processing event #1139127, run #204073 on slot 1,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    21   2    INFO   ===>>>  done processing event #1139495, run #204073 on slot 2,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    22   3    INFO   ===>>>  done processing event #1140193, run #204073 on slot 3,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  start processing event #1141272, run #204073 on slot 2,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   1    INFO   ===>>>  done processing event #1136791, run #204073 on slot 1,  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   1    INFO   ===>>>  start processing event #1139495, run #204073 on slot 1,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   3    INFO   ===>>>  done processing event #1132067, run #204073 on slot 3,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  done processing event #1133781, run #204073 on slot 2,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   2    INFO   ===>>>  start processing event #1140193, run #204073 on slot 2,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   3    INFO   ===>>>  start processing event #1142953, run #204073 on slot 3,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   0    INFO   ===>>>  done processing event #1138637, run #204073 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   0    INFO   ===>>>  start processing event #1139127, run #204073 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   1    INFO   ===>>>  done processing event #1139495, run #204073 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  start processing event #1141272, run #204073 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   3    INFO   ===>>>  done processing event #1142953, run #204073 on slot 3,  23 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    26   3    INFO   ===>>>  start processing event #1137117, run #204073 on slot 3,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    23   0    INFO   ===>>>  done processing event #1142953, run #204073 on slot 0,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    24   1    INFO   ===>>>  done processing event #1139127, run #204073 on slot 1,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  start processing event #1139599, run #204073 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   2    INFO   ===>>>  done processing event #1140193, run #204073 on slot 2,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   2    INFO   ===>>>  start processing event #1139599, run #204073 on slot 2,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  done processing event #1141272, run #204073 on slot 1,  25 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    28   1    INFO   ===>>>  start processing event #1140314, run #204073 on slot 1,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  done processing event #1141272, run #204073 on slot 2,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   0    INFO   ===>>>  done processing event #1139127, run #204073 on slot 0,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  start processing event #1133685, run #204073 on slot 0,  26 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    26   3    INFO   ===>>>  done processing event #1137117, run #204073 on slot 3,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    29   2    INFO   ===>>>  start processing event #1133685, run #204073 on slot 2,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    30   3    INFO   ===>>>  start processing event #1143279, run #204073 on slot 3,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  done processing event #1139599, run #204073 on slot 0,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    28   1    INFO   ===>>>  done processing event #1140314, run #204073 on slot 1,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    INFO   ===>>>  start processing event #1137563, run #204073 on slot 0,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    32   1    INFO   ===>>>  start processing event #1139927, run #204073 on slot 1,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    29   2    INFO   ===>>>  done processing event #1133685, run #204073 on slot 2,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  start processing event #1141197, run #204073 on slot 2,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    30   3    INFO   ===>>>  done processing event #1143279, run #204073 on slot 3,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    31   0    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                    27   2    INFO   ===>>>  done processing event #1139599, run #204073 on slot 2,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  start processing event #1143279, run #204073 on slot 2,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   3    INFO   ===>>>  start processing event #1137563, run #204073 on slot 3,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  done processing event #1133685, run #204073 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   1    INFO   ===>>>  done processing event #1140314, run #204073 on slot 1,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   0    INFO   ===>>>  start processing event #1139927, run #204073 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  start processing event #1141197, run #204073 on slot 1,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   2    INFO   ===>>>  done processing event #1143279, run #204073 on slot 2,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   3    INFO   ===>>>  done processing event #1137563, run #204073 on slot 3,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   2    INFO   ===>>>  start processing event #1140039, run #204073 on slot 2,  32 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    35   3    INFO   ===>>>  start processing event #1142531, run #204073 on slot 3,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    32   1    INFO   ===>>>  done processing event #1139927, run #204073 on slot 1,  33 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    36   1    INFO   ===>>>  start processing event #1139475, run #204073 on slot 1,  33 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    33   2    INFO   ===>>>  done processing event #1141197, run #204073 on slot 2,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    34   0    INFO   ===>>>  done processing event #1140039, run #204073 on slot 0,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    37   0    INFO   ===>>>  start processing event #1139958, run #204073 on slot 0,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   0    INFO   ===>>>  done processing event #1139927, run #204073 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    36   0    INFO   ===>>>  start processing event #1139475, run #204073 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  done processing event #1141197, run #204073 on slot 1,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    37   1    INFO   ===>>>  start processing event #1139958, run #204073 on slot 1,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   2    INFO   ===>>>  done processing event #1140039, run #204073 on slot 2,  35 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    38   2    INFO   ===>>>  start processing event #1143765, run #204073 on slot 2,  35 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    35   3    INFO   ===>>>  done processing event #1142531, run #204073 on slot 3,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    36   1    INFO   ===>>>  done processing event #1139475, run #204073 on slot 1,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    39   1    INFO   ===>>>  start processing event #1143097, run #204073 on slot 1,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    36   0    INFO   ===>>>  done processing event #1139475, run #204073 on slot 0,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   0    INFO   ===>>>  start processing event #1143097, run #204073 on slot 0,  37 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    40   3    INFO   ===>>>  start processing event #1134147, run #204073 on slot 3,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    37   0    INFO   ===>>>  done processing event #1139958, run #204073 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    41   0    INFO   ===>>>  start processing event #1137156, run #204073 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    38   2    INFO   ===>>>  done processing event #1143765, run #204073 on slot 2,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    38   2    INFO   ===>>>  done processing event #1143765, run #204073 on slot 2,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    37   1    INFO   ===>>>  done processing event #1139958, run #204073 on slot 1,  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                    39   1    INFO   ===>>>  done processing event #1143097, run #204073 on slot 1,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   0    INFO   ===>>>  done processing event #1143097, run #204073 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   0    INFO   ===>>>  start processing event #1137842, run #204073 on slot 0,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    40   3    INFO   ===>>>  done processing event #1134147, run #204073 on slot 3,  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                    41   0    INFO   ===>>>  done processing event #1137156, run #204073 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   1    INFO   ===>>>  done processing event #1137156, run #204073 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  start processing event #1143410, run #204073 on slot 1,  42 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    42   2    INFO   ===>>>  done processing event #1136377, run #204073 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    45   0    INFO   ===>>>  start processing event #1143410, run #204073 on slot 0,  43 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    46   2    INFO   ===>>>  start processing event #1144170, run #204073 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    43   1    INFO   ===>>>  done processing event #1137842, run #204073 on slot 1,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    47   1    INFO   ===>>>  start processing event #1145987, run #204073 on slot 1,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    44   3    INFO   ===>>>  done processing event #1141705, run #204073 on slot 3,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    48   3    INFO   ===>>>  start processing event #1145633, run #204073 on slot 3,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    45   0    INFO   ===>>>  done processing event #1143410, run #204073 on slot 0,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    49   0    INFO   ===>>>  start processing event #1135005, run #204073 on slot 0,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   3    INFO   ===>>>  done processing event #1141705, run #204073 on slot 3,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   3    INFO   ===>>>  start processing event #1145987, run #204073 on slot 3,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   0    INFO   ===>>>  done processing event #1137842, run #204073 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   1    INFO   ===>>>  done processing event #1143410, run #204073 on slot 1,  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   1    INFO   ===>>>  start processing event #1135005, run #204073 on slot 1,  46 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    46   2    INFO   ===>>>  done processing event #1144170, run #204073 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    47   1    INFO   ===>>>  done processing event #1145987, run #204073 on slot 1,  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   2    INFO   ===>>>  start processing event #1144646, run #204073 on slot 2,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    48   3    INFO   ===>>>  done processing event #1145633, run #204073 on slot 3,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    49   0    INFO   ===>>>  done processing event #1135005, run #204073 on slot 0,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    52   0    INFO   ===>>>  start processing event #1145027, run #204073 on slot 0,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    53   3    INFO   ===>>>  start processing event #1144112, run #204073 on slot 3,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    50   1    INFO   ===>>>  done processing event #1142167, run #204073 on slot 1,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  start processing event #1138485, run #204073 on slot 1,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    51   2    INFO   ===>>>  done processing event #1144646, run #204073 on slot 2,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    52   0    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   2    INFO   ===>>>  start processing event #1139498, run #204073 on slot 2,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    53   3    INFO   ===>>>  done processing event #1144112, run #204073 on slot 3,  54 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  done processing event #1138485, run #204073 on slot 1,  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   3    INFO   ===>>>  start processing event #1143799, run #204073 on slot 3,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    55   0    INFO   ===>>>  done processing event #1144565, run #204073 on slot 0,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    56   2    INFO   ===>>>  done processing event #1139498, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1149894, run #204073 on slot 2,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    57   1    INFO   ===>>>  done processing event #1136546, run #204073 on slot 1,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    58   3    INFO   ===>>>  done processing event #1143799, run #204073 on slot 3,  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                    59   0    INFO   ===>>>  done processing event #1142877, run #204073 on slot 0,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    60   2    INFO   ===>>>  done processing event #1149894, run #204073 on slot 2,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    63   0    INFO   ===>>>  start processing event #1148361, run #204073 on slot 0,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    64   2    INFO   ===>>>  start processing event #1148167, run #204073 on slot 2,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    61   1    INFO   ===>>>  done processing event #1145364, run #204073 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    62   3    INFO   ===>>>  done processing event #1143770, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1144808, run #204073 on slot 3,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    63   0    INFO   ===>>>  done processing event #1148361, run #204073 on slot 0,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    64   2    INFO   ===>>>  done processing event #1148167, run #204073 on slot 2,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    67   0    INFO   ===>>>  start processing event #1145832, run #204073 on slot 0,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    68   2    INFO   ===>>>  start processing event #1153100, run #204073 on slot 2,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    65   1    INFO   ===>>>  done processing event #1138948, run #204073 on slot 1,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    66   3    INFO   ===>>>  done processing event #1144808, run #204073 on slot 3,  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                    67   0    INFO   ===>>>  done processing event #1145832, run #204073 on slot 0,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    68   2    INFO   ===>>>  done processing event #1153100, run #204073 on slot 2,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    71   0    INFO   ===>>>  start processing event #1138350, run #204073 on slot 0,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    72   2    INFO   ===>>>  start processing event #1149424, run #204073 on slot 2,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    69   1    INFO   ===>>>  done processing event #1142524, run #204073 on slot 1,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    70   3    INFO   ===>>>  done processing event #1138294, run #204073 on slot 3,  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                    71   0    INFO   ===>>>  done processing event #1138350, run #204073 on slot 0,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    72   2    INFO   ===>>>  done processing event #1149424, run #204073 on slot 2,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    75   0    INFO   ===>>>  start processing event #1148416, run #204073 on slot 0,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    76   2    INFO   ===>>>  start processing event #1142753, run #204073 on slot 2,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    73   1    INFO   ===>>>  done processing event #1151102, run #204073 on slot 1,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    74   3    INFO   ===>>>  done processing event #1152242, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1151617, run #204073 on slot 3,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    75   0    INFO   ===>>>  done processing event #1148416, run #204073 on slot 0,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    76   2    INFO   ===>>>  done processing event #1142753, run #204073 on slot 2,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    79   0    INFO   ===>>>  start processing event #1149794, run #204073 on slot 0,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    80   2    INFO   ===>>>  start processing event #1152504, run #204073 on slot 2,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    77   1    INFO   ===>>>  done processing event #1149997, run #204073 on slot 1,  78 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    78   3    INFO   ===>>>  done processing event #1151617, run #204073 on slot 3,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    81   1    INFO   ===>>>  start processing event #1142485, run #204073 on slot 1,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    82   3    INFO   ===>>>  start processing event #1151364, run #204073 on slot 3,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    79   0    INFO   ===>>>  done processing event #1149794, run #204073 on slot 0,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    80   2    INFO   ===>>>  done processing event #1152504, run #204073 on slot 2,  81 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  start processing event #1143901, run #204073 on slot 0,  81 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    84   2    INFO   ===>>>  start processing event #1153979, run #204073 on slot 2,  81 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    81   1    INFO   ===>>>  done processing event #1142485, run #204073 on slot 1,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    82   3    INFO   ===>>>  done processing event #1151364, run #204073 on slot 3,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    85   1    INFO   ===>>>  start processing event #1150212, run #204073 on slot 1,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    86   3    INFO   ===>>>  start processing event #1152633, run #204073 on slot 3,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  done processing event #1143901, run #204073 on slot 0,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    84   2    INFO   ===>>>  done processing event #1153979, run #204073 on slot 2,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    87   0    INFO   ===>>>  start processing event #1155482, run #204073 on slot 0,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    88   2    INFO   ===>>>  start processing event #1150472, run #204073 on slot 2,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    85   1    INFO   ===>>>  done processing event #1150212, run #204073 on slot 1,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    89   1    INFO   ===>>>  start processing event #1140275, run #204073 on slot 1,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    86   3    INFO   ===>>>  done processing event #1152633, run #204073 on slot 3,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    87   0    INFO   ===>>>  done processing event #1155482, run #204073 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    90   0    INFO   ===>>>  start processing event #1145882, run #204073 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    91   3    INFO   ===>>>  start processing event #1151732, run #204073 on slot 3,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    88   2    INFO   ===>>>  done processing event #1150472, run #204073 on slot 2,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    89   1    INFO   ===>>>  done processing event #1140275, run #204073 on slot 1,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    92   1    INFO   ===>>>  start processing event #1137896, run #204073 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   2    INFO   ===>>>  start processing event #1142167, run #204073 on slot 2,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   3    INFO   ===>>>  done processing event #1145987, run #204073 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   3    INFO   ===>>>  start processing event #1144646, run #204073 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   1    INFO   ===>>>  done processing event #1135005, run #204073 on slot 1,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  start processing event #1145027, run #204073 on slot 1,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   0    INFO   ===>>>  done processing event #1145633, run #204073 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   2    INFO   ===>>>  done processing event #1142167, run #204073 on slot 2,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #1144112, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   2    INFO   ===>>>  start processing event #1138485, run #204073 on slot 2,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  done processing event #1145027, run #204073 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   1    INFO   ===>>>  start processing event #1144565, run #204073 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   3    INFO   ===>>>  done processing event #1144646, run #204073 on slot 3,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   3    INFO   ===>>>  start processing event #1139498, run #204073 on slot 3,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   2    INFO   ===>>>  done processing event #1138485, run #204073 on slot 2,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   2    INFO   ===>>>  start processing event #1136546, run #204073 on slot 2,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  done processing event #1144112, run #204073 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   0    INFO   ===>>>  start processing event #1143799, run #204073 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   3    INFO   ===>>>  done processing event #1139498, run #204073 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   3    INFO   ===>>>  start processing event #1142877, run #204073 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   1    INFO   ===>>>  done processing event #1144565, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   1    INFO   ===>>>  start processing event #1149894, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   0    INFO   ===>>>  done processing event #1143799, run #204073 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   2    INFO   ===>>>  done processing event #1136546, run #204073 on slot 2,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   0    INFO   ===>>>  start processing event #1145364, run #204073 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   2    INFO   ===>>>  start processing event #1143770, run #204073 on slot 2,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   3    INFO   ===>>>  done processing event #1142877, run #204073 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   3    INFO   ===>>>  start processing event #1148361, run #204073 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   1    INFO   ===>>>  done processing event #1149894, run #204073 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   1    INFO   ===>>>  start processing event #1148167, run #204073 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   0    INFO   ===>>>  done processing event #1145364, run #204073 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  start processing event #1138948, run #204073 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   2    INFO   ===>>>  done processing event #1143770, run #204073 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   2    INFO   ===>>>  start processing event #1144808, run #204073 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   1    INFO   ===>>>  done processing event #1148167, run #204073 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   3    INFO   ===>>>  done processing event #1148361, run #204073 on slot 3,  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                    66   2    INFO   ===>>>  done processing event #1144808, run #204073 on slot 2,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  done processing event #1138948, run #204073 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  start processing event #1142524, run #204073 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   2    INFO   ===>>>  start processing event #1138294, run #204073 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  done processing event #1153100, run #204073 on slot 3,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   1    INFO   ===>>>  done processing event #1145832, run #204073 on slot 1,  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   3    INFO   ===>>>  start processing event #1149424, run #204073 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   2    INFO   ===>>>  done processing event #1138294, run #204073 on slot 2,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  done processing event #1142524, run #204073 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   0    INFO   ===>>>  start processing event #1151102, run #204073 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   2    INFO   ===>>>  start processing event #1152242, run #204073 on slot 2,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   1    INFO   ===>>>  done processing event #1138350, run #204073 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  done processing event #1149424, run #204073 on slot 3,  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                    73   0    INFO   ===>>>  done processing event #1151102, run #204073 on slot 0,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   2    INFO   ===>>>  done processing event #1152242, run #204073 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   0    INFO   ===>>>  start processing event #1149997, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   2    INFO   ===>>>  start processing event #1151617, run #204073 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   1    INFO   ===>>>  done processing event #1148416, run #204073 on slot 1,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   3    INFO   ===>>>  done processing event #1142753, run #204073 on slot 3,  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                    77   0    INFO   ===>>>  done processing event #1149997, run #204073 on slot 0,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   2    INFO   ===>>>  done processing event #1151617, run #204073 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   0    INFO   ===>>>  start processing event #1142485, run #204073 on slot 0,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   2    INFO   ===>>>  start processing event #1151364, run #204073 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   1    INFO   ===>>>  done processing event #1149794, run #204073 on slot 1,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   1    INFO   ===>>>  start processing event #1143901, run #204073 on slot 1,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   3    INFO   ===>>>  done processing event #1152504, run #204073 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   3    INFO   ===>>>  start processing event #1153979, run #204073 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   0    INFO   ===>>>  done processing event #1142485, run #204073 on slot 0,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   0    INFO   ===>>>  start processing event #1150212, run #204073 on slot 0,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   2    INFO   ===>>>  done processing event #1151364, run #204073 on slot 2,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   2    INFO   ===>>>  start processing event #1152633, run #204073 on slot 2,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   1    INFO   ===>>>  done processing event #1143901, run #204073 on slot 1,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   3    INFO   ===>>>  done processing event #1153979, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1150472, run #204073 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   2    INFO   ===>>>  done processing event #1152633, run #204073 on slot 2,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   0    INFO   ===>>>  done processing event #1150212, run #204073 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  start processing event #1140275, run #204073 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   2    INFO   ===>>>  start processing event #1145882, run #204073 on slot 2,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   1    INFO   ===>>>  done processing event #1155482, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   1    INFO   ===>>>  start processing event #1151732, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   3    INFO   ===>>>  done processing event #1150472, run #204073 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  start processing event #1137896, run #204073 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   2    INFO   ===>>>  done processing event #1145882, run #204073 on slot 2,  90 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    93   2    INFO   ===>>>  start processing event #1156381, run #204073 on slot 2,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    90   0    INFO   ===>>>  done processing event #1145882, run #204073 on slot 0,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    91   3    INFO   ===>>>  done processing event #1151732, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1153794, run #204073 on slot 3,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    92   1    INFO   ===>>>  done processing event #1137896, run #204073 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  done processing event #1140275, run #204073 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   0    INFO   ===>>>  start processing event #1149161, run #204073 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  done processing event #1137896, run #204073 on slot 3,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   1    INFO   ===>>>  done processing event #1151732, run #204073 on slot 1,  93 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    93   2    INFO   ===>>>  done processing event #1156381, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1148893, run #204073 on slot 2,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   1    INFO   ===>>>  start processing event #1153794, run #204073 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   2    INFO   ===>>>  start processing event #1151312, run #204073 on slot 2,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   3    INFO   ===>>>  start processing event #1148893, run #204073 on slot 3,  94 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    94   0    INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    95   3    INFO   ===>>>  done processing event #1153794, run #204073 on slot 3,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  start processing event #1156351, run #204073 on slot 3,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  done processing event #1151312, run #204073 on slot 1,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    97   2    INFO   ===>>>  done processing event #1148893, run #204073 on slot 2,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   1    INFO   ===>>>  done processing event #1153794, run #204073 on slot 1,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   2    INFO   ===>>>  done processing event #1151312, run #204073 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   1    INFO   ===>>>  start processing event #1156351, run #204073 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   3    INFO   ===>>>  done processing event #1148893, run #204073 on slot 3,  98 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  done processing event #1156938, run #204073 on slot 0,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    99   3    INFO ---> Loop Finished (seconds): 3.84329
+AthenaHiveEventLoopMgr                    99   1    INFO   ===>>>  done processing event #1156351, run #204073 on slot 1,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   1    INFO ---> Loop Finished (seconds): 4.85674
 /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...
@@ -1262,7 +1265,7 @@ AvalancheSchedulerSvc                               INFO Joining Scheduler threa
 PyComponentMgr                                      INFO Finalizing PyComponentMgr...
 EventDataSvc                                        INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 IdDictDetDescrCnv                                   INFO in finalize
-IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.19 ))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
@@ -1274,10 +1277,10 @@ IOVDbFolder                                         INFO Folder /TILE/OFL02/NOIS
 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.06 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.08 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.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.06 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.26 ))s
 IOVDbSvc                                            INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc                                    INFO in finalize...
 ToolSvc                                             INFO Removing all tools created by ToolSvc
@@ -1288,9 +1291,9 @@ ToolSvc.ByteStreamMetadataTool                      INFO in finalize()
 *****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=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [ms] #=  2
-cObj_ALL                                            INFO Time User   : Tot=  340 [ms] Ave/Min/Max=  170(+-  140)/   30/  310 [ms] #=  2
-ChronoStatSvc                                       INFO Time User   : Tot= 10.3  [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(+-  130)/   20/  280 [ms] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 13.7  [s]                                             #=  1
 *****Chrono*****                                    INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                            INFO  Service finalized successfully 
 ApplicationMgr                                      INFO Application Manager Finalized successfully
-- 
GitLab


From 97f78e9714af46f6b81069fa2b9abd6b15254c69 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 16:29:10 +0200
Subject: [PATCH 049/266] AtlasDetDescr: is_muon checks.

In the muon subsystem checks is_rpc, etc, we first need to ensure
that is_muon passes.  Otherwise, we can crash if called for
a non-muon identifier.
---
 .../AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h
index 0ddfceb48153..3989c77f00a1 100755
--- a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h
+++ b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ATLASDETDESCR_ATLASDETECTORID_H
@@ -765,6 +765,7 @@ inline bool
 AtlasDetectorID::is_mdt(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     // MDT and RPC can only be destinguished by the additional bit in the ID
@@ -780,6 +781,7 @@ inline bool
 AtlasDetectorID::is_rpc(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     // MDT and RPC can only be destinguished by the additional bit in the ID
@@ -795,6 +797,7 @@ inline bool
 AtlasDetectorID::is_csc(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     result = (is_muon(id) && (techBit == AtlasDetDescr::fAtlasCSC));
@@ -805,6 +808,7 @@ inline bool
 AtlasDetectorID::is_tgc(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     result = (is_muon(id) && (techBit == AtlasDetDescr::fAtlasTGC));
@@ -815,6 +819,7 @@ inline bool
 AtlasDetectorID::is_mm(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     result = (is_muon(id) && (techBit == AtlasDetDescr::fAtlasMM));
@@ -825,6 +830,7 @@ inline bool
 AtlasDetectorID::is_stgc(Identifier id) const
 {
     bool result = false;
+    if (!is_muon(id)) return false;
     unsigned int stationNameIndex = m_muon_station_name_impl.unpack(id);
     unsigned int techBit = m_muon_tech_bits[stationNameIndex];
     result = (is_muon(id) && (techBit == AtlasDetDescr::fAtlasSTGC));
-- 
GitLab


From d68db07a50e113844f2f2481eb9ad949d1eafd10 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:26:33 +0200
Subject: [PATCH 050/266] TrigNavTools: Remove references to ThinningSvc.

The old thinning service is now not used from here.
Remove references to it.
---
 .../share/TrigNavigationSlimming_test.py      |   1 -
 .../src/TrigNavigationThinningSvc.cxx         | 192 +-----------------
 .../src/TrigNavigationThinningSvc.h           | 118 +----------
 3 files changed, 3 insertions(+), 308 deletions(-)

diff --git a/Trigger/TrigEvent/TrigNavTools/share/TrigNavigationSlimming_test.py b/Trigger/TrigEvent/TrigNavTools/share/TrigNavigationSlimming_test.py
index e6d1d6443e6d..e903cce2ebef 100644
--- a/Trigger/TrigEvent/TrigNavTools/share/TrigNavigationSlimming_test.py
+++ b/Trigger/TrigEvent/TrigNavTools/share/TrigNavigationSlimming_test.py
@@ -1,5 +1,4 @@
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-from AthenaServices.Configurables import ThinningSvc, createThinningSvc
 
 from PyUtils.MetaReaderPeeker import convert_itemList
 inputObjects = convert_itemList(layout=None)
diff --git a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
index 193bf23d525b..c96034668736 100644
--- a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
+++ b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
@@ -7,206 +7,16 @@
 
 
 TrigNavigationThinningSvc::TrigNavigationThinningSvc( const std::string& name, ISvcLocator* pSvcLocator ) 
-  : AthService(name, pSvcLocator),
-    m_workerThinning("ThinningSvc", name),
+  : base_class(name, pSvcLocator),
     m_slimmingTool("TrigNavigationSlimmingTool/TrigNavigationSlimmingTool")
 {
-  declareProperty("WorkerThinningSvc", m_workerThinning, "Service which deals wiht all requests except the navigation");
   declareProperty("SlimmingTool", m_slimmingTool, "Tool responsible for the actual thinning");
 }
 
 
 StatusCode TrigNavigationThinningSvc::initialize() {
-  CHECK( m_workerThinning.retrieve() );
-
   CHECK( m_slimmingTool.retrieve() );
   return StatusCode::SUCCESS;
 }
-StatusCode TrigNavigationThinningSvc::reinitialize() {
-  return StatusCode::SUCCESS;
-}
-StatusCode TrigNavigationThinningSvc::finalize() {
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode TrigNavigationThinningSvc::queryInterface(const InterfaceID& rrid, void** ppvInterface) {
-  if ( IThinningSvc::interfaceID().versionMatch(rrid)) {
-    *ppvInterface = (IThinningSvc*)this;
-  } else if ( ITrigNavigationThinningSvc::interfaceID().versionMatch(rrid) ) {
-    *ppvInterface = (ITrigNavigationThinningSvc*)this;
-  } else {
-    return Service::queryInterface(rrid, ppvInterface);
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-// forwards of ThinningSvc
-bool TrigNavigationThinningSvc::thinningOccurred() const  {
-    return m_workerThinning->thinningOccurred(); 
-  }
-  
-  
-StatusCode TrigNavigationThinningSvc::register_slimmer (Athena::ISlimmingHdlr *handler)  { 
-  return m_workerThinning->register_slimmer(handler);
-}
-
-Athena::IThinningHdlr* TrigNavigationThinningSvc::handler( SG::DataProxy* proxy )  {
-  return m_workerThinning->handler(proxy);
-}
-
-StatusCode TrigNavigationThinningSvc::filter_impl( Athena::IThinningHdlr* handler,
-	       SG::DataProxy* proxy,
-	       const IThinningSvc::Filter_t& filter,
-	       const IThinningSvc::Operator::Type op)  {
-  return m_workerThinning->filter_impl(handler, proxy, filter, op);
-}
-
-
-   
-StatusCode TrigNavigationThinningSvc::commit()  {
-  return m_workerThinning->commit();
-}
-
-   
-StatusCode TrigNavigationThinningSvc::rollback()  {
-  return m_workerThinning->rollback();
-}
-
-
-   
-std::size_t TrigNavigationThinningSvc::index_impl( const SG::DataProxy* objProxy, 
-						   std::size_t idx ) const  {
-  return m_workerThinning->index_impl(objProxy, idx);
-}
-
-
-  
-bool TrigNavigationThinningSvc::is_thinned_impl(const SG::DataProxy* p) const  {
-  return m_workerThinning->is_thinned_impl(p);
-}
-
-// IIncidentListener
-void TrigNavigationThinningSvc::handle( const Incident& incident )  { 
-  IIncidentListener *incidentListener(0);
-  if( m_workerThinning->queryInterface(IIncidentListener::interfaceID(), (void**)&incidentListener).isFailure() ) {
-    ATH_MSG_WARNING("Worker ThinningSvc " << m_workerThinning.type()
-		    <<"/" << m_workerThinning.name()
-		    <<" can not be querried for IncidentListerner interface");
-    
-  }
-  if ( incidentListener ) 
-    incidentListener->handle(incident); 
-  else
-    ATH_MSG_WARNING("Worker ThinningSvc " << m_workerThinning.type()
-		    <<"/" << m_workerThinning.name()
-		    <<" does not implement IncidentListener interface, request can not be handled");
-}
-
-
-
-  /// get proxy for a given data object address in memory
-SG::DataProxy* TrigNavigationThinningSvc::proxy( const void* const pTransient ) const   { 
-  return m_workerThinning->proxy(pTransient); 
-}
-
-/// get proxy with given id and key. Returns 0 to flag failure
-SG::DataProxy* TrigNavigationThinningSvc::proxy( const CLID& id, const std::string& key ) const  { 
-  return m_workerThinning->proxy(id, key); 
-}
-
-/// Get proxy given a hashed key+clid.
-/// Find an exact match; no handling of aliases, etc.
-/// Returns 0 to flag failure.
-SG::DataProxy* TrigNavigationThinningSvc::proxy_exact (SG::sgkey_t sgkey) const  {
-  return m_workerThinning->proxy_exact(sgkey); 
-}
-
-/// return the list of all current proxies in store
-std::vector<const SG::DataProxy*> TrigNavigationThinningSvc::proxies() const  { 
-  return m_workerThinning->proxies(); 
-}
-
-/// Add a new proxy to the store.
-StatusCode TrigNavigationThinningSvc::addToStore (CLID id, SG::DataProxy* proxy)  {
-  return m_workerThinning->addToStore(id, proxy);
-}
 
-/// Record an object in the store.
-SG::DataProxy*
-TrigNavigationThinningSvc::recordObject (SG::DataObjectSharedPtr<DataObject> obj,
-                                         const std::string& key,
-                                         bool allowMods,
-                                         bool returnExisting)
-{
-  return m_workerThinning->recordObject (std::move(obj), key,
-                                         allowMods, returnExisting);
-}
-
-
-/**
- * @brief Find the key for a string/CLID pair.
- * @param str The string to look up.
- * @param clid The CLID associated with the string.
- * @return A key identifying the string.
- *         A given string will always return the same key.
- *         Will abort in case of a hash collision!
- */
-SG::sgkey_t
-TrigNavigationThinningSvc::stringToKey (const std::string& str, CLID clid)
-{
-  return m_workerThinning->stringToKey (str, clid);
-}
-
-/**
- * @brief Find the string corresponding to a given key.
- * @param key The key to look up.
- * @return Pointer to the string found, or null.
- *         We can find keys as long as the corresponding string
- *         was given to either @c stringToKey() or @c registerKey().
- */
-const std::string*
-TrigNavigationThinningSvc::keyToString (SG::sgkey_t key) const
-{
-  return m_workerThinning->keyToString (key);
-}
-
-/**
- * @brief Find the string and CLID corresponding to a given key.
- * @param key The key to look up.
- * @param clid[out] The found CLID.
- * @return Pointer to the string found, or null.
- *         We can find keys as long as the corresponding string
- *         was given to either @c stringToKey() or @c registerKey().
- */
-const std::string*
-TrigNavigationThinningSvc::keyToString (SG::sgkey_t key,
-                                        CLID& clid) const
-{
-  return m_workerThinning->keyToString (key, clid);
-}
-
-/**
- * @brief Remember an additional mapping from key to string/CLID.
- * @param key The key to enter.
- * @param str The string to enter.
- * @param clid The CLID associated with the string.
- * @return True if successful; false if the @c key already
- *         corresponds to a different string.
- *
- * This registers an additional mapping from a key to a string;
- * it can be found later through @c lookup() on the string.
- * Logs an error if @c key already corresponds to a different string.
- */
-void TrigNavigationThinningSvc::registerKey (SG::sgkey_t key,
-                                             const std::string& str,
-                                             CLID clid)
-{
-  return m_workerThinning->registerKey (key, str, clid);
-}
 
diff --git a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
index d6a907641300..0cbf780ef25c 100644
--- a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
+++ b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
@@ -9,21 +9,18 @@
 
 #include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthService.h"
-#include "AthenaKernel/IThinningSvc.h"
 #include "AthenaKernel/ITrigNavigationThinningSvc.h"
 #include "TrigNavTools/TrigNavigationSlimmingTool.h"
 
 
 
 
-class TrigNavigationThinningSvc : virtual public IThinningSvc, virtual public ITrigNavigationThinningSvc, virtual public AthService, virtual public IIncidentListener {
+class TrigNavigationThinningSvc : public extends<AthService, ITrigNavigationThinningSvc>
+{
 public:
   TrigNavigationThinningSvc( const std::string& name, ISvcLocator* pSvcLocator );
 
   virtual StatusCode initialize() override;
-  virtual StatusCode reinitialize() override;
-  virtual StatusCode finalize() override;
-  virtual StatusCode queryInterface(const InterfaceID& rrid, void** ppvInterface) override; 
   
   // specifics of ITrigNavigationThinning
 
@@ -31,121 +28,10 @@ public:
                                  std::vector<uint32_t>& slimmed_and_serialized ) const override
   { return m_slimmingTool->doSlimming(slimmed_and_serialized);  }
   
-  // forwards of ThinningSvc
-  virtual bool thinningOccurred() const override;
-  
-  virtual
-  StatusCode register_slimmer (Athena::ISlimmingHdlr *handler) override;
-
-  virtual Athena::IThinningHdlr* handler( SG::DataProxy* proxy ) override;
-
-  virtual StatusCode
-  filter_impl( Athena::IThinningHdlr* handler,
-	       SG::DataProxy* proxy,
-	       const IThinningSvc::Filter_t& filter,
-	       const IThinningSvc::Operator::Type op = Operator::And ) override;
-
-
-  virtual 
-  StatusCode commit() override;
-
-  virtual 
-  StatusCode rollback() override;
-
-  virtual 
-  std::size_t index_impl( const SG::DataProxy* objProxy, 
-                          std::size_t idx ) const override;
-
-
-  virtual
-  bool is_thinned_impl(const SG::DataProxy* p) const override;
-
-  // IIncidentListener
-  void handle( const Incident& incident ) override;
-
-
 
-  ///@{ @c IProxyDict interface
-  using IProxyDict::proxy;
-
-  /// get proxy for a given data object address in memory
-  virtual SG::DataProxy* proxy( const void* const pTransient ) const override;
-
-  /// get proxy with given id and key. Returns 0 to flag failure
-  virtual SG::DataProxy* proxy( const CLID& id, const std::string& key ) const override;
-
-  /// Get proxy given a hashed key+clid.
-  /// Find an exact match; no handling of aliases, etc.
-  /// Returns 0 to flag failure.
-  virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const override; 
-
-  /// return the list of all current proxies in store
-  std::vector<const SG::DataProxy*> proxies() const override;
-
-  /// Add a new proxy to the store.
-  virtual StatusCode addToStore (CLID id, SG::DataProxy* proxy) override;
-
-  /// Record an object in the store.
-  virtual SG::DataProxy* recordObject (SG::DataObjectSharedPtr<DataObject> obj,
-                                       const std::string& key,
-                                       bool allowMods,
-                                       bool returnExisting) override;
-
-
-  /**
-   * @brief Find the key for a string/CLID pair.
-   * @param str The string to look up.
-   * @param clid The CLID associated with the string.
-   * @return A key identifying the string.
-   *         A given string will always return the same key.
-   *         Will abort in case of a hash collision!
-   */
-  virtual
-  SG::sgkey_t stringToKey (const std::string& str, CLID clid) override;
-
-  /**
-   * @brief Find the string corresponding to a given key.
-   * @param key The key to look up.
-   * @return Pointer to the string found, or null.
-   *         We can find keys as long as the corresponding string
-   *         was given to either @c stringToKey() or @c registerKey().
-   */
-  virtual
-  const std::string* keyToString (SG::sgkey_t key) const override;
-
-  /**
-   * @brief Find the string and CLID corresponding to a given key.
-   * @param key The key to look up.
-   * @param clid[out] The found CLID.
-   * @return Pointer to the string found, or null.
-   *         We can find keys as long as the corresponding string
-   *         was given to either @c stringToKey() or @c registerKey().
-   */
-  virtual
-  const std::string* keyToString (SG::sgkey_t key,
-                                  CLID& clid) const override;
-
-  /**
-   * @brief Remember an additional mapping from key to string/CLID.
-   * @param key The key to enter.
-   * @param str The string to enter.
-   * @param clid The CLID associated with the string.
-   * @return True if successful; false if the @c key already
-   *         corresponds to a different string.
-   *
-   * This registers an additional mapping from a key to a string;
-   * it can be found later through @c lookup() on the string.
-   * Logs an error if @c key already corresponds to a different string.
-   */
-  virtual
-  void registerKey (SG::sgkey_t key,
-                    const std::string& str,
-                    CLID clid) override;
 
 private:
-  ServiceHandle<IThinningSvc> m_workerThinning;
   ToolHandle<HLT::TrigNavigationSlimmingTool> m_slimmingTool;
-
 };
 
 
-- 
GitLab


From 3383da4dc85b404d983e15fa9dbf724b81af0ee9 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 9 Jun 2020 01:04:09 +0200
Subject: [PATCH 051/266] IPATFitter event context aware

---
 .../TrkiPatFitter/ATLAS_CHECK_THREAD_SAFETY   |   1 +
 .../TrkiPatFitter/MaterialAllocator.h         |   2 +-
 .../TrkiPatFitter/TrkiPatFitter/iPatFitter.h  | 225 ++++++++++--------
 .../TrkiPatFitter/src/MaterialAllocator.cxx   |  40 ++--
 .../TrkiPatFitter/src/iPatFitter.cxx          | 222 ++++++++++-------
 .../TrkiPatFitter/src/iPatGlobalFitter.cxx    |   8 +-
 6 files changed, 289 insertions(+), 209 deletions(-)

diff --git a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/ATLAS_CHECK_THREAD_SAFETY
index e69de29bb2d1..662149c44a73 100644
--- a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/ATLAS_CHECK_THREAD_SAFETY
+++ b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Tracking/TrkFitter/TrkiPatFitter
diff --git a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
index 83a817e9f1e9..ee94bd319f7c 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
+++ b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
@@ -101,7 +101,7 @@ private:
 	const TrackParameters&			parameters,
 	const Surface&				surface,
 	PropDirection				dir,
-	BoundaryCheck				boundsCheck,
+	const BoundaryCheck&				boundsCheck,
 	ParticleHypothesis			particleHypothesis,
         Garbage_t&                              garbage) const;
 
diff --git a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/iPatFitter.h b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/iPatFitter.h
index 2d87fb1779f4..7621b2dacb90 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/iPatFitter.h
+++ b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/iPatFitter.h
@@ -5,12 +5,9 @@
 #ifndef TRKIPATFITTER_IPATFITTER_H
 #define TRKIPATFITTER_IPATFITTER_H
 
-#include <vector>
-#include <memory>
-#include <mutex>
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkiPatFitterUtils/FitMeasurement.h"
 #include "TrkiPatFitterUtils/FitParameters.h"
 #include "TrkiPatFitterUtils/IMaterialAllocator.h"
@@ -29,6 +26,9 @@
 #include "TrkiPatFitterUtils/MessageHelper.h"
 #include "TrkiPatFitterUtils/FitProcedure.h"
 
+#include <vector>
+#include <memory>
+#include <mutex>
 namespace Trk
 {
 class FitQuality;
@@ -56,47 +56,60 @@ public:
     //	RunOutlierRemoval    - use logic to remove bad hits
 
     /*
-     * Bring in default impl with
+     * Bring in default impl without
      * EventContext for now
      */
     using ITrackFitter::fit;
  
     // refit a track
-    virtual Track*	fit (const Track&,
-		     const RunOutlierRemoval	runOutlier=false,
-		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis particleHypothesis = Trk::nonInteracting) const override;
 
     // refit a track adding a PrepRawDataSet
-    virtual Track*	fit (const Track&,
+    virtual std::unique_ptr<Track> fit (
+         const EventContext& ctx,
+         const Track&,
 		     const PrepRawDataSet&,
 		     const RunOutlierRemoval	runOutlier=false,
 		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
 
     // fit a set of PrepRawData objects
-    virtual Track*	fit (const PrepRawDataSet&,
-		     const TrackParameters&	perigeeStartValue,
-		     const RunOutlierRemoval	runOutlier=false,
-		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const PrepRawDataSet&,
+      const TrackParameters& perigeeStartValue,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis particleHypothesis = Trk::nonInteracting) const override;
 
     // refit a track adding a MeasurementSet
-    virtual Track*	fit (const Track&,
-		     const MeasurementSet&,
-		     const RunOutlierRemoval	runOutlier=false,
-		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const MeasurementSet&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis particleHypothesis =
+        Trk::nonInteracting) const override;
 
     // fit a set of MeasurementBase objects with starting value for perigeeParameters
-    virtual Track*	fit (const MeasurementSet&,
-		     const TrackParameters&	perigeeStartValue,
-		     const RunOutlierRemoval	runOutlier=false,
-		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const MeasurementSet&,
+      const TrackParameters& perigeeStartValue,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis particleHypothesis = Trk::nonInteracting) const override;
 
     // combined muon fit
-    virtual Track*	fit (const Track&,
-		     const Track&,
-		     const RunOutlierRemoval	runOutlier=false,
-		     const ParticleHypothesis	particleHypothesis=Trk::nonInteracting) const override;
-
-protected:
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const Track&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis particleHypothesis = Trk::nonInteracting) const override;
+
+  protected:
     class FitState {
       public:
         ~FitState() {
@@ -145,6 +158,7 @@ protected:
 
     // fitWithState that creates and returns state
     std::pair<std::unique_ptr<Track>, std::unique_ptr<FitState>> fitWithState (
+        const EventContext& ctx,
         const Track&,
         const RunOutlierRemoval runOutlier=false,
         const ParticleHypothesis particleHypothesis=Trk::nonInteracting) const;
@@ -158,74 +172,95 @@ protected:
 
 private:
     // add MeasurementSet
-    void	addMeasurements (std::vector<FitMeasurement*>&			measurements,
-				 const MeasurementSet&				measurementSet,
-				 const FitParameters&				parameters) const;
-    
-    // add TrackStateOnSurfaces (true means material already allocated on trackTSOS)
-    bool	addMeasurements (std::vector<FitMeasurement*>&			measurements,
-				 const FitParameters&				parameters,
-				 ParticleHypothesis			   	particleHypothesis,
-				 const DataVector<const TrackStateOnSurface>&	trackTSOS) const;
-
-    // perform fit
-    Track*	performFit(
-        FitState& fitState,
-        const ParticleHypothesis particleHypothesis,
-        const TrackInfo& trackInfo,
-        const DataVector<const TrackStateOnSurface>* leadingTSOS,
-        const FitQuality*	perigeeQuality,
-        Garbage_t& garbage) const;
-    
-    // print TSOS on a track (debugging aid)
-    void	printTSOS (const Track&) const;
-
-    void	refit(
-        FitState& fitState,
-        const Track&		track,
-        const RunOutlierRemoval	runOutlier,
-        const ParticleHypothesis	particleHypothesis) const;
-    
-    // configurables (tools and options)
-    Gaudi::Property<bool> m_aggregateMaterial {this, "AggregateMaterial", true};
-    Gaudi::Property<bool> m_asymmetricCaloEnergy {this, "AsymmetricCaloEnergy", true};
-    Gaudi::Property<bool> m_fullCombinedFit {this, "FullCombinedFit", true};
-    Gaudi::Property<bool> m_lineFit {this, "LineFit", false};
-    Gaudi::Property<double> m_lineMomentum {this, "LineMomentum", 100. * Gaudi::Units::GeV};
-    ToolHandle<IMaterialAllocator>			m_materialAllocator;
-    ToolHandle<IIntersector>				m_rungeKuttaIntersector;
-    ToolHandle<IIntersector>				m_solenoidalIntersector;
-    ToolHandle<IPropagator>				m_stepPropagator;
-    ToolHandle<IIntersector>				m_straightLineIntersector;
-    ServiceHandle<ITrackingVolumesSvc>			m_trackingVolumesSvc;
-    ToolHandle<Trk::IExtendedTrackSummaryTool>          m_trackSummaryTool;
-
-    // configurable tolerances, warnings
-    Gaudi::Property<double> m_orderingTolerance {this, "OrderingTolerance", 1. * Gaudi::Units::mm};
-    Gaudi::Property<unsigned> m_maxWarnings {this, "MaxNumberOfWarnings", 10, 
-      "Maximum number of permitted WARNING messages per message type."};
-
-    // configurables for validation purposes
-    Gaudi::Property<bool> m_constrainedAlignmentEffects {this, "ConstrainedAlignmentEffects", false};
-    Gaudi::Property<bool> m_extendedDebug {this, "ExtendedDebug", false};
-    Gaudi::Property<int> m_forcedRefitsForValidation {this, "ForcedRefitsForValidation", 0};
-    Gaudi::Property<int> m_maxIterations {this, "MaxIterations", 25}; 
-
-    // constants 
-    std::unique_ptr<Trk::Volume> m_calorimeterVolume;
-    std::unique_ptr<Trk::Volume> m_indetVolume;
-    Trk::MagneticFieldProperties m_stepField; 
-
-    // counters
-    mutable std::atomic<unsigned> m_countFitAttempts = 0;
-    mutable std::atomic<unsigned> m_countGoodFits = 0;
-    mutable std::atomic<unsigned> m_countIterations = 0;
-    mutable std::atomic<unsigned> m_countRefitAttempts = 0;
-    mutable std::atomic<unsigned> m_countGoodRefits = 0;
-    mutable std::atomic<unsigned> m_countRefitIterations = 0;
-
-    // count warnings
-    mutable std::unique_ptr<MessageHelper> m_messageHelper ATLAS_THREAD_SAFE; // MessageHelper is thread-safe
+  void addMeasurements(const EventContext& ctx,
+                       std::vector<FitMeasurement*>& measurements,
+                       const MeasurementSet& measurementSet,
+                       const FitParameters& parameters) const;
+
+  // add TrackStateOnSurfaces (true means material already allocated on
+  // trackTSOS)
+  bool addMeasurements(
+    const EventContext& ctx,
+    std::vector<FitMeasurement*>& measurements,
+    const FitParameters& parameters,
+    ParticleHypothesis particleHypothesis,
+    const DataVector<const TrackStateOnSurface>& trackTSOS) const;
+
+  // perform fit
+  std::unique_ptr<Track> performFit(
+    FitState& fitState,
+    const ParticleHypothesis particleHypothesis,
+    const TrackInfo& trackInfo,
+    const DataVector<const TrackStateOnSurface>* leadingTSOS,
+    const FitQuality* perigeeQuality,
+    Garbage_t& garbage) const;
+
+  // print TSOS on a track (debugging aid)
+  void printTSOS(const Track&) const;
+
+  void refit(const EventContext& ctx,
+             FitState& fitState,
+             const Track& track,
+             const RunOutlierRemoval runOutlier,
+             const ParticleHypothesis particleHypothesis) const;
+
+  // configurables (tools and options)
+  Gaudi::Property<bool> m_aggregateMaterial{ this, "AggregateMaterial", true };
+  Gaudi::Property<bool> m_asymmetricCaloEnergy{ this,
+                                                "AsymmetricCaloEnergy",
+                                                true };
+  Gaudi::Property<bool> m_fullCombinedFit{ this, "FullCombinedFit", true };
+  Gaudi::Property<bool> m_lineFit{ this, "LineFit", false };
+  Gaudi::Property<double> m_lineMomentum{ this,
+                                          "LineMomentum",
+                                          100. * Gaudi::Units::GeV };
+  ToolHandle<IMaterialAllocator> m_materialAllocator;
+  ToolHandle<IIntersector> m_rungeKuttaIntersector;
+  ToolHandle<IIntersector> m_solenoidalIntersector;
+  ToolHandle<IPropagator> m_stepPropagator;
+  ToolHandle<IIntersector> m_straightLineIntersector;
+  ServiceHandle<ITrackingVolumesSvc> m_trackingVolumesSvc;
+  ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool;
+
+  // configurable tolerances, warnings
+  Gaudi::Property<double> m_orderingTolerance{ this,
+                                               "OrderingTolerance",
+                                               1. * Gaudi::Units::mm };
+  Gaudi::Property<unsigned> m_maxWarnings{
+    this,
+    "MaxNumberOfWarnings",
+    10,
+    "Maximum number of permitted WARNING messages per message type."
+  };
+
+  // configurables for validation purposes
+  Gaudi::Property<bool> m_constrainedAlignmentEffects{
+    this,
+    "ConstrainedAlignmentEffects",
+    false
+  };
+  Gaudi::Property<bool> m_extendedDebug{ this, "ExtendedDebug", false };
+  Gaudi::Property<int> m_forcedRefitsForValidation{ this,
+                                                    "ForcedRefitsForValidation",
+                                                    0 };
+  Gaudi::Property<int> m_maxIterations{ this, "MaxIterations", 25 };
+
+  // constants
+  std::unique_ptr<Trk::Volume> m_calorimeterVolume;
+  std::unique_ptr<Trk::Volume> m_indetVolume;
+  Trk::MagneticFieldProperties m_stepField;
+
+  // counters
+  mutable std::atomic<unsigned> m_countFitAttempts = 0;
+  mutable std::atomic<unsigned> m_countGoodFits = 0;
+  mutable std::atomic<unsigned> m_countIterations = 0;
+  mutable std::atomic<unsigned> m_countRefitAttempts = 0;
+  mutable std::atomic<unsigned> m_countGoodRefits = 0;
+  mutable std::atomic<unsigned> m_countRefitIterations = 0;
+
+  // count warnings
+  mutable std::unique_ptr<MessageHelper> m_messageHelper
+    ATLAS_THREAD_SAFE; // MessageHelper is thread-safe
 
 };
 
diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
index be5e4226be89..427273883f54 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
@@ -102,35 +102,35 @@ namespace Trk
     if (m_extrapolator.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
-    }
+    
     if (m_intersector.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_intersector);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tool " << m_intersector);
-    }
+    
 
     // retrieve services
     if (m_trackingGeometrySvc.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve Svc " << m_trackingGeometrySvc);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved Svc " << m_trackingGeometrySvc);
-    }
+    
 
     // need to create the IndetExit and MuonEntrance TrackingVolumes
     if (m_trackingVolumesSvc.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve Svc " << m_trackingVolumesSvc);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved Svc " << m_trackingVolumesSvc);
       m_calorimeterVolume = new Volume(
         m_trackingVolumesSvc->volume(ITrackingVolumesSvc::MuonSpectrometerEntryLayer));
       m_indetVolume = new Volume(
         m_trackingVolumesSvc->volume(ITrackingVolumesSvc::CalorimeterEntryLayer));
-    }
+    
 
     if (m_useStepPropagator > 0 && m_stepPropagator.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve Svc " << m_stepPropagator);
@@ -252,8 +252,8 @@ namespace Trk
       if (haveDelimiter && intersection && surface && m_indetVolume->inside(endPosition)) {
         // debug
         if (msgLvl(MSG::VERBOSE)) {
-          Amg::Vector3D direction = intersection->direction();
-          Amg::Vector3D startPosition = intersection->position();
+          const Amg::Vector3D& direction = intersection->direction();
+          const Amg::Vector3D& startPosition = intersection->position();
           ATH_MSG_VERBOSE(" addLeadingMaterial: using extrapolateM from distance "
                           << direction.dot(fitParameters.position() - startPosition));
         }
@@ -489,7 +489,7 @@ namespace Trk
                    && leadingOutlier->intersection(FittedTrajectory).position().perp() > radius) {
               leadingOutliers.pop_back();
               measurements.insert(measurements.begin(), leadingOutlier);
-              if (leadingOutliers.size()) {
+              if (!leadingOutliers.empty()) {
                 leadingOutlier = leadingOutliers.back();
               } else {
                 leadingOutlier = nullptr;
@@ -723,9 +723,9 @@ namespace Trk
         // missing TrackingGeometrySvc - no leading material will be added
         m_messageHelper->printWarning(0);
         return nullptr;
-      } else {
+      } 
         createSpectrometerEntranceOnce();
-      }
+      
     }
 
     // check input parameters are really in the spectrometer
@@ -759,7 +759,7 @@ namespace Trk
                            garbage);
     delete entranceParameters;
     if (!extrapolatedTSOS
-        || !extrapolatedTSOS->size()
+        || extrapolatedTSOS->empty()
         || !extrapolatedTSOS->front()->trackParameters()) {
       ATH_MSG_VERBOSE(std::setiosflags(std::ios::fixed)
                       << "leadingSpectrometerTSOS: no material found from RZ"
@@ -1115,7 +1115,7 @@ namespace Trk
                                           const TrackParameters& parameters,
                                           const Surface& surface,
                                           PropDirection dir,
-                                          BoundaryCheck boundsCheck,
+                                          const BoundaryCheck& boundsCheck,
                                           ParticleHypothesis particleHypothesis,
                                           Garbage_t& garbage) const {
     // fix up material duplication appearing after recent TrackingGeometry speed-up
@@ -1405,7 +1405,7 @@ namespace Trk
       if (!materialSurface) continue;
 
       // or if it's already been allocated upstream
-      if (surfaces.size() && materialSurface == surfaces.back()) continue;
+      if (!surfaces.empty() && materialSurface == surfaces.back()) continue;
 
       // skip leading material during the fit (up to and including first measurement)
       // insert an materialDelimiter so the leading material can be allocated after the fit converges
@@ -1539,7 +1539,7 @@ namespace Trk
     ATH_MSG_INFO("segment material aggregation " << material.size());
     FitMeasurement* measurement1 = nullptr;
     FitMeasurement* measurement2 = nullptr;
-    if (!material.size()) return std::pair<FitMeasurement*, FitMeasurement*>(measurement1, measurement2);
+    if (material.empty()) return std::pair<FitMeasurement*, FitMeasurement*>(measurement1, measurement2);
 
     Amg::Vector3D* referencePosition = nullptr;
 
@@ -2113,7 +2113,7 @@ namespace Trk
     ATH_MSG_VERBOSE("measurements and material:  distance        X0   deltaE            E        pT"
                     << "           R      phi         Z  DoF      phi    theta");
 
-    if (!measurements.size()) return;
+    if (measurements.empty()) return;
 
     std::vector<Trk::FitMeasurement*>::iterator m = measurements.begin();
     while (m != measurements.end()
@@ -2320,9 +2320,9 @@ namespace Trk
         // missing TrackingGeometrySvc - no spectrometer material added
         m_messageHelper->printWarning(2);
         return;
-      } else {
+      } 
         createSpectrometerEntranceOnce();
-      }
+      
     }
 
     // entranceParameters are at the MS entrance surface (0 if perigee downstream)
diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
index 05b7a54a1390..813a059c2115 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
@@ -112,10 +112,10 @@ namespace Trk
       if (handle.retrieve().isFailure()) {
         ATH_MSG_FATAL("Failed to retrieve tool " << handle);
         return false;
-      } else {
+      } 
         ATH_MSG_INFO("Retrieved tool " << handle);
         return true;
-      }
+      
     };
     if (!retrieveTool(m_materialAllocator)) { return StatusCode::FAILURE; }        
     if (!retrieveTool(m_rungeKuttaIntersector)) { return StatusCode::FAILURE; }
@@ -127,13 +127,13 @@ namespace Trk
     if (m_trackingVolumesSvc.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve Svc " << m_trackingVolumesSvc);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved Svc " << m_trackingVolumesSvc);
       m_calorimeterVolume = std::make_unique<Trk::Volume>(
         m_trackingVolumesSvc->volume(ITrackingVolumesSvc::MuonSpectrometerEntryLayer));
       m_indetVolume = std::make_unique<Volume>(
         m_trackingVolumesSvc->volume(ITrackingVolumesSvc::CalorimeterEntryLayer));
-    }
+    
 
     ATH_CHECK(m_trackSummaryTool.retrieve());
 
@@ -194,10 +194,11 @@ namespace Trk
     return StatusCode::SUCCESS;
   }
 
-  auto iPatFitter::fitWithState(
-    const Track& track,
-    const RunOutlierRemoval runOutlier,
-    const ParticleHypothesis particleHypothesis) const 
+  auto
+  iPatFitter::fitWithState(const EventContext& ctx,
+                           const Track& track,
+                           const RunOutlierRemoval runOutlier,
+                           const ParticleHypothesis particleHypothesis) const
     -> std::pair<std::unique_ptr<Track>, std::unique_ptr<FitState>>
   {
     ATH_MSG_VERBOSE(" track fit ");
@@ -246,7 +247,8 @@ namespace Trk
 
     fitState->newMeasurements();
 
-    bool haveMaterial = addMeasurements(fitState->getMeasurements(),
+    bool haveMaterial = addMeasurements(ctx,
+                                        fitState->getMeasurements(),
                                         *fitState->parameters,
                                         particleHypothesis,
                                         *track.trackStateOnSurfaces());
@@ -273,47 +275,54 @@ namespace Trk
 
     // validation
     for (int i = 0; i < m_forcedRefitsForValidation; ++i) {
-      if (fittedTrack) { refit(*fitState, *fittedTrack, runOutlier, particleHypothesis); }
+      if (fittedTrack) { refit(ctx,*fitState, *fittedTrack, runOutlier, particleHypothesis); }
     }
 
     return {std::move(fittedTrack), std::move(fitState)};
   }
 
-  Track*
-  iPatFitter::fit(const Track& track,
+  std::unique_ptr<Track> 
+  iPatFitter::fit(const EventContext& ctx, 
+                  const Track& track,
                   const RunOutlierRemoval runOutlier,
                   const ParticleHypothesis particleHypothesis) const {
-    auto [fittedTrack, fitState] = fitWithState(track, runOutlier, particleHypothesis);
-    return fittedTrack.release();
+    auto [fittedTrack, fitState] = fitWithState(ctx,track, runOutlier, particleHypothesis);
+    return std::move(fittedTrack);
   }
 
-  Track*
-  iPatFitter::fit(const Track& /*track*/,
+  std::unique_ptr<Track>
+  iPatFitter::fit(const EventContext&,
+                  const Track& /*track*/,
                   const PrepRawDataSet& /*prepRawDataSet*/,
                   const RunOutlierRemoval /*trackrunOutlier*/,
-                  const ParticleHypothesis /*trackparticleHypothesis*/) const {
+                  const ParticleHypothesis /*trackparticleHypothesis*/) const
+  {
     m_countFitAttempts++;
     // track + PrepRawDataSet interface not implemented
     m_messageHelper->printWarning(3);
     return nullptr;
   }
 
-  Track*
-  iPatFitter::fit(const PrepRawDataSet& /*prepRawDataSet*/,
+  std::unique_ptr<Track>
+  iPatFitter::fit(const EventContext&,
+                  const PrepRawDataSet& /*prepRawDataSet*/,
                   const TrackParameters& /*estimatedParametersNearOrigin*/,
                   const RunOutlierRemoval /*trackrunOutlier*/,
-                  const ParticleHypothesis /*trackparticleHypothesis*/) const {
+                  const ParticleHypothesis /*trackparticleHypothesis*/) const
+  {
     m_countFitAttempts++;
     // PrepRawDataSet interface not implemented
     m_messageHelper->printWarning(4);
     return nullptr;
   }
 
-  Track*
-  iPatFitter::fit(const Track& track,
+  std::unique_ptr<Track>
+  iPatFitter::fit(const EventContext& ctx,
+                  const Track& track,
                   const MeasurementSet& measurementSet,
                   const RunOutlierRemoval runOutlier,
-                  const ParticleHypothesis particleHypothesis) const {
+                  const ParticleHypothesis particleHypothesis) const
+  {
     ATH_MSG_VERBOSE(" track + measurementSet fit ");
     m_countFitAttempts++;
     // outlier removal not implemented
@@ -338,12 +347,15 @@ namespace Trk
 
     // set up the measurements (and material)
     fitState.newMeasurements();
-    if (addMeasurements(fitState.getMeasurements(), *fitState.parameters, particleHypothesis,
-                        *track.trackStateOnSurfaces())) m_messageHelper->printWarning(8); // FIX needed: material may
-                                                                                          // get double counted
-    addMeasurements(fitState.getMeasurements(),
-                    measurementSet,
-                    *fitState.parameters);
+    if (addMeasurements(ctx,
+                        fitState.getMeasurements(),
+                        *fitState.parameters,
+                        particleHypothesis,
+                        *track.trackStateOnSurfaces()))
+      m_messageHelper->printWarning(8); // FIX needed: material may
+                                        // get double counted
+    addMeasurements(
+      ctx, fitState.getMeasurements(), measurementSet, *fitState.parameters);
     Garbage_t garbage;
     if (particleHypothesis != Trk::nonInteracting) {
       const TrackParameters& endParams = *(track.trackStateOnSurfaces()->back()->trackParameters());
@@ -357,14 +369,21 @@ namespace Trk
     // perform fit and return fitted track
     TrackInfo trackInfo(TrackInfo::iPatTrackFitter, particleHypothesis);
     trackInfo.addPatternReco(track.info());
-    return performFit(fitState, particleHypothesis, trackInfo, track.trackStateOnSurfaces(), track.fitQuality(), garbage);
+    return performFit(fitState,
+                      particleHypothesis,
+                      trackInfo,
+                      track.trackStateOnSurfaces(),
+                      track.fitQuality(),
+                      garbage);
   }
 
-  Track*
-  iPatFitter::fit(const MeasurementSet& measurementSet,
+  std::unique_ptr<Trk::Track>
+  iPatFitter::fit(const EventContext& ctx,
+                  const MeasurementSet& measurementSet,
                   const TrackParameters& perigeeStartValue,
                   const RunOutlierRemoval runOutlier,
-                  const ParticleHypothesis particleHypothesis) const {
+                  const ParticleHypothesis particleHypothesis) const
+  {
     ATH_MSG_VERBOSE(" fit from measurement set + perigeeStartValue ");
     m_countFitAttempts++;
     // outlier removal not implemented
@@ -382,7 +401,7 @@ namespace Trk
 
     // set up the measurements (and material)
     fitState.newMeasurements();
-    addMeasurements(fitState.getMeasurements(), measurementSet, *fitState.parameters);
+    addMeasurements(ctx,fitState.getMeasurements(), measurementSet, *fitState.parameters);
     Garbage_t garbage;
     if (particleHypothesis != Trk::nonInteracting) {
       m_materialAllocator->allocateMaterial(fitState.getMeasurements(),
@@ -397,11 +416,13 @@ namespace Trk
     return performFit(fitState, particleHypothesis, trackInfo, nullptr, nullptr, garbage);
   }
 
-  Track*
-  iPatFitter::fit(const Track& indetTrack,
+  std::unique_ptr<Track>
+  iPatFitter::fit(const EventContext& ctx,
+                  const Track& indetTrack,
                   const Track& spectrometerTrack,
                   const RunOutlierRemoval runOutlier,
-                  const ParticleHypothesis particleHypothesis) const {
+                  const ParticleHypothesis particleHypothesis) const
+  {
     ATH_MSG_VERBOSE(" combined muon fit ");
     m_countFitAttempts++;
     // outlier removal not implemented
@@ -453,17 +474,23 @@ namespace Trk
         m_messageHelper->printWarning(13);
         return nullptr;
       }
-      if (!addMeasurements(fitState.getMeasurements(),
+      if (!addMeasurements(ctx,
+                           fitState.getMeasurements(),
                            *fitState.parameters,
                            particleHypothesis,
-                           *indetTrack.trackStateOnSurfaces())) { haveMaterial = false; }
+                           *indetTrack.trackStateOnSurfaces())) {
+        haveMaterial = false;
+      }
     }
 
     // add the spectrometer measurements
-    if (!addMeasurements(fitState.getMeasurements(),
+    if (!addMeasurements(ctx,
+                         fitState.getMeasurements(),
                          *fitState.parameters,
                          particleHypothesis,
-                         *spectrometerTrack.trackStateOnSurfaces())) { haveMaterial = false; }
+                         *spectrometerTrack.trackStateOnSurfaces())) {
+      haveMaterial = false;
+    }
     Garbage_t garbage;
     if (!haveMaterial && particleHypothesis != Trk::nonInteracting) {
       Perigee* startingPerigee = fitState.parameters->startingPerigee();
@@ -482,15 +509,18 @@ namespace Trk
     trackInfo.addPatternReco(indetTrack.info());
     trackInfo.addPatternReco(spectrometerTrack.info());
     if (m_fullCombinedFit) {
-      Trk::Track* fittedTrack = performFit(fitState, particleHypothesis, trackInfo, nullptr, nullptr, garbage);
+      std::unique_ptr<Trk::Track> fittedTrack = performFit(
+        fitState, particleHypothesis, trackInfo, nullptr, nullptr, garbage);
 
       // validation
       for (int i = 0; i < m_forcedRefitsForValidation; ++i) {
-        if (fittedTrack) { refit(fitState, *fittedTrack, runOutlier, particleHypothesis); }
+        if (fittedTrack) {
+          refit(ctx, fitState, *fittedTrack, runOutlier, particleHypothesis);
+        }
       }
 
       return fittedTrack;
-    } else { // hybrid fit
+    } // hybrid fit
       if (!indetPerigee) {
         // fail combined muon fit as indet track without measuredPerigee
         m_messageHelper->printWarning(14);
@@ -498,22 +528,31 @@ namespace Trk
       }
       fitState.getMeasurements().insert(fitState.getMeasurements().begin(), new FitMeasurement(*indetPerigee));
       FitParameters measuredParameters(*indetPerigee);
-      Trk::Track* fittedTrack = performFit(fitState, particleHypothesis, trackInfo, indetTrack.trackStateOnSurfaces(),
-          indetTrack.fitQuality(), garbage);
+      std::unique_ptr<Trk::Track> fittedTrack =
+        performFit(fitState,
+                   particleHypothesis,
+                   trackInfo,
+                   indetTrack.trackStateOnSurfaces(),
+                   indetTrack.fitQuality(),
+                   garbage);
 
       // validation
       for (int i = 0; i < m_forcedRefitsForValidation; ++i) {
-        if (fittedTrack) { refit(fitState, *fittedTrack, runOutlier, particleHypothesis); }
+        if (fittedTrack) {
+          refit(ctx, fitState, *fittedTrack, runOutlier, particleHypothesis);
+        }
       }
 
       return fittedTrack;
-    }
+    
   }
 
   void
-  iPatFitter::addMeasurements(std::vector<FitMeasurement*>& measurements,
+  iPatFitter::addMeasurements(const EventContext& ctx,
+                              std::vector<FitMeasurement*>& measurements,
                               const MeasurementSet& measurementSet,
-                              const FitParameters& parameters) const {
+                              const FitParameters& parameters) const
+  {
     // extrapolation to set FittedTrajectory
     double qOverP = parameters.qOverP();
     double previousDistance = -m_orderingTolerance;
@@ -530,12 +569,14 @@ namespace Trk
     for (MeasurementSet::const_iterator m = measurementSet.begin();
          m != measurementSet.end();
          m++, hit++) {
-      std::unique_ptr<const TrackSurfaceIntersection> newIntersection {
-        m_stepPropagator->intersectSurface((**m).associatedSurface(),
-                                            intersection.get(),
-                                            qOverP,
-                                            m_stepField,
-                                            Trk::muon)};
+      std::unique_ptr<const TrackSurfaceIntersection> newIntersection{
+        m_stepPropagator->intersectSurface(ctx,
+                                           (**m).associatedSurface(),
+                                           intersection.get(),
+                                           qOverP,
+                                           m_stepField,
+                                           Trk::muon)
+      };
       if (newIntersection) {
         intersection = std::move(newIntersection);
 
@@ -565,7 +606,7 @@ namespace Trk
         // FIXME
         // no intersection to MeasurementSet
         m_messageHelper->printWarning(15);
-        intersection = std::make_unique<TrackSurfaceIntersection>(*intersection.get());
+        intersection = std::make_unique<TrackSurfaceIntersection>(*intersection);
       }
       auto measurement = std::make_unique<FitMeasurement>(hit, nullptr, *m);
       measurement->intersection(type, intersection.get());
@@ -578,10 +619,13 @@ namespace Trk
   }
 
   bool
-  iPatFitter::addMeasurements(std::vector<FitMeasurement*>& measurements,
-                              const FitParameters& parameters,
-                              ParticleHypothesis particleHypothesis,
-                              const DataVector<const TrackStateOnSurface>& trackStateOnSurfaces) const {
+  iPatFitter::addMeasurements(
+    const EventContext& ctx,
+    std::vector<FitMeasurement*>& measurements,
+    const FitParameters& parameters,
+    ParticleHypothesis particleHypothesis,
+    const DataVector<const TrackStateOnSurface>& trackStateOnSurfaces) const
+  {
     // create vector of any TSOS'es which require fitted alignment corrections
     std::vector<Identifier> misAlignedTSOS;
     std::vector<int> misAlignmentNumbers;
@@ -617,9 +661,9 @@ namespace Trk
     double previousDistanceR = -m_orderingTolerance;
     double previousDistanceZ = -m_orderingTolerance;
     bool reorder = false;
-    const bool skipVertexMeasurement = measurements.size() > 0;
+    const bool skipVertexMeasurement = !measurements.empty();
     const Amg::Vector3D startDirection = parameters.direction();
-    const Amg::Vector3D startPosition = parameters.position();
+    const Amg::Vector3D& startPosition = parameters.position();
     const TrackSurfaceIntersection* vertex = parameters.intersection();
     const TrackSurfaceIntersection* intersection = vertex;
     bool measurementsFlipped = false;
@@ -724,7 +768,6 @@ namespace Trk
         }
       } else if (!measurement1 && s.trackParameters()) {
         if (s.type(TrackStateOnSurface::Hole)) {
-          // ATH_MSG_VERBOSE( " addMeasurements: adding hole" );
           measurement2 = std::make_unique<FitMeasurement>(s);
         } else if (s.type(TrackStateOnSurface::Perigee)) {
           if (i == trackStateOnSurfaces.begin()) { continue; }
@@ -763,15 +806,11 @@ namespace Trk
                                                     direction,
                                                     0.);
       } else if (surface) {
-        const TrackSurfaceIntersection* newIntersection = m_stepPropagator->intersectSurface(*surface,
-                                                                                             intersection,
-                                                                                             qOverP,
-                                                                                             m_stepField,
-                                                                                             Trk::muon);
+        const TrackSurfaceIntersection* newIntersection =
+          m_stepPropagator->intersectSurface(
+            ctx, *surface, intersection, qOverP, m_stepField, Trk::muon);
 
         if (!newIntersection) {
-          // addMeasurements: skip measurement as fail to intersect
-          //                  associated surface from given starting parameters
           m_messageHelper->printWarning(18);
           measurement2.reset();
           continue;
@@ -783,7 +822,7 @@ namespace Trk
           intersection = newIntersection;
         }
         if (s.materialEffectsOnTrack()) {
-          Amg::Vector3D position = intersection->position();
+          const Amg::Vector3D& position = intersection->position();
           bool calo = (!m_indetVolume->inside(position)
                        && m_calorimeterVolume->inside(position));
           measurement1 = std::make_unique<FitMeasurement>(s.materialEffectsOnTrack(), 
@@ -855,14 +894,15 @@ namespace Trk
     return haveMaterial;
   }
 
-  Track*
+  std::unique_ptr<Trk::Track>
   iPatFitter::performFit(
-      FitState& fitState,
-      const ParticleHypothesis particleHypothesis,
-      const TrackInfo& trackInfo,
-      const DataVector<const TrackStateOnSurface>* leadingTSOS,
-      const FitQuality* perigeeQuality,
-      Garbage_t& garbage) const {
+    FitState& fitState,
+    const ParticleHypothesis particleHypothesis,
+    const TrackInfo& trackInfo,
+    const DataVector<const TrackStateOnSurface>* leadingTSOS,
+    const FitQuality* perigeeQuality,
+    Garbage_t& garbage) const
+  {
     std::vector<FitMeasurement*>& measurements = fitState.getMeasurements();
     FitParameters* parameters = fitState.parameters.get();
     // initialize the scattering centres
@@ -962,7 +1002,7 @@ namespace Trk
               // conflicting energy deposit sign for inDet material
               if (m->energyLoss() * indetEloss < 0.) { m_messageHelper->printWarning(21); }
               continue;
-            } else if (m_calorimeterVolume->inside(
+            } if (m_calorimeterVolume->inside(
                          m->intersection(FittedTrajectory).position())) {
               calo++;
               caloX0 += m->materialEffects()->thicknessInX0();
@@ -1036,7 +1076,7 @@ namespace Trk
      m_trackSummaryTool->computeAndReplaceTrackSummary(*fittedTrack, nullptr, false);
    }
 
-    return fittedTrack.release();
+    return fittedTrack;
   }
 
   void
@@ -1083,10 +1123,13 @@ namespace Trk
   }
 
   void
-  iPatFitter::refit(FitState& fitState,
-                    const Track& track,
-                    const RunOutlierRemoval runOutlier,
-                    const ParticleHypothesis particleHypothesis) const {
+  iPatFitter::refit(
+    const EventContext& ctx,
+    FitState& fitState,
+    const Track& track,
+    const RunOutlierRemoval runOutlier,
+    const ParticleHypothesis particleHypothesis) const
+  {
     ATH_MSG_VERBOSE(" refit ");
     unsigned countGoodFits = m_countGoodFits;
     unsigned countIterations = m_countIterations;
@@ -1140,8 +1183,9 @@ namespace Trk
     }
     
     fitState.newMeasurements();
-    
-    bool haveMaterial = addMeasurements(fitState.getMeasurements(),
+
+    bool haveMaterial = addMeasurements(ctx,
+                                        fitState.getMeasurements(),
                                         *fitState.parameters,
                                         particleHypothesis,
                                         *track.trackStateOnSurfaces());
@@ -1165,7 +1209,5 @@ namespace Trk
     m_countGoodFits = countGoodFits;
     m_countRefitIterations += m_countIterations - countIterations;
     m_countIterations = countIterations;
-
-    return;
-  }
+ }
 } // end of namespace
diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/iPatGlobalFitter.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/iPatGlobalFitter.cxx
index ab2a1f12ecae..fb3a14298035 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/iPatGlobalFitter.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/iPatGlobalFitter.cxx
@@ -11,6 +11,7 @@
 
 
 #include "GaudiKernel/SystemOfUnits.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 #include "TrkiPatFitterUtils/ExtrapolationType.h"
 #include "TrkiPatFitterUtils/FitMeasurement.h"
 #include "TrkiPatFitterUtils/FitParameters.h"
@@ -48,9 +49,10 @@ namespace Trk
     }
   	alignCache.m_fullCovarianceMatrix =  nullptr;
     alignCache.m_iterationsOfLastFit = 0;
-  
-    auto [refittedTrack, fitState] = fitWithState(trk, runOutlier, matEffects);
-  
+
+    auto [refittedTrack, fitState] =
+      fitWithState(Gaudi::Hive::currentContext(), trk, runOutlier, matEffects);
+
     if(refittedTrack){
   		alignCache.m_derivMatrix = derivMatrix(*fitState).release();
   	  alignCache.m_fullCovarianceMatrix = fullCovarianceMatrix(*fitState).release();
-- 
GitLab


From 8ad11d2957463d0ae1cd5c79563dc89ff4ee1790 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:32:45 +0200
Subject: [PATCH 052/266] TrigJetMonitoring: Remove TriggerChain property.

Remove the TriggerChain property of TrigL1JetMonitorAlgorithm.
It duplicates functionality from the base class, and leads to a warning
from Gaudi about a duplicated property.
---
 .../TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx    | 7 -------
 .../TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h      | 1 -
 2 files changed, 8 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx
index 9a37bbff9ce6..b220e6eca93a 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx
@@ -8,7 +8,6 @@ TrigL1JetMonitorAlgorithm::TrigL1JetMonitorAlgorithm( const std::string& name, I
   : AthMonitorAlgorithm(name,pSvcLocator)
 {
   declareProperty("L1JetContainer", m_l1jetContainerkey = "LVL1JetRoIs");
-  declareProperty("TriggerChain",   m_chain             = "");
 }
 
 TrigL1JetMonitorAlgorithm::~TrigL1JetMonitorAlgorithm() {}
@@ -21,12 +20,6 @@ StatusCode TrigL1JetMonitorAlgorithm::initialize() {
 StatusCode TrigL1JetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
   using namespace Monitored;
 
-  bool triggerPassed = true;
-  if( m_chain != "" ){
-    if( !getTrigDecisionTool()->isPassed(m_chain) ) triggerPassed = false;
-  }
-  if( !triggerPassed ) return StatusCode::SUCCESS;
-
   // Retrieve the L1 jet container
   SG::ReadHandle<xAOD::JetRoIContainer> jets(m_l1jetContainerkey, ctx);
   if( !jets.isValid() ){
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h
index 49a8c32cb7d0..a5e049789c45 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h
@@ -19,6 +19,5 @@ class TrigL1JetMonitorAlgorithm : public AthMonitorAlgorithm {
 
   // Name of the L1 jet collection to be monitored
   SG::ReadHandleKey<xAOD::JetRoIContainer> m_l1jetContainerkey;
-  std::string                              m_chain;
 };
 #endif
-- 
GitLab


From 768c602d308f399832ce71e051c887a543c42bc0 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:33:14 +0200
Subject: [PATCH 053/266] CaloUtils: Fix typos.

Fix typos in previous change.
---
 Calorimeter/CaloUtils/CaloUtils/ToolWithConstants.icc | 2 +-
 Calorimeter/CaloUtils/src/exceptions.cxx              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Calorimeter/CaloUtils/CaloUtils/ToolWithConstants.icc b/Calorimeter/CaloUtils/CaloUtils/ToolWithConstants.icc
index 34d783569bc7..bfb77cb235af 100644
--- a/Calorimeter/CaloUtils/CaloUtils/ToolWithConstants.icc
+++ b/Calorimeter/CaloUtils/CaloUtils/ToolWithConstants.icc
@@ -130,7 +130,7 @@ inline
 T ToolConstant<T>::operator()() const
 {
   if (!m_prop.m_setFromJO) {
-    throwBadContextlessRetrieve (m_prop.m_impl.m_toolName, m_prop.name());
+    CaloUtils::throwExcBadContextlessRetrieve (m_prop.m_impl.m_toolName, m_prop.name());
   }
   return static_cast<T> (m_prop);
 }
diff --git a/Calorimeter/CaloUtils/src/exceptions.cxx b/Calorimeter/CaloUtils/src/exceptions.cxx
index 6fc62ad94ea1..eea5043db0dd 100644
--- a/Calorimeter/CaloUtils/src/exceptions.cxx
+++ b/Calorimeter/CaloUtils/src/exceptions.cxx
@@ -141,7 +141,7 @@ ExcBadContextlessRetrieve::ExcBadContextlessRetrieve
  * @param toolName Name of the tool being used.
  * @param constName Name of the constant being retrieved.
  */
-void throwBadExcContextlessRetrieve (const std::string& toolName,
+void throwExcBadContextlessRetrieve (const std::string& toolName,
                                      const std::string& constName)
 {
   throw ExcBadContextlessRetrieve (toolName, constName);
-- 
GitLab


From fca3c5652abb9b98fbebc44eeb05b7f4d344d7bd Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:46:47 +0200
Subject: [PATCH 054/266] SiLorentzAngleTool: cmake fixes

Library dependency fixes.
---
 InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
index f09c72283b31..7afdee9b19be 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
@@ -36,7 +36,7 @@ atlas_add_component( SiLorentzAngleTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GeoPrimitives GaudiKernel SiPropertiesToolLib AthenaPoolUtilities Identifier InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry MagFieldElements MagFieldConditions)
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GeoPrimitives GaudiKernel SiPropertiesToolLib AthenaPoolUtilities Identifier InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry MagFieldElements MagFieldConditions InDetConditionsSummaryService )
 
 # Run tests:
 atlas_add_test( TestSCTLorentzAngle
-- 
GitLab


From 807a19b85644e6365b2e1de7ab591547ef4bca80 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:46:29 +0200
Subject: [PATCH 055/266] TRT_DriftCircleTool: cmake fixes

Define an interface library for exported headers.
Library dependency fixes.
---
 .../InDetRecTools/TRT_DriftCircleTool/CMakeLists.txt   | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/CMakeLists.txt b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/CMakeLists.txt
index 0f7d1391f63d..f7ebb0118e1b 100644
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/CMakeLists.txt
@@ -27,13 +27,17 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( Eigen )
 
+atlas_add_library( TRT_DriftCircleToolLib
+                   TRT_DriftCircleTool/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS TRT_DriftCircleTool
+                   LINK_LIBRARIES GaudiKernel InDetPrepRawData InDetRawData TrkPrepRawData AthenaBaseComps TRT_ConditionsServicesLib TRT_ReadoutGeometry CommissionEvent StoreGateLib LumiBlockData )
+
 # Component(s) in the package:
 atlas_add_component( TRT_DriftCircleTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel TRT_ConditionsServicesLib InDetRawData InDetPrepRawData TrkPrepRawData CommissionEvent GeoPrimitives EventPrimitives xAODEventInfo InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry LumiBlockData TRT_DriftFunctionToolLib )
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} TRT_DriftCircleToolLib  GeoPrimitives EventPrimitives xAODEventInfo InDetIdentifier InDetReadoutGeometry  TRT_DriftFunctionToolLib )
 
-# Install files from the package:
-atlas_install_headers( TRT_DriftCircleTool )
 
-- 
GitLab


From 9fe64806e2ea78ac505f93a214a0acec453a1bad Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:47:01 +0200
Subject: [PATCH 056/266] PixelConditionsTools: cmake fixes

Define an interface library for the exported headers.
---
 .../PixelConditionsTools/CMakeLists.txt               | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
index 1898f1e1172a..31ad2e8a32ea 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
@@ -32,17 +32,22 @@ atlas_depends_on_subdirs( PUBLIC
 find_package( CLHEP )
 find_package( Eigen )
 
+atlas_add_library( PixelConditionsToolsLib
+                   PixelConditionsTools/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS PixelConditionsTools
+                   LINK_LIBRARIES GaudiKernel AthenaPoolUtilities PixelConditionsData InDetConditionsSummaryService ${interface_extra_lib} )
+
 # Component(s) in the package:
 atlas_add_component( PixelConditionsTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives GaudiKernel AthenaBaseComps 
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} PixelConditionsToolsLib AthenaKernel GeoPrimitives GaudiKernel AthenaBaseComps 
                      SGTools AthenaPoolUtilities DetDescrConditions Identifier PixelCablingLib PixelConditionsData InDetIdentifier 
-                     GeoModelUtilities InDetReadoutGeometry PathResolver PixelGeoModelLib InDetByteStreamErrors )
+                     GeoModelUtilities InDetReadoutGeometry PathResolver PixelGeoModelLib InDetByteStreamErrors  )
 
 # Install files from the package:
-atlas_install_headers( PixelConditionsTools )
 atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/*.py )
 atlas_install_runtime( share/*.txt share/*.py )
-- 
GitLab


From 26c97d599edbfc1c5ceb3eb2583e0d7e44f48f74 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:47:15 +0200
Subject: [PATCH 057/266] POOLRootAccess: cmake fix

Dependency on StoreGateBindings should be public.
---
 PhysicsAnalysis/POOLRootAccess/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt b/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
index da76a9a862a8..a3df8865960f 100644
--- a/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
+++ b/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
@@ -26,8 +26,8 @@ atlas_add_library( POOLRootAccessLib
                    src/*.cxx
                    PUBLIC_HEADERS POOLRootAccess
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-		   LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess AthAnalysisBaseCompsLib StoreGateLib 
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel SGtests StoreGateBindings  )
+		   LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess AthAnalysisBaseCompsLib StoreGateLib StoreGateBindings 
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel SGtests  )
 
 atlas_add_dictionary( POOLRootAccessDict
                       POOLRootAccess/POOLRootAccessDict.h
@@ -43,7 +43,7 @@ atlas_add_executable( ut_basicRead_test
 atlas_add_executable( ut_basicxAODRead_test
                       test/ut_basicxAODRead_test.cxx
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} POOLRootAccessLib xAODEventInfo )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} POOLRootAccessLib xAODEventInfo xAODBase )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.opts )
-- 
GitLab


From aae89802f85d00c5217ca68a5bb5932af2dc4331 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 9 Jun 2020 03:26:56 +0200
Subject: [PATCH 058/266] IMaterialEffectsUpdator update comments tidy a bit

---
 .../TrkExInterfaces/IMaterialEffectsUpdator.h | 256 +++++++++++-------
 .../TrkExTools/src/MaterialEffectsUpdator.cxx |  12 +-
 .../IMultiStateMaterialEffects.h              |  15 -
 3 files changed, 158 insertions(+), 125 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IMaterialEffectsUpdator.h b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IMaterialEffectsUpdator.h
index 0f1ff35cb98d..1334fae9d697 100755
--- a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IMaterialEffectsUpdator.h
+++ b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IMaterialEffectsUpdator.h
@@ -25,13 +25,19 @@ class MaterialProperties;
 class MaterialEffectsOnTrack;
 
 /** Interface ID for IMaterialEffectsUpdator*/
-static const InterfaceID IID_IMaterialEffectsUpdator("IMaterialEffectsUpdator", 1, 0);
+static const InterfaceID IID_IMaterialEffectsUpdator("IMaterialEffectsUpdator",
+                                                     1,
+                                                     0);
 
 /** @class IMaterialEffectsUpdator
   Interface class for the updater AlgTool, it inherits from IAlgTool
-  Detailed information about private members and member functions can be found in the actual
-  implementation class MaterialEffectsUpdator which inherits from this one.
+
+  Detailed information about private members and member functions can be found
+  in the actual implementation class MaterialEffectsUpdator which inherits from
+  this one.
+
   @author Andreas.Salzburger@cern.ch
+
   @author Christos Anastopoulos (Athena MT)
   */
 
@@ -43,59 +49,164 @@ public:
   virtual ~IMaterialEffectsUpdator() {}
 
   /** AlgTool and IAlgTool interface methods */
-  static const InterfaceID& interfaceID() { return IID_IMaterialEffectsUpdator; }
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMaterialEffectsUpdator;
+  }
+
+  /**
+   * Abstract cache class to allow passing information to/between calls.
+   * This can be particular useful in Athena MT
+   * re-entrant algorithms
+   */
+  class ICache
+  {
+  public:
+    /* we can make this concrete
+     * if we do not need a Dummy
+     * Material Effects updator
+     */
+    enum MaterialCacheType
+    {
+      MaterialEffects = 0,
+      DummyMaterialEffects = 1
+    };
+    virtual MaterialCacheType type() const = 0;
+    virtual ~ICache() = default;
+
+  protected:
+    ICache() = default;
+  };
+  /**
+   * Creates an instance of the cache to be used.
+   * by the client.
+   */
+  virtual std::unique_ptr<ICache> getCache() const = 0;
+
+  /** Updator interface (full update for a layer):
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update
+    */
+  virtual const TrackParameters* update(
+    ICache& icache,
+    const TrackParameters* parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
+
+  /** User updator interface (full update for a layer):
+    The parmeters are given as a pointer, they are deleted inside the update
+    method. Update occurs on the place where the parameters parm are according
+    to the specified MaterialEffectsOnTrack
+    */
+  virtual const TrackParameters* update(
+    ICache& icache,
+    const TrackParameters* parm,
+    const MaterialEffectsOnTrack& meff,
+    Trk::ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
+
+  /** Updator interface (pre-update for a layer):
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update
+    */
+  virtual const TrackParameters* preUpdate(
+    ICache& icache,
+    const TrackParameters* parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
+
+  /** Updator interface (pre-update for a layer):
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update if the postUpdate fails, it returns 0
+    */
+  virtual const TrackParameters* postUpdate(
+    ICache& icache,
+    const TrackParameters& parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
+
+  /** Updator interface:
+    The parmeters are given as a pointer, they are delete inside the update
+    method. MaterialProperties based material update
+    - used by all Layer-based methods
+    */
+  virtual const TrackParameters* update(
+    ICache& icache,
+    const TrackParameters& parm,
+    const MaterialProperties& mprop,
+    double pathcorrection,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
+
+  /** Validation Action: */
+  virtual void validationAction(ICache& icache) const = 0;
+
+  /** Model Action:*/
+  virtual void modelAction(ICache& icache,
+                           const TrackParameters* parm = nullptr) const = 0;
 
   /** Updator interface (full update for a layer):
-    The parmeters are given as a pointer, they are delete inside the update method.
-    Layer-based material update
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update
     */
-  virtual const TrackParameters* update(const TrackParameters* parm,
-                                        const Layer& sf,
-                                        PropDirection dir = alongMomentum,
-                                        ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
+  virtual const TrackParameters* update(
+    const TrackParameters* parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
 
   /** User updator interface (full update for a layer):
-    The parmeters are given as a pointer, they are deleted inside the update method.
-    Update occurs on the place where the parameters parm are according to the specified
-    MaterialEffectsOnTrack
+    The parmeters are given as a pointer, they are deleted inside the update
+    method. Update occurs on the place where the parameters parm are according
+    to the specified MaterialEffectsOnTrack
     */
-  virtual const TrackParameters* update(const TrackParameters* parm,
-                                        const MaterialEffectsOnTrack& meff,
-                                        ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
+  virtual const TrackParameters* update(
+    const TrackParameters* parm,
+    const MaterialEffectsOnTrack& meff,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
   /** Updator interface (pre-update for a layer):
-    The parmeters are given as a pointer, they are delete inside the update method.
-    Layer-based material update
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update
     */
-  virtual const TrackParameters* preUpdate(const TrackParameters* parm,
-                                           const Layer& sf,
-                                           PropDirection dir = alongMomentum,
-                                           ParticleHypothesis particle = pion,
-                                           MaterialUpdateMode matupmode = addNoise) const = 0;
+  virtual const TrackParameters* preUpdate(
+    const TrackParameters* parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
 
   /** Updator interface (pre-update for a layer):
-    The parmeters are given as a pointer, they are delete inside the update method.
-    Layer-based material update
-    if the postUpdate fails, it returns 0
+    The parmeters are given as a pointer, they are delete inside the update
+    method. Layer-based material update if the postUpdate fails, it returns 0
     */
-  virtual const TrackParameters* postUpdate(const TrackParameters& parm,
-                                            const Layer& sf,
-                                            PropDirection dir = alongMomentum,
-                                            ParticleHypothesis particle = pion,
-                                            MaterialUpdateMode matupmode = addNoise) const = 0;
+  virtual const TrackParameters* postUpdate(
+    const TrackParameters& parm,
+    const Layer& sf,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
 
   /** Updator interface:
-    The parmeters are given as a pointer, they are delete inside the update method.
-    MaterialProperties based material update
+    The parmeters are given as a pointer, they are delete inside the update
+    method. MaterialProperties based material update
     - used by all Layer-based methods
     */
-  virtual const TrackParameters* update(const TrackParameters& parm,
-                                        const MaterialProperties& mprop,
-                                        double pathcorrection,
-                                        PropDirection dir = alongMomentum,
-                                        ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
+  virtual const TrackParameters* update(
+    const TrackParameters& parm,
+    const MaterialProperties& mprop,
+    double pathcorrection,
+    PropDirection dir = alongMomentum,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const = 0;
   /** Validation Action:
     outside access to internal validation steps
     Optional */
@@ -106,69 +217,6 @@ public:
    * Optional
    */
   virtual void modelAction(const TrackParameters* parm = nullptr) const = 0;
-
-  /** Interfaces for clients using  a local cache.*/
-
-  /** 
-   * The cache class
-   */
-  class ICache
-  {
-  public:
-    enum MaterialCacheType
-    {
-      MaterialEffects = 0,
-      DummyMaterialEffects = 1
-    };
-    virtual MaterialCacheType type() const = 0;
-    virtual ~ICache() = default;
-
-  protected:
-    ICache() = default;
-  };
-
-  virtual std::unique_ptr<ICache> getCache() const = 0;
-
-  virtual const TrackParameters* update(ICache& icache,
-                                        const TrackParameters* parm,
-                                        const Layer& sf,
-                                        PropDirection dir = alongMomentum,
-                                        ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
-
-  virtual const TrackParameters* update(ICache& icache,
-                                        const TrackParameters* parm,
-                                        const MaterialEffectsOnTrack& meff,
-                                        Trk::ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
-
-  virtual const TrackParameters* preUpdate(ICache& icache,
-                                           const TrackParameters* parm,
-                                           const Layer& sf,
-                                           PropDirection dir = alongMomentum,
-                                           ParticleHypothesis particle = pion,
-                                           MaterialUpdateMode matupmode = addNoise) const = 0;
-
-  virtual const TrackParameters* postUpdate(ICache& icache,
-                                            const TrackParameters& parm,
-                                            const Layer& sf,
-                                            PropDirection dir = alongMomentum,
-                                            ParticleHypothesis particle = pion,
-                                            MaterialUpdateMode matupmode = addNoise) const = 0;
-
-  virtual const TrackParameters* update(ICache& icache,
-                                        const TrackParameters& parm,
-                                        const MaterialProperties& mprop,
-                                        double pathcorrection,
-                                        PropDirection dir = alongMomentum,
-                                        ParticleHypothesis particle = pion,
-                                        MaterialUpdateMode matupmode = addNoise) const = 0;
-
-  /** Validation Action: */
-  virtual void validationAction(ICache& icache) const = 0;
-
-  /** Model Action:*/
-  virtual void modelAction(ICache& icache, const TrackParameters* parm = nullptr) const = 0;
 };
 
 } // end of namespace
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
index c9ed2a8fc784..6e4eb8458951 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
@@ -97,9 +97,9 @@ Trk::MaterialEffectsUpdator::initialize() {
                     "Failed to retrieve tool " << m_eLossUpdator << ". No multiple scattering effects will be taken into account.");
       m_doEloss = false;
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_DEBUG("Retrieved tool " << m_eLossUpdator);
-    }
+    
   }
   else {
     m_eLossUpdator.disable();
@@ -111,9 +111,9 @@ Trk::MaterialEffectsUpdator::initialize() {
                     ". No energy loss effects will be taken into account.");
       m_doMs = false;
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_DEBUG("Retrieved tool " << m_msUpdator);
-    }
+    
   }
   else {
     m_msUpdator.disable();
@@ -124,9 +124,9 @@ Trk::MaterialEffectsUpdator::initialize() {
     if (m_materialMapper.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_materialMapper << ". No material recording.");
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_DEBUG("Retrieved tool " << m_materialMapper);
-    }
+    
   }
   else {
     m_materialMapper.disable();
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
index 5118360d4f36..1d235b978b8d 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
@@ -14,19 +14,6 @@
  */
 
 
-/*************************************************************************************
-      IMultiStateMaterialEffects.h  -  description
-      --------------------------------------------
-begin                : Thursday 17th February 2005
-author               : atkinson
-email                : Tom.Atkinson@cern.ch
-decription           : (Non-pure) abstract base class for defining material
-                       effects including energy loss and multiple scattering for
-                       use in the multi-component state environment. These
-                       material effects will produce multi-component state
-outputs
-************************************************************************************/
-
 #ifndef Trk_IMultiStateMaterialEffects_H
 #define Trk_IMultiStateMaterialEffects_H
 
@@ -37,8 +24,6 @@ outputs
 #include "TrkEventPrimitives/PropDirection.h"
 #include "TrkMultiComponentStateOnSurface/MultiComponentState.h"
 
-#include "TrkExInterfaces/IMaterialEffectsUpdator.h"
-
 #include <Eigen/StdVector>
 #include <memory>
 
-- 
GitLab


From f6e34200e9c97a72dbf78fa6f1f60e807bf13f45 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 17:11:16 +0200
Subject: [PATCH 059/266] JetRec: Fix clang warning.

Don't use std::move for a return.
---
 Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
index 425f0a846415..b8cb9467dae7 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
@@ -83,7 +83,7 @@ std::unique_ptr<PseudoJetContainer> PseudoJetAlgorithm::createPJContainer(const
   auto pjcont = std::make_unique<PseudoJetContainer>(extractor.release(), vpj);
   ATH_MSG_DEBUG("New PseudoJetContainer size " << pjcont->size());
 
-  return std::move(pjcont);
+  return pjcont;
 }
 
 
-- 
GitLab


From ebc5501fe20be15e18a75f57e8152cd78c5e7221 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 17:13:30 +0200
Subject: [PATCH 060/266] SCT_ConditionsData: Fix clang warning.

SCT_ReadoutData has a unique_ptr member, so it cannot have a defaulted
ctor/assignment op.
---
 .../SCT_ConditionsData/SCT_ReadoutData.h                  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
index f89ba37dc96f..9303ef9d82c8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
@@ -44,10 +44,10 @@ public:
   SCT_ReadoutData(IMessageSvc* msgSvc=nullptr);
   ~SCT_ReadoutData() = default;
 
-  /** Default copy constructor*/
-  SCT_ReadoutData(const SCT_ReadoutData&) = default;
-  /** Default assignment operator*/
-  SCT_ReadoutData& operator=(const SCT_ReadoutData&) = default;
+  /** No copy ctor due to m_msg*/
+  SCT_ReadoutData(const SCT_ReadoutData&) = delete;
+  /** No assignment operator due to m_msg */
+  SCT_ReadoutData& operator=(const SCT_ReadoutData&) = delete;
   /** Default move constructor*/
   SCT_ReadoutData(SCT_ReadoutData&&) = default;
   /** Default move assignment operator*/
-- 
GitLab


From 7d3cbe3c68113503d595e50b95f033d3381bfee9 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 17:14:23 +0200
Subject: [PATCH 061/266] SCT_RawDataByteStreamCnv: Fix clang warning.

struct/class mismatch.
---
 .../SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx            | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
index 0171dbf8fe1f..9efdfee05fdb 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
@@ -172,7 +172,8 @@ StatusCode SCT_RodDecoder::finalize()
  * To be sure that all of the errors are saved this helper class provides add method allowing to update/accumulate erorr.
  * The IDC, for a very good reasons (MT safety) do not allow for that.
  **/
-struct SCT_RodDecoderErrorsHelper {
+class SCT_RodDecoderErrorsHelper {
+public:
   SCT_RodDecoderErrorsHelper( IDCInDetBSErrContainer& idcContainer )
     : errorsIDC{ idcContainer } {}
   ~SCT_RodDecoderErrorsHelper() {
-- 
GitLab


From 546bff7eb815a4eaa340d86e1daffe61d860999e Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 16:53:08 +0200
Subject: [PATCH 062/266] CaloTools: Increase test timeout.

Increase timout for test that has been timing out in dbg builds.
---
 Calorimeter/CaloTools/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Calorimeter/CaloTools/CMakeLists.txt b/Calorimeter/CaloTools/CMakeLists.txt
index c5ad29c9304c..a14f3bfad85e 100644
--- a/Calorimeter/CaloTools/CMakeLists.txt
+++ b/Calorimeter/CaloTools/CMakeLists.txt
@@ -71,5 +71,6 @@ atlas_add_test( CaloEstimatedGainToolConfig_test
 
 atlas_add_test( CaloEstimatedGainTool_test
                 SCRIPT python -m CaloTools.CaloEstimatedGainTool_test
+                PROPERTIES TIMEOUT 300
                 LOG_SELECT_PATTERN "ERROR|error|WARNING [^U]|FATAL|processing|TestAlg" )
 
-- 
GitLab


From 1212c48136acf70a7756470a69247fae782af6da Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 8 Jun 2020 16:54:32 +0200
Subject: [PATCH 063/266] MuonConfig: Increase test timeouts.

Increase timeouts for tests that have been timing out in dbg builds.
---
 MuonSpectrometer/MuonConfig/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MuonSpectrometer/MuonConfig/CMakeLists.txt b/MuonSpectrometer/MuonConfig/CMakeLists.txt
index c24cbba5884b..43b39d75bac8 100644
--- a/MuonSpectrometer/MuonConfig/CMakeLists.txt
+++ b/MuonSpectrometer/MuonConfig/CMakeLists.txt
@@ -45,9 +45,11 @@ if( NOT SIMULATIONBASE )
 
    atlas_add_test( MuonReconstructionConfigTest
                    SCRIPT python -m MuonConfig.MuonReconstructionConfig --run
+                   PROPERTIES TIMEOUT 1200
                    POST_EXEC_SCRIPT nopost.sh )
 
    atlas_add_test( MuonSegmentFindingConfigTest
                    SCRIPT python -m MuonConfig.MuonSegmentFindingConfig --run
+                   PROPERTIES TIMEOUT 300
                    POST_EXEC_SCRIPT nopost.sh )
 endif()
-- 
GitLab


From 05773e08b88da0eb6eb554e9fdf61202b09ebc3c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 8 Jun 2020 16:34:51 +0200
Subject: [PATCH 064/266] GeneratorObjects: Fix problems with tests.

In HepMcParticleLink::eventIndex(), the second argument to makeIndex()
should be the existing position, not a flag.  Fixes an assertion failure.

In populateFilteredGenEvent(), don't reference a map iterator after
it's been removed from the map.
---
 Generators/GeneratorObjects/src/HepMcParticleLink.cxx |  2 +-
 .../GeneratorObjects/test/HepMcParticleLink_test.cxx  | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
index ddaf6e6243a5..a8c41d63fad4 100644
--- a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
+++ b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
@@ -258,7 +258,7 @@ HepMcParticleLink::index_type HepMcParticleLink::eventIndex() const
         }
         if(event_number>-1) {
           index = static_cast<index_type>(event_number);
-          m_extBarcode.makeIndex (index, HepMcParticleLink::IS_INDEX);
+          m_extBarcode.makeIndex (index, position);
           return index;
         }
       }
diff --git a/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx b/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx
index bca5b7087184..bc5c971c4352 100644
--- a/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx
+++ b/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx
@@ -213,15 +213,12 @@ namespace MCTesting {
     }
 
     if(!ge.vertices_empty()){
-      std::vector<HepMC::GenVertexPtr> vtxvec;
       HepMC::GenEvent::vertex_iterator itvtx = ge.vertices_begin();
-      for (;itvtx != ge.vertices_end(); ++itvtx ) {
-        ge.remove_vertex(*itvtx);
-        vtxvec.push_back((*itvtx));
-        //fix me: delete vertex pointer causes crash
-        //delete (*itvtx);
+      while (itvtx != ge.vertices_end()) {
+        HepMC::GenVertex* vtx = *itvtx++;
+        ge.remove_vertex(vtx);
+        delete vtx;
       }
-      for(unsigned int i=0;i<vtxvec.size();i++)  delete vtxvec[i];
     }
 
     //.....add new vertex with geantino
-- 
GitLab


From 6e1261101685dae446fd84514e36f8140ea08755 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 9 Jun 2020 04:58:06 +0200
Subject: [PATCH 065/266] TrkTools a few clang-tidy checks

---
 ...enseEnvironmentsAmbiguityProcessorTool.cxx | 18 ++--
 ...nvironmentsAmbiguityScoreProcessorTool.cxx |  4 +-
 .../src/SimpleAmbiguityProcessorTool.cxx      | 16 ++--
 .../src/TrackSelectionProcessorTool.cxx       |  6 +-
 .../src/TrkMaterialProviderTool.cxx           | 16 ++--
 .../src/KalmanUpdator.cxx                     | 28 +++---
 .../src/KalmanUpdatorAmg.cxx                  | 58 ++++++------
 .../src/KalmanUpdatorSMatrix.cxx              | 92 +++++++++----------
 .../src/KalmanWeightUpdator.cxx               | 24 ++---
 .../src/KalmanUpdator_xk.cxx                  | 12 +--
 .../src/TrackParticleCreatorTool.cxx          | 28 +++---
 .../src/RIO_OnTrackCreator.cxx                | 42 ++++-----
 ...O_OnTrackErrorScalingDbOverrideCondAlg.cxx | 10 +-
 .../src/FieldIntegralByTrackQueryTool.cxx     |  8 +-
 .../src/TrackSlimmingTool.cxx                 |  6 +-
 .../src/TrackSummaryTool.cxx                  | 34 +++----
 .../src/DetailedTrackTruthBuilder.cxx         |  8 +-
 .../TrkTruthToTrack/src/TruthToTrack.cxx      |  8 +-
 .../src/TruthTrackRecordToTrack.cxx           |  8 +-
 19 files changed, 213 insertions(+), 213 deletions(-)

diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
index eaf84cf9f9bd..20b1fa2ed7d9 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
@@ -159,8 +159,8 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::statistics()
 void Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat::dump(MsgStream &out, bool try_brem_fit) const
 {
    auto parseFileName=[](const std::string & fullname){
-    auto dotPosition = fullname.rfind(".");
-    auto slashPosition = fullname.rfind("/");
+    auto dotPosition = fullname.rfind('.');
+    auto slashPosition = fullname.rfind('/');
     auto stringLength = dotPosition - slashPosition;
     return fullname.substr(slashPosition, stringLength);
    };
@@ -331,12 +331,12 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c
         // add track to map, map is sorted small to big !
         scoreTrackFitflagMap.emplace( -score, TrackPtr(bremTrack, true) );
         return;
-      } else {
+      } 
         ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it");
         stat.increment_by_eta(TrackStat::kNscoreZeroBremRefitScoreZero,bremTrack);
         // clean up
         cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(bremTrack) );
-      }
+      
     }
   } else {
     ATH_MSG_DEBUG ("Track score is zero, reject it");
@@ -768,9 +768,9 @@ bool Trk::DenseEnvironmentsAmbiguityProcessorTool::decideIfInHighPtBROI(const Tr
       bool inROI  = m_useHClusSeed && isHadCaloCompatible(*ptrTrack->trackParameters()->front());
       return inROI;
     }
-    else
+    
       return false;
-  } else
+  } 
     return false;
 }
 
@@ -842,11 +842,11 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::removeInnerHits(std::vector<c
           measurements.erase(measurements.begin()+i);
           break;
         }
-        else{
+        
           break;
-        }
+        
       }
-      else 
+      
         break;
     }
   }
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
index 2cde819f3061..fd5b425131e4 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
@@ -96,8 +96,8 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics() {
 void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::TrackStat::dump(MsgStream &out) const
 {
    auto parseFileName=[](const std::string & fullname){
-     auto dotPosition = fullname.rfind(".");
-     auto slashPosition = fullname.rfind("/");
+     auto dotPosition = fullname.rfind('.');
+     auto slashPosition = fullname.rfind('/');
      auto stringLength = dotPosition - slashPosition;
      return fullname.substr(slashPosition, stringLength);
    };
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
index 1366f6274c32..a67dd8230344 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
@@ -78,7 +78,7 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
       msg(MSG::FATAL) << "Failed to retrieve tool " << m_scoringTool << endmsg;
       return StatusCode::FAILURE;
     } 
-  else 
+  
     msg(MSG::INFO) << "Retrieved tool " << m_scoringTool << endmsg;
 
   sc = m_selectionTool.retrieve();
@@ -87,7 +87,7 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
       msg(MSG::FATAL) << "Failed to retrieve tool " << m_selectionTool << endmsg;
       return StatusCode::FAILURE;
     } 
-  else 
+  
     msg(MSG::INFO) << "Retrieved tool " << m_selectionTool << endmsg;
   
   sc = m_fitterTool.retrieve();
@@ -96,7 +96,7 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
       msg(MSG::FATAL) << "Failed to retrieve tool " << m_fitterTool << endmsg;
       return sc;
     } 
-  else 
+  
     msg(MSG::INFO) << "Retrieved tool " << m_fitterTool << endmsg;
   
   // suppress refit overwrites force refit
@@ -153,8 +153,8 @@ void Trk::SimpleAmbiguityProcessorTool::statistics()
 void Trk::SimpleAmbiguityProcessorTool::dumpStat(MsgStream &out) const {
    std::lock_guard<std::mutex> lock( m_statMutex );
     auto parseFileName=[](const std::string & fullname){
-      auto dotPosition = fullname.rfind(".");
-      auto slashPosition = fullname.rfind("/");
+      auto dotPosition = fullname.rfind('.');
+      auto slashPosition = fullname.rfind('/');
       auto stringLength = dotPosition - slashPosition;
     return fullname.substr(slashPosition, stringLength);
    };
@@ -214,7 +214,7 @@ void Trk::SimpleAmbiguityProcessorTool::missingTrackOrParameters(const Track* tr
      ATH_MSG_ERROR ("track pointer zero, should not happen!");
      return;
   }
-  else if (!track->trackParameters()) {
+  if (!track->trackParameters()) {
      ATH_MSG_WARNING ("No track parameters, needed for statistics code in Trk::SimpleAmbiguityProcessorTool!");
   }
 }
@@ -400,11 +400,11 @@ void Trk::SimpleAmbiguityProcessorTool::addTrack(Trk::Track* in_track,
 	      // add track to map, map is sorted small to big !
 	      trackScoreTrackMap.insert( make_pair(-score, TrackPtr(bremTrack.release(), fitted)) );
 	      return;
-	    } else {
+	    } 
 	      ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it");
 	      // statistic
 	      increment_by_eta(Counter::kNscoreZeroBremRefitScoreZero,stat,bremTrack.get());
-	    }
+	    
       cleanup_tracks.push_back(std::move(atrack));
 	  }
   } else {
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
index bba26bb5167e..f7eaca968e72 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrackSelectionProcessorTool.h"
@@ -53,7 +53,7 @@ StatusCode Trk::TrackSelectionProcessorTool::initialize()
       msg(MSG::FATAL) << "Failed to retrieve tool " << m_scoringTool << endmsg;
       return StatusCode::FAILURE;
     } 
-  else 
+  
     msg(MSG::INFO) << "Retrieved tool " << m_scoringTool << endmsg;
   
   sc = m_selectionTool.retrieve();
@@ -62,7 +62,7 @@ StatusCode Trk::TrackSelectionProcessorTool::initialize()
       msg(MSG::FATAL) << "Failed to retrieve tool " << m_selectionTool << endmsg;
       return StatusCode::FAILURE;
     } 
-  else 
+  
     msg(MSG::INFO) << "Retrieved tool " << m_selectionTool << endmsg;
 
 
diff --git a/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx b/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
index 178ae4e435bf..2b3c42fdfc88 100644
--- a/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
+++ b/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
@@ -475,7 +475,7 @@ void Trk::TrkMaterialProviderTool::getCaloMEOT(const Trk::Track& idTrack, const
 
   MagField::AtlasFieldCache    fieldCache;
   // Get field cache object
-  EventContext ctx = Gaudi::Hive::currentContext();
+  const EventContext& ctx = Gaudi::Hive::currentContext();
   SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
   const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
  
@@ -640,7 +640,7 @@ Trk::TrkMaterialProviderTool::getCaloTSOS (const Trk::TrackParameters&	parm, con
     }
     return caloTSOS;    
     
-  } else {
+  } 
 
     // get boundary surfaces of the target volume
     auto boundaryIntersections = targetVolume->boundarySurfacesOrdered<Trk::TrackParameters>(parm,dir,false);
@@ -691,7 +691,7 @@ Trk::TrkMaterialProviderTool::getCaloTSOS (const Trk::TrackParameters&	parm, con
         return caloTSOS;    
       }
     }
-  }
+  
 
   return caloTSOS;
 }
@@ -991,7 +991,7 @@ CaloEnergy* Trk::TrkMaterialProviderTool::getParamCaloELoss(Trk::Track* track) c
 	      paramCaloEnergy->set_measEnergyLoss(caloEnergy->deltaEMeas(), caloEnergy->sigmaDeltaEMeas());
 	      paramCaloEnergy->set_paramEnergyLoss(caloEnergy->deltaEParam(), caloEnergy->sigmaMinusDeltaEParam(), caloEnergy->sigmaPlusDeltaEParam());
 	      return paramCaloEnergy;
-	    }else
+	    }
 	      return caloEnergy->clone();
 	  }
 	}
@@ -1078,9 +1078,9 @@ void Trk::TrkMaterialProviderTool::removeOutOfCalo(std::vector<const Trk::TrackS
                                       state=nullptr;
                                       return true;
                                     }
-                                    else {
+                                    
                                       return false;
-                                    }
+                                    
                                   } ), 
                    caloTSOS->end());
 
@@ -1102,9 +1102,9 @@ void Trk::TrkMaterialProviderTool::removeMS(std::vector<const Trk::TrackStateOnS
                                       state=nullptr;
                                       return true;
                                     }
-                                    else {
+                                    
                                       return false;
-                                    }
+                                    
                                   } ), 
                    caloTSOS->end());
 
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdator.cxx b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdator.cxx
index c7e67e59fe63..13ad69ec316e 100755
--- a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdator.cxx
+++ b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdator.cxx
@@ -86,9 +86,9 @@ Trk::TrackParameters* Trk::KalmanUpdator::addToState (const Trk::TrackParameters
     if (fitQoS) {
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
       return nullptr;
-    } else {
+    } 
       return calculateFilterStep (trkPar, measmtPos, measmtErr, 1, fitQoS, true);
-    }
+    
 }
 
 // updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -100,9 +100,9 @@ Trk::TrackParameters* Trk::KalmanUpdator::addToState (const Trk::TrackParameters
     if (fitQoS) {
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
       return nullptr;
-    } else {
+    } 
       return calculateFilterStep (trkPar, measmtPar, measmtErr, 1, fitQoS, true);
-    }
+    
 }
 
 // inverse updator #1 for Kalman Fitter - version with Amg::Vector2D (for example for PrepRawData)
@@ -133,9 +133,9 @@ Trk::TrackParameters* Trk::KalmanUpdator::removeFromState (const Trk::TrackParam
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to"
                        << " avoid mem leak!"  );
       return nullptr;
-    } else {
+    } 
       return calculateFilterStep (trkPar, measmtPos, measmtErr, -1, fitQoS, true);
-    }
+    
 }
 
 // inverse updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -148,9 +148,9 @@ Trk::TrackParameters* Trk::KalmanUpdator::removeFromState (const Trk::TrackParam
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to"
                        << " avoid mem leak!"  );
         return nullptr;
-    } else {
+    } 
         return calculateFilterStep (trkPar, measmtPar, measmtErr, -1, fitQoS, true);
-    }
+    
 }
 
 // state-to-state updator, trajectory combination - version without fitQuality
@@ -215,7 +215,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::combineStates (const Trk::TrackParamet
   if (fitQoS) {
     ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
     return nullptr;
-  } else {
+  } 
     // if only one of two has an error, return that one
     if (!one.covariance()) {
       fitQoS =  new FitQualityOnSurface(0.f, 5);
@@ -257,7 +257,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::combineStates (const Trk::TrackParamet
                                                                           par[Trk::phi],par[Trk::theta],par[Trk::qOverP],covPar); 
     if (m_outputlevel<=0) logResult("combineStates(TP,TP,FQ)", par, *covPar);
     return comb;
-  }
+  
 }
 
 
@@ -447,7 +447,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::calculateFilterStep (const Trk::TrackP
     if (sign<0) {
       ATH_MSG_WARNING( "MeasuredTrackParameters == Null, can not calculate updated parameter state"  );
       return nullptr;
-    } else {
+    } 
       // no error given - use a huge error matrix for the time
       // covTrk = Amg::MatrixX(5, 1) * 1000.f;
       ATH_MSG_VERBOSE( "-U- no covTrk at input -  assign large error matrix for the time being."  );
@@ -456,7 +456,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::calculateFilterStep (const Trk::TrackP
       covTrk(2,2) = m_cov0[2];
       covTrk(3,3) = m_cov0[3];
       covTrk(4,4) = m_cov0[4];
-    } 
+    
   }else {
     covTrk = (*trkPar.covariance());
   }
@@ -555,7 +555,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::calculateFilterStep (const Trk::TrackP
       ATH_MSG_WARNING( "MeasuredTrackParameters == Null, can not calculate "
                        << "updated parameter state."  );
       return nullptr;
-    } else {
+    } 
       // no error given - use a huge error matrix for the time
       // covTrk = Amg::MatrixX(5, 1) * 1000.f;
       ATH_MSG_VERBOSE( "-U- no covTrk at input - "
@@ -565,7 +565,7 @@ Trk::TrackParameters* Trk::KalmanUpdator::calculateFilterStep (const Trk::TrackP
       covTrk(2,2) = m_cov0[2];
       covTrk(3,3) = m_cov0[3];
       covTrk(4,4) = m_cov0[4];
-    } 
+    
   } else {
     covTrk = (*trkPar.covariance());
   }
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorAmg.cxx b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorAmg.cxx
index 0e976bf29614..c2a47c4d4969 100755
--- a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorAmg.cxx
+++ b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorAmg.cxx
@@ -21,7 +21,7 @@
 
 // #include "EventPrimitives/SymmetricMatrixHelpers.h"
 // #include <Eigen/LU>
-#include <math.h>
+#include <cmath>
 #include <cstring>
 
 const Trk::ParamDefsAccessor Trk::KalmanUpdatorAmg::s_enumAccessor;
@@ -94,7 +94,7 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::addToState (const Trk::TrackParamet
     return calculateFilterStep_1D (trkPar,*trkCov,
                                    measLocPos[0],measLocCov(0,0),1,
                                    updatingSign,fitQoS,false);
-  } else if (nLocCoord == 2) {
+  } if (nLocCoord == 2) {
     return calculateFilterStep_T<2>(trkPar,*trkCov,
                                     measLocPos,measLocCov.block<2,2>(0,0),3,
                                     updatingSign,fitQoS,false);
@@ -125,7 +125,7 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::addToState (const Trk::TrackParamet
     if (fitQoS) {
         ATH_MSG_WARNING("expect nil FitQuality pointer, refuse operation to avoid mem leak!");
         return nullptr;
-    } else {
+    } 
       // get the Start covariance matrix
       const AmgSymMatrix(5)* trkCov = getStartCov(trkPar,updatingSign);
       if (!trkCov) return nullptr;
@@ -135,15 +135,15 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::addToState (const Trk::TrackParamet
         return calculateFilterStep_1D (trkPar,*trkCov,
                                        measLocPos[0],measLocCov(0,0),1,
                                        updatingSign,fitQoS,true);
-      } else if (nLocCoord == 2) {
+      } if (nLocCoord == 2) {
         return calculateFilterStep_T<2>(trkPar,*trkCov,
                                         measLocPos,measLocCov.block<2,2>(0,0),3,
                                         updatingSign,fitQoS,true);
-      } else {
+      } 
         ATH_MSG_WARNING(" number (" << nLocCoord << ") of local coordinates must be 1 or 2, can not update!");
         return nullptr;
-      }
-    }
+      
+    
 }
 
 // updator #4 for Kalman Fitter - version with LocalParameters (MeasurementBase method)
@@ -156,9 +156,9 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::addToState (const Trk::TrackParamet
     if (fitQoS) {
         ATH_MSG_WARNING("expect nil FitQuality pointer, refuse operation to avoid mem leak!");
       return nullptr;
-    } else {
+    } 
       return prepareFilterStep (trkPar, measmtPar, measmtCov, 1, fitQoS, true);
-    }
+    
 }
 
 // inverse updator #1 for Kalman Fitter - version with Amg::Vector2D (PrepRawData method)
@@ -180,14 +180,14 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::removeFromState (const Trk::TrackPa
       return calculateFilterStep_1D (trkPar,*trkCov,
                                      measLocPos[0],measLocCov(0,0),1,
                                      updatingSign,fitQoS,false);
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       return calculateFilterStep_T<2>(trkPar,*trkCov,
                                      measLocPos,measLocCov.block<2,2>(0,0),3,
                                      updatingSign,fitQoS,false);
-    } else {
+    } 
       ATH_MSG_WARNING(" number (" << nLocCoord << ") of local coordinates must be 1 or 2, can not un-update!");
       return nullptr;
-    }
+    
 }
 
 // inverse updator #2 for Kalman Fitter - version with LocalParameters (MeasurementBase method)
@@ -210,7 +210,7 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::removeFromState (const Trk::TrackPa
       ATH_MSG_WARNING("expect nil FitQuality pointer, refuse operation to"
             << " avoid mem leak!");
       return nullptr;
-    } else {
+    } 
 
       // get the Start covariance matrix
       const AmgSymMatrix(5)* trkCov = getStartCov(trkPar,updatingSign);
@@ -223,15 +223,15 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::removeFromState (const Trk::TrackPa
         return calculateFilterStep_1D (trkPar,*trkCov,
                                        measLocPos[0],measLocCov(0,0),1,
                                        updatingSign,fitQoS,true);
-      } else if (nLocCoord == 2) {
+      } if (nLocCoord == 2) {
         return calculateFilterStep_T<2>(trkPar,*trkCov,
                                        measLocPos,measLocCov.block<2,2>(0,0),3,
                                        updatingSign,fitQoS,true);
-      } else {
+      } 
         ATH_MSG_WARNING(" number (" << nLocCoord << ") of local coordinates must be 1 or 2, can not un-update!");
         return nullptr;
-      }
-    }
+      
+    
 }
 
 // inverse updator #4 for Kalman Fitter - version with LocalParameters (MeasurementBase method)
@@ -244,9 +244,9 @@ Trk::TrackParameters* Trk::KalmanUpdatorAmg::removeFromState(const Trk::TrackPar
     if (fitQoS) {
         ATH_MSG_WARNING("expect nil FitQuality pointer, refuse operation to avoid mem leak!");
         return nullptr;
-    } else {
+    } 
         return prepareFilterStep (trkPar, measmtPar, measmtCov, -1, fitQoS, true);
-    }
+    
 }
 
 // state-to-state updator, trajectory combination - version without fitQuality
@@ -322,13 +322,13 @@ Trk::KalmanUpdatorAmg::stateFitQuality (const Trk::TrackParameters& trkPar,
     if (nLocCoord == 1) {
       return makeChi2_1D(trkPar.parameters(),(*trkPar.covariance()),
                          rioLocPos[Trk::locX],rioCov(0,0), 1,fullPred); // key=1, signForUpdatedChi2 = -1
-   } else if (nLocCoord == 2) {
+   } if (nLocCoord == 2) {
       return makeChi2_T<2>(trkPar.parameters(),(*trkPar.covariance()),
                            rioLocPos,rioCov.block<2,2>(0,0), 3,fullPred);
-   } else {
+   } 
       ATH_MSG_WARNING("Error in local position - must be 1D or 2D!");
       return nullptr;
-   }
+   
 }
 
 
@@ -543,7 +543,7 @@ Trk::KalmanUpdatorAmg::calculateFilterStep_1D (const TrackParameters& TP, const
   if (R == 0.0) {
     ATH_MSG_DEBUG("inversion of the error-on-the-residual failed.");
     return nullptr;
-  } else R = 1./R;
+  } R = 1./R;
   // --- compute Kalman gain matrix
   AmgMatrix(5,1) K = trkCov.block<5,1>(0,mk) * R;
   ATH_MSG_VERBOSE ("-U- residual            = " << r << '\n'<< "-U- inv. sigmaR         = " <<
@@ -621,7 +621,7 @@ Trk::KalmanUpdatorAmg::calculateFilterStep_1D(const AmgVector(5)& trkPar, const
   if (R == 0.0) {
     ATH_MSG_DEBUG("inversion of the error-on-the-residual failed.");
     return nullptr;
-  } else R = 1./R;
+  } R = 1./R;
   // --- compute Kalman gain matrix
   AmgMatrix(5,1) K = trkCov.block<5,1>(0,mk) * R;
   ATH_MSG_VERBOSE ("-U- residual            = " << r << '\n'<< "-U- inv. sigmaR         = " <<
@@ -781,9 +781,9 @@ Trk::FitQualityOnSurface* Trk::KalmanUpdatorAmg::makeChi2_1D(const AmgVector(5)&
   if (chiSquared == 0.0) {
     ATH_MSG_DEBUG( "inversion of the error-on-the-residual failed for 1D measurement, set chi2 to zero.");
     return nullptr;
-  } else {
+  } 
     chiSquared = r*r/chiSquared;
-  }
+  
   return new FitQualityOnSurface(chiSquared, 1);
 }
 
@@ -825,11 +825,11 @@ const AmgSymMatrix(5)* Trk::KalmanUpdatorAmg::getStartCov(const Trk::TrackParame
     if (isign<0) {
       ATH_MSG_WARNING ("-U- no trkCov in fit iteration, can not calculate updated parameter state.");
       return nullptr;
-    } else {
+    } 
       // no error given - use a huge error matrix for the time
       ATH_MSG_VERBOSE ("-U- no trkCov at input - assign large error matrix for the time being.");
       return m_covariance0;
-    }
+    
   }
   return covariance;
 }
@@ -841,7 +841,7 @@ bool Trk::KalmanUpdatorAmg::consistentParamDimensions(const Trk::LocalParameters
     ATH_MSG_WARNING ("dim of local parameters: "<<P.dimension()<<" vs. dim of error matrix: "<<dimCov);
     ATH_MSG_INFO    ("==> refuse update or chi2 calculation");
     return false;
-  } else return true;
+  } return true;
 }
 
 bool Trk::KalmanUpdatorAmg::correctThetaPhiRange_5D(AmgVector(5)& V,AmgSymMatrix(5)& M,
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorSMatrix.cxx b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorSMatrix.cxx
index 152439dcb285..edb56ba9e4e3 100755
--- a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorSMatrix.cxx
+++ b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanUpdatorSMatrix.cxx
@@ -92,16 +92,16 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::addToState (const Trk::TrackPar
                                    SParVector5(&inputTrkPar.parameters()[0],5),covTrk,
                                    measLocPos[0],1,measLocCov,
                                    updatingSign,fitQoS,false);
-  } else if (nLocCoord == 2) {
+  } if (nLocCoord == 2) {
     return calculateFilterStep_2D (inputTrkPar,// transmit the surface
                                    SParVector5(&inputTrkPar.parameters()[0],5),covTrk,
                                    SParVector2(measLocPos[0],measLocPos[1]),3,
                                    measLocCov,
                                    updatingSign,fitQoS,false);
-  } else {
+  } 
     ATH_MSG_WARNING( " number (" << nLocCoord << ") of local coordinates must be 1 or 2, can not update!" ); 
     return nullptr;
-  }
+  
 }
 
 // updator #2 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -123,7 +123,7 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::addToState (const Trk::TrackPar
     if (fitQoS) {
         ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!");
         return nullptr;
-    } else {
+    } 
 
       SCovMatrix5 covTrk;
       if (!getStartCov(covTrk,inputTP,updatingSign)) return nullptr;
@@ -134,17 +134,17 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::addToState (const Trk::TrackPar
                                        SParVector5(&inputTP.parameters()[0],5),covTrk,
                                        measLocPos[0],1,measLocCov,
                                        updatingSign,fitQoS,true);
-      } else if (nLocCoord == 2) {
+      } if (nLocCoord == 2) {
         return calculateFilterStep_2D (inputTP,
                                        SParVector5(&inputTP.parameters()[0],5),covTrk,
                                        SParVector2(measLocPos[0],measLocPos[1]),3,
                                        measLocCov,
                                        updatingSign,fitQoS,true);
-        } else {
+        } 
         ATH_MSG_WARNING( " number (" << nLocCoord << ") of local coordinates must be 1 or 2, can not update!" ); 
         return nullptr;
-      }
-    }
+      
+    
 }
 
 // updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -157,9 +157,9 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::addToState (const Trk::TrackPar
         ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to"
               << " avoid mem leak!" );
       return nullptr;
-    } else {
+    } 
       return prepareFilterStep (trkPar, measmtPar, measmtCov, 1, fitQoS, true);
-    }
+    
 }
 
 // inverse updator #1 for Kalman Fitter - version with Amg::Vector2D (for example for PrepRawData)
@@ -178,17 +178,17 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::removeFromState (const Trk::Tra
                                      SParVector5(&inputTP.parameters()[0],5),covTrk,
                                      measLocPos[0],1,measLocCov,
                                      updatingSign,fitQoS,false);
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       return calculateFilterStep_2D (inputTP,
                                      SParVector5(&inputTP.parameters()[0],5),covTrk,
                                      SParVector2(measLocPos[0],measLocPos[1]),3,
                                      measLocCov,
                                      updatingSign,fitQoS,false);
-    } else {
+    } 
       ATH_MSG_WARNING( " number (" << nLocCoord << ") of local coordinates "
             << "must be 1 or 2, can not un-update!" ); 
       return nullptr;
-    }
+    
 }
 
 // inverse updator #2 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -211,7 +211,7 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::removeFromState (const Trk::Tra
       msg(MSG::WARNING) << "expect nil FitQuality pointer, refuse operation to"
             << " avoid mem leak!" << endmsg;
       return nullptr;
-    } else {
+    } 
       SCovMatrix5 covTrk;
       
       if (!getStartCov(covTrk,inputTP,updatingSign)) return nullptr;
@@ -222,18 +222,18 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::removeFromState (const Trk::Tra
                                        SParVector5(&inputTP.parameters()[0],5),covTrk,
                                        measLocPos[0],1,measLocCov,
                                        updatingSign,fitQoS,true);
-      } else if (nLocCoord == 2) {
+      } if (nLocCoord == 2) {
         return calculateFilterStep_2D (inputTP,
                                        SParVector5(&inputTP.parameters()[0],5),covTrk,
                                        SParVector2(measLocPos[0],measLocPos[1]),3,
                                        measLocCov,
                                        updatingSign,fitQoS,true);
-      } else {
+      } 
         ATH_MSG_WARNING( " number (" << nLocCoord << ") of local coordinates"
               << " must be 1 or 2, can not un-update!" );
         return nullptr;
-      }
-    }
+      
+    
 }
 
 // inverse updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -245,9 +245,9 @@ Trk::TrackParameters* Trk::KalmanUpdatorSMatrix::removeFromState (const Trk::Tra
     if (fitQoS) {
         ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!" );
         return nullptr;
-    } else {
+    } 
         return prepareFilterStep (trkPar, measmtPar, measmtCov, -1, fitQoS, true);
-    }
+    
 }
 
 // state-to-state updator, trajectory combination - version without fitQuality
@@ -350,7 +350,7 @@ Trk::KalmanUpdatorSMatrix::fullStateFitQuality (const Trk::TrackParameters& trkP
                          (*trkPar.covariance()),
                          locPos[Trk::locX],covRio(0,0),
                          1,-1); // key=1, signForUpdatedChi2 = -1
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       SCovMatrix2 SmeasCov;
       SmeasCov(0,0) = covRio(0,0);
       SmeasCov(1,0) = covRio(0,1);
@@ -359,10 +359,10 @@ Trk::KalmanUpdatorSMatrix::fullStateFitQuality (const Trk::TrackParameters& trkP
                          (*trkPar.covariance()),
                          SParVector2(locPos[Trk::locX],locPos[Trk::locY]),
                          SmeasCov, 2,-1);
-    } else {
+    } 
       ATH_MSG_WARNING( "Error in local position - must be 1D or 2D!" );
       return nullptr;
-    }
+    
 }
 
 
@@ -388,7 +388,7 @@ Trk::KalmanUpdatorSMatrix::fullStateFitQuality (const Trk::TrackParameters& trkP
                          (*trkPar.covariance()),
                          parRio[s_enumAccessor.pardef[intAccessor(0)]],covRio(0,0),
                          parRio.parameterKey(),-1);
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       SCovMatrix2 SmeasCov;
       for (int i=0, irow=0; i<5; ++i) {
         if (parRio.parameterKey() & (1<<i)) {
@@ -402,14 +402,14 @@ Trk::KalmanUpdatorSMatrix::fullStateFitQuality (const Trk::TrackParameters& trkP
                          SParVector2(parRio[s_enumAccessor.pardef[intAccessor(0)]],
                                      parRio[s_enumAccessor.pardef[intAccessor(1)]]),
                          SmeasCov, parRio.parameterKey(),-1);
-    } else if (nLocCoord == 5) {
+    } if (nLocCoord == 5) {
       return makeChi2_5D(SParVector5(&trkPar.parameters()[0],5),
                          (*trkPar.covariance()),
                          SParVector5(parRio[Trk::locX],parRio[Trk::locY],
                                      parRio[Trk::phi0],parRio[Trk::theta],
                                      parRio[Trk::qOverP]),
                          covRio,-1);
-    } else { // stay with Eigen for other cases
+    } // stay with Eigen for other cases
 
       // State to measurement dimensional reduction Matrix ( n x m )
       const Amg::MatrixX& H = parRio.expansionMatrix();
@@ -421,7 +421,7 @@ Trk::KalmanUpdatorSMatrix::fullStateFitQuality (const Trk::TrackParameters& trkP
       
       // all the rest is outsourced to a common chi2 routine
       return makeChi2Object(r,(*trkPar.covariance()),covRio,H,-1);
-    }
+    
 }
 
 // estimator for FitQuality on Surface (allows for setting of LR for straws)
@@ -447,7 +447,7 @@ Trk::KalmanUpdatorSMatrix::predictedStateFitQuality (const Trk::TrackParameters&
                          (*predPar.covariance()),
                          rioLocPos[Trk::locX],covRio(0,0),
                          1,+1); // key=1, signForUpdatedChi2 = +1
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       SCovMatrix2 SmeasCov;
       SmeasCov(0,0) = covRio(0,0);
       SmeasCov(1,0) = covRio(1,0);
@@ -456,10 +456,10 @@ Trk::KalmanUpdatorSMatrix::predictedStateFitQuality (const Trk::TrackParameters&
                          (*predPar.covariance()),
                          SParVector2(rioLocPos[Trk::locX],rioLocPos[Trk::locY]),
                          SmeasCov, 2,+1);
-    } else {
+    } 
       ATH_MSG_WARNING( "Error in local position - must be 1D or 2D!" );
       return nullptr;
-    }
+    
 }
 
 // estimator for FitQuality on Surface (allows for setting of LR for straws)
@@ -489,7 +489,7 @@ Trk::KalmanUpdatorSMatrix::predictedStateFitQuality (const Trk::TrackParameters&
                          (*predPar.covariance()),
                          parRio[s_enumAccessor.pardef[intAccessor(0)]],covRio(0,0),
                          parRio.parameterKey(),+1);
-    } else if (nLocCoord == 2) {
+    } if (nLocCoord == 2) {
       SCovMatrix2 SmeasCov;
       for (int i=0, irow=0; i<5; ++i) {
         if (parRio.parameterKey() & (1<<i)) {
@@ -503,14 +503,14 @@ Trk::KalmanUpdatorSMatrix::predictedStateFitQuality (const Trk::TrackParameters&
                          SParVector2(parRio[s_enumAccessor.pardef[intAccessor(0)]],
                                      parRio[s_enumAccessor.pardef[intAccessor(1)]]),
                          SmeasCov, parRio.parameterKey(),+1);
-    } else if (nLocCoord == 5 ) {
+    } if (nLocCoord == 5 ) {
       return makeChi2_5D(SParVector5(&predPar.parameters()[0],5),
                          (*predPar.covariance()),
                          SParVector5(parRio[Trk::locX],parRio[Trk::locY],
                                      parRio[Trk::phi0],parRio[Trk::theta],
                                      parRio[Trk::qOverP]),
                          covRio,+1);
-    } else { // stay with CLHEP for other cases
+    } // stay with CLHEP for other cases
 
       // State to measurement dimensional reduction Matrix ( n x m )
       const Amg::MatrixX& H = parRio.expansionMatrix();
@@ -523,7 +523,7 @@ Trk::KalmanUpdatorSMatrix::predictedStateFitQuality (const Trk::TrackParameters&
       // all the rest is outsourced to a common chi2 routine
       return makeChi2Object(r,(*predPar.covariance()),
                             covRio,H,+1);
-    }
+    
 }
 
 // estimator for FitQuality on Surface (allows for setting of LR for straws)
@@ -617,7 +617,7 @@ Trk::KalmanUpdatorSMatrix::calculateFilterStep_1D (const TrackParameters& TP,
   if (R == 0.0) {
     ATH_MSG_DEBUG( "inversion of the error-on-the-residual failed.");
     return nullptr;
-  } else R = 1./R;
+  } R = 1./R;
 
   // --- compute Kalman gain matrix
   ROOT::Math::SMatrix<double,5,1,ROOT::Math::MatRepStd<double, 5, 1> >
@@ -1105,9 +1105,9 @@ Trk::FitQualityOnSurface* Trk::KalmanUpdatorSMatrix::makeChi2_1D(const SParVecto
   if (chiSquared == 0.0) {
     ATH_MSG_DEBUG( "inversion of the error-on-the-residual failed." );
     return nullptr;
-  } else {
+  } 
     chiSquared = r*r/chiSquared;
-  }
+  
   return new FitQualityOnSurface(chiSquared, 1);
 }
 
@@ -1204,7 +1204,7 @@ SCovMatrix2 Trk::KalmanUpdatorSMatrix::projection_2D(const SCovMatrix5& M, const
   if (key == 3) { // shortcut the most-used case
     SCovMatrix2 S = M.Sub<SCovMatrix2> (0,0);
     return S;
-  } else {
+  } 
     ROOT::Math::SVector<int,2>  iv;
     for (int i=0,k=0; i<5; ++i) { if (key & (1<<i)) iv(k++)=i; }
     SCovMatrix2 covSubMatrix;
@@ -1214,7 +1214,7 @@ SCovMatrix2 Trk::KalmanUpdatorSMatrix::projection_2D(const SCovMatrix5& M, const
       }
     }
     return covSubMatrix;
-  }
+  
 }
 
 SCovMatrix2 Trk::KalmanUpdatorSMatrix::projection_2D(const Amg::MatrixX& M,
@@ -1235,7 +1235,7 @@ SCovMatrix3 Trk::KalmanUpdatorSMatrix::projection_3D(const SCovMatrix5& M, const
 {
   if (key == 7) { // shortcut the most-used case
     return M.Sub<SCovMatrix3> (0,0);
-  } else {
+  } 
     ROOT::Math::SVector<int,3>  iv;
     for (int i=0,k=0; i<5; ++i) { if (key & (1<<i)) iv(k++)=i; }
     SCovMatrix3 covSubMatrix;
@@ -1245,14 +1245,14 @@ SCovMatrix3 Trk::KalmanUpdatorSMatrix::projection_3D(const SCovMatrix5& M, const
       }
     }
     return covSubMatrix;
-  }
+  
 }
 
 SCovMatrix4 Trk::KalmanUpdatorSMatrix::projection_4D(const SCovMatrix5& M, const int& key) const
 {
   if (key == 15) { // shortcut the most-used case
     return M.Sub<SCovMatrix4> (0,0);
-  } else {
+  } 
     ROOT::Math::SVector<int,4> iv;
     for (int i=0,k=0; i<5; ++i) { if (key & (1<<i)) iv(k++)=i; }
     SCovMatrix4 covSubMatrix;
@@ -1262,7 +1262,7 @@ SCovMatrix4 Trk::KalmanUpdatorSMatrix::projection_4D(const SCovMatrix5& M, const
       }
     }
     return covSubMatrix;
-  }
+  
 }
 
 bool Trk::KalmanUpdatorSMatrix::getStartCov(SCovMatrix5& M,
@@ -1275,11 +1275,11 @@ bool Trk::KalmanUpdatorSMatrix::getStartCov(SCovMatrix5& M,
     if (isign<0) {
       ATH_MSG_WARNING ("MeasuredTrackParameters == Null, can not calculate updated parameter state.");
       return false;
-    } else {
+    } 
       // no error given - use a huge error matrix for the time
       ATH_MSG_VERBOSE ("-U- no covTrk at input - assign large error matrix for the time being.");
       M.SetDiagonal(m_cov0);
-    }
+    
   } else {
     //    int k = measTrkPar->localAmg::MatrixX().covariance().cols(); is always 5
     for (int i=0; i<5; ++i) {
@@ -1323,7 +1323,7 @@ bool Trk::KalmanUpdatorSMatrix::consistentParamDimensions(const Trk::LocalParame
     ATH_MSG_WARNING ("dim of local parameters: "<<P.dimension()<<" vs. dim of error matrix: "<<dimCov);
     ATH_MSG_INFO    ("==> refuse update or chi2 calculation");
     return false;
-  } else return true;
+  } return true;
 }
 
 bool Trk::KalmanUpdatorSMatrix::correctThetaPhiRange_5D(SParVector5& V,SCovMatrix5& M,
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanWeightUpdator.cxx b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanWeightUpdator.cxx
index b0207754e454..51cb1687a3f1 100755
--- a/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanWeightUpdator.cxx
+++ b/Tracking/TrkTools/TrkMeasurementUpdator/src/KalmanWeightUpdator.cxx
@@ -85,14 +85,14 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::addToState (  const Trk::TrackPa
     if (fitQoS) {
         ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
         return nullptr;
-    } else {
+    } 
         Trk::TrackParameters* outPar = calculateFilterStep (trkPar, measmtPos, measmtErr, 1, fitQoS, true);
         if (!outPar)
             fitQoS = nullptr;
         if (m_outputlevel <= 0 && outPar)
             logResult("addToState(TP,LPOS,ERR,FQ)",*outPar);
         return outPar;
-    }
+    
 }
 
 // updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -103,13 +103,13 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::addToState (  const Trk::TrackPa
     if (fitQoS) {
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
         return nullptr;
-    } else {
+    } 
         Trk::TrackParameters* outPar = calculateFilterStep (trkPar, measmtPar, measmtErr, 1, fitQoS, true);
         if (!outPar)
             fitQoS = nullptr;
         if (m_outputlevel <= 0 && outPar) logResult("addToState(TP,LPAR,ERR,FQ)",*outPar);
         return outPar;
-    }
+    
 }
 
 // inverse updator #1 for Kalman Fitter - version with Amg::Vector2D (for example for PrepRawData)
@@ -141,12 +141,12 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::removeFromState ( const Trk::Tra
     if (fitQoS) {
       ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
         return nullptr;
-    } else {
+    } 
       Trk::TrackParameters* outPar = calculateFilterStep (trkPar, measmtPos, measmtErr, -1, fitQoS, true);
         if (!outPar) fitQoS = nullptr;
         if (m_outputlevel<=0 && outPar) logResult("removeFromState(TP,LPOS,ERR,FQ)",*outPar);
         return outPar;
-    }
+    
 }
 
 // inverse updator #4 for Kalman Fitter - version with LocalParameters (for example for RIO_OnTrack)
@@ -157,12 +157,12 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::removeFromState ( const Trk::Tra
   if (fitQoS) {
     ATH_MSG_WARNING( "expect nil FitQuality pointer, refuse operation to avoid mem leak!"  );
         return nullptr;
-    } else {
+    } 
         Trk::TrackParameters* outPar = calculateFilterStep (trkPar, measmtPar, measmtErr, -1, fitQoS, true);
         if (!outPar) fitQoS = nullptr;
         if (m_outputlevel<=0 && outPar) logResult("removeFrommState(TP,LPAR,ERR,FQ)",*outPar);
         return outPar;
-    }
+    
 }
 
 // state-to-state updator, trajectory combination - version without fitQuality
@@ -473,7 +473,7 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::calculateFilterStep ( const Trk:
       ATH_MSG_ERROR( "MeasuredTrackParameters == Null, can not calculate "
                      << "updated track state"  );
       return nullptr;
-    } else {
+    } 
       // no error given - use zero weight for the time
       GOld.setZero();
       ATH_MSG_VERBOSE( "-U- no covTrk at input - "
@@ -483,7 +483,7 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::calculateFilterStep ( const Trk:
       (GOld)(2,2) = m_weight[2];
       (GOld)(3,3) = m_weight[3];
       (GOld)(4,4) = m_weight[4];
-    }
+    
   } else {
     GOld = p.covariance()->inverse();
   }
@@ -573,7 +573,7 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::calculateFilterStep ( const Trk:
     if (sign<0) {
       ATH_MSG_ERROR( "MeasuredTrackParameters == Null, can not calculate updated track state"  );
       return nullptr;
-    } else {
+    } 
       // no error given - use zero weight for the time
       GOld.setZero();
       ATH_MSG_VERBOSE( "-U- no covTrk at input - "
@@ -583,7 +583,7 @@ Trk::TrackParameters* Trk::KalmanWeightUpdator::calculateFilterStep ( const Trk:
       (GOld)(2,2) = m_weight[2];
       (GOld)(3,3) = m_weight[3];
       (GOld)(4,4) = m_weight[4];
-    }
+    
   } else {
     GOld = p.covariance()->inverse();
   }
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator_xk/src/KalmanUpdator_xk.cxx b/Tracking/TrkTools/TrkMeasurementUpdator_xk/src/KalmanUpdator_xk.cxx
index 7c5e2bb592e5..8b06508f3ff1 100755
--- a/Tracking/TrkTools/TrkMeasurementUpdator_xk/src/KalmanUpdator_xk.cxx
+++ b/Tracking/TrkTools/TrkMeasurementUpdator_xk/src/KalmanUpdator_xk.cxx
@@ -439,9 +439,9 @@ bool                        Trk::KalmanUpdator_xk::combineStates
     }
     return false;
   }
-  else if(q1) {T3=T1; return true;}
-  else if(q2) {T3=T2; return true;}
-  else return false;
+  if(q1) {T3=T1; return true;}
+  if(q2) {T3=T2; return true;}
+  return false;
 }
 
 
@@ -496,9 +496,9 @@ bool                        Trk::KalmanUpdator_xk::combineStates
     }
     return false;
   }
-  else if(q1) {T3=T1; Q=0; return true;}
-  else if(q2) {T3=T2; Q=0; return true;}
-  else return false;
+  if(q1) {T3=T1; Q=0; return true;}
+  if(q2) {T3=T2; Q=0; return true;}
+  return false;
 }
 
 ///////////////////////////////////////////////////////////////////
diff --git a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
index fa11afe73f8b..4d3f381d258f 100644
--- a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
+++ b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
@@ -158,9 +158,9 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
         if ( m_trackSummaryTool.retrieve().isFailure() ) {
           ATH_MSG_FATAL("Failed to retrieve tool " << m_trackSummaryTool );
           return StatusCode::FAILURE;
-        } else {
+        } 
           ATH_MSG_DEBUG( "Retrieved tool " << m_trackSummaryTool );
-        }
+        
       }
     else {
       m_trackSummaryTool.disable();
@@ -170,9 +170,9 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
     if ( m_extrapolator.retrieve().isFailure() ) {
       ATH_MSG_FATAL( "Failed to retrieve tool " << m_extrapolator );
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_DEBUG( "Retrieved tool " << m_extrapolator );
-    }
+    
 
     if (detStore()->retrieve(m_detID, "AtlasID" ).isFailure()) {
       ATH_MSG_FATAL ("Could not get AtlasDetectorID ");
@@ -187,9 +187,9 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
     if (m_IBLParameterSvc.retrieve().isFailure()) {
       ATH_MSG_FATAL( "Could not retrieve IBLParameterSvc" );
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO( "Retrieved tool " << m_IBLParameterSvc );
-    }
+    
 
     m_doIBL = m_IBLParameterSvc->containsIBL();
     ATH_MSG_INFO( "doIBL set to "<<m_doIBL );
@@ -202,18 +202,18 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
     if ( m_trackToVertex.retrieve().isFailure() ) {
       ATH_MSG_FATAL( "Failed to retrieve tool " << m_trackToVertex );
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_DEBUG( "Retrieved tool " << m_trackToVertex );
-    }
+    
 
     if (m_useMuonSummaryTool){
       /* Retrieve hit summary tool from ToolService */
       if ( m_hitSummaryTool.retrieve().isFailure() ) {
         ATH_MSG_FATAL("Failed to retrieve tool " << m_hitSummaryTool );
         return StatusCode::FAILURE;
-      } else {
+      } 
         ATH_MSG_DEBUG( "Retrieved tool " << m_hitSummaryTool);
-      }
+      
     }
     else{
       m_hitSummaryTool.disable();
@@ -499,10 +499,10 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
       if (!result){
         ATH_MSG_WARNING("Failed to extrapolate to first Beamspot - No TrackParticle created.");
         return nullptr;
-      }else{
+      }
         parsToBeDeleted = result;
         aPer = result;
-      }
+      
     } else if (m_perigeeExpression == "Vertex"){  // the non default way, express the perigee wrt. the vertex position
       if (vxCandidate != nullptr) {
         const Trk::Perigee* result =  m_trackToVertex->perigeeAtVertex(track, vxCandidate->position());
@@ -525,10 +525,10 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
         ATH_MSG_WARNING("Failed to extrapolate to Beamline - No TrackParticle created.");
         return nullptr;
       }
-      else{
+      
         parsToBeDeleted = result;
         aPer = result;
-      }
+      
     }
     /*
      * We start from the existing summary
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx
index f51a55b64c50..00e8c8bcd0cd 100755
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -82,9 +82,9 @@ StatusCode Trk::RIO_OnTrackCreator::initialize()
       if ( m_pixClusCor.retrieve().isFailure() ) {
 	      ATH_MSG_FATAL( "Failed to retrieve tool " << m_pixClusCor);
 	      return StatusCode::FAILURE;
-      } else {
+      } 
 	      ATH_MSG_INFO( "Retrieved tool " << m_pixClusCor);
-      }
+      
     } else {
       m_doPixel = false;
     }
@@ -93,9 +93,9 @@ StatusCode Trk::RIO_OnTrackCreator::initialize()
       if ( m_sctClusCor.retrieve().isFailure() ) {
         ATH_MSG_FATAL( "Failed to retrieve tool " << m_sctClusCor);
 	      return StatusCode::FAILURE;
-      } else {
+      } 
 	      ATH_MSG_INFO( "Retrieved tool " << m_sctClusCor);
-      }
+      
     } else {
       m_doSCT = false;
     }
@@ -104,9 +104,9 @@ StatusCode Trk::RIO_OnTrackCreator::initialize()
       if ( m_trt_Cor.retrieve().isFailure() ) {
         ATH_MSG_FATAL( "Failed to retrieve tool " << m_trt_Cor);
 	      return StatusCode::FAILURE;
-      } else {
+      } 
 	      ATH_MSG_INFO( "Retrieved tool " << m_trt_Cor);
-      }
+      
     } else {
       m_doTRT = false;
     }
@@ -120,16 +120,16 @@ StatusCode Trk::RIO_OnTrackCreator::initialize()
     if ( m_muonDriftCircleCor.retrieve().isFailure() ) {
       ATH_MSG_FATAL( "Failed to retrieve tool " << m_muonDriftCircleCor);      
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO( "Retrieved tool " << m_muonDriftCircleCor);
-    }
+    
 
     if ( m_muonClusterCor.retrieve().isFailure() ) {
       ATH_MSG_FATAL( "Failed to retrieve tool " << m_muonClusterCor);            
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO( "Retrieved tool " << m_muonClusterCor);
-    }
+    
   }
   else{
     m_muonClusterCor.disable();
@@ -170,40 +170,40 @@ Trk::RIO_OnTrackCreator::correct(const Trk::PrepRawData& rio,
     if (m_mode == "muon") {
       ATH_MSG_WARNING("I have no tool to correct the current Pixel hit! - Giving back nil.");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_DEBUG ("RIO identified as PixelCluster.");
       return m_pixClusCor->correct(rio, trk);
-    }
+    
   }
 
   if (m_doSCT && m_idHelper->is_sct(id)) {
     if (m_mode == "muon") {
       ATH_MSG_WARNING("I have no tool to correct the current SCT hit! - Giving back nil.");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_DEBUG ("RIO identified as SCT_Cluster.");
       return m_sctClusCor->correct(rio, trk);
-    }
+    
   }
 
   if (m_doTRT && m_idHelper->is_trt(id)) {
     if (m_mode == "muon") {
       ATH_MSG_WARNING("I have no tool to correct a TRT DriftCircle! - Giving back nil.");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_DEBUG ("RIO identified as TRT_DriftCircle.");
       return m_trt_Cor->correct(rio, trk);
-    }
+    
   }
 
   if (m_idHelper->is_mdt(id)){
     if (m_mode == "indet") {
       ATH_MSG_WARNING("I have no tool to correct a MDT DriftCircle! - Giving back nil.");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_DEBUG ("RIO identified as MuonDriftCircle.");
       return m_muonDriftCircleCor->correct(rio, trk);
-    }
+    
   }
   
   if ( (m_idHelper->is_csc(id)) || (m_idHelper->is_rpc(id))
@@ -211,10 +211,10 @@ Trk::RIO_OnTrackCreator::correct(const Trk::PrepRawData& rio,
     if (m_mode == "indet") {
       ATH_MSG_WARNING("I have no tool to correct a CSC/RPC/TGC hit! - Giving back nil.");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_DEBUG ("RIO identified as MuonCluster.");
       return m_muonClusterCor->correct(rio, trk);
-    }
+    
   }
 
   ATH_MSG_WARNING( "idHelper could not identify sub-detector for: "<<m_idHelper->print_to_string(id)<<". Return nil RIO_OnTrack");
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx
index ae387de9df33..af9494ba61ee 100644
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h"
@@ -28,11 +28,11 @@ StatusCode RIO_OnTrackErrorScalingDbOverrideCondAlg::initialize ATLAS_NOT_THREAD
         ATH_MSG_FATAL("PrametersPerSet must either be empty or match the number of parameters of the error scaling class " << m_errorScalingTypeName);
         return StatusCode::FAILURE;
       }
-      else {
+      
         for (unsigned int n_parameters : m_nParameterPerSet) {
           n_parameters_total += n_parameters;
         }
-      }
+      
       m_useNParametersPerSet = m_nParameterPerSet;
     }
     else {
@@ -115,9 +115,9 @@ StatusCode RIO_OnTrackErrorScalingDbOverrideCondAlg::execute() {
           ATH_MSG_FATAL("No error scaling parameters for " << write_handle.key() << " " << m_errorScalingDataKit->paramNames()[param_i] << ".");
           return StatusCode::FAILURE;
         }
-        else {
+        
           ATH_MSG_VERBOSE("Parameters for " << write_handle.key() << " " << m_errorScalingDataKit->paramNames()[param_i] << error_scaling->params()[param_i] );
-        }
+        
       }
     }
 
diff --git a/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx b/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx
index 90524a3a00ca..63ba88ddadce 100755
--- a/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx
@@ -50,11 +50,11 @@ StatusCode Trk::FieldIntegralByTrackQueryTool::initialize()
   if (m_trackingVolumesSvc.retrieve().isFailure()) {
     ATH_MSG_FATAL( "Failed to retrieve Svc " << m_trackingVolumesSvc );
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_DEBUG( "Retrieved Svc " << m_trackingVolumesSvc );
     m_caloVolume = new Trk::Volume(m_trackingVolumesSvc->volume(ITrackingVolumesSvc::MuonSpectrometerEntryLayer));
     m_indetVolume= new Trk::Volume(m_trackingVolumesSvc->volume(ITrackingVolumesSvc::CalorimeterEntryLayer));
-  }
+  
   ATH_MSG_INFO ("Successfully initialized "<<name());
   return StatusCode::SUCCESS;
 }
@@ -123,10 +123,10 @@ double Trk::FieldIntegralByTrackQueryTool::fieldIntegral(const Trk::Track& track
 		 "missing code in this tool. Will bail out...");
     return 0.0;
   }
-  else {
+  
     ATH_MSG_VERBOSE ("found starting parameters for MS field calculation at "<<
                      parameters->associatedSurface() );
-  }
+  
 
   // loop over TSOS to integrate vector Bdl
   for (DataVector<const Trk::TrackStateOnSurface>::const_iterator
diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
index e60c88054247..0275cb2af7c3 100755
--- a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
@@ -53,9 +53,9 @@ StatusCode Trk::TrackSlimmingTool::initialize()
   if (sc.isFailure()) {
     ATH_MSG_FATAL ("Could not get AtlasDetectorID ");
     return sc;
-  }else{
-    ATH_MSG_DEBUG ("Found AtlasDetectorID");
   }
+    ATH_MSG_DEBUG ("Found AtlasDetectorID");
+  
 
   ATH_MSG_INFO("initialize() successful in " << name());
   return StatusCode::SUCCESS;
@@ -292,7 +292,7 @@ void Trk::TrackSlimmingTool::findLastValidTSoS(const DataVector<const Trk::Track
       if (m_detID->is_indet((*rItTSoS)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier())) {
         lastValidIDTSOS = (*rItTSoS);
         break;
-      } else if(m_detID->is_muon((*rItTSoS)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier())){
+      } if(m_detID->is_muon((*rItTSoS)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier())){
         lastValidMSTSOS = (*rItTSoS);
         break;
       }
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index ecf10d511453..1c97225cdd19 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -61,9 +61,9 @@ StatusCode
         ATH_MSG_ERROR ("Failed to retrieve InDet helper tool "<< m_idTool);
         ATH_MSG_ERROR ("configure as 'None' to avoid its loading.");
         return StatusCode::FAILURE;
-    } else {
+    } 
         if ( !m_idTool.empty()) msg(MSG::INFO) << "Retrieved tool " << m_idTool << endmsg;
-    }
+    
 
   // Troels.Petersen@cern.ch:
     if ( !m_eProbabilityTool.empty() && m_eProbabilityTool.retrieve().isFailure() ) 
@@ -71,9 +71,9 @@ StatusCode
         ATH_MSG_ERROR ("Failed to retrieve electron probability tool " << m_eProbabilityTool);
         ATH_MSG_ERROR ("configure as 'None' to avoid its loading.");
         return StatusCode::FAILURE;
-    } else { 
+    } 
        if ( !m_eProbabilityTool.empty()) msg(MSG::INFO) << "Retrieved tool " << m_eProbabilityTool << endmsg;
-    }
+    
 
     if (!m_trt_dEdxTool.empty()) {
       ATH_CHECK( m_trt_dEdxTool.retrieve() );
@@ -85,9 +85,9 @@ StatusCode
         ATH_MSG_ERROR ("Failed to retrieve pixel dEdx tool " << m_dedxtool);
         ATH_MSG_ERROR ("configure as 'None' to avoid its loading.");
         return StatusCode::FAILURE;
-    } else {
+    } 
        if ( !m_dedxtool.empty()) msg(MSG::INFO) << "Retrieved tool " << m_dedxtool << endmsg;
-    }
+    
 
     if ( !m_muonTool.empty() && m_muonTool.retrieve().isFailure() ) 
     {
@@ -503,15 +503,15 @@ Trk::TrackSummaryTool::getTool(const Identifier& id)
   if (m_detID->is_indet(id)){
     if (!m_idTool.empty()){
       return &*m_idTool;
-    } else { 
+    } 
       ATH_MSG_WARNING("getTool: Identifier is from ID but have no ID tool");
-    }
+    
   } else if(m_detID->is_muon(id)) {
     if (!m_muonTool.empty()) {
       return &*m_muonTool;
-    } else {
+    } 
       ATH_MSG_WARNING("getTool: Identifier is from Muon but have no Muon tool");
-    }
+    
   } else {
     ATH_MSG_WARNING("getTool: Identifier is of unknown type! id: "<<id.getString());
   }
@@ -524,15 +524,15 @@ Trk::TrackSummaryTool::getTool(const Identifier& id) const
   if (m_detID->is_indet(id)){
     if (!m_idTool.empty()){
       return &*m_idTool;
-    } else { 
+    } 
       ATH_MSG_WARNING("getTool: Identifier is from ID but have no ID tool");
-    }
+    
   } else if(m_detID->is_muon(id)) {
     if (!m_muonTool.empty()) {
       return &*m_muonTool;
-    } else {
+    } 
       ATH_MSG_WARNING("getTool: Identifier is from Muon but have no Muon tool");
-    }
+    
   } else {
     ATH_MSG_WARNING("getTool: Identifier is of unknown type! id: "<<id.getString());
   }
@@ -570,8 +570,8 @@ void Trk::TrackSummaryTool::searchHolesStepWise( const Trk::Track& track,
     information [numberOfMmHoles]              = -1;
     return;
   }
-  else
-  {
+  
+  
     if (doHolesInDet)
     {
       // -------- perform the InDet hole search
@@ -603,6 +603,6 @@ void Trk::TrackSummaryTool::searchHolesStepWise( const Trk::Track& track,
       information [numberOfMmHoles] = 0;        
       m_muonTool->searchForHoles(track,information,Trk::muon) ;
     }
-  }
+  
   }
 
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
index 48d6ca1b9efb..4d37ed69d3fc 100755
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
@@ -90,9 +90,9 @@ StatusCode DetailedTrackTruthBuilder::initialize() {
   if ( m_truthTrajBuilder.retrieve().isFailure() ) {
     ATH_MSG_FATAL("Failed to retrieve TruthTrajectory building tool " << m_truthTrajBuilder);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_INFO("Retrieved TruthTrajectory building tool " << m_truthTrajBuilder);
-  }
+  
   
   if(!detStore()->retrieve(m_idHelper, "AtlasID").isSuccess()) {
     ATH_MSG_FATAL("Unable to initialize ID helper.");
@@ -373,7 +373,7 @@ void DetailedTrackTruthBuilder::addTrack(DetailedTrackTruthCollection *output,
 	sprouts.erase(p_old);
 	break; // the do-while(getMother()) loop
       }
-      else { // No, this is a new particle.  Try to extend the current truth trajectory.
+      // No, this is a new particle.  Try to extend the current truth trajectory.
 	
 	// Add the particle to the current truth trajectory.
 	// New: with the current stricter cuts on mother-daughter 
@@ -386,7 +386,7 @@ void DetailedTrackTruthBuilder::addTrack(DetailedTrackTruthCollection *output,
 	  current_sprout.stat += p_newstat->second;
 	}
 
-      }
+      
     } while( (current = m_truthTrajBuilder->getMother(current)) );
     
     // Add the grown sprout to the list
diff --git a/Tracking/TrkTools/TrkTruthToTrack/src/TruthToTrack.cxx b/Tracking/TrkTools/TrkTruthToTrack/src/TruthToTrack.cxx
index 17b82caa12b4..ffe0bd8537fd 100755
--- a/Tracking/TrkTools/TrkTruthToTrack/src/TruthToTrack.cxx
+++ b/Tracking/TrkTools/TrkTruthToTrack/src/TruthToTrack.cxx
@@ -51,9 +51,9 @@ StatusCode Trk::TruthToTrack::initialize() {
   if ( m_extrapolator.retrieve().isFailure() ) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
-  }
+  
   
   return StatusCode::SUCCESS;
 }
@@ -134,7 +134,7 @@ const Trk::TrackParameters* Trk::TruthToTrack::makePerigeeParameters(const HepMC
   if(part && part->production_vertex() && m_particleDataTable && m_extrapolator) {
 
     std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(part) );
-    if(productionVertexTrackParams.get()) {
+    if(productionVertexTrackParams) {
       
       // Extrapolate the TrackParameters object to the perigee. Direct extrapolation,
       // no material effects.
@@ -158,7 +158,7 @@ const Trk::TrackParameters* Trk::TruthToTrack::makePerigeeParameters(const xAOD:
   if(part && part->hasProdVtx() && m_particleDataTable && m_extrapolator) {
 
     std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(part) );
-    if(productionVertexTrackParams.get()) {
+    if(productionVertexTrackParams) {
       
       // Extrapolate the TrackParameters object to the perigee. Direct extrapolation,
       // no material effects.
diff --git a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
index d70cbcfb6aad..ab729c0ac68c 100755
--- a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
+++ b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
@@ -55,9 +55,9 @@ StatusCode Trk::TruthTrackRecordToTrack::initialize() {
   if ( m_extrapolator.retrieve().isFailure() ) {
     ATH_MSG_FATAL ("Failed to retrieve tool " << m_extrapolator );
     return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
   } 
+    ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
+  
 
   ATH_CHECK( m_reccollkey.initialize() );
 
@@ -215,7 +215,7 @@ const Trk::TrackParameters* Trk::TruthTrackRecordToTrack::makePerigeeParameters(
     MsgStream log(msgSvc(), name());
     
     std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(part) );
-    if(productionVertexTrackParams.get()) {
+    if(productionVertexTrackParams) {
       
       // Extrapolate the TrackParameters object to the perigee. Direct extrapolation,
       // no material effects.
@@ -239,7 +239,7 @@ const Trk::TrackParameters* Trk::TruthTrackRecordToTrack::makePerigeeParameters(
     MsgStream log(msgSvc(), name());
     
     std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(part) );
-    if(productionVertexTrackParams.get()) {
+    if(productionVertexTrackParams) {
       
       // Extrapolate the TrackParameters object to the perigee. Direct extrapolation,
       // no material effects.
-- 
GitLab


From 13c1a9a9b99048dcdc1d19458e7b7fd5fcbd863c Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Mon, 8 Jun 2020 22:01:00 -0500
Subject: [PATCH 066/266] Add fuzz to TTree comparisons to avoid py2/py3
 differences

---
 .../test_unit_ExampleMonitorAlgorithm.ref     | 118 +++++++++---------
 .../test/test_unit_ExampleMonitorAlgorithm.sh |   2 +-
 2 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
index 0c725ce1863d..85b637e33f09 100644
--- a/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
+++ b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
@@ -1,59 +1,59 @@
-TH1F /run_311321/top/run: 4000554 uncompressed, 17768 on file (hash 2879974139)
-TEfficiency /run_311321/OneRing/AndInTheDarkness/random_vs_pT_vs_pT_passed: 21034 uncompressed, 1551 on file (hash 3769596744)
-TTree /run_311321/OneRing/BindThem/testtree: 2979 uncompressed, 856 on file (hash 3604726262)
-TEfficiency /run_311321/OneRing/AndInTheDarkness/pT_vs_pT_passed: 2965 uncompressed, 684 on file (hash 3294946318)
-TH2F /run_311321/OneRing/ToBringThemAll/pT_vs_random: 909 uncompressed, 426 on file (hash 552182390)
-TH1F /run_311321/OneRing/ToFindThem/lb: 12574 uncompressed, 387 on file (hash 3672452440)
-TH1F /run_311321/OneRing/AndInTheDarkness/pT_with_cut: 759 uncompressed, 356 on file (hash 3784147481)
-TH1F /run_311321/OneRing/ToBringThemAll/random2: 668 uncompressed, 315 on file (hash 2041017371)
-TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID_merge: 748 uncompressed, 304 on file (hash 1181712869)
-TH1F /run_311321/OneRing/ToBringThemAll/random: 613 uncompressed, 298 on file (hash 1269065538)
-TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID: 742 uncompressed, 297 on file (hash 3154673526)
-TH1F /run_311321/top/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 1589876658)
-TH1F /run_311321/top/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 1382455216)
-TH1F /run_311321/top/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash 1313380230)
-TH1F /run_311321/top/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash 1105958788)
-TH1F /run_311321/OneRing/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 1589876658)
-TH1F /run_311321/OneRing/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 1382455216)
-TH1F /run_311321/OneRing/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash 1313380230)
-TH1F /run_311321/OneRing/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash 1105958788)
-TH1F /run_311321/top/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash 255957623)
-TH1F /run_311321/top/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 457873993)
-TH1F /run_311321/OneRing/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash 255957623)
-TH1F /run_311321/OneRing/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 457873993)
-TH1F /run_311321/top/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1193447169)
-TH1F /run_311321/top/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1087475456)
-TH1F /run_311321/OneRing/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1193447169)
-TH1F /run_311321/OneRing/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1087475456)
-TH1F /run_311321/top/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash 2649579799)
-TH1F /run_311321/top/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 325411073)
-TH1F /run_311321/top/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash 2543345942)
-TH1F /run_311321/top/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 219177216)
-TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash 2649579799)
-TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 325411073)
-TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash 2543345942)
-TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 219177216)
-TH1F /run_311321/top/Keys/c_layer2: 952 uncompressed, 236 on file (hash 1161596241)
-TH1F /run_311321/top/Keys/c_layer1: 952 uncompressed, 236 on file (hash 955944271)
-TH1F /run_311321/OneRing/Keys/c_layer2: 952 uncompressed, 236 on file (hash 1161596241)
-TH1F /run_311321/OneRing/Keys/c_layer1: 952 uncompressed, 236 on file (hash 955944271)
-TH2F /run_311321/top/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1684713683)
-TH2F /run_311321/top/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1574678738)
-TH2F /run_311321/OneRing/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1684713683)
-TH2F /run_311321/OneRing/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1574678738)
-TH1F /run_311321/top/Layer/c_layer2: 581 uncompressed, 228 on file (hash 972643678)
-TH1F /run_311321/top/Layer/c_layer1: 581 uncompressed, 228 on file (hash 866999645)
-TH1F /run_311321/OneRing/Layer/c_layer2: 581 uncompressed, 228 on file (hash 972643678)
-TH1F /run_311321/OneRing/Layer/c_layer1: 581 uncompressed, 228 on file (hash 866999645)
-TH1F /run_311321/top/Eta/c_1: 576 uncompressed, 222 on file (hash 3689175917)
-TH1F /run_311321/top/Eta/c_0: 576 uncompressed, 222 on file (hash 3583466348)
-TH1F /run_311321/OneRing/Eta/c_1: 576 uncompressed, 222 on file (hash 3689175917)
-TH1F /run_311321/OneRing/Eta/c_0: 576 uncompressed, 222 on file (hash 3583466348)
-TH1F /run_311321/top/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1244158600)
-TH1F /run_311321/top/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1138907783)
-TH1F /run_311321/top/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1138776711)
-TH1F /run_311321/top/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1033525894)
-TH1F /run_311321/OneRing/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1244158600)
-TH1F /run_311321/OneRing/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1138907783)
-TH1F /run_311321/OneRing/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1138776711)
-TH1F /run_311321/OneRing/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1033525894)
+TH1F /run_311321/top/run: 4000554 uncompressed (hash 2879974139)
+TH1F /run_311321/top/LayerCluster/c_layer2_clusterX: 590 uncompressed (hash 2649579799)
+TH1F /run_311321/top/LayerCluster/c_layer2_clusterB: 590 uncompressed (hash 325411073)
+TH1F /run_311321/top/LayerCluster/c_layer1_clusterX: 590 uncompressed (hash 2543345942)
+TH1F /run_311321/top/LayerCluster/c_layer1_clusterB: 590 uncompressed (hash 219177216)
+TH1F /run_311321/top/Layer/c_layer2: 581 uncompressed (hash 972643678)
+TH1F /run_311321/top/Layer/c_layer1: 581 uncompressed (hash 866999645)
+TH1F /run_311321/top/Keys/layer2/c_alternate_layer2: 955 uncompressed (hash 1193447169)
+TH1F /run_311321/top/Keys/layer1/c_alternate_layer1: 955 uncompressed (hash 1087475456)
+TH1F /run_311321/top/Keys/clusterX/c_layer2_clusterX: 979 uncompressed (hash 1589876658)
+TH1F /run_311321/top/Keys/clusterX/c_layer1_clusterX: 979 uncompressed (hash 1382455216)
+TH1F /run_311321/top/Keys/clusterB/c_layer2_clusterB: 979 uncompressed (hash 1313380230)
+TH1F /run_311321/top/Keys/clusterB/c_layer1_clusterB: 979 uncompressed (hash 1105958788)
+TH1F /run_311321/top/Keys/c_restricted_layer2_clusterX: 989 uncompressed (hash 255957623)
+TH1F /run_311321/top/Keys/c_restricted_layer1_clusterB: 989 uncompressed (hash 457873993)
+TH1F /run_311321/top/Keys/c_layer2: 952 uncompressed (hash 1161596241)
+TH1F /run_311321/top/Keys/c_layer1: 952 uncompressed (hash 955944271)
+TH1F /run_311321/top/EtaPhi/a_1_1: 578 uncompressed (hash 1244158600)
+TH1F /run_311321/top/EtaPhi/a_1_0: 578 uncompressed (hash 1138907783)
+TH1F /run_311321/top/EtaPhi/a_0_1: 578 uncompressed (hash 1138776711)
+TH1F /run_311321/top/EtaPhi/a_0_0: 578 uncompressed (hash 1033525894)
+TH1F /run_311321/top/Eta/c_1: 576 uncompressed (hash 3689175917)
+TH1F /run_311321/top/Eta/c_0: 576 uncompressed (hash 3583466348)
+TH2F /run_311321/top/Eta/b_vs_a_1: 1148 uncompressed (hash 1684713683)
+TH2F /run_311321/top/Eta/b_vs_a_0: 1148 uncompressed (hash 1574678738)
+TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID_merge: 748 uncompressed (hash 1181712869)
+TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID: 742 uncompressed (hash 3154673526)
+TH1F /run_311321/OneRing/ToFindThem/lb: 12574 uncompressed (hash 3672452440)
+TH1F /run_311321/OneRing/ToBringThemAll/random2: 668 uncompressed (hash 2041017371)
+TH1F /run_311321/OneRing/ToBringThemAll/random: 613 uncompressed (hash 1269065538)
+TH2F /run_311321/OneRing/ToBringThemAll/pT_vs_random: 909 uncompressed (hash 552182390)
+TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterX: 590 uncompressed (hash 2649579799)
+TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterB: 590 uncompressed (hash 325411073)
+TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterX: 590 uncompressed (hash 2543345942)
+TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterB: 590 uncompressed (hash 219177216)
+TH1F /run_311321/OneRing/Layer/c_layer2: 581 uncompressed (hash 972643678)
+TH1F /run_311321/OneRing/Layer/c_layer1: 581 uncompressed (hash 866999645)
+TH1F /run_311321/OneRing/Keys/layer2/c_alternate_layer2: 955 uncompressed (hash 1193447169)
+TH1F /run_311321/OneRing/Keys/layer1/c_alternate_layer1: 955 uncompressed (hash 1087475456)
+TH1F /run_311321/OneRing/Keys/clusterX/c_layer2_clusterX: 979 uncompressed (hash 1589876658)
+TH1F /run_311321/OneRing/Keys/clusterX/c_layer1_clusterX: 979 uncompressed (hash 1382455216)
+TH1F /run_311321/OneRing/Keys/clusterB/c_layer2_clusterB: 979 uncompressed (hash 1313380230)
+TH1F /run_311321/OneRing/Keys/clusterB/c_layer1_clusterB: 979 uncompressed (hash 1105958788)
+TH1F /run_311321/OneRing/Keys/c_restricted_layer2_clusterX: 989 uncompressed (hash 255957623)
+TH1F /run_311321/OneRing/Keys/c_restricted_layer1_clusterB: 989 uncompressed (hash 457873993)
+TH1F /run_311321/OneRing/Keys/c_layer2: 952 uncompressed (hash 1161596241)
+TH1F /run_311321/OneRing/Keys/c_layer1: 952 uncompressed (hash 955944271)
+TH1F /run_311321/OneRing/EtaPhi/a_1_1: 578 uncompressed (hash 1244158600)
+TH1F /run_311321/OneRing/EtaPhi/a_1_0: 578 uncompressed (hash 1138907783)
+TH1F /run_311321/OneRing/EtaPhi/a_0_1: 578 uncompressed (hash 1138776711)
+TH1F /run_311321/OneRing/EtaPhi/a_0_0: 578 uncompressed (hash 1033525894)
+TH1F /run_311321/OneRing/Eta/c_1: 576 uncompressed (hash 3689175917)
+TH1F /run_311321/OneRing/Eta/c_0: 576 uncompressed (hash 3583466348)
+TH2F /run_311321/OneRing/Eta/b_vs_a_1: 1148 uncompressed (hash 1684713683)
+TH2F /run_311321/OneRing/Eta/b_vs_a_0: 1148 uncompressed (hash 1574678738)
+TTree /run_311321/OneRing/BindThem/testtree: 2979 uncompressed (hash 3604726262)
+TEfficiency /run_311321/OneRing/AndInTheDarkness/random_vs_pT_vs_pT_passed: 21034 uncompressed (hash 3769596744)
+TH1F /run_311321/OneRing/AndInTheDarkness/pT_with_cut: 759 uncompressed (hash 3784147481)
+TEfficiency /run_311321/OneRing/AndInTheDarkness/pT_vs_pT_passed: 2965 uncompressed (hash 3294946318)
diff --git a/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh b/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh
index 35ba7c07809c..060c9e165ef0 100755
--- a/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh
+++ b/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh
@@ -3,7 +3,7 @@
 echo $PWD
 python -m AthenaMonitoring.ExampleMonitorAlgorithm
 # Grep to avoid RooFit lines
-hist_file_dump.py --hash ExampleMonitorOutput.root | grep '^T' | tee hist-content
+hist_file_dump.py -r name --no_onfile --hash ExampleMonitorOutput.root | grep '^T' | tee hist-content
 get_files -symlink test_unit_ExampleMonitorAlgorithm.ref
 diff hist-content test_unit_ExampleMonitorAlgorithm.ref
 exit $?
\ No newline at end of file
-- 
GitLab


From e2c2972e561f8cfbba372c8fb02ab544d1cc82e1 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 10:25:19 +0200
Subject: [PATCH 067/266] TrigCommon: Move flake8 checking to build stage

---
 HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt   | 11 ++---------
 HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py | 12 ++++++------
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt b/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt
index c9884ce739e8..335edfbb8319 100644
--- a/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt
+++ b/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt
@@ -6,20 +6,13 @@
 atlas_subdir( TrigCommon )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( bin/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
-atlas_install_scripts( bin/athenaHLT.py )
-atlas_install_scripts( bin/athenaHLT-select-PEB-stream.py )
-atlas_install_scripts( bin/ros2rob_from_partition.py )
 
 # Aliases:
 atlas_add_alias( athenaHLT "athenaHLT.py" )
 
-# Check python syntax:
-atlas_add_test( flake8
-   SCRIPT flake8 --select=ATL,F,E7,E9,W6 --extend-ignore=E701 ${CMAKE_CURRENT_SOURCE_DIR}/python ${CMAKE_CURRENT_SOURCE_DIR}/bin
-   POST_EXEC_SCRIPT nopost.sh )
-
 # Tests:
 atlas_add_test( test_AthHLT
    SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/AthHLT.py
diff --git a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py
index 193d2927f81e..6441ab66d7d0 100755
--- a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py
+++ b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py
@@ -16,12 +16,12 @@ export USEIMF=1
 for a in ${@}
 do
     case "$a" in
-	--leak-check*)   USETCMALLOC=0;;
-	--stdcmalloc)    USETCMALLOC=0;;
-	--tcmalloc)      USETCMALLOC=1;;
-	--stdcmath)      USEIMF=0;;
-	--imf)           USEIMF=1;;
-	--preloadlib*)   export ATHENA_ADD_PRELOAD=${a#*=};;
+        --leak-check*)   USETCMALLOC=0;;
+        --stdcmalloc)    USETCMALLOC=0;;
+        --tcmalloc)      USETCMALLOC=1;;
+        --stdcmath)      USEIMF=0;;
+        --imf)           USEIMF=1;;
+        --preloadlib*)   export ATHENA_ADD_PRELOAD=${a#*=};;
         --no-ers-signal-handlers)  export TDAQ_ERS_NO_SIGNAL_HANDLERS=1;;
     esac
 done
-- 
GitLab


From 1a6a6913b2bd607fc0a2d902f42d1f1497cf366b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 10:57:37 +0200
Subject: [PATCH 068/266] TrigBunchCrossingTool: Remove obsolete flake8 test

Remove obsolete flake8 test and the workaround for AnalysisBase.
---
 .../TrigBunchCrossingTool/CMakeLists.txt            | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
index a7d2d72a45eb..4e05b729c533 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/CMakeLists.txt
@@ -54,15 +54,4 @@ atlas_add_test( ut_web_bunch_tool_test
    PROPERTIES TIMEOUT 300 )
 
 # Install files from the package:
-
-# temporarily disabling FLAKE8 in AnalysisBase until it becomes
-# available there.
-if( XAOD_STANDALONE )
-atlas_install_python_modules( python/*.py )
-else()
-atlas_install_python_modules( python/*.py  POST_BUILD_CMD ${ATLAS_FLAKE8} )
-
-atlas_add_test( flake8_scripts
-                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/scripts
-                POST_EXEC_SCRIPT nopost.sh )
-endif()
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
-- 
GitLab


From 8181c17d8fd18007e19eed3a6dc962299dc5babb Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 10:58:40 +0200
Subject: [PATCH 069/266] AnalysisBase: Add dummy flake8 configuration

`flake8` is not available in AnalysisBase. While our cmake configuration
does handle this correctly, it fails once developers start using special
flake8 options, e.g.:
```
... POST_BUILD_CMD ${ATLAS_FLAKE8} --enable-extensions ATL902
```
Even if `ATLAS_FLAKE8` is not defined it will now try to run a command
of name `--enable-extensions`, which of course fails. An easy workaround
is to `set( ATLAS_FLAKE8 true )` where `true` here is the shell builtin,
which returns success and swallows any command line args given to it.
---
 Projects/AnalysisBase/CMakeLists.txt           | 6 ++++++
 Projects/AnalysisBase/cmake/PreConfig.cmake.in | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/Projects/AnalysisBase/CMakeLists.txt b/Projects/AnalysisBase/CMakeLists.txt
index 2493bcda372c..90ed7b819398 100644
--- a/Projects/AnalysisBase/CMakeLists.txt
+++ b/Projects/AnalysisBase/CMakeLists.txt
@@ -34,6 +34,12 @@ atlas_ctest_setup()
 atlas_project( USE AnalysisBaseExternals ${AnalysisBaseExternals_VERSION}
    PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ )
 
+# Configure flake8:
+set( ATLAS_FLAKE8 true   # <- this is the shell builtin `true`
+   CACHE STRING "Default flake8 command" )
+set( ATLAS_PYTHON_CHECKER ""
+   CACHE STRING "Python checker command to run during Python module compilation" )
+
 # Configure and install the pre/post-configuration files:
 configure_file( ${CMAKE_SOURCE_DIR}/cmake/PreConfig.cmake.in
    ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PreConfig.cmake @ONLY )
diff --git a/Projects/AnalysisBase/cmake/PreConfig.cmake.in b/Projects/AnalysisBase/cmake/PreConfig.cmake.in
index c29dae3afd0e..8d572f868251 100644
--- a/Projects/AnalysisBase/cmake/PreConfig.cmake.in
+++ b/Projects/AnalysisBase/cmake/PreConfig.cmake.in
@@ -4,6 +4,12 @@
 # @CMAKE_PROJECT_NAME@.
 #
 
+# Set up the project's flake8 usage.
+set( ATLAS_FLAKE8 @ATLAS_FLAKE8@
+   CACHE STRING "Default flake8 command" )
+set( ATLAS_PYTHON_CHECKER @ATLAS_PYTHON_CHECKER@
+   CACHE STRING "Python checker command to run during Python module compilation" )
+
 # Figure out whether to use QUIET in the find_package call(s).
 set( _quietFlag )
 if( @CMAKE_PROJECT_NAME@_FIND_QUIETLY )
-- 
GitLab


From 0f47efa574c808226a6145e21075234ce26a4eea Mon Sep 17 00:00:00 2001
From: Benjamin Michael Wynne <b.m.wynne@ed.ac.uk>
Date: Tue, 9 Jun 2020 09:42:14 +0000
Subject: [PATCH 070/266] More explicit data loads for event views

---
 .../src/TRTStrawStatusWrite.cxx               | 11 +++++++---
 .../src/TRT_StrawStatusSummaryTool.cxx        | 20 ++++++++-----------
 .../TrigInDetConfig/python/InDetSetup.py      |  6 ------
 .../BeamspotChainConfiguration.py             |  7 ++++---
 .../PrecisionElectronRecoSequences.py         | 13 +++++-------
 .../MinBias/MinBiasChainConfiguration.py      | 19 +++++++++++++++---
 .../python/HLTMenuConfig/Muon/MuonSetup.py    | 12 +++--------
 .../HLTMenuConfig/Tau/TauRecoSequences.py     | 14 +++++++++----
 8 files changed, 54 insertions(+), 48 deletions(-)

diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx
index cf9bdec6d808..31141b1213dd 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx
@@ -63,9 +63,14 @@ StatusCode TRTStrawStatusWrite::initialize()
   }
 
     // Read keys
-    if (m_par_stattextfile.empty()) ATH_CHECK( m_statReadKey.initialize() );
-    if (m_par_stattextfilepermanent.empty()) ATH_CHECK( m_permReadKey.initialize() );
-    if (m_par_stattextfileHT.empty() ) ATH_CHECK( m_statHTReadKey.initialize() );
+    bool useStatKey = m_par_stattextfile.empty();
+    ATH_CHECK( m_statReadKey.initialize( useStatKey ) );
+
+    bool usePermKey = m_par_stattextfilepermanent.empty();
+    ATH_CHECK( m_permReadKey.initialize( usePermKey ) );
+
+    bool useStatHTKey = m_par_stattextfileHT.empty();
+    ATH_CHECK( m_statHTReadKey.initialize( useStatHTKey ) );
 
     // Check if a text file has been supplied. In that case assume that
     // the corresponding folder was blocked. Create, record and update a new data handle
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx
index 88d92074eb6a..93277e853700 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx
@@ -28,23 +28,19 @@ StatusCode TRT_StrawStatusSummaryTool::initialize()
     return StatusCode::FAILURE;
   }
 
-    // Read keys in case of normal reconstruction/digitization
+  // Read keys in case of normal reconstruction/digitization
   ATH_CHECK( m_statReadKey.initialize() );
   ATH_CHECK( m_permReadKey.initialize() );
 
-  if(!m_isGEANT4) {
-  
-    ATH_CHECK( m_statHTReadKey.initialize() );
-  }
+  // Only require this input if not using G4 sim
+  ATH_CHECK( m_statHTReadKey.initialize( !m_isGEANT4 ) );
 
-  if(m_isGEANT4) {
+  if ( m_isGEANT4 ) {
     // processing GEANT4 simulation - revert to old non-MT style cond access
-
-    if(StatusCode::SUCCESS!=detStore()->retrieve(m_strawstatusHTG4,m_par_strawstatusHTcontainerkey)) {
-        ATH_MSG_FATAL("Could not retrieve folder " << m_par_strawstatusHTcontainerkey);
-        return StatusCode::FAILURE;
-      }
-
+    if ( StatusCode::SUCCESS!=detStore()->retrieve( m_strawstatusHTG4, m_par_strawstatusHTcontainerkey ) ) {
+      ATH_MSG_FATAL( "Could not retrieve folder " << m_par_strawstatusHTcontainerkey );
+      return StatusCode::FAILURE;
+    }
   }
 
   ATH_MSG_INFO("TRT_StrawStatusSummaryTool initialized successfully  ");
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
index bfd74d034dd0..1cd714872fbc 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
@@ -70,12 +70,6 @@ def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'E
                                          ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
                                          ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
 
-    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
-    from IOVDbSvc.CondDB import conddb
-    if not conddb.folderRequested( "Cond/StatusHT" ):
-      ViewDataVerifier.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
-      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
-
   from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
   from AthenaCommon.AppMgr import ToolSvc
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
index 2154b737f92d..162ee73577d0 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
@@ -41,12 +41,13 @@ def allTE_trkfast( signature="FS" ):
         vertexAlg.TrackCollections = ["TrigFastTrackFinder_Tracks_"+signature]
 
         viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+beamspotViewRoI_'+signature ),
-                                   ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+                                   ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                   ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
 
-        # Make sure the event info is still available at whole-event level
+        # Make sure this is still available at whole-event level
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+        topSequence.SGInputLoader.Load += [( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
 
         beamspotSequence = seqAND( "beamspotSequence_"+signature, viewAlgs+[vertexAlg] )
         inputMakerAlg.ViewNodeName = beamspotSequence.name()
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
index f820e1dff6f4..719f2074bbbd 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
@@ -35,19 +35,16 @@ def precisionElectronRecoSequence(RoIs):
                                  ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+' + precisionCaloMenuDefs.precisionCaloClusters ),
                                  ( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' ),
                                  ( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ),
+                                 ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' ),
                                  ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+precisionElectron' )]
+                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+precisionElectron' ),
+                                 ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )] # the load below doesn't always work
 
-    # Make sure the required objects are still available at whole-event level
+    # These objects must be loaded from SGIL if not from CondInputLoader
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
     topSequence.SGInputLoader.Load += [( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' )]
-
-    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
     from IOVDbSvc.CondDB import conddb
-    if not conddb.folderRequested( "Cond/StatusHT" ):
-      ViewVerifyTrk.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
-      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
     if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
       ViewVerifyTrk.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
                                     ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
@@ -56,7 +53,7 @@ def precisionElectronRecoSequence(RoIs):
     
     if globalflags.InputFormat.is_bytestream():
       ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
-                                    ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ) ]
+                                    ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
     else:
       topSequence.SGInputLoader.Load += [( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' )]
       ViewVerifyTrk.DataObjects += [( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' )]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
index dc522270a785..781d7bd6ab3a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
@@ -54,17 +54,30 @@ class MinBiasChainConfig(ChainConfigurationBase):
         idAlgs, verifier = makeInDetAlgs(whichSignature='MinBias', separateTrackParticleCreator='', rois=SPInputMakerAlg.InViewRoIs, viewVerifier='SPViewDataVerifier' )
         verifier.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+InputRoI' ),
                                  ( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
-                                 ( 'PixelID' , 'DetectorStore+PixelID' )]
+                                 ( 'PixelID' , 'DetectorStore+PixelID' ),
+                                 ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
 
         # Make sure required objects are still available at whole-event level
-        from AthenaCommon.AlgSequence import AlgSequence
+        from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
         topSequence = AlgSequence()
         topSequence.SGInputLoader.Load += [( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
-                                           ( 'PixelID' , 'DetectorStore+PixelID' )]
+                                           ( 'PixelID' , 'DetectorStore+PixelID' ),
+                                           ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
+
         from IOVDbSvc.CondDB import conddb
         if not conddb.folderRequested( '/TDAQ/Resources/ATLAS/PIXEL/Modules' ):
           verifier.DataObjects += [( 'CondAttrListCollection', 'ConditionStore+/TDAQ/Resources/ATLAS/PIXEL/Modules' )]
           topSequence.SGInputLoader.Load += [( 'CondAttrListCollection', 'ConditionStore+/TDAQ/Resources/ATLAS/PIXEL/Modules' )]
+        if not conddb.folderRequested( '/PIXEL/DCS/FSMSTATE' ):
+          verifier.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/PIXEL/DCS/FSMSTATE' )]
+          topSequence.SGInputLoader.Load += [( 'CondAttrListCollection' , 'ConditionStore+/PIXEL/DCS/FSMSTATE' )]
+        if not conddb.folderRequested( '/PIXEL/DCS/FSMSTATUS' ):
+          verifier.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/PIXEL/DCS/FSMSTATUS' )]
+          topSequence.SGInputLoader.Load += [( 'CondAttrListCollection' , 'ConditionStore+/PIXEL/DCS/FSMSTATUS' )]
+        condSeq = AthSequencer( "AthCondSeq" )
+        if not hasattr( condSeq, 'SCT_DCSConditionsStatCondAlg' ):
+          verifier.DataObjects += [( 'SCT_DCSStatCondData' , 'ConditionStore+SCT_DCSStatCondData' )]
+          topSequence.SGInputLoader.Load += [( 'SCT_DCSStatCondData' , 'ConditionStore+SCT_DCSStatCondData' )]
 
         SpList = idAlgs[:-2]
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index 0166a57e49a1..e12877a15ce5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -429,8 +429,8 @@ def muonIDFastTrackingSequence( RoIs, name ):
   ### and Define EventViewNodes to run the algorithms ###
   from TrigInDetConfig.InDetSetup import makeInDetAlgs
   viewAlgs, viewVerify = makeInDetAlgs(whichSignature="Muon"+name, rois = RoIs)
-  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+MUIDRoIs' )]
-
+  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+MUIDRoIs' ),
+                             ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+HLTNav_IMl2muComb__out' )]
 
   for viewAlg in viewAlgs:
       muonIDFastTrackingSequence += viewAlg
@@ -665,15 +665,9 @@ def muEFCBRecoSequence( RoIs, name ):
                                  ( 'xAOD::IParticleContainer' , 'StoreGateSvc+'+TrackParticlesName ),
                                  ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )] #seems to be necessary, despite the load below
 
-    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
-    from IOVDbSvc.CondDB import conddb
-    if not conddb.folderRequested( "Cond/StatusHT" ):
-      ViewVerifyTrk.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
-      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
-
     if globalflags.InputFormat.is_bytestream():
       ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
-                                    ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ) ]
+                                    ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
     muEFCBRecoSequence += ViewVerifyTrk
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
index 677a3d8941d4..d9a5aea24b58 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
@@ -140,9 +140,11 @@ def tauCaloSequence(ConfigFlags):
 
     tauCaloRecoVDV = CfgMgr.AthViews__ViewDataVerifier( "tauCaloRecoVDV" )
     tauCaloRecoVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
-                                     ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
-                                     ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
-                                     ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+                                  ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
+                                  ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
+                                  ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                  ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.ActIntPerXDecor' ),
+                                  ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' )]
     tauCaloInViewSequence += tauCaloRecoVDV
 
     # Make sure the required objects are still available at whole-event level
@@ -174,7 +176,9 @@ def tauCaloMVASequence(ConfigFlags):
     tauCaloMVARecoVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
                                      ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
                                      ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
-                                     ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+                                     ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                     ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.ActIntPerXDecor' ),
+                                     ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' )]
     tauCaloMVAInViewSequence += tauCaloMVARecoVDV
 
     # Make sure the required objects are still available at whole-event level
@@ -222,6 +226,8 @@ def tauIdTrackSequence( RoIs , name):
     viewVerify.DataObjects += [( 'xAOD::TauTrackContainer' , 'StoreGateSvc+HLT_tautrack_dummy' ),
                                ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + RoIs ),
                                ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                               ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' ),
+                               ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.ActIntPerXDecor' ),
                                ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
                                ( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly' )]
 
-- 
GitLab


From 2fe1b4d07196ad4db6d0030f89e7d609306d860f Mon Sep 17 00:00:00 2001
From: Nora Emilia Pettersson <npetters@pcumass4.dyndns.cern.ch>
Date: Tue, 9 Jun 2020 11:47:09 +0200
Subject: [PATCH 071/266] Updating AOD digests

---
 Tools/PROCTools/data/master_q221_AOD_digest.ref | 4 ++--
 Tools/PROCTools/data/master_q431_AOD_digest.ref | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index f38e246bd996..06f9614cc8c5 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -3,7 +3,7 @@
       284500    87473014          85          79           6           0           9           1           8           7           4           3
       284500    87473022          38          30           4           0           5           1           4           2           1           1
       284500    87473032          27          33           4           1           9           4           5           2           1           1
-      284500    87473037          60          43           7           0          10           2           8           6           4           2
+      284500    87473037          60          42           7           0          10           2           8           6           4           2
       284500    87473040         101          96           9           0          17           1          16           7           5           2
       284500    87473051         142         114          12           1          14           2          12          22          16           6
       284500    87473063          62          76           5           2           6           2           4           6           4           2
@@ -13,7 +13,7 @@
       284500    87473091          43          49           3           0           2           1           1           5           2           3
       284500    87473096          72          75           3           2           2           0           2           3           2           1
       284500    87473104          61          66           6           0           6           1           5           5           4           1
-      284500    87473114          93          84           7           2          14           1          13           8           5           3
+      284500    87473114          93          83           7           2          13           1          12           8           5           3
       284500    87473121          93         101           6           3          15           4          11           7           6           1
       284500    87473132          81          59           9           1          10           0          10           5           5           0
       284500    87473137          81          71           8           3          15           0          15           6           6           0
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
index e60e8fed01b1..8f5fbb3ab9e6 100644
--- a/Tools/PROCTools/data/master_q431_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -1,7 +1,7 @@
          run       event       nTopo   nIdTracks       nJets      nMuons
       330470  1183722158           1           0           0           0
-      330470  1183722342         394         429          20           0
-      330470  1183727953         532         595          13           4
+      330470  1183722342         394         428          20           0
+      330470  1183727953         532         594          13           4
       330470  1183732647         467         483          12           1
       330470  1183733040         381         293           6           1
       330470  1183734651         361         375          14           3
-- 
GitLab


From 4fda2c0e1fcf34601b606a50ebe0479dbfb890c1 Mon Sep 17 00:00:00 2001
From: Jakob Novak <jakob.novak@cern.ch>
Date: Tue, 9 Jun 2020 09:57:23 +0000
Subject: [PATCH 072/266] Introduce BCM overlay algorithm

---
 .../share/BeamOverlay_jobOptions.py           |   3 +
 .../python/BCM_DigitizationConfig.py          |  23 +-
 .../InDetRawAlgs/InDetOverlay/CMakeLists.txt  |   8 +-
 .../InDetOverlay/InDetOverlay/BCMOverlay.h    |  54 ++
 .../InDetOverlay/python/InDetOverlayConfig.py |  32 +
 .../python/InDetOverlayConfigDb.py            |   3 +
 .../InDetOverlay/src/BCMOverlay.cxx           | 267 +++++++
 .../src/components/InDetOverlay_entries.cxx   |   2 +
 .../InDetOverlay/test/BCMOverlay_test.cxx     | 688 ++++++++++++++++++
 Tools/PROCTools/python/RunTier0TestsTools.py  |   2 +-
 10 files changed, 1074 insertions(+), 8 deletions(-)
 create mode 100644 InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/BCMOverlay.h
 create mode 100644 InnerDetector/InDetRawAlgs/InDetOverlay/src/BCMOverlay.cxx
 create mode 100644 InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx

diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
index e861c3e655cf..8dfc573dad6c 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
@@ -9,3 +9,6 @@ if DetFlags.overlay.BCM_on():
 
     from AthenaCommon import CfgGetter
     job += CfgGetter.getAlgorithm("BCM_OverlayDigitization")
+    job += CfgGetter.getAlgorithm("BCMOverlay")
+    if DetFlags.overlay.Truth_on():
+        job += CfgGetter.getAlgorithm("BCMSDOOverlay")
\ No newline at end of file
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfig.py b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfig.py
index 63a12479a085..2faa67f815b1 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfig.py
@@ -31,15 +31,26 @@ def BCM_DigitizationTool(name="BCM_DigitizationTool",**kwargs):
  
     if digitizationFlags.doXingByXingPileUp():
         kwargs.setdefault("FirstXing", BCM_FirstXing() )
-        kwargs.setdefault("LastXing",  BCM_LastXing()  ) 
+        kwargs.setdefault("LastXing",  BCM_LastXing()  )
 
-    if digitizationFlags.PileUpPremixing and 'OverlayMT' in digitizationFlags.experimentalDigi():
+    from AthenaCommon.GlobalFlags import globalflags
+    if globalflags.isOverlay():
         from OverlayCommonAlgs.OverlayFlags import overlayFlags
-        kwargs.setdefault("OutputRDOKey", overlayFlags.bkgPrefix() + "BCM_RDOs")
-        kwargs.setdefault("OutputSDOKey", overlayFlags.bkgPrefix() + "BCM_SDO_Map")
+        if overlayFlags.isOverlayMT():
+            kwargs.setdefault("OnlyUseContainerName", False)
+            kwargs.setdefault("OutputRDOKey", overlayFlags.sigPrefix() + "BCM_RDOs")
+            kwargs.setdefault("OutputSDOKey", overlayFlags.sigPrefix() + "BCM_SDO_Map")
+        else:
+            kwargs.setdefault("OutputRDOKey", overlayFlags.evtStore() + "+BCM_RDOs")
+            kwargs.setdefault("OutputSDOKey", overlayFlags.evtStore() + "+BCM_SDO_Map")
     else:
-        kwargs.setdefault("OutputRDOKey", "BCM_RDOs")
-        kwargs.setdefault("OutputSDOKey", "BCM_SDO_Map")
+        if digitizationFlags.PileUpPremixing and 'OverlayMT' in digitizationFlags.experimentalDigi():
+            from OverlayCommonAlgs.OverlayFlags import overlayFlags
+            kwargs.setdefault("OutputRDOKey", overlayFlags.bkgPrefix() + "BCM_RDOs")
+            kwargs.setdefault("OutputSDOKey", overlayFlags.bkgPrefix() + "BCM_SDO_Map")
+        else:
+            kwargs.setdefault("OutputRDOKey", "BCM_RDOs")
+            kwargs.setdefault("OutputSDOKey", "BCM_SDO_Map")
 
     from AthenaCommon import CfgMgr
     return CfgMgr.BCM_DigitizationTool(name,**kwargs)
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
index c6b38a0444e4..aab831a248a0 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
@@ -15,6 +15,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/StoreGate
                           DetectorDescription/IdDictParser
                           Generators/GeneratorObjects
+                          InnerDetector/InDetRawEvent/InDetBCM_RawData
                           InnerDetector/InDetDetDescr/InDetIdentifier
                           InnerDetector/InDetRawEvent/InDetSimData
                           InnerDetector/InDetRecTools/TRT_ElectronPidTools
@@ -48,7 +49,7 @@ atlas_add_component( InDetOverlay
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib)
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetBCM_RawData InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib)
 
 # Install files from the package:
 atlas_install_headers( InDetOverlay )
@@ -67,3 +68,8 @@ atlas_add_test( SCTOverlayConfig_test
 atlas_add_test( TRTOverlayConfig_test
                 SCRIPT test/TRTOverlayConfig_test.py
                 PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( BCMOverlay_test
+                SOURCES test/BCMOverlay_test.cxx src/BCMOverlay.cxx
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib SGtests GeneratorObjects InDetBCM_RawData InDetSimData ${GTEST_LIBRARIES} )
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/BCMOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/BCMOverlay.h
new file mode 100644
index 000000000000..159c481cef60
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/BCMOverlay.h
@@ -0,0 +1,54 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/** @class BCMOverlay
+
+  BCM overlay algorithm
+      @author  Jakob Novak <jakob.novak@cern.ch>
+
+*/
+
+#ifndef INDETOVERLAY_BCMOVERLAY_H
+#define INDETOVERLAY_BCMOVERLAY_H
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "InDetBCM_RawData/BCM_RDO_Container.h"
+
+struct BCM_Pulse {
+  BCM_Pulse(unsigned int p_, unsigned int w_) {p = p_; w = w_;};
+  unsigned int p;
+  unsigned int w;
+};
+
+class BCMOverlay : public AthReentrantAlgorithm
+{
+public:
+
+  BCMOverlay(const std::string &name, ISvcLocator *pSvcLocator);
+
+  virtual StatusCode initialize() override final;
+  virtual StatusCode execute(const EventContext& ctx) const override final;
+
+  StatusCode overlayContainer(const BCM_RDO_Container *bkgContainer, 
+                              const BCM_RDO_Container *signalContainer, 
+                              BCM_RDO_Container *outputContainer) const;
+
+private:
+
+  BCM_RawData *mergeChannel(const BCM_RawData *bkgRDO, 
+                            const BCM_RawData *signalRDO) const;
+
+  void overlayPulses(std::vector<std::unique_ptr<BCM_Pulse>>& merged_pulses) const;
+
+  std::pair<BCM_Pulse*, BCM_Pulse*> timeOrder(BCM_Pulse* pulse1, BCM_Pulse* pulse2) const;
+
+  static bool compare(const std::unique_ptr<BCM_Pulse>& a, const std::unique_ptr<BCM_Pulse>& b);
+
+  SG::ReadHandleKey<BCM_RDO_Container> m_bkgInputKey{ this, "BkgInputKey", "Bkg_BCM_RDOs", "ReadHandleKey for Background Input BCM_RDO_Container" };
+  SG::ReadHandleKey<BCM_RDO_Container> m_signalInputKey{ this, "SignalInputKey", "Sig_BCM_RDOs", "ReadHandleKey for Signal Input BCM_RDO_Container" };
+  SG::WriteHandleKey<BCM_RDO_Container> m_outputKey{ this, "OutputKey", "BCM_RDOs", "WriteHandleKey for Output BCM_RDO_Container" };
+
+};
+
+#endif // INDETOVERLAY_BCMOVERLAY_H
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
index 846616af04c6..db4353a3fb4d 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
@@ -110,3 +110,35 @@ def getTRTSDOOverlay(name="TRTSDOOverlay", **kwargs):
         kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+TRT_SDO_Map");
 
     return CfgMgr.InDetSDOOverlay(name, **kwargs)
+
+
+def getBCMOverlay(name="BCMOverlay", **kwargs):
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    if overlayFlags.isOverlayMT():
+        kwargs.setdefault("BkgInputKey", overlayFlags.bkgPrefix() + "BCM_RDOs");
+        kwargs.setdefault("SignalInputKey", overlayFlags.sigPrefix() + "BCM_RDOs");
+        kwargs.setdefault("OutputKey", "BCM_RDOs");
+    else:
+        kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+BCM_RDOs");
+        kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+BCM_RDOs");
+        kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+BCM_RDOs");
+
+    return CfgMgr.BCMOverlay(name, **kwargs)
+
+
+def getBCMSDOOverlay(name="BCMSDOOverlay", **kwargs):
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    # We do not need background pixel SDOs
+    kwargs.setdefault("BkgInputKey", "");
+
+    if overlayFlags.isOverlayMT():
+        kwargs.setdefault("SignalInputKey", overlayFlags.sigPrefix() + "BCM_SDO_Map");
+        kwargs.setdefault("OutputKey", "BCM_SDO_Map");
+    else:
+        kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+BCM_SDO_Map");
+        kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+BCM_SDO_Map");
+
+    return CfgMgr.InDetSDOOverlay(name, **kwargs)
+
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
index 142e4e353f32..61e773770e15 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
@@ -5,6 +5,9 @@ from AthenaCommon.CfgGetter import addAlgorithm
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getPixelOverlay", "PixelOverlay")
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getPixelSDOOverlay", "PixelSDOOverlay")
 
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getBCMOverlay", "BCMOverlay")
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getBCMSDOOverlay", "BCMSDOOverlay")
+
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getSCTOverlay", "SCTOverlay")
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getSCTSDOOverlay", "SCTSDOOverlay")
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/BCMOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/BCMOverlay.cxx
new file mode 100644
index 000000000000..8969078a4866
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/BCMOverlay.cxx
@@ -0,0 +1,267 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "InDetOverlay/BCMOverlay.h"
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+
+BCMOverlay::BCMOverlay(const std::string &name, ISvcLocator *pSvcLocator)
+  : AthReentrantAlgorithm(name, pSvcLocator)
+{
+}
+
+StatusCode BCMOverlay::initialize()
+{
+  ATH_MSG_DEBUG("Initializing...");
+
+  // Check and initialize keys
+  ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.empty()) );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey);
+  ATH_CHECK( m_signalInputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey);
+  ATH_CHECK( m_outputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey);
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode BCMOverlay::execute(const EventContext& ctx) const
+{
+  ATH_MSG_DEBUG("execute() begin");
+
+  // Reading the input RDOs
+  ATH_MSG_VERBOSE("Retrieving input RDO containers");
+
+  const BCM_RDO_Container *bkgContainerPtr = nullptr;
+  if (!m_bkgInputKey.empty()) {
+    SG::ReadHandle<BCM_RDO_Container> bkgContainer(m_bkgInputKey, ctx);
+    if (!bkgContainer.isValid()) {
+      ATH_MSG_ERROR("Could not get background BCM RDO container " << bkgContainer.name() << " from store " << bkgContainer.store());
+      return StatusCode::FAILURE;
+    }
+    bkgContainerPtr = bkgContainer.cptr();
+
+    ATH_MSG_DEBUG("Found background BCM RDO container " << bkgContainer.name() << " in store " << bkgContainer.store());
+  }
+
+  SG::ReadHandle<BCM_RDO_Container> signalContainer(m_signalInputKey, ctx);
+  if (!signalContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get signal BCM RDO container " << signalContainer.name() << " from store " << signalContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Found signal BCM RDO container " << signalContainer.name() << " in store " << signalContainer.store());
+
+  // Creating output RDO container
+  SG::WriteHandle<BCM_RDO_Container> outputContainer(m_outputKey, ctx);
+  ATH_CHECK(outputContainer.record(std::make_unique<BCM_RDO_Container>()));
+  if (!outputContainer.isValid()) {
+    ATH_MSG_ERROR("Could not record output BCM RDO container " << outputContainer.name() << " to store " << outputContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Recorded output BCM RDO container " << outputContainer.name() << " in store " << outputContainer.store());
+
+  ATH_CHECK(overlayContainer(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr()));
+
+  ATH_MSG_DEBUG("execute() end");
+  return StatusCode::SUCCESS;
+}
+
+StatusCode BCMOverlay::overlayContainer(const BCM_RDO_Container *bkgContainer, 
+                                        const BCM_RDO_Container *signalContainer, 
+                                        BCM_RDO_Container *outputContainer) const
+{
+
+  if (!bkgContainer) {
+    for (const BCM_RDO_Collection *coll : *signalContainer) {
+
+      std::unique_ptr<BCM_RDO_Collection> outputColl = std::make_unique<BCM_RDO_Collection>();
+      
+      for (const BCM_RawData *rdo : *coll) {
+        outputColl->push_back(new BCM_RawData(rdo->getWord1(), rdo->getWord2()));
+      }
+      outputContainer->push_back(outputColl.release());
+    }
+
+    return StatusCode::SUCCESS;
+  }
+
+  size_t containerSize = signalContainer->size();
+
+  for (size_t i = 0; i < containerSize; i++) {
+
+    const BCM_RDO_Collection *sigColl = signalContainer->at(i);
+    const BCM_RDO_Collection *bkgColl = bkgContainer->at(i);
+
+    std::unique_ptr<BCM_RDO_Collection> outputColl = std::make_unique<BCM_RDO_Collection>();
+    size_t collectionSize = sigColl->size();
+    if (collectionSize != bkgColl->size()) {
+      ATH_MSG_ERROR ("BCM signal and background collection size mismatch");
+      return StatusCode::FAILURE;
+    }
+
+    if (bkgColl->getChannel() == sigColl->getChannel()) {
+      outputColl->setChannel(sigColl->getChannel());
+    } else {
+      ATH_MSG_ERROR ("BCM signal and background channel mismatch");
+      return StatusCode::FAILURE;
+    }
+
+    for (size_t j = 0; j < collectionSize; j++) {
+
+      if (bkgColl->at(j)->getChannel() == sigColl->at(j)->getChannel()) {
+        BCM_RawData *mergedRDO = mergeChannel(bkgColl->at(j),sigColl->at(j));
+        if (mergedRDO) outputColl->push_back(mergedRDO);
+        else {
+          ATH_MSG_ERROR ("BCM channel merging failed");
+          return StatusCode::FAILURE;
+        }
+      }
+      else {
+        ATH_MSG_ERROR ("BCM signal and background channel mismatch");
+        return StatusCode::FAILURE;
+      }
+
+    }
+    outputContainer->push_back(outputColl.release());
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+BCM_RawData *BCMOverlay::mergeChannel(const BCM_RawData *bkgRDO, 
+                                      const BCM_RawData *signalRDO) const
+{
+
+  if (bkgRDO->getPulse1Width()==0) {
+    return new BCM_RawData(signalRDO->getWord1(), signalRDO->getWord2());
+  } else if (signalRDO->getPulse1Width()==0) {
+    return new BCM_RawData(bkgRDO->getWord1(), bkgRDO->getWord2());
+  }
+
+  unsigned int bkg_p1 = bkgRDO->getPulse1Position();
+  unsigned int bkg_w1 = bkgRDO->getPulse1Width();
+  unsigned int bkg_p2 = bkgRDO->getPulse2Position();
+  unsigned int bkg_w2 = bkgRDO->getPulse2Width();
+  unsigned int sig_p1 = signalRDO->getPulse1Position();
+  unsigned int sig_w1 = signalRDO->getPulse1Width();
+  unsigned int sig_p2 = signalRDO->getPulse2Position();
+  unsigned int sig_w2 = signalRDO->getPulse2Width();
+
+  std::vector<std::unique_ptr<BCM_Pulse>> merged_pulses;
+
+  if (bkg_w1 > 0) merged_pulses.push_back(std::make_unique<BCM_Pulse>(bkg_p1,bkg_w1));
+  if (bkg_w2 > 0) merged_pulses.push_back(std::make_unique<BCM_Pulse>(bkg_p2,bkg_w2));
+  if (sig_w1 > 0) merged_pulses.push_back(std::make_unique<BCM_Pulse>(sig_p1,sig_w1));
+  if (sig_w2 > 0) merged_pulses.push_back(std::make_unique<BCM_Pulse>(sig_p2,sig_w2));
+
+  overlayPulses(merged_pulses);
+  std::sort(merged_pulses.begin(), merged_pulses.end(), compare);
+
+  // Check whether some of the pulses merged
+  for (size_t i = 0; i < merged_pulses.size()-1; i++) {
+
+    BCM_Pulse *early = merged_pulses.at(i).get();
+    BCM_Pulse *later = merged_pulses.at(i+1).get();
+
+    if ( (early->p + early->w - 1) >= later->p ) {
+      early->w = later->p - early->p + later->w;      // Enlarge early pulse
+      merged_pulses.erase(merged_pulses.begin()+i+1, 
+                          merged_pulses.begin()+i+2); // Omit later pulse
+      i--;
+    }
+  }
+
+  unsigned int merged_p1;
+  unsigned int merged_w1;
+  unsigned int merged_p2;
+  unsigned int merged_w2;
+
+  if (merged_pulses.size() > 0) {
+    merged_p1 = merged_pulses.at(0)->p;
+    merged_w1 = merged_pulses.at(0)->w;
+  } else {
+    merged_p1 = 0;
+    merged_w1 = 0;
+  }
+
+  if (merged_pulses.size() > 1) {
+    merged_p2 = merged_pulses.at(1)->p;
+    merged_w2 = merged_pulses.at(1)->w;
+  } else {
+    merged_p2 = 0;
+    merged_w2 = 0;
+  }
+
+  // Record two earliest pulses into the output RDO
+  return new BCM_RawData(signalRDO->getChannel(),
+                         merged_p1, merged_w1,
+                         merged_p2, merged_w2,
+                         signalRDO->getLVL1A(),
+                         signalRDO->getBCID(),
+                         signalRDO->getLVL1ID());
+}
+
+void BCMOverlay::overlayPulses(std::vector<std::unique_ptr<BCM_Pulse>>& merged_pulses) const
+{
+
+  constexpr double fullPulseWidth{15.};      // Analogue pulse width
+                                             // before application of
+                                             // time over threshold
+  constexpr double slopeUpFraction{1./3.};   // Pulse rise time,
+                                             // expressed in the fraction
+                                             // of full pulse width
+  constexpr double slopeDownFraction{2./3.}; // Pulse fall time,
+                                             // expressed in the fraction
+                                             // of full pulse width
+
+  for (size_t i = 0; i < merged_pulses.size(); i++) {
+    BCM_Pulse* pulse_1 = merged_pulses.at(i).get();
+
+    for (size_t j = 0; j < i; j++) {
+      BCM_Pulse* pulse_2 = merged_pulses.at(j).get();
+      auto[early,later] = timeOrder(pulse_1, pulse_2);
+
+      double slope_up = 1./slopeUpFraction/(fullPulseWidth - later->w);
+      double slope_down = 1./slopeDownFraction/(fullPulseWidth - early->w);
+      int bin_min = early->p + early->w;
+      int bin_max = later->p;
+
+      // Widen the pulses, if they lie close enough to each other
+      for (int bin_iter=bin_min; bin_iter < bin_max; bin_iter++) {
+        if (slope_up*(bin_iter - bin_max) - slope_down*(bin_iter - bin_min) > -1) {
+          early->w++;
+        }
+        else break;
+      }
+      for (int bin_iter=bin_max-1; bin_iter >= bin_min; bin_iter--) {
+        if (slope_up*(bin_iter - bin_max) - slope_down*(bin_iter - bin_min) > -1) {
+          later->p = bin_iter;
+          later->w++;
+        }
+        else break;
+      }
+
+    }
+  }
+
+}
+
+std::pair<BCM_Pulse*, BCM_Pulse*> BCMOverlay::timeOrder(BCM_Pulse* pulse1, 
+                                                        BCM_Pulse* pulse2) const
+{
+
+  if (pulse2->p > pulse1->p) return std::pair(pulse1,pulse2);
+  else return std::pair(pulse2,pulse1);
+
+}
+
+bool BCMOverlay::compare(const std::unique_ptr<BCM_Pulse>& a, 
+                         const std::unique_ptr<BCM_Pulse>& b)
+{
+
+  return a->p < b->p;
+  
+}
\ No newline at end of file
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
index 581212fbb987..d559b49df981 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
@@ -1,3 +1,4 @@
+#include "InDetOverlay/BCMOverlay.h"
 #include "InDetOverlay/PixelOverlay.h"
 #include "InDetOverlay/SCTOverlay.h"
 #include "InDetOverlay/TRTOverlay.h"
@@ -6,6 +7,7 @@
 
 DECLARE_COMPONENT( InDetSDOOverlay )
   
+DECLARE_COMPONENT( BCMOverlay )
 DECLARE_COMPONENT( PixelOverlay )
 DECLARE_COMPONENT( SCTOverlay )
 DECLARE_COMPONENT( TRTOverlay )
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx
new file mode 100644
index 000000000000..2d3cee07df4f
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx
@@ -0,0 +1,688 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/** @class BCMOverlay_test
+
+  Tests for BCMOverlay
+      @author  Jakob Novak <jakob.novak@cern.ch>
+
+*/
+
+#undef NDEBUG
+
+// Framework
+#include "TestTools/initGaudi.h"
+
+// Google Test
+#include "gtest/gtest.h"
+
+// Tested AthAlgorithm
+#include "../InDetOverlay/BCMOverlay.h"
+
+namespace OverlayTesting {
+
+  // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated
+  ISvcLocator* g_svcLoc = nullptr;
+
+  // global test environment takes care of setting up Gaudi
+  class GaudiEnvironment : public ::testing::Environment {
+  protected:
+    virtual void SetUp() override {
+      Athena_test::initGaudi(OverlayTesting::g_svcLoc);
+    }
+  };
+
+  class BCMOverlay_test : public ::testing::Test {
+
+  protected:
+    virtual void SetUp() override {
+      m_alg = new BCMOverlay{"BCMOverlay", g_svcLoc};
+      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
+      ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
+    }
+
+    virtual void TearDown() override {
+      ASSERT_TRUE( m_alg->finalize().isSuccess() );
+      delete m_alg;
+      ASSERT_TRUE( m_sg->clearStore().isSuccess() );
+    }
+
+    BCMOverlay* m_alg{};
+    StoreGateSvc* m_sg{};
+  };   // BCMOverlay_test fixture
+
+
+  TEST_F(BCMOverlay_test, set_properties) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isFailure() ); //inputs don't exist
+  }
+
+  TEST_F(BCMOverlay_test, empty_containers_alg_execute) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG"};
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_empty_collections) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG1"};
+    const unsigned int sigChannel(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG1"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG1'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG1'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs1'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs1"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->empty() );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_empty_bkg_collection) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG2"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(8);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG2"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG2'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG2'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs2'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isFailure() ); //signal and background collection size mismatch
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_pulses_from_different_channels) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG3"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(0);
+    const unsigned int sigPulse1Width(0);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(1);
+    const unsigned int bkgPulse1Position(0);
+    const unsigned int bkgPulse1Width(0);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG3"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG3'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG3'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs3'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isFailure() ); //signal and background channel mismatch
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_two_independent_pulses) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG4"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(8);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(39);
+    const unsigned int bkgPulse1Width(10);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG4"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG4'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG4'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs4'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs4"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // First pulse is signal pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==sigPulse1Width );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==bkgPulse1Position ); // Second pulse is background pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==bkgPulse1Width );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_two_pulses_affecting_each_other) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG5"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(12);
+    const unsigned int sigPulse1Width(9);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(5);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG5"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG5'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG5'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs5'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs5"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==bkgPulse1Position ); // First pulse is background pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==bkgPulse1Width );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==11 ); // Second pulse is broader signal pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==10 );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_two_merging_pulses) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG6"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(3);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(11);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG6"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG6'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG6'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs6'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs6"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // Merged pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==9 );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==0 ); // No second pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==0 );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_one_signal_and_two_independent_background_pulses) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG7"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(25);
+    const unsigned int sigPulse1Width(9);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(5);
+    const unsigned int bkgPulse1Width(9);
+    const unsigned int bkgPulse2Position(45);
+    const unsigned int bkgPulse2Width(9);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG7"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG7'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG7'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs7'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs7"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==bkgPulse1Position ); // First pulse is first background pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==bkgPulse1Width );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==sigPulse1Position ); // Second pulse is signal pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==sigPulse1Width );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_two_signal_and_one_independent_background_pulse) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG8"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(9);
+    const unsigned int sigPulse2Position(45);
+    const unsigned int sigPulse2Width(9);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(25);
+    const unsigned int bkgPulse1Width(9);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG8"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG8'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG8'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs8'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs8"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // First pulse is first signal pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==sigPulse1Width );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==bkgPulse1Position ); // Second pulse is background pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==bkgPulse1Width );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_three_pulses_two_merging) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG9"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(3);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(11);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(45);
+    const unsigned int bkgPulse2Width(9);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG9"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG9'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG9'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs9'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs9"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // First pulse is merged
+    ASSERT_TRUE( outputDigit->getPulse1Width()==9 );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==bkgPulse2Position ); // Second pulse is second background pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==bkgPulse2Width );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_one_signal_two_bkg_merging_pulses) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG10"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(11);
+    const unsigned int sigPulse1Width(3);
+    const unsigned int sigPulse2Position(0);
+    const unsigned int sigPulse2Width(0);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(5);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(17);
+    const unsigned int bkgPulse2Width(3);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG10"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG10'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG10'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs10'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs10"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==bkgPulse1Position ); // Merged pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==15 );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==0 ); // No second pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==0 );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_one_bkg_two_signal_merging_pulses) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG11"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(3);
+    const unsigned int sigPulse2Position(17);
+    const unsigned int sigPulse2Width(3);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(11);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(0);
+    const unsigned int bkgPulse2Width(0);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG11"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG11'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG11'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs11'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs11"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // Merged pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==15 );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==0 ); // No second pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==0 );
+  }
+
+  TEST_F(BCMOverlay_test, containers_with_four_pulses_two_merging) {
+    EventContext ctx(0,0);
+    ctx.setExtension( Atlas::ExtendedEventContext( m_sg, 0 ) );
+    SG::WriteHandle<BCM_RDO_Container> inputSigDataHandle{"StoreGateSvc+BCM_RDOs_SIG12"};
+    const unsigned int sigChannel(0);
+    const unsigned int sigPulse1Position(5);
+    const unsigned int sigPulse1Width(3);
+    const unsigned int sigPulse2Position(50);
+    const unsigned int sigPulse2Width(9);
+    const unsigned int bkgChannel(0);
+    const unsigned int bkgPulse1Position(11);
+    const unsigned int bkgPulse1Width(3);
+    const unsigned int bkgPulse2Position(30);
+    const unsigned int bkgPulse2Width(9);
+    inputSigDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> sigCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> sigDigit = std::make_unique<BCM_RawData>(sigChannel,sigPulse1Position,sigPulse1Width,sigPulse2Position,sigPulse2Width,0,0,0,0);
+    sigCollection->push_back(sigDigit.release());
+    inputSigDataHandle->push_back(sigCollection.get());
+    sigCollection.release(); // Now owned by inputSigDataHandle
+    SG::WriteHandle<BCM_RDO_Container> inputBkgDataHandle{"StoreGateSvc+BCM_RDOs_BKG12"};
+    inputBkgDataHandle = std::make_unique<BCM_RDO_Container>();
+    std::unique_ptr<BCM_RDO_Collection> bkgCollection = std::make_unique<BCM_RDO_Collection>();
+    //Add a BCM_RawData object
+    std::unique_ptr<BCM_RawData> bkgDigit = std::make_unique<BCM_RawData>(bkgChannel,bkgPulse1Position,bkgPulse1Width,bkgPulse2Position,bkgPulse2Width,0,0,0,0);
+    bkgCollection->push_back(bkgDigit.release());
+    inputBkgDataHandle->push_back(bkgCollection.get());
+    bkgCollection.release(); // Now owned by inputBkgDataHandle
+
+    // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+    std::string  inputSigPropertyValue = "'StoreGateSvc+BCM_RDOs_SIG12'";
+    std::string  inputBkgPropertyValue = "'StoreGateSvc+BCM_RDOs_BKG12'";
+    std::string    outputPropertyValue = "'StoreGateSvc+BCM_RDOs12'";
+    ASSERT_TRUE( m_alg->setProperty( "SignalInputKey",   inputSigPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "BkgInputKey",   inputBkgPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() );
+    ASSERT_TRUE( m_alg->initialize().isSuccess() );
+    ASSERT_TRUE( m_alg->execute(ctx).isSuccess() );
+    // check output makes sense
+    SG::ReadHandle<BCM_RDO_Container> outputDataHandle{"StoreGateSvc+BCM_RDOs12"};
+    ASSERT_TRUE( outputDataHandle.isValid() );
+    const BCM_RDO_Collection *outputCollection = outputDataHandle->at(sigChannel);
+    ASSERT_TRUE( outputCollection!=nullptr );
+    ASSERT_TRUE( outputCollection->size()==1 );
+    const BCM_RawData* outputDigit = outputCollection->at(0);
+    ASSERT_TRUE( outputDigit!=nullptr );
+    ASSERT_TRUE( outputDigit->getChannel()==sigChannel );
+    ASSERT_TRUE( outputDigit->getPulse1Position()==sigPulse1Position ); // Merged pulse
+    ASSERT_TRUE( outputDigit->getPulse1Width()==9 );
+    ASSERT_TRUE( outputDigit->getPulse2Position()==bkgPulse2Position ); // Second pulse is second background pulse
+    ASSERT_TRUE( outputDigit->getPulse2Width()==bkgPulse2Width );
+  }
+
+} // <-- namespace OverlayTesting
+
+
+int main(int argc, char *argv[])
+{
+  ::testing::InitGoogleTest( &argc, argv );
+  ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment );
+  return RUN_ALL_TESTS();
+}
diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 1344cc6849e3..02fcca2f770b 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -28,7 +28,7 @@ ciRefFileMap = {
                 's3505-22.0'           : 'v3',
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
-                'overlay-d1498-22.0'   : 'v30',
+                'overlay-d1498-22.0'   : 'v31',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
                }
-- 
GitLab


From 93b9ad8d701868573a7c42b4a68b53e7cf864ee9 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 10:31:15 +0200
Subject: [PATCH 073/266] TrigUpgradeTest: CMake cleanup

- Move flake8 checking to build stage.
- Remove obsolete unit tests.
- Remove `atlas_depends_on_subdirs` statements.
---
 .../TrigUpgradeTest/CMakeLists.txt            | 35 ++-----------------
 .../test/test_view_schedule.sh                |  9 -----
 2 files changed, 2 insertions(+), 42 deletions(-)
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index 62a312769c9b..4a9b1b7c0096 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: TrigUpgradeTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigUpgradeTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          GaudiKernel
-                          Control/AthenaBaseComps
-                          Trigger/TrigSteer/DecisionHandling
-                          Trigger/TrigSteer/TrigCompositeUtils
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          )
-
 atlas_add_component( TrigUpgradeTest
                      src/*.cxx
                      src/components/*.cxx
@@ -23,25 +12,5 @@ atlas_add_component( TrigUpgradeTest
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
 atlas_install_data( share/*.ref share/*.conf )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( test/exec*.sh test/test*.sh )
-
-# Check python syntax:
-atlas_add_test( flake8
-   SCRIPT flake8 --select=ATL,F,E7,E9,W6 --extend-ignore=E701 ${CMAKE_CURRENT_SOURCE_DIR}/python
-   POST_EXEC_SCRIPT nopost.sh )
-
-# 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 )
-
-# Unit tests of the test scripts
-atlas_add_test( flake8_test_dir
-                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/test
-                POST_EXEC_SCRIPT nopost.sh )
-
-atlas_add_test( TrigValSteeringUT
-                SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test
-                PROPERTIES TIMEOUT 300
-                POST_EXEC_SCRIPT nopost.sh )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh
deleted file mode 100755
index 8637d81c2680..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# 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
-unset THREADS
-- 
GitLab


From c086801fabd150a16abaecffb1d389fc995c11d7 Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Tue, 9 Jun 2020 13:06:46 +0200
Subject: [PATCH 074/266] Remove view linking from muon trigger hypo

Removing the view linking from the muon trigger hypo alg since this is done already in the input maker.
Should fix the remaining  muon related warnings discussed in ATR-21548.
---
 Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFHypoAlg.cxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFHypoAlg.cxx
index 1f280cabd20e..c073232c858f 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFHypoAlg.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFHypoAlg.cxx
@@ -85,7 +85,6 @@ StatusCode TrigMuonEFHypoAlg::execute( const EventContext& context ) const
       toolInput.emplace_back( newd, roi, muon, previousDecision );
 
       newd -> setObjectLink( featureString(), muonEL );
-      newd->setObjectLink( viewString(),    viewEL);
       TrigCompositeUtils::linkToPrevious( newd, previousDecision, context );
 
       ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
-- 
GitLab


From ef4e3dafbe2423bc36562ce7e249f7e3973e1b79 Mon Sep 17 00:00:00 2001
From: Alexander Solodkov <Sanya.Solodkov@cern.ch>
Date: Tue, 9 Jun 2020 13:10:58 +0200
Subject: [PATCH 075/266] adding --end and --endlumi parameters to
 WriteCellNoiseToCool.py

---
 .../share/WriteBchToCool.py                   |   2 +-
 .../share/WriteCellNoiseToCool.py             | 720 +++++++++---------
 2 files changed, 370 insertions(+), 352 deletions(-)

diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
index ea5ffa429817..ac487759bb5f 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
@@ -374,7 +374,7 @@ if len(execFile):
         else:
             if comment=="None":
                 comment = comments[io]
-            elif comments[io] not in comment:
+            elif iov and comments[io] not in comment:
                 comment += "  //  " + comments[io]
             if io>0 and since!=until and 'ALL' not in moduleList:
                 author=commentsSplit[io]
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
index 58dc6a6ef34c..93e6b63e263d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
@@ -7,10 +7,11 @@
 #
 # 2014-07-14 - Sasha, based on update_noise_bulk.py from Carlos,Gui,Blake,Yuri
 # 2016-12-14 - Yuri Smirnov, change for PyCintex->cppyy for ROOT6
+# 2020-06-06 - Sasha - introducing --end and --endlumi parameters
 
 from __future__ import print_function
 
-import getopt,sys,os,re
+import getopt,sys,os,re,bisect
 os.environ['TERM'] = 'linux'
 
 def usage():
@@ -20,22 +21,26 @@ def usage():
     print ("-h, --help      shows this help")
     print ("-i, --infile=   specify the input sqlite file or full schema string")
     print ("-o, --outfile=  specify the output sqlite file")
-    print ("-a, --intag=    specify the input tag")
-    print ("-g, --outtag=   specify the output tag")
+    print ("-t, --intag=    specify the input tag")
+    print ("-T, --outtag=   specify the output tag")
     print ("-f, --folder=   specify status folder to use e.g. /TILE/OFL02/NOISE/CELL ")
     print ("-d, --dbname=   specify the database name e.g. OFLP200")
-    print ("-t, --txtfile=  specify the text file with the new noise constants")
+    print ("-x, --txtfile=  specify the text file with the new noise constants")
     print ("-r, --run=      specify run number for start of IOV")
-    print ("-l, --lumi=     specify lumiblock number for start of IOV")
-    print ("-b, --begin=    make IOV in output file from (begin,0) to infinity")
+    print ("-l, --lumi=     specify lumiblock number for start of IOV, default is 0")
+    print ("-b, --begin=    specify run number of first iov in multi-iov mode, by default uses very first iov")
+    print ("-e, --end=      specify run number of last iov in multi-iov mode, by default uses latest iov")
+    print ("-L, --endlumi=  specify lumi block number for last iov in multi-iov mode, default is 0")
+    print ("-A, --adjust    in multi-iov mode adjust iov boundaries to nearest iov available in DB, default is False")
     print ("-n, --channel=  specify cool channel to use (48 by defalt)")
     print ("-s, --scale=    specify scale factor for all the fields except ratio field")
+    print ("-u  --update    set this flag if output sqlite file should be updated, otherwise it'll be recreated")
     print ("--scaleElec=    specify separate scale factor for all electronic noise fields except ratio field")
     print ("if run number and lumiblock number are omitted - all IOVs from input file are updated")
 
-letters = "hi:o:a:g:f:d:t:r:l:b:n:s:"
-keywords = ["help","infile=","outfile=","intag=","outtag=","folder=","dbname=","txtfile=","run=","lumi=","begin=","channel=",
-            "scale=","scaleA=","scaleB=","scaleD=","scaleE=","scaleD4=","scaleC10=","scaleD4sp=","scaleC10sp=","scaleElec="]
+letters = "hi:o:t:T:f:d:x:r:l:b:e:L:A:n:s:u"
+keywords = ["help","infile=","outfile=","intag=","outtag=","folder=","dbname=","txtfile=","run=","lumi=","begin=","end=","endlumi=","adjust",
+            "channel=","scale=","scaleA=","scaleB=","scaleD=","scaleE=","scaleD4=","scaleC10=","scaleD4sp=","scaleC10sp=","scaleElec=","update"]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
@@ -54,7 +59,12 @@ dbName      = ''
 txtFile     = ''
 run         = -1
 lumi        = 0
-begin       = -1
+beg         = -1
+end         = 2147483647
+endlumi     = 0
+iov         = True
+adjust      = False
+update      = False
 chan        = 48 # represents Tile
 scale       = 0.0 # means do not scale
 scaleA      = 0.0 # scale for pileup term in A cells
@@ -72,9 +82,9 @@ for o, a in opts:
         inFile = a
     elif o in ("-o","--outfile"):
         outFile = a
-    elif o in ("-a","--intag"):
+    elif o in ("-t","--intag"):
         inTag = a
-    elif o in ("-g","--outtag"):
+    elif o in ("-T","--outtag"):
         outTag = a
     elif o in ("-f","--folder"):
         folderPath = a
@@ -82,10 +92,21 @@ for o, a in opts:
         dbName = a
     elif o in ("-r","--run"):
         run = int(a)
+        if run>=0:
+            iov = False
     elif o in ("-l","--lumi"):
         lumi = int(a)
     elif o in ("-b","--begin"):
-        begin = int(a)
+        beg = int(a)
+        iov = True
+    elif o in ("-e","--end"):
+        end = int(a)
+    elif o in ("-L","--endlumi"):
+        endlumi = int(a)
+    elif o in ("-A","--adjust"):
+        adjust = True
+    elif o in ("-u","--update"):
+        update = True
     elif o in ("-n","--channel"):
         chan = int(a)
     elif o in ("-s","--scale"):
@@ -108,7 +129,7 @@ for o, a in opts:
         scaleC10sp = float(a)
     elif o in ("-s","--scaleElec"):
         scaleElec = float(a)
-    elif o in ("-t","--txtfile"):
+    elif o in ("-x","--txtfile"):
         txtFile = a
     elif o in ("-h","--help"):
         usage()
@@ -173,33 +194,43 @@ if len(folderPath)<1:
 if len(dbName)<1:
     raise Exception("Please, provide dbname (e.g. --dbname=OFLP200 or --dbname=CONDBR2)")
 
+import cppyy
+
+from CaloCondBlobAlgs import CaloCondTools, CaloCondLogger
+from TileCalibBlobPython import TileCalibTools
+from TileCalibBlobPython import TileCellTools
+
+# get a logger
+log = CaloCondLogger.getLogger("WriteCellNoise")
+import logging
+if iov:
+    log.setLevel(logging.INFO)
+else:
+    log.setLevel(logging.DEBUG)
+
+
 if inTag=="HEAD":
     inTag=""
 if outTag=="HEAD":
     outTag=""
 
 if os.path.isfile(inFile):
-  ischema = 'sqlite://;schema='+inFile+';dbname='+dbName
+    ischema = 'sqlite://;schema='+inFile+';dbname='+dbName
 else:
-  print ("File %s was not found, assuming it's full schema string" % inFile)
-  ischema = inFile
-  # possible strings for inFile:
-  # "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_CALO;dbname=OFLP200"
-  # "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_TILE;dbname=OFLP200"
-  # COOLOFL_TILE/OFLP200 COOLOFL_TILE/COMP200 COOLOFL_TILE/CONDBR2
-
-
-import cppyy
-
-from CaloCondBlobAlgs import CaloCondTools
-from TileCalibBlobPython import TileCalibTools
-from TileCalibBlobPython import TileCellTools
+    log.info("File %s was not found, assuming it's full schema string" , inFile)
+    ischema = inFile
+    # possible strings for inFile:
+    # "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_CALO;dbname=OFLP200"
+    # "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_TILE;dbname=OFLP200"
+    # COOLOFL_TILE/OFLP200 COOLOFL_TILE/COMP200 COOLOFL_TILE/CONDBR2
+
+rb = max(run,beg)
 if run<0:
     cabling = 'RUN2a'
 elif run<222222 or 'COMP200' in ischema:
     cabling = 'RUN1'
 else:
-    if ('OFLP200' in ischema and run>=310000) or run>=343000:
+    if ('OFLP200' in ischema and rb>=310000) or rb>=343000:
         cabling = 'RUN2a'
     else:
         cabling = 'RUN2'
@@ -209,48 +240,84 @@ hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA")
 hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC")
 hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC")
 
-#=== Get list of IOVs by tricking TileCalibTools to read a Calo blob
-idb = TileCalibTools.openDbConn(ischema,'READONLY')
 iovList = []
-try:
-  blobReader = TileCalibTools.TileBlobReader(idb,folderPath, inTag)
-  dbobjs = blobReader.getDBobjsWithinRange(-1, chan)
-  if (dbobjs is None):
-      raise Exception("No DB objects retrieved when building IOV list!")
-  while dbobjs.goToNext():
-    obj = dbobjs.currentRef()
-    objsince = obj.since()
-    sinceRun = objsince >> 32
-    sinceLum = objsince & 0xFFFFFFFF
-    since    = (sinceRun, sinceLum)
-    objuntil = obj.until()
-    untilRun = objuntil >> 32
-    untilLum = objuntil & 0xFFFFFFFF
-    until    = (untilRun, untilLum)
-
-    iov = (since, until)
-    iovList.append(iov)
-except Exception:
-  print ("Warning: can not read IOVs from input DB file")
-  if run<0:
-    raise Exception("Please, provide run number at command line")
-  else:
-    print ("Using IOV starting run run %d" %run)
-    since = (run, lumi)
-    until = (0xFFFFFFFF, 0xFFFFFFFF)
-    iov = (since, until)
-    iovList.append(iov)
-idb.closeDatabase()
+iovUntil = []
+until = (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)
+if end >= TileCalibTools.MAXRUN:
+    end = TileCalibTools.MAXRUN
+    endlumi = TileCalibTools.MAXLBK
+
+if iov:
+    #=== Get list of IOVs by tricking TileCalibTools to read a Calo blob
+    idb = TileCalibTools.openDbConn(ischema,'READONLY')
+    try:
+        blobReader = TileCalibTools.TileBlobReader(idb,folderPath, inTag)
+        iovList = blobReader.getIOVsWithinRange(-1,chan)
+    except Exception:
+        log.warning("Can not read IOVs from input DB file")
+    idb.closeDatabase()
+
+    iovList += [until]
+    if beg<0:
+        since = iovList[0]
+    else:
+        since = (beg, lumi)
+    ib=bisect.bisect(iovList,since)-1
+    if ib<0:
+        ib=0
+    if iovList[ib] != since:
+        if adjust:
+            since = iovList[ib]
+            log.info( "Moving beginning of first IOV with new cell noise from (%d,%d) to (%d,%d)" , beg,lumi,since[0],since[1])
+        else:
+            iovList[ib] = since
+            log.info( "Creating new IOV starting from (%d,%d) with new cell noise" , beg,lumi)
+
+    if end<0:
+        ie=ib+1
+        if ie>=len(iovList):
+            ie=ib
+        until=iovList[ie]
+        log.info( "Next IOV with old cell noise starts from (%d,%d)" , until[0],until[1])
+    else:
+        until=(end,endlumi)
+        ie=bisect.bisect_left(iovList,until)
+        if ie>=len(iovList):
+            ie=len(iovList)-1
+
+        if iovList[ie] != until:
+            if adjust:
+                until=iovList[ie]
+                log.info( "Moving end of last IOV from (%d,%d) to (%d,%d)" , end,endlumi,until[0],until[1])
+            else:
+                log.info( "Keeping end of last IOV at (%d,%d) - new IOV is shorter than IOV in input DB" , end,endlumi)
+                iovList[ie] = until
+
+    iovList = iovList[ib:ie]
+    iovUntil = iovList[1:] + [until]
+    run = since[0]
+    lumi = since[1]
+    log.info( "IOVs: %s" , str(iovList))
+    log.info( "%d IOVs in total, end of last IOV is %s" , ie-ib,str(until))
+
+if len(iovList)==0:
+    if run<0:
+        raise Exception("Please, provide run number at command line")
+    else:
+        log.info( "Creating single IOV starting from run,lumi %d,%d" , run,lumi)
+        since = (run, lumi)
+        until = (end, endlumi)
+        iovList = [since]
+        iovUntil = [until]
 
 #=== Open DB connections
 oschema = 'sqlite://;schema='+outFile+';dbname='+dbName
 dbr = CaloCondTools.openDbConn(ischema,'READONLY')
-#dbw = CaloCondTools.openDbConn(oschema,'RECREATE')
-dbw = CaloCondTools.openDbConn(oschema,'UPDATE')
+update = update or (inFile==outFile)
+dbw = CaloCondTools.openDbConn(oschema,('UPDATE' if update else 'RECREATE'))
 reader = CaloCondTools.CaloBlobReader(dbr,folderPath,inTag)
 writer = CaloCondTools.CaloBlobWriter(dbw,folderPath,'Flt',(outTag!="" and outTag!="HEAD"))
 
-from TileCalibBlobPython.TileCalibTools import MAXRUN, MAXLBK
 
 #== read input file
 cellData = {}
@@ -265,311 +332,262 @@ useGain=None
 if len(txtFile):
 #  try:
     with open(txtFile,"r") as f:
-      cellDataText = f.readlines()
+        cellDataText = f.readlines()
 
     for line in cellDataText:
-      fields = line.strip().split()
-      #=== ignore empty and comment lines
-      if not len(fields)          :
-          continue
-      if fields[0].startswith("#"):
-          continue
-
-      if fields[0][:1].isalpha():
-          print (fields)
-          if useNames is not None and not useNames:
-              raise Exception("Mixture of formats in inpyt file %s - useNames" % (txtFile))
-          useNames=True
-          if fields[0]=='Cell':
-              if useModuleNames is not None and useModuleNames:
-                  raise Exception("Mixture of formats in inpyt file %s - useModuleNames" % (txtFile))
-              useModuleNames=False
-              modName=''
-              cellName=fields[1]
-          else:
-              if useModuleNames is not None and not useModuleNames:
-                  raise Exception("Mixture of formats in inpyt file %s - useModuleNames" % (txtFile))
-              useModuleNames=True
-              modName=fields[0]
-              cellName=fields[1]
-          if fields[2].isdigit():
-              if useGain is not None and not useGain:
-                  raise Exception("Mixture of formats in inpyt file %s - useGain" % (txtFile))
-              useGain=True
-              gain=int(fields[2])
-              noise = fields[3:]
-              if ival<len(noise):
-                  ival=len(noise)
-              if igain<gain:
-                  igain=gain
-          else:
-              if useGain is not None and useGain:
-                  raise Exception("Mixture of formats in inpyt file %s - useGain" % (txtFile))
-              if len(fields)>3:
-                  raise Exception("Too many fields in input file %s" % (txtFile))
-              useGain=False
-              gain=-1
-              noise = [-1]+fields[2:]
-              ival=1
-          if cellName=='D0':
-              cellName='D*0'
-          if cellName.startswith('BC'):
-              cellName='B'+cellName[2:]
-          if not ('+' in cellName or '-' in cellName or '*' in cellName):
-              p = re.search("\\d", cellName).start()
-              cellPos = modName+cellName[:p] + '+' + cellName[p:]
-              cellNeg = modName+cellName[:p] + '-' + cellName[p:]
-              dictKey  = (cellPos,gain)
-              cellData[dictKey] = noise
-              dictKey  = (cellNeg,gain)
-              cellData[dictKey] = noise
-              if (cellName=='spE1'):
-                  for cellNm in ['mbE+1','mbE-1','e4E+1','e4E-1']:
-                      cellN = modName+cellNm
-                      dictKey  = (cellN,gain)
-                      if dictKey not in cellData:
-                          cellData[dictKey] = noise
-          else:
-              cellN = modName+cellName
-              dictKey  = (cellN,gain)
-              cellData[dictKey] = noise
-              if (cellName=='spE+1'):
-                  for cellNm in ['mbE+1','e4E+1']:
-                      cellN = modName+cellNm
-                      dictKey  = (cellN,gain)
-                      if dictKey not in cellData:
-                          cellData[dictKey] = noise
-              if (cellName=='spE-1'):
-                  for cellNm in ['mbE-1','e4E-1']:
-                      cellN = modName+cellNm
-                      dictKey  = (cellN,gain)
-                      if dictKey not in cellData:
-                          cellData[dictKey] = noise
-          icell[gain]+=1
-      else:
-          if useNames is not None and useNames:
-              raise Exception("Mixture of formats in inpyt file %s - useNames" % (txtFile))
-          useNames=False
-          cellHash = int(fields[0])
-          cellGain = int(fields[1])
-          noise    = fields[2:]
-          dictKey  = (cellHash,cellGain)
-          cellData[dictKey] = noise
-          if icell<cellHash:
-              icell=cellHash
-          if igain<cellGain:
-              igain=cellGain
-          if ival<len(noise):
-              ival=len(noise)
+        fields = line.strip().split()
+        #=== ignore empty and comment lines
+        if not len(fields)          :
+            continue
+        if fields[0].startswith("#"):
+            continue
+
+        if fields[0][:1].isalpha():
+            print (fields)
+            if useNames is not None and not useNames:
+                raise Exception("Mixture of formats in inpyt file %s - useNames" % (txtFile))
+            useNames=True
+            if fields[0]=='Cell':
+                if useModuleNames is not None and useModuleNames:
+                    raise Exception("Mixture of formats in inpyt file %s - useModuleNames" % (txtFile))
+                useModuleNames=False
+                modName=''
+                cellName=fields[1]
+            else:
+                if useModuleNames is not None and not useModuleNames:
+                    raise Exception("Mixture of formats in inpyt file %s - useModuleNames" % (txtFile))
+                useModuleNames=True
+                modName=fields[0]
+                cellName=fields[1]
+            if fields[2].isdigit():
+                if useGain is not None and not useGain:
+                    raise Exception("Mixture of formats in inpyt file %s - useGain" % (txtFile))
+                useGain=True
+                gain=int(fields[2])
+                noise = fields[3:]
+                if ival<len(noise):
+                    ival=len(noise)
+                if igain<gain:
+                    igain=gain
+            else:
+                if useGain is not None and useGain:
+                    raise Exception("Mixture of formats in inpyt file %s - useGain" % (txtFile))
+                if len(fields)>3:
+                    raise Exception("Too many fields in input file %s" % (txtFile))
+                useGain=False
+                gain=-1
+                noise = [-1]+fields[2:]
+                ival=1
+            if cellName=='D0':
+                cellName='D*0'
+            if cellName.startswith('BC'):
+                cellName='B'+cellName[2:]
+            if not ('+' in cellName or '-' in cellName or '*' in cellName):
+                p = re.search("\\d", cellName).start()
+                cellPos = modName+cellName[:p] + '+' + cellName[p:]
+                cellNeg = modName+cellName[:p] + '-' + cellName[p:]
+                dictKey  = (cellPos,gain)
+                cellData[dictKey] = noise
+                dictKey  = (cellNeg,gain)
+                cellData[dictKey] = noise
+                if (cellName=='spE1'):
+                    for cellNm in ['mbE+1','mbE-1','e4E+1','e4E-1']:
+                        cellN = modName+cellNm
+                        dictKey  = (cellN,gain)
+                        if dictKey not in cellData:
+                            cellData[dictKey] = noise
+            else:
+                cellN = modName+cellName
+                dictKey  = (cellN,gain)
+                cellData[dictKey] = noise
+                if (cellName=='spE+1'):
+                    for cellNm in ['mbE+1','e4E+1']:
+                        cellN = modName+cellNm
+                        dictKey  = (cellN,gain)
+                        if dictKey not in cellData:
+                            cellData[dictKey] = noise
+                if (cellName=='spE-1'):
+                    for cellNm in ['mbE-1','e4E-1']:
+                        cellN = modName+cellNm
+                        dictKey  = (cellN,gain)
+                        if dictKey not in cellData:
+                            cellData[dictKey] = noise
+            icell[gain]+=1
+        else:
+            if useNames is not None and useNames:
+                raise Exception("Mixture of formats in inpyt file %s - useNames" % (txtFile))
+            useNames=False
+            cellHash = int(fields[0])
+            cellGain = int(fields[1])
+            noise    = fields[2:]
+            dictKey  = (cellHash,cellGain)
+            cellData[dictKey] = noise
+            if icell[gain]<cellHash:
+                icell[gain]=cellHash
+            if igain<cellGain:
+                igain=cellGain
+            if ival<len(noise):
+                ival=len(noise)
     if not useNames:
-        icell=icell+1
+        icell[gain]+=1
     else:
         print (cellData)
     igain=igain+1
 #  except:
 #    raise Exception("Can not read input file %s" % (txtFile))
 else:
-  print ("No input txt file provided, making copy from input DB to output DB")
+    log.info("No input txt file provided, making copy from input DB to output DB")
 
 nval=ival
 ngain=igain
 ncell=max(icell)
 
-print ("IOV list in input DB:", iovList)
-
-#== update only IOVs starting from given run number
-if run>=0 and len(iovList)>0:
-  if begin>=0:
-      print ("Updating only one IOV which contains run %d lb %d" % (run,lumi))
-  else:
-      print ("Updating only IOVs starting from run %d lumi %d " % (run,lumi))
-  start=0
-  for iov in iovList:
-    until    = iov[1]
-    untilRun = until[0]
-    if untilRun<run:
-      start+=1
-    elif untilRun==run:
-      untilLumi = until[1]
-      if untilLumi<=lumi:
-        start+=1
-  if start>0:
-      iovList = iovList[start:]
-  if begin>=0:
-      iovList = iovList[:1]
-#== update only one IOV from input DB if we are reading numbers from file
-if (ncell>0 and nval>2):
-  if (run>0):
-    if begin<-1:
-      iovList=iovList[0:-begin]
-      print ("Updating",len(iovList),"IOVs")
-    else:
-      if (len(iovList)>1):
-        print ("Updating only single IOV")
-        iovList = iovList[0:1]
-      iov=iovList[0]
-      since = (run, lumi)
-      until = iov[1]
-      iov = (since, until)
-      iovList = [ iov ]
-  else:
-    if (len(iovList)>1):
-      print ("Updating only last IOV")
-      iovList = iovList[len(iovList)-1:]
-
-if begin>=0 and len(iovList)>1:
-    raise Exception("-begin flag can not be used with multiple IOVs, please provide run number inside one IOV")
-
 if not tile:
-  modName="LAr %2d" % chan
-  cellName=""
-  fullName=modName
+    modName="LAr %2d" % chan
+    cellName=""
+    fullName=modName
 
 #=== loop over all iovs
-for iov in iovList:
-
-  since    = iov[0]
-  sinceRun = since[0]
-  sinceLum = since[1]
-
-  until    = iov[1]
-  untilRun = until[0]
-  untilLum = until[1]
-
-  print ("IOV in input DB [%d,%d]-[%d,%d)" % (sinceRun, sinceLum, untilRun, untilLum))
-
-  blobR = reader.getCells(chan,(sinceRun,sinceLum))
-  mcell=blobR.getNChans()
-  mgain=blobR.getNGains()
-  mval=blobR.getObjSizeUint32()
-
-  print ("input file: ncell: %d ngain %d nval %d" % (max(icell), igain, ival))
-  print ("input db:   ncell: %d ngain %d nval %d" % (mcell, mgain, mval))
-  if mcell>ncell:
-      ncell=mcell
-  if mgain>ngain:
-      ngain=mgain
-  if mval>nval:
-      nval=mval
-
-  print ("output db:  ncell: %d ngain %d nval %d" % (ncell, ngain, nval))
-
-  if ncell>hashMgrA.getHashMax():
-    hashMgr=hashMgrABC
-  elif ncell>hashMgrBC.getHashMax():
-    hashMgr=hashMgrA
-  elif ncell>hashMgrDef.getHashMax():
-    hashMgr=hashMgrBC
-  else:
-    hashMgr=hashMgrDef
-  print ("Using %s CellMgr with hashMax %d" % (hashMgr.getGeometry(),hashMgr.getHashMax()))
-
-  GainDefVec = cppyy.gbl.std.vector('float')()
-  for val in range(nval):
-    GainDefVec.push_back(0.0)
-  defVec = cppyy.gbl.std.vector('std::vector<float>')()
-  for gain in range(ngain):
-    defVec.push_back(GainDefVec)
-  blobW = writer.getCells(chan)
-  blobW.init(defVec,ncell,1)
-
-  src = ['Default','DB','File','Scale']
-  FullName=None
-  cell=None
-  gain=None
-  field=None
-  strval=None
-  noise=None
-
-  try:
-    for cell in range(ncell):
-      exist0 = (cell<mcell)
-      if tile:
-        (modName,cellName)=hashMgr.getNames(cell)
-        fullName="%s %6s" % (modName,cellName)
-      for gain in range(ngain):
-        exist1 = (exist0 and (gain<mgain))
-        if useNames:
-            if useGain:
-                gn=gain
-            else:
-                gn=-1
-            if useModuleNames:
-                dictKey = (modName+cellName,gn)
-            else:
-                dictKey = (cellName,gn)
-        else:
-            dictKey = (cell, gain)
-        noise = cellData.get(dictKey,[])
-        nF = len(noise)
-        for field in range(nval):
-          exist = (exist1 and (field<mval))
-          value = GainDefVec[field]
-          if field<nF:
-            strval=str(noise[field])
-            if strval.startswith("*"):
-              coef=float(strval[1:])
-              value = blobR.getData(cell,gain,field)*coef
-            elif strval.startswith("++") or strval.startswith("+-") :
-              coef=float(strval[1:])
-              value = blobR.getData(cell,gain,field)+coef
-            elif strval=="keep" or strval=="None":
-              value = None
-            else:
-              value = float(strval)
-            if (value is None or value<0) and exist: # negative value means that we don't want to update this field
-              value = blobR.getData(cell,gain,field)
-            elif exist:
-              exist = 2
-          elif exist:
-            value = blobR.getData(cell,gain,field)
-            if rescale:
-              if field==1 or field>4:
-                  if 'spC' in cellName:
-                      sc = scaleC10sp
-                  elif 'spD' in cellName:
-                      sc = scaleD4sp
-                  elif 'C' in cellName and '10' in cellName:
-                      sc = scaleC10
-                  elif 'D' in cellName and '4'  in cellName:
-                      sc = scaleD4
-                  elif 'E' in cellName:
-                      sc = scaleE
-                  elif 'D' in cellName:
-                      sc = scaleD
-                  elif 'B' in cellName:
-                      sc = scaleB
-                  elif 'A' in cellName:
-                      sc = scaleA
-                  else:
-                      sc = scale
-                  if sc>0.0:
-                      exist = 3
-                      value *= sc
-                      src[exist] = "ScalePileUp %s" % str(sc)
-              elif field<4 and scaleElec>0.0:
-                  exist = 3
-                  value *= scaleElec
-                  src[exist] = "ScaleElec %s" % str(scaleElec)
-
-          blobW.setData( cell, gain, field, value )
-          if rescale or exist>1:
-            print ("%s hash %4d gain %d field %d value %f Source %s" % (fullName, cell, gain, field, value, src[exist]))
-  except Exception as e:
-    print ("Exception on IOV [%d,%d]-[%d,%d)" % (sinceRun, sinceLum, untilRun, untilLum))
-    print (FullName,"Cell",cell,"gain",gain,"field",field,"value",strval,"noise vector",noise)
-    #e = sys.exc_info()[0]
-    print (e)
-
-  if begin>=0:
-      print ("IOV in output DB [%d,%d]-[%d,%d)" % (begin, 0, MAXRUN, MAXLBK))
-      writer.register((begin,0), (MAXRUN, MAXLBK), outTag)
-  else:
-      print ("IOV in output DB [%d,%d]-[%d,%d)" % (sinceRun, sinceLum, untilRun, untilLum))
-      writer.register((sinceRun,sinceLum), (untilRun,untilLum), outTag)
-
-print ("Using %s CellMgr with hashMax %d" % (hashMgr.getGeometry(),hashMgr.getHashMax()))
+for io,since in enumerate(iovList):
+
+    sinceRun = since[0]
+    sinceLum = since[1]
+
+    until=iovUntil[io]
+    untilRun = until[0]
+    untilLum = until[1]
+
+    log.info("")
+    log.info("Updating IOV [%d,%d] - [%d,%d)" , sinceRun, sinceLum, untilRun, untilLum)
+
+    blobR = reader.getCells(chan,(sinceRun,sinceLum))
+    if blobR is None:
+        continue
+    mcell=blobR.getNChans()
+    mgain=blobR.getNGains()
+    mval=blobR.getObjSizeUint32()
+
+    log.info("input file: ncell: %d ngain %d nval %d" , max(icell), igain, ival)
+    log.info("input db:   ncell: %d ngain %d nval %d" , mcell, mgain, mval)
+    if mcell>ncell:
+        ncell=mcell
+    if mgain>ngain:
+        ngain=mgain
+    if mval>nval:
+        nval=mval
+
+    log.info("output db:  ncell: %d ngain %d nval %d" , ncell, ngain, nval)
+
+    if ncell>hashMgrA.getHashMax():
+        hashMgr=hashMgrABC
+    elif ncell>hashMgrBC.getHashMax():
+        hashMgr=hashMgrA
+    elif ncell>hashMgrDef.getHashMax():
+        hashMgr=hashMgrBC
+    else:
+        hashMgr=hashMgrDef
+    log.info("Using %s CellMgr with hashMax %d" , hashMgr.getGeometry(),hashMgr.getHashMax())
+
+    GainDefVec = cppyy.gbl.std.vector('float')()
+    for val in range(nval):
+        GainDefVec.push_back(0.0)
+    defVec = cppyy.gbl.std.vector('std::vector<float>')()
+    for gain in range(ngain):
+        defVec.push_back(GainDefVec)
+    blobW = writer.getCells(chan)
+    blobW.init(defVec,ncell,1)
+
+    src = ['Default','DB','File','Scale']
+    FullName=None
+    cell=None
+    gain=None
+    field=None
+    strval=None
+    noise=None
+
+    try:
+        for cell in range(ncell):
+            exist0 = (cell<mcell)
+            if tile:
+                (modName,cellName)=hashMgr.getNames(cell)
+                fullName="%s %6s" % (modName,cellName)
+            for gain in range(ngain):
+                exist1 = (exist0 and (gain<mgain))
+                if useNames:
+                    if useGain:
+                        gn=gain
+                    else:
+                        gn=-1
+                    if useModuleNames:
+                        dictKey = (modName+cellName,gn)
+                    else:
+                        dictKey = (cellName,gn)
+                else:
+                    dictKey = (cell, gain)
+                noise = cellData.get(dictKey,[])
+                nF = len(noise)
+                for field in range(nval):
+                    exist = (exist1 and (field<mval))
+                    value = GainDefVec[field]
+                    if field<nF:
+                        strval=str(noise[field])
+                        if strval.startswith("*"):
+                            coef=float(strval[1:])
+                            value = blobR.getData(cell,gain,field)*coef
+                        elif strval.startswith("++") or strval.startswith("+-") :
+                            coef=float(strval[1:])
+                            value = blobR.getData(cell,gain,field)+coef
+                        elif strval=="keep" or strval=="None":
+                            value = None
+                        else:
+                            value = float(strval)
+                        if (value is None or value<0) and exist: # negative value means that we don't want to update this field
+                            value = blobR.getData(cell,gain,field)
+                        elif exist:
+                            exist = 2
+                    elif exist:
+                        value = blobR.getData(cell,gain,field)
+                        if rescale:
+                            if field==1 or field>4:
+                                if 'spC' in cellName:
+                                    sc = scaleC10sp
+                                elif 'spD' in cellName:
+                                    sc = scaleD4sp
+                                elif 'C' in cellName and '10' in cellName:
+                                    sc = scaleC10
+                                elif 'D' in cellName and '4'  in cellName:
+                                    sc = scaleD4
+                                elif 'E' in cellName:
+                                    sc = scaleE
+                                elif 'D' in cellName:
+                                    sc = scaleD
+                                elif 'B' in cellName:
+                                    sc = scaleB
+                                elif 'A' in cellName:
+                                    sc = scaleA
+                                else:
+                                    sc = scale
+                                if sc>0.0:
+                                    exist = 3
+                                    value *= sc
+                                    src[exist] = "ScalePileUp %s" % str(sc)
+                            elif field<4 and scaleElec>0.0:
+                                exist = 3
+                                value *= scaleElec
+                                src[exist] = "ScaleElec %s" % str(scaleElec)
+
+                    blobW.setData( cell, gain, field, value )
+                    if rescale or exist>1:
+                        print ("%s hash %4d gain %d field %d value %f Source %s" % (fullName, cell, gain, field, value, src[exist]))
+    except Exception as e:
+        log.warning("Exception on IOV [%d,%d]-[%d,%d)" , sinceRun, sinceLum, untilRun, untilLum)
+        print (FullName,"Cell",cell,"gain",gain,"field",field,"value",strval,"noise vector",noise)
+        #e = sys.exc_info()[0]
+        print (e)
+
+    writer.register((sinceRun,sinceLum), (untilRun,untilLum), outTag)
+
+log.info("Using %s CellMgr with hashMax %d" , hashMgr.getGeometry(),hashMgr.getHashMax())
 #=== Cleanup
 dbw.closeDatabase()
 dbr.closeDatabase()
-
-- 
GitLab


From c2ab76e6a2294bfd8e912a35e113e5a14304e9c7 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Tue, 9 Jun 2020 11:26:32 +0000
Subject: [PATCH 076/266] Remove delete from SCT_GeoModel using std::unique_ptr

---
 .../SCT_GeoModel/SCT_DetectorFactory.h        | 10 +--
 .../SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h | 10 +--
 .../SCT_GeoModel/SCT_GeoModel/SCT_Forward.h   |  7 +-
 .../SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h | 15 +++--
 .../SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h   | 15 ++---
 .../SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h  | 20 +++---
 .../SCT_GeoModel/SCT_GeneralParameters.h      |  6 +-
 .../SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h | 23 +++----
 .../SCT_GeoModel/SCT_GeoModel/SCT_Layer.h     | 31 ++++-----
 .../SCT_GeoModel/SCT_GeoModel/SCT_Module.h    | 31 +++++----
 .../SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h | 22 +++---
 .../SCT_GeoModel/SCT_GeoModel/SCT_Ski.h       | 24 +++----
 .../SCT_GeoModel/src/SCT_DetectorFactory.cxx  | 17 ++---
 .../SCT_GeoModel/src/SCT_FSIHelper.cxx        | 34 +++-------
 .../SCT_GeoModel/src/SCT_Forward.cxx          | 18 ++---
 .../SCT_GeoModel/src/SCT_FwdModule.cxx        | 21 ++----
 .../SCT_GeoModel/src/SCT_FwdRing.cxx          | 14 ++--
 .../SCT_GeoModel/src/SCT_FwdSensor.cxx        |  3 +
 .../SCT_GeoModel/src/SCT_FwdWheel.cxx         | 40 +++--------
 .../src/SCT_GeneralParameters.cxx             |  5 +-
 .../SCT_GeoModel/src/SCT_InnerSide.cxx        | 23 ++-----
 .../SCT_GeoModel/src/SCT_Layer.cxx            | 67 +++++++------------
 .../SCT_GeoModel/src/SCT_Module.cxx           | 35 +++-------
 .../SCT_GeoModel/src/SCT_OuterSide.cxx        | 34 +++-------
 .../SCT_GeoModel/src/SCT_Sensor.cxx           |  5 +-
 .../SCT_GeoModel/src/SCT_Ski.cxx              | 21 +++---
 26 files changed, 218 insertions(+), 333 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
index c10ab32cd7ce..10931dc62849 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_DETECTORFACTORY_H 
@@ -9,6 +9,8 @@
 #include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/InDetDD_Defs.h"
 
+#include <memory>
+
 class GeoPhysVol;
 class SCT_DataBase;
 class SCT_GeometryManager;
@@ -39,9 +41,9 @@ class SCT_DetectorFactory : public InDetDD::DetectorFactoryBase
   const SCT_DetectorFactory & operator=(const SCT_DetectorFactory &right); 
 
   InDetDD::SCT_DetectorManager *m_detectorManager;
-  SCT_GeometryManager *m_geometryManager;
-  SCT_DataBase* m_db;
-  SCT_MaterialManager* m_materials;
+  std::unique_ptr<SCT_GeometryManager> m_geometryManager;
+  std::unique_ptr<SCT_DataBase> m_db;
+  std::unique_ptr<SCT_MaterialManager> m_materials;
   bool m_useDynamicAlignFolders;
 
 }; 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h
index 8a185e29b20d..f5f84c946b58 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h
@@ -1,13 +1,14 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_FSIHELPER_H
 #define SCT_GEOMODEL_SCT_FSIHELPER_H
 
-#include <vector>
 #include <map>
+#include <memory>
 #include <string>
+#include <vector>
 
 class SCT_DataBase;
 
@@ -69,8 +70,9 @@ public:
 private:
   void fill();
 
-  std::vector<std::vector<const FSIDetails *> * > m_wheelLocMap;
-  std::map<std::string, FSILocation *> m_locationTypes;
+  std::vector<std::vector<std::unique_ptr<FSIDetails>>> m_wheelLocMap;
+  std::vector<std::vector<const FSIDetails *>> m_wheelLocMapConst;
+  std::map<std::string, std::unique_ptr<FSILocation>> m_locationTypes;
 
   SCT_DataBase * m_rdb;
   
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h
index b515a77cbd52..52b737e2d287 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_FORWARD_H
@@ -7,6 +7,7 @@
 
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 
+#include <memory>
 #include <vector>
 
 class SCT_FwdModule;
@@ -69,9 +70,9 @@ private:
   double m_outerRadiusCylinderServices;
 
   // Child detector elements
-  std::vector <SCT_FwdWheel *> m_wheels;
+  std::vector<std::unique_ptr<SCT_FwdWheel>> m_wheels;
 
-  std::vector <SCT_FwdModule *> m_modules;
+  std::vector<std::unique_ptr<SCT_FwdModule>> m_modules;
   
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h
index 5b2db9aa7dfe..1a262527ed2c 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_FWDMODULE_H
@@ -9,6 +9,7 @@
 
 #include "SCT_GeoModel/SCT_FwdSensor.h"
 
+#include <memory>
 #include <string>
 
 class SCT_Identifier;
@@ -91,12 +92,12 @@ private:
 
 public:	  
   // Child detector elements
-  SCT_FwdSensor    * m_sensor;
-  SCT_FwdModuleConnector    * m_connector;
-  SCT_FwdHybrid    * m_hybrid;
-  SCT_FwdSpine     * m_spine;
-  SCT_FwdSubSpine  * m_subspineL;
-  SCT_FwdSubSpine  * m_subspineR;
+  std::unique_ptr<SCT_FwdSensor> m_sensor;
+  std::unique_ptr<SCT_FwdModuleConnector> m_connector;
+  std::unique_ptr<SCT_FwdHybrid> m_hybrid;
+  std::unique_ptr<SCT_FwdSpine> m_spine;
+  std::unique_ptr<SCT_FwdSubSpine> m_subspineL;
+  std::unique_ptr<SCT_FwdSubSpine> m_subspineR;
 };
     
 #endif //  SCT_GEOMODEL_SCT_FWDMODULE_H
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h
index f23a67ff9f37..f8f7355ed75c 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_FWDRING_H
@@ -10,6 +10,7 @@
 class SCT_FwdModule;
 class SCT_FwdCoolingBlock;
 
+#include <memory>
 #include <vector>
 
 class GeoNameTag;
@@ -36,10 +37,6 @@ public:
   SCT_FwdRing(const SCT_FwdRing &) = delete;
   SCT_FwdRing & operator=(const SCT_FwdRing &) = delete;
 
-  // Ring type
-  //int ringType() const {return m_ringType;}  
-  //int ringType() const {return m_module->ringType();}
-
   //
   // Retrieve parameters
   //
@@ -110,10 +107,10 @@ private:
 
   // Child detector elements
   SCT_FwdModule* m_module;
-  SCT_FwdCoolingBlock * m_coolingBlockHiMain;
-  SCT_FwdCoolingBlock * m_coolingBlockHiSec;
-  SCT_FwdCoolingBlock * m_coolingBlockLoMain;
-  SCT_FwdCoolingBlock * m_coolingBlockLoSec;
+  std::unique_ptr<SCT_FwdCoolingBlock> m_coolingBlockHiMain;
+  std::unique_ptr<SCT_FwdCoolingBlock> m_coolingBlockHiSec;
+  std::unique_ptr<SCT_FwdCoolingBlock> m_coolingBlockLoMain;
+  std::unique_ptr<SCT_FwdCoolingBlock> m_coolingBlockLoSec;
 
   GeoPhysVol * m_moduleServicesHi;
   GeoPhysVol * m_moduleServicesLo;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h
index b1d321982023..064b84f9d97d 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_FWDWHEEL_H
@@ -7,6 +7,7 @@
 
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 
+#include <memory>
 #include <vector>
 
 
@@ -44,8 +45,7 @@ public:
   double zPosition() const {return m_zPosition;} 
   int    numRings() const {return m_numRings;}
   int    ringType(int i) const {return m_ringType[i];} 
-  //int    ringStereoType(int i) const {return m_ringStereoType[i];} 
-  const  SCT_FwdRing* ring(int i) {return m_rings[i];}
+  const  SCT_FwdRing* ring(int i) {return m_rings[i].get();}
 
   //
   // Retrieve derived parameters
@@ -95,13 +95,13 @@ private:
   double m_safety;
 
   // Child detector elements
-  std::vector<SCT_FwdRing *>      m_rings;
-  SCT_FwdDiscSupport *            m_discSupport;
-  std::vector<SCT_FwdPatchPanel*> m_patchPanel;
-  SCT_FwdPPConnector*             m_pPConnector;
-  SCT_FwdPPCooling*               m_pPCooling;
-  std::vector<SCT_FwdFSI*>        m_fsiType;
-  SCT_FwdDiscFixation*            m_discFixation;
+  std::vector<std::unique_ptr<SCT_FwdRing>> m_rings;
+  std::unique_ptr<SCT_FwdDiscSupport> m_discSupport;
+  std::vector<std::unique_ptr<SCT_FwdPatchPanel>> m_patchPanel;
+  std::unique_ptr<SCT_FwdPPConnector> m_pPConnector;
+  std::unique_ptr<SCT_FwdPPCooling> m_pPCooling;
+  std::vector<std::unique_ptr<SCT_FwdFSI>> m_fsiType;
+  std::unique_ptr<SCT_FwdDiscFixation> m_discFixation;
 
   const std::vector<SCT_FwdModule*> & m_modules;
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h
index 5a104c6723c3..071278fbf372 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GeoModel_SCT_GeneralParameters_H
@@ -7,7 +7,7 @@
 
 #include "GeoModelKernel/GeoDefinitions.h"
 
-#include <map>
+#include <memory>
 #include <string>
 
 class SCT_DataBase;
@@ -37,7 +37,7 @@ public:
 private:
 
   SCT_DataBase * m_rdb;
-  TopLevelPlacements * m_placements;
+  std::unique_ptr<TopLevelPlacements> m_placements;
     
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h
index 72f7065edf66..56a39034b5b4 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -14,6 +14,7 @@
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 #include "GeoModelKernel/GeoDefinitions.h"
 
+#include <memory>
 #include <string>
 
 class GeoMaterial;
@@ -46,13 +47,13 @@ public:
   double width()     const {return m_width;}
   double length()    const {return m_length;}
 
-  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;}
-  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;}
+  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector.get();}
+  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector.get();}
   // *** End of modified lines. ------------------ (00)*********************************
 
 
-  const SCT_Hybrid       * hybrid() const {return m_hybrid;}
-  const SCT_Sensor       * sensor() const {return m_sensor;}
+  const SCT_Hybrid       * hybrid() const {return m_hybrid.get();}
+  const SCT_Sensor       * sensor() const {return m_sensor.get();}
 
   double hybridOffsetX() const {return m_hybridOffsetX;}
   //double hybridOffsetY() const {return m_hybridOffsetY;} // 16:30 Wed 15th Jun 2005 D.Naito removed.
@@ -68,21 +69,17 @@ private:
   double m_length;
 
   double m_hybridOffsetX;
-  //double m_hybridOffsetY; // 16:30 Wed 15th Jun 2005 D.Naito removed.
   double m_hybridOffsetZ;
   double m_safety;
 
-  SCT_Hybrid       * m_hybrid;
-  SCT_Sensor       * m_sensor;
+  std::unique_ptr<SCT_Hybrid> m_hybrid;
+  std::unique_ptr<SCT_Sensor> m_sensor;
 
   GeoTransform * m_hybridPos;
   GeoTransform * m_sensorPos;
 
-  // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (02)*********************************
-  // *** -->>                                      (02)*********************************
-  GeoTrf::Vector3D * m_env1RefPointVector;
-  GeoTrf::Vector3D * m_env2RefPointVector;
-  // *** End of modified lines. ------------------ (02)*********************************
+  std::unique_ptr<GeoTrf::Vector3D> m_env1RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env2RefPointVector;
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h
index e29c3db79804..651370bfe9f6 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -11,6 +11,7 @@
 
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 
+#include <memory>
 #include <string>
 
 class GeoMaterial;
@@ -42,7 +43,7 @@ public:
             const SCT_GeometryManager* geometryManager,
             SCT_MaterialManager* materials);
 
-  ~SCT_Layer();
+  virtual ~SCT_Layer();
   //Explicitly disallow copy, assign to appease coverity
   SCT_Layer(const SCT_Layer &) = delete;
   SCT_Layer & operator=(const SCT_Layer &) = delete;
@@ -103,19 +104,19 @@ private:
   double m_phiScorpion;
   double m_zScorpion;
 
-  SCT_Module       * m_module;
-  SCT_Ski          * m_ski;
-  SCT_Clamp        * m_clamp;
-  SCT_CoolingEnd   * m_coolingEnd;
-  SCT_Bracket      * m_bracket;
-  SCT_Harness      * m_harness;
-  SCT_SkiPowerTape * m_skiPowerTape;
-  SCT_SkiAux       * m_skiAux;
-  SCT_Flange       * m_flange;
-  SCT_SupportCyl   * m_supportCyl;
-  SCT_FSIEndJewel  * m_endJewel;
-  SCT_FSIScorpion  * m_scorpion;
-  SCT_FSIFibreMask * m_fibreMask;
+  SCT_Module* m_module;
+  std::unique_ptr<SCT_Ski> m_ski;
+  std::unique_ptr<SCT_Clamp> m_clamp;
+  std::unique_ptr<SCT_CoolingEnd> m_coolingEnd;
+  std::unique_ptr<SCT_Bracket> m_bracket;
+  std::unique_ptr<SCT_Harness> m_harness;
+  std::unique_ptr<SCT_SkiPowerTape> m_skiPowerTape;
+  std::unique_ptr<SCT_SkiAux> m_skiAux;
+  std::unique_ptr<SCT_Flange> m_flange;
+  std::unique_ptr<SCT_SupportCyl> m_supportCyl;
+  std::unique_ptr<SCT_FSIEndJewel> m_endJewel;
+  std::unique_ptr<SCT_FSIScorpion> m_scorpion;
+  std::unique_ptr<SCT_FSIFibreMask> m_fibreMask;
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h
index f34e82b520be..202b2d3fd000 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_MODULE_H
@@ -9,6 +9,7 @@
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 #include "GeoModelKernel/GeoDefinitions.h"
 
+#include <memory>
 #include <string>
 
 class GeoMaterial;
@@ -48,8 +49,8 @@ public:
   double env2Width()     const {return m_env2Width;}
   double env2Length()    const {return m_env2Length;}
 
-  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;}
-  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;}
+  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector.get();}
+  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector.get();}
 
   double sensorGap()    const {return m_sensorGap;}
   double stereoInner()  const {return m_stereoInner;}
@@ -61,9 +62,9 @@ public:
   double baseBoardOffsetY() const {return m_baseBoardOffsetY;}
   double baseBoardOffsetZ() const {return m_baseBoardOffsetZ;}
 
-  const SCT_InnerSide * innerSide() const {return m_innerSide;}
-  const SCT_OuterSide * outerSide() const {return m_outerSide;}
-  const SCT_BaseBoard * baseBoard() const {return m_baseBoard;}
+  const SCT_InnerSide * innerSide() const {return m_innerSide.get();}
+  const SCT_OuterSide * outerSide() const {return m_outerSide.get();}
+  const SCT_BaseBoard * baseBoard() const {return m_baseBoard.get();}
 
  
 private:
@@ -90,21 +91,19 @@ private:
   double m_stereoInner;
   double m_stereoOuter;
   double m_stereoAngle;
-  //int  m_stereoSign;
   int    m_upperSide;
   double m_safety;
 
-  SCT_InnerSide * m_innerSide;
-  SCT_OuterSide * m_outerSide;
-  SCT_BaseBoard * m_baseBoard;
-  //const SCT_Sensor          * m_sensor; // 14:00 Thu 14th Jul 2005 D.Naito removed.
+  std::unique_ptr<SCT_InnerSide> m_innerSide;
+  std::unique_ptr<SCT_OuterSide> m_outerSide;
+  std::unique_ptr<SCT_BaseBoard> m_baseBoard;
 
-  GeoTrf::Transform3D * m_innerSidePos;
-  GeoTrf::Transform3D * m_outerSidePos;
-  GeoTrf::Translate3D * m_baseBoardPos; // 6th Apr 2005 S.Mima
+  std::unique_ptr<GeoTrf::Transform3D> m_innerSidePos;
+  std::unique_ptr<GeoTrf::Transform3D> m_outerSidePos;
+  std::unique_ptr<GeoTrf::Translate3D> m_baseBoardPos;
 
-  GeoTrf::Vector3D * m_env1RefPointVector;
-  GeoTrf::Vector3D * m_env2RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env1RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env2RefPointVector;
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h
index e8c8840bbdc8..3dede87b9256 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h
@@ -8,6 +8,8 @@
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "SCT_GeoModel/SCT_ComponentFactory.h"
 #include "GeoModelKernel/GeoDefinitions.h"
+
+#include <memory>
 #include <string>
 
 class GeoMaterial;
@@ -41,12 +43,12 @@ public:
   double width()     const {return m_width;}
   double length()    const {return m_length;}
 
-  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;}
-  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;}
+  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector.get();}
+  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector.get();}
 
-  const SCT_Hybrid       * hybrid() const {return m_hybrid;}
-  const SCT_Pigtail      * pigtail()      const {return m_pigtail;}
-  const SCT_Sensor             * sensor()       const {return m_sensor;}
+  const SCT_Hybrid * hybrid() const {return m_hybrid.get();}
+  const SCT_Pigtail * pigtail() const {return m_pigtail.get();}
+  const SCT_Sensor * sensor() const {return m_sensor.get();}
 
   double hybridOffsetX() const {return m_hybridOffsetX;}
   double hybridOffsetZ() const {return m_hybridOffsetZ;}
@@ -63,15 +65,15 @@ private:
   double m_hybridOffsetZ;
   double m_safety;
 
-  SCT_Hybrid  * m_hybrid;
-  SCT_Pigtail * m_pigtail;
-  SCT_Sensor        * m_sensor;
+  std::unique_ptr<SCT_Hybrid> m_hybrid;
+  std::unique_ptr<SCT_Pigtail> m_pigtail;
+  std::unique_ptr<SCT_Sensor> m_sensor;
 
   GeoTransform * m_hybridPos;
   GeoTransform * m_pigtailPos;
   GeoTransform * m_sensorPos;
-  GeoTrf::Vector3D * m_env1RefPointVector;
-  GeoTrf::Vector3D * m_env2RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env1RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env2RefPointVector;
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h
index 01dd72fa0feb..7baa2fd54809 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_SKI_H
@@ -9,7 +9,7 @@
 
 #include "GeoModelKernel/GeoDefinitions.h"
 
-
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -56,13 +56,13 @@ public:
   int    stereoSign()   const {return m_stereoSign;}
 
   const SCT_Module * module() const {return m_module;}   
-  const SCT_Dogleg * dogleg() const {return m_dogleg;}   
-  const SCT_CoolingBlock * coolingBlock() const {return m_coolingBlock;}   
-  const SCT_CoolingPipe * coolingPipe() const {return m_coolingPipe;}   
+  const SCT_Dogleg * dogleg() const {return m_dogleg.get();}
+  const SCT_CoolingBlock * coolingBlock() const {return m_coolingBlock.get();}
+  const SCT_CoolingPipe * coolingPipe() const {return m_coolingPipe.get();}
 
   const GeoTransform * getRefPointTransform() const {return m_refPointTransform;}
-  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;}
-  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;}
+  const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector.get();}
+  const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector.get();}
   double env1Thickness() const {return m_env1Thickness;}
   double env1Width()     const {return m_env1Width;}
   double env2Thickness() const {return m_env2Thickness;}
@@ -119,17 +119,17 @@ private:
   double m_doglegOffsetY;
 
   SCT_Module* m_module;
-  SCT_Dogleg* m_dogleg;
-  SCT_CoolingBlock* m_coolingBlock;
-  SCT_CoolingPipe* m_coolingPipe;
+  std::unique_ptr<SCT_Dogleg> m_dogleg;
+  std::unique_ptr<SCT_CoolingBlock> m_coolingBlock;
+  std::unique_ptr<SCT_CoolingPipe> m_coolingPipe;
 
   GeoTransform * m_refPointTransform;
   GeoTransform * m_coolingPipePos;
 
   //! For calculations of envelopes of SCT_DetailLayer.
-  GeoTrf::Vector3D * m_env1RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env1RefPointVector;
   //! For calculations of envelopes of SCT_DetailLayer.
-  GeoTrf::Vector3D * m_env2RefPointVector;
+  std::unique_ptr<GeoTrf::Vector3D> m_env2RefPointVector;
 
   double m_env1Thickness;
   double m_env1Width;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
index 22b479c91045..a9768b1f18f8 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -73,13 +73,13 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC
   m_detectorManager = new SCT_DetectorManager(detStore());
 
   // Create the database
-  m_db = new SCT_DataBase{athenaComps};
+  m_db = std::make_unique<SCT_DataBase>(athenaComps);
 
   // Create the material manager
-  m_materials = new SCT_MaterialManager{m_db};
+  m_materials = std::make_unique<SCT_MaterialManager>(m_db.get());
 
   // Create the geometry manager.
-  m_geometryManager = new SCT_GeometryManager{m_db};
+  m_geometryManager = std::make_unique<SCT_GeometryManager>(m_db.get());
   m_geometryManager->setOptions(options);
 
   // Add SiCommonItems to SCT_DetectorManager to hold and delete it.
@@ -124,9 +124,6 @@ SCT_DetectorFactory::~SCT_DetectorFactory()
 { 
   // NB the detector manager (m_detectorManager)is stored in the detector store by the
   // Tool and so we don't delete it.
-  delete m_db;
-  delete m_materials;
-  delete m_geometryManager;
 } 
 
 void SCT_DetectorFactory::create(GeoPhysVol *world) 
@@ -165,7 +162,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
     m_detectorManager->numerology().addBarrel(0);
 
     // Create the SCT Barrel
-    SCT_Barrel sctBarrel("SCT_Barrel", m_detectorManager, m_geometryManager, m_materials);
+    SCT_Barrel sctBarrel("SCT_Barrel", m_detectorManager, m_geometryManager.get(), m_materials.get());
   
     SCT_Identifier id{m_geometryManager->athenaComps()->getIdHelper()};
     id.setBarrelEC(0);
@@ -196,7 +193,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
     m_detectorManager->numerology().addEndcap(2);
 
     // Create the Forward
-    SCT_Forward sctForwardPlus("SCT_ForwardA", +2, m_detectorManager, m_geometryManager, m_materials);
+    SCT_Forward sctForwardPlus("SCT_ForwardA", +2, m_detectorManager, m_geometryManager.get(), m_materials.get());
     
     SCT_Identifier idFwdPlus{m_geometryManager->athenaComps()->getIdHelper()};
     idFwdPlus.setBarrelEC(2);
@@ -229,7 +226,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
 
     m_detectorManager->numerology().addEndcap(-2);
     
-    SCT_Forward sctForwardMinus("SCT_ForwardC", -2, m_detectorManager, m_geometryManager, m_materials);
+    SCT_Forward sctForwardMinus("SCT_ForwardC", -2, m_detectorManager, m_geometryManager.get(), m_materials.get());
 
     SCT_Identifier idFwdMinus{m_geometryManager->athenaComps()->getIdHelper()};
     idFwdMinus.setBarrelEC(-2);
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx
index da4786130076..3542adc65a94 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -39,24 +39,12 @@ FSIHelper::FSIHelper(SCT_DataBase * rdb)
 {
   int numWheels =  m_rdb->fwdGeneral()->getInt("NUMWHEELS");
   m_wheelLocMap.resize(numWheels);
+  m_wheelLocMapConst.resize(numWheels);
   fill();
 }
 
 FSIHelper::~FSIHelper()
 {
-  std::map<std::string, FSILocation *>::iterator iter;
-  for (iter = m_locationTypes.begin(); iter != m_locationTypes.end(); ++iter) {
-    delete iter->second;
-  }
-
-  for(unsigned int i = 0; i < m_wheelLocMap.size(); i++) {
-    if (m_wheelLocMap[i]) {
-      for (unsigned int j = 0; j < m_wheelLocMap[i]->size(); j++) {
-        delete (*m_wheelLocMap[i])[j];
-      }
-      delete m_wheelLocMap[i];
-    }
-  }
 }
 
 
@@ -69,8 +57,7 @@ FSIHelper::fill()
     double radius =  m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCR") * Gaudi::Units::mm;
     double rphi = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCPHI") * Gaudi::Units::deg;
     int side =  m_rdb->fwdFSILocation(iLocIndex)->getInt("SIDE");
-    FSILocation * location = new  FSILocation(locType, radius, rphi, side);
-    m_locationTypes[locType] = location;
+    m_locationTypes[locType] = std::make_unique<FSILocation>(locType, radius, rphi, side);
   }
 
   // Loop through all fsi's
@@ -84,17 +71,15 @@ FSIHelper::fill()
 
     if (simTypeCheck != simType)  std::cout << "Error in simType to index match in table SctFwdFSIType" << std::endl; 
 
-    FSILocation * location = m_locationTypes[locationType];
+    FSILocation * location = m_locationTypes[locationType].get();
     if (!location) std::cout << "Error filling FSI information. No FSI of type " <<  locationType << " found" << std::endl;
-    FSIDetails * fsi = new FSIDetails(location, simType, simTypeString, locationType, actualType);
+    std::unique_ptr<FSIDetails> fsi = std::make_unique<FSIDetails>(location, simType, simTypeString, locationType, actualType);
     
     if (iWheel >= m_wheelLocMap.size()) 
       std::cout << "Error in FSIHelper: wheel number is out of range: " << iWheel << std::endl;
     
-    if (!m_wheelLocMap[iWheel]) {
-      m_wheelLocMap[iWheel] = new std::vector<const FSIDetails *>;
-    }
-    m_wheelLocMap[iWheel]->push_back(fsi);
+    m_wheelLocMapConst[iWheel].push_back(fsi.get());
+    m_wheelLocMap[iWheel].push_back(std::move(fsi));
     
   }
 }
@@ -103,8 +88,5 @@ FSIHelper::fill()
 const std::vector<const FSIDetails *> &
 FSIHelper::fsiVector(int iWheel) const
 {
-  return *(m_wheelLocMap[iWheel]);
+  return m_wheelLocMapConst[iWheel];
 }
-  
-
-  
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx
index cc2b311c42a1..c5861e22f9c5 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_Forward.h"
@@ -49,8 +49,6 @@ SCT_Forward::SCT_Forward(const std::string & name, int ec,
 
 SCT_Forward::~SCT_Forward()
 {
-  for (size_t i = 0; i < m_wheels.size(); i++) delete m_wheels[i];
-  for (size_t i = 0; i < m_modules.size(); i++) delete m_modules[i];
 }
 
 void 
@@ -99,17 +97,19 @@ SCT_Forward::preBuild()
   // Create the elements we need for the forward
 
   // We make all the module types here. There is a outer, middle, truncated middle and inner type module.
+  std::vector<SCT_FwdModule*> modules;
   for (int iModuleType = 0; iModuleType < m_numModuleTypes; iModuleType++){
-    m_modules.push_back(new SCT_FwdModule("FwdModule"+intToString(iModuleType), iModuleType,
-                                          m_detectorManager, m_geometryManager, m_materials));
+    std::unique_ptr<SCT_FwdModule> module = std::make_unique<SCT_FwdModule>("FwdModule"+intToString(iModuleType), iModuleType,
+                                                                            m_detectorManager, m_geometryManager, m_materials);
+    modules.push_back(module.get());
+    m_modules.push_back(std::move(module));
   }
 
   for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
     // Build Wheels
     std::ostringstream name; name << "Wheel" << iWheel << ((m_endcap > 0) ? "A" : "C");
-    SCT_FwdWheel * wheel = new SCT_FwdWheel(name.str(), iWheel, m_modules, m_endcap,
-                                            m_detectorManager, m_geometryManager, m_materials);
-    m_wheels.push_back(wheel);
+    m_wheels.push_back(std::make_unique<SCT_FwdWheel>(name.str(), iWheel, modules, m_endcap,
+                                                      m_detectorManager, m_geometryManager, m_materials));
   }
 
 
@@ -129,7 +129,7 @@ SCT_Forward::build(SCT_Identifier id)
 
   for (int iWheel = 0; iWheel < m_numWheels; iWheel++){
 
-    SCT_FwdWheel * wheel = m_wheels[iWheel];
+    SCT_FwdWheel * wheel = m_wheels[iWheel].get();
     std::ostringstream wheelName; wheelName << "Wheel#" << iWheel;
     double zpos = wheel->zPosition() - zCenter();
     forward->add(new GeoNameTag(wheelName.str()));
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx
index d6ac1a49cc49..d3aa8d302934 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx
@@ -55,21 +55,18 @@ SCT_FwdModule::SCT_FwdModule(const std::string & name, int ringType,
 
   getParameters();
 
-  m_hybrid = new SCT_FwdHybrid("SCT_FwdHybrid"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials);
-  m_spine  = new SCT_FwdSpine("SCT_FwdSpine"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials);
-  m_subspineL  = new SCT_FwdSubSpine("SCT_FwdSubSpineL"+intToString(ringType), m_ringType, SUBSPINE_LEFT,
+  m_hybrid = std::make_unique<SCT_FwdHybrid>("SCT_FwdHybrid"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials);
+  m_spine  = std::make_unique<SCT_FwdSpine>("SCT_FwdSpine"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials);
+  m_subspineL  = std::make_unique<SCT_FwdSubSpine>("SCT_FwdSubSpineL"+intToString(ringType), m_ringType, SUBSPINE_LEFT,
                                      m_detectorManager, m_geometryManager, materials);
-  m_subspineR  = new SCT_FwdSubSpine("SCT_FwdSubSpineR"+intToString(ringType), m_ringType, SUBSPINE_RIGHT,
+  m_subspineR  = std::make_unique<SCT_FwdSubSpine>("SCT_FwdSubSpineR"+intToString(ringType), m_ringType, SUBSPINE_RIGHT,
                                      m_detectorManager, m_geometryManager, materials);
-  m_sensor = new SCT_FwdSensor("ECSensor"+intToString(ringType), m_ringType,
+  m_sensor = std::make_unique<SCT_FwdSensor>("ECSensor"+intToString(ringType), m_ringType,
                                m_detectorManager, m_geometryManager, materials);
   if (m_connectorPresent) {
-    m_connector = new SCT_FwdModuleConnector("SCT_FwdModuleConnector"+intToString(ringType), m_ringType,
+    m_connector = std::make_unique<SCT_FwdModuleConnector>("SCT_FwdModuleConnector"+intToString(ringType), m_ringType,
                                              m_detectorManager, m_geometryManager, materials);
   }
-  else {
-    m_connector = nullptr;
-  }
 
   m_logVolume = preBuild();
 
@@ -77,12 +74,6 @@ SCT_FwdModule::SCT_FwdModule(const std::string & name, int ringType,
 
 SCT_FwdModule::~SCT_FwdModule()
 {
-  delete m_connector;
-  delete m_hybrid;
-  delete m_spine;
-  delete m_subspineL;
-  delete m_subspineR;
-  delete m_sensor;
 }
   
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx
index 4caf983b15e5..febcd3742017 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_FwdRing.h"
@@ -80,10 +80,6 @@ SCT_FwdRing::getParameters()
 
 SCT_FwdRing::~SCT_FwdRing()
 {
-  delete m_coolingBlockHiMain;
-  delete m_coolingBlockHiSec;
-  delete m_coolingBlockLoMain;
-  delete m_coolingBlockLoSec;
 }
 
 const GeoLogVol * 
@@ -282,14 +278,14 @@ SCT_FwdRing::makeModuleServices()
   // to add more things to it later. We call it module services.
   
   // Cooling blocks for the upper Modules
-  m_coolingBlockHiMain = new SCT_FwdCoolingBlock("CoolingBlkHiMain",SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::MAIN,
+  m_coolingBlockHiMain = std::make_unique<SCT_FwdCoolingBlock>("CoolingBlkHiMain",SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::MAIN,
                                                  m_detectorManager, m_geometryManager, m_materials);
-  m_coolingBlockHiSec  = new SCT_FwdCoolingBlock("CoolingBlkHiSec", SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::SECONDARY,
+  m_coolingBlockHiSec  = std::make_unique<SCT_FwdCoolingBlock>("CoolingBlkHiSec", SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::SECONDARY,
                                                  m_detectorManager, m_geometryManager, m_materials);
   // Cooling blocks for the lower Modules
-  m_coolingBlockLoMain = new SCT_FwdCoolingBlock("CoolingBlkLoMain",SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::MAIN,
+  m_coolingBlockLoMain = std::make_unique<SCT_FwdCoolingBlock>("CoolingBlkLoMain",SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::MAIN,
                                                  m_detectorManager, m_geometryManager, m_materials);
-  m_coolingBlockLoSec  = new SCT_FwdCoolingBlock("CoolingBlkLoSec", SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::SECONDARY,
+  m_coolingBlockLoSec  = std::make_unique<SCT_FwdCoolingBlock>("CoolingBlkLoSec", SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::SECONDARY,
                                                  m_detectorManager, m_geometryManager, m_materials);
   
   double coolingBlkMainR = m_module->mainMountPointRadius();
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx
index d81d2ede7f8c..1cd186388e2b 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx
@@ -278,6 +278,7 @@ void SCT_FwdSensor::makeDesign()
   // The readout side is at the +ve depth direction
   int readoutSide = +1;
 
+  // m_design will be owned and deleted by SCT_DetectorManager
   m_design = new SCT_ForwardModuleSideDesign(m_thicknessN,    
                                              crystals, 
                                              diodes, 
@@ -323,6 +324,8 @@ GeoVPhysVol *SCT_FwdSensor::build(SCT_Identifier id)
 
   if (commonItems->getIdHelper()) {
 
+    // detElement will be owned by SCT_DetectorManager
+    // and will be deleted in destructor of SiDetectorElementCollection in SCT_DetectorManager
     SiDetectorElement * detElement = new SiDetectorElement(id.getWaferId(),
                                                            m_design,
                                                            sensor,
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx
index e074d2b2258c..1df936e43f7c 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_FwdWheel.h"
@@ -57,34 +57,15 @@ SCT_FwdWheel::SCT_FwdWheel(const std::string & name,
   : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials),
     m_iWheel(iWheel), 
     m_endcap(ec),
-    m_pPConnector(0),
-    m_pPCooling(0),
-    m_discFixation(0),
     m_modules(modules)
 {
   getParameters();
-  //m_logVolume = 0;
   m_logVolume = preBuild(); 
   
 }
 
 SCT_FwdWheel::~SCT_FwdWheel()
 {
-  delete m_discSupport;
-  for (unsigned int iRing = 0; iRing < m_rings.size(); iRing++){
-    delete m_rings[iRing];
-  }
-  for (unsigned int iPPType = 0; iPPType < m_patchPanel.size(); iPPType++) {
-    delete m_patchPanel[iPPType];
-  }
-
-  if (m_pPConnectorPresent) delete m_pPConnector;
-  if (m_pPCoolingPresent)  delete m_pPCooling;
-  if (m_discFixationPresent)  delete m_discFixation;
-  
-  for (unsigned int iFSI = 0; iFSI <  m_fsiType.size(); iFSI++) {
-    delete m_fsiType[iFSI];
-  }
 }
 
 void
@@ -149,37 +130,36 @@ SCT_FwdWheel::preBuild()
 {
    
   // Create disc support. 
-  m_discSupport = new SCT_FwdDiscSupport("DiscSupport"+intToString(m_iWheel), m_iWheel,
-                                         m_detectorManager, m_geometryManager, m_materials);
+  m_discSupport = std::make_unique<SCT_FwdDiscSupport>("DiscSupport"+intToString(m_iWheel), m_iWheel,
+                                                       m_detectorManager, m_geometryManager, m_materials);
 
 
   // The rings
   for (int iRing = 0; iRing < m_numRings; iRing++){
     std::string ringName = "Ring"+intToString(iRing)+"For"+getName();
     int ringType = m_ringType[iRing];
-    m_rings.push_back(new SCT_FwdRing(ringName, m_modules[ringType], m_iWheel, iRing, m_endcap,
+    m_rings.push_back(std::make_unique<SCT_FwdRing>(ringName, m_modules[ringType], m_iWheel, iRing, m_endcap,
                                       m_detectorManager, m_geometryManager, m_materials));
   }
 
 
   // Create Patch Panel
-  //m_patchPanel = new SCT_FwdPatchPanel("PatchPanel"+intToString(m_iWheel), m_iWheel);
   for (int iPPType = 0; iPPType < m_numPatchPanelTypes; iPPType++) {
-    m_patchPanel.push_back(new SCT_FwdPatchPanel("PatchPanel"+intToString(iPPType), iPPType,
+    m_patchPanel.push_back(std::make_unique<SCT_FwdPatchPanel>("PatchPanel"+intToString(iPPType), iPPType,
                                                  m_detectorManager, m_geometryManager, m_materials));
   }
 
   // Create Patch Pannel Connector and Cooling, and disc Fixations
   if (m_pPConnectorPresent) {
-    m_pPConnector = new SCT_FwdPPConnector("PPConnector", 
+    m_pPConnector = std::make_unique<SCT_FwdPPConnector>("PPConnector", 
                                            m_detectorManager, m_geometryManager, m_materials);
   }
   if (m_pPCoolingPresent) {
-    m_pPCooling = new SCT_FwdPPCooling("PPCooling",
+    m_pPCooling = std::make_unique<SCT_FwdPPCooling>("PPCooling",
                                        m_detectorManager, m_geometryManager, m_materials);
   }
   if (m_discFixationPresent) {
-    m_discFixation = new SCT_FwdDiscFixation("DiscFixation",
+    m_discFixation = std::make_unique<SCT_FwdDiscFixation>("DiscFixation",
                                              m_detectorManager, m_geometryManager, m_materials);
   }
 
@@ -195,7 +175,7 @@ SCT_FwdWheel::preBuild()
   for (unsigned int iFSI = 0; iFSI < m_fsiVector->size(); iFSI++) {
     int type = (*m_fsiVector)[iFSI]->simType();
     if (!m_fsiType[type]) {
-      m_fsiType[type] = new SCT_FwdFSI("FSI"+intToString(type), type,
+      m_fsiType[type] = std::make_unique<SCT_FwdFSI>("FSI"+intToString(type), type,
                                        m_detectorManager, m_geometryManager, m_materials);
     }
   }
@@ -290,7 +270,7 @@ SCT_FwdWheel::build(SCT_Identifier id)
 
   for (int iRing = 0; iRing < m_numRings; iRing++){
    
-    SCT_FwdRing * ring = m_rings[iRing];
+    SCT_FwdRing * ring = m_rings[iRing].get();
 
     // Position ring
     double ringZpos = ring->ringSide() * ring->ringOffset(); 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx
index bfc74c74349c..094e0e758a3c 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_GeneralParameters.h"
@@ -17,13 +17,12 @@ const double SCT_SAFETY = 0.01 * Gaudi::Units::mm; // Used in some places to mak
 SCT_GeneralParameters::SCT_GeneralParameters(SCT_DataBase* rdb)
 {
   m_rdb = rdb;
-  m_placements = new TopLevelPlacements(m_rdb->topLevelTable());
+  m_placements = std::make_unique<TopLevelPlacements>(m_rdb->topLevelTable());
 }
 
 
 SCT_GeneralParameters::~SCT_GeneralParameters()
 {
-  delete m_placements;
 }
 
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
index 9247bce9d758..7dcfc93d6b86 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -41,9 +41,7 @@ SCT_InnerSide::SCT_InnerSide(const std::string & name,
                              InDetDD::SCT_DetectorManager* detectorManager,
                              const SCT_GeometryManager* geometryManager,
                              SCT_MaterialManager* materials)
-  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials),
-    m_hybrid(0),
-    m_sensor(0)
+  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials)
 {
   getParameters();
   m_logVolume = preBuild();
@@ -52,10 +50,6 @@ SCT_InnerSide::SCT_InnerSide(const std::string & name,
 
 SCT_InnerSide::~SCT_InnerSide()
 {
-  delete m_hybrid;
-  delete m_sensor;
-  delete m_env1RefPointVector;
-  delete m_env2RefPointVector;
   if (m_hybridPos) m_hybridPos->unref();
   if (m_sensorPos) m_sensorPos->unref();
 }
@@ -77,8 +71,8 @@ const GeoLogVol *
 SCT_InnerSide::preBuild()
 {
   // Create child components
-  m_sensor             = new SCT_Sensor("BRLSensor", m_detectorManager, m_geometryManager, m_materials);
-  m_hybrid             = new SCT_Hybrid("Hybrid", m_detectorManager, m_geometryManager, m_materials);
+  m_sensor = std::make_unique<SCT_Sensor>("BRLSensor", m_detectorManager, m_geometryManager, m_materials);
+  m_hybrid = std::make_unique<SCT_Hybrid>("Hybrid", m_detectorManager, m_geometryManager, m_materials);
 
   //
   // Define constants for convenience.
@@ -123,11 +117,8 @@ SCT_InnerSide::preBuild()
   const double ise2PosY = hybridPosY;
   const double ise2PosZ = hybridPosZ;
 
-  // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (00)*********************************
-  // *** -->>                                      (00)*********************************
-  m_env1RefPointVector = new GeoTrf::Vector3D(0.0, 0.0, 0.0);
-  m_env2RefPointVector = new GeoTrf::Vector3D(-ise2PosX, -ise2PosY, -ise2PosZ);
-  // *** End of modified lines. ------------------ (00)*********************************
+  m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(0.0, 0.0, 0.0);
+  m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-ise2PosX, -ise2PosY, -ise2PosZ);
 
   m_hybridPos             = new GeoTransform(GeoTrf::Translate3D(hybridPosX, hybridPosY, hybridPosZ));
   m_hybridPos->ref();
@@ -144,8 +135,6 @@ SCT_InnerSide::preBuild()
   // 
   //Gaudi::Units::HepRotation rotSensor;
   //rotSensor.rotateZ(180*Gaudi::Units::deg);
-  //m_outerSidePos = new GeoTrf::Transform3D(rotOuter, GeoTrf::Vector3D(0.5 * (m_sensorGap + sectThickness), 0., 0.));
-  //m_sensorPos = new GeoTransform(GeoTrf::Transform3D(rotSensor, GeoTrf::Vector3D(sensorPosX, sensorPosY, sensorPosZ)));
   m_sensorPos             = new GeoTransform(GeoTrf::Translate3D(sensorPosX, sensorPosY, sensorPosZ));
   m_sensorPos->ref();
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx
index 9d41f5ba92f5..7b1d3378f8e4 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -63,20 +63,6 @@ SCT_Layer::SCT_Layer(const std::string & name,
 
 SCT_Layer::~SCT_Layer()
 {
-  delete m_bracket;
-  delete m_clamp;
-  delete m_coolingEnd;
-  delete m_flange;
-  delete m_harness;
-  delete m_ski;
-  delete m_skiAux;
-  delete m_skiPowerTape;
-  delete m_supportCyl;
-  if (m_includeFSI) {
-    delete m_endJewel;
-    delete m_scorpion;
-    delete m_fibreMask;
-  }
 }
 
 void
@@ -123,26 +109,21 @@ SCT_Layer::preBuild()
   std::string layerNumStr = intToString(m_iLayer);
 
   // Build the Flanges
-  m_flange     = new SCT_Flange("Flange"+layerNumStr, m_iLayer, m_detectorManager, m_geometryManager, m_materials);
+  m_flange     = std::make_unique<SCT_Flange>("Flange"+layerNumStr, m_iLayer, m_detectorManager, m_geometryManager, m_materials);
   
   // Build the SupportCyl
-  m_supportCyl = new SCT_SupportCyl("SupportCyl"+layerNumStr, m_iLayer, m_cylinderLength,
+  m_supportCyl = std::make_unique<SCT_SupportCyl>("SupportCyl"+layerNumStr, m_iLayer, m_cylinderLength,
                                     m_detectorManager, m_geometryManager, m_materials);
 
   // Build the FSI end jewel, scorpion and fibre mask
   // Mask runs between scorpions and flange in z - must be built after these
   if (m_includeFSI) {
-    m_endJewel = new SCT_FSIEndJewel("FSIEndJewel"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
-    m_scorpion = new SCT_FSIScorpion("FSIScorpion"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
+    m_endJewel = std::make_unique<SCT_FSIEndJewel>("FSIEndJewel"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
+    m_scorpion = std::make_unique<SCT_FSIScorpion>("FSIScorpion"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
     double length_mask = 0.5*m_cylinderLength - m_flange->length() - m_zScorpion - 0.5*m_scorpion->length();
-    m_fibreMask = new SCT_FSIFibreMask("FSIFibreMask"+layerNumStr, m_iLayer, length_mask,
+    m_fibreMask = std::make_unique<SCT_FSIFibreMask>("FSIFibreMask"+layerNumStr, m_iLayer, length_mask,
                                        m_detectorManager, m_geometryManager, m_materials);
   }
-  else {
-    m_endJewel = nullptr;
-    m_scorpion = nullptr;
-    m_fibreMask = nullptr;
-  }
 
   //
   // Calculations for making active layer components - called ski.
@@ -160,7 +141,7 @@ SCT_Layer::preBuild()
 
   // Make the ski
   // The ski length is now reduced to m_activeLength to make room for the cooling inlet/outlet volumes
-  m_ski = new SCT_Ski("Ski"+layerNumStr, m_module, m_stereoSign, m_tilt, m_activeLength,
+  m_ski = std::make_unique<SCT_Ski>("Ski"+layerNumStr, m_module, m_stereoSign, m_tilt, m_activeLength,
                       m_detectorManager, m_geometryManager, m_materials);
 
   //
@@ -169,11 +150,11 @@ SCT_Layer::preBuild()
   // Bracket is placed at edge of division. 
   // -tiltSign * (r*divisionAngle/2 - bracket_width/2)
   // Works for both +ve and -ve tilt.
-  m_bracket = new SCT_Bracket("Bracket"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
+  m_bracket = std::make_unique<SCT_Bracket>("Bracket"+layerNumStr, m_detectorManager, m_geometryManager, m_materials);
 
-  m_harness = new SCT_Harness("Harness"+layerNumStr, m_cylinderLength,
+  m_harness = std::make_unique<SCT_Harness>("Harness"+layerNumStr, m_cylinderLength,
                               m_detectorManager, m_geometryManager, m_materials);
-  m_skiPowerTape = new SCT_SkiPowerTape("SkiPowerTape"+layerNumStr, m_ski, m_cylinderLength,
+  m_skiPowerTape = std::make_unique<SCT_SkiPowerTape>("SkiPowerTape"+layerNumStr, m_ski.get(), m_cylinderLength,
                                         m_detectorManager, m_geometryManager, m_materials);
 
   int tiltSign = (m_tilt < 0) ? -1 : +1;
@@ -185,21 +166,21 @@ SCT_Layer::preBuild()
   
  
   // Make the SkiAux. This is layer dependent.
-  m_skiAux = new SCT_SkiAux("SkiAux"+layerNumStr, 
-                            m_ski, 
-                            m_bracket,
-                            m_harness,
-                            m_skiPowerTape, 
-                            m_outerRadiusOfSupport,
-                            bracketOffset, 
-                            powerTapeOffset,
-                            divisionAngle,
-                            m_detectorManager,
-                            m_geometryManager,
-                            m_materials);
+  m_skiAux = std::make_unique<SCT_SkiAux>("SkiAux"+layerNumStr, 
+                                          m_ski.get(), 
+                                          m_bracket.get(),
+                                          m_harness.get(),
+                                          m_skiPowerTape.get(), 
+                                          m_outerRadiusOfSupport,
+                                          bracketOffset, 
+                                          powerTapeOffset,
+                                          divisionAngle,
+                                          m_detectorManager,
+                                          m_geometryManager,
+                                          m_materials);
 
   // Build the clamp: we cannot do this until we have the dimensions of SkiAux
-  m_clamp = new SCT_Clamp("Clamp"+layerNumStr, m_iLayer, m_skiAux->outerRadius(),
+  m_clamp = std::make_unique<SCT_Clamp>("Clamp"+layerNumStr, m_iLayer, m_skiAux->outerRadius(),
                           m_detectorManager, m_geometryManager, m_materials);
 
   // Build the volume representing the cooling inlets, outlet and U-bends.
@@ -207,7 +188,7 @@ SCT_Layer::preBuild()
   double coolingInnerRadius = m_clamp->outerRadius();
   double clearance = 1*Gaudi::Units::mm;
   double coolingLength = 0.5*m_cylinderLength - 0.5*m_activeLength - clearance;
-  m_coolingEnd = new SCT_CoolingEnd("CoolingEnd"+layerNumStr, m_iLayer, coolingInnerRadius, coolingLength,
+  m_coolingEnd = std::make_unique<SCT_CoolingEnd>("CoolingEnd"+layerNumStr, m_iLayer, coolingInnerRadius, coolingLength,
                                     m_detectorManager, m_geometryManager, m_materials);
 
   //
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
index 8f465b1db7e8..d192435a5bbd 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_Module.h"
@@ -43,11 +43,7 @@ SCT_Module::SCT_Module(const std::string & name,
                        InDetDD::SCT_DetectorManager* detectorManager,
                        const SCT_GeometryManager* geometryManager,
                        SCT_MaterialManager* materials)
-: SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials),
-    m_innerSide(0),
-    m_outerSide(0),
-    m_baseBoard(0)
-
+: SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials)
 {
   getParameters();
   m_logVolume = preBuild();
@@ -56,17 +52,6 @@ SCT_Module::SCT_Module(const std::string & name,
 
 SCT_Module::~SCT_Module()
 {
-  // Clean up
-  delete m_baseBoardPos; // 6th Apr 2005 S.Mima modified.
-  delete m_innerSidePos;
-  delete m_outerSidePos;
-
-  delete m_innerSide;
-  delete m_outerSide;
-  delete m_baseBoard;
-
-  delete m_env1RefPointVector;
-  delete m_env2RefPointVector;
 }
 
 
@@ -95,9 +80,9 @@ const GeoLogVol *
 SCT_Module::preBuild()
 {
   // Create child components
-  m_outerSide = new SCT_OuterSide("OuterSide", m_detectorManager, m_geometryManager, m_materials);
-  m_baseBoard = new SCT_BaseBoard("BaseBoard", m_detectorManager, m_geometryManager, m_materials);
-  m_innerSide = new SCT_InnerSide("InnerSide", m_detectorManager, m_geometryManager, m_materials);
+  m_outerSide = std::make_unique<SCT_OuterSide>("OuterSide", m_detectorManager, m_geometryManager, m_materials);
+  m_baseBoard = std::make_unique<SCT_BaseBoard>("BaseBoard", m_detectorManager, m_geometryManager, m_materials);
+  m_innerSide = std::make_unique<SCT_InnerSide>("InnerSide", m_detectorManager, m_geometryManager, m_materials);
 
   //
   // We have 2 envelopes.
@@ -213,7 +198,7 @@ SCT_Module::preBuild()
   const double yCenterEnv1 = yminEnv1 + 0.5*widthEnv1;
   const double zCenterEnv1 = zmaxEnv1 - 0.5*lengthEnv1;
 
-  m_env1RefPointVector = new GeoTrf::Vector3D(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1);
+  m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1);
 
   // Calculate demension of envelope2.
   const double z_ikl = std::max(i.z(), l.z());
@@ -244,7 +229,7 @@ SCT_Module::preBuild()
   const double yCenterEnv2 = ymaxEnv2 - 0.5*widthEnv2;
   const double zCenterEnv2 = zmaxEnv2 - 0.5*lengthEnv2;
 
-  m_env2RefPointVector = new GeoTrf::Vector3D(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2);
+  m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2);
 
   // 8th Aug 2005 S.Mima modified.
   // Calculate dimension of subbox 
@@ -307,13 +292,13 @@ SCT_Module::preBuild()
   // inner side
   //
   GeoTrf::Transform3D rotInner = GeoTrf::RotateX3D(m_stereoInner) * GeoTrf::RotateZ3D(180*Gaudi::Units::deg);
-  m_innerSidePos = new GeoTrf::Transform3D(GeoTrf::Transform3D(GeoTrf::Translation3D(ISPosX, 0.0, 0.0)*rotInner));
+  m_innerSidePos = std::make_unique<GeoTrf::Transform3D>(GeoTrf::Transform3D(GeoTrf::Translation3D(ISPosX, 0.0, 0.0)*rotInner));
 
   //
   // outer side
   //
   GeoTrf::RotateX3D rotOuter(m_stereoOuter);
-  m_outerSidePos = new GeoTrf::Transform3D(GeoTrf::Transform3D(GeoTrf::Translation3D(OSPosX, 0.0, 0.0)*rotOuter));
+  m_outerSidePos = std::make_unique<GeoTrf::Transform3D>(GeoTrf::Transform3D(GeoTrf::Translation3D(OSPosX, 0.0, 0.0)*rotOuter));
 
   //
   // base board
@@ -321,7 +306,7 @@ SCT_Module::preBuild()
   //
   const double baseBoardPosY = m_baseBoardOffsetY;
   const double baseBoardPosZ = m_baseBoardOffsetZ;
-  m_baseBoardPos = new GeoTrf::Translate3D(0.0, baseBoardPosY, baseBoardPosZ);
+  m_baseBoardPos = std::make_unique<GeoTrf::Translate3D>(0.0, baseBoardPosY, baseBoardPosZ);
 
 
   return moduleLog;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx
index 4cf592f91f15..7229f21b8efe 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_OuterSide.h"
@@ -36,10 +36,7 @@ SCT_OuterSide::SCT_OuterSide(const std::string & name,
                              InDetDD::SCT_DetectorManager* detectorManager,
                              const SCT_GeometryManager* geometryManager,
                              SCT_MaterialManager* materials)
-  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials),
-    m_hybrid(0),
-    m_pigtail(0),
-    m_sensor(0)
+  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials)
 {
   getParameters();
   m_logVolume = preBuild();
@@ -48,11 +45,6 @@ SCT_OuterSide::SCT_OuterSide(const std::string & name,
 
 SCT_OuterSide::~SCT_OuterSide()
 {
-  delete m_hybrid;
-  delete m_pigtail;
-  delete m_sensor;
-  delete m_env1RefPointVector;
-  delete m_env2RefPointVector;
   if (m_hybridPos) m_hybridPos->unref();
   if (m_pigtailPos) m_pigtailPos->unref();
   if (m_sensorPos) m_sensorPos->unref();
@@ -75,9 +67,9 @@ const GeoLogVol *
 SCT_OuterSide::preBuild()
 {
   // Create child components
-  m_sensor             = new SCT_Sensor("BRLSensor", m_detectorManager, m_geometryManager, m_materials);
-  m_hybrid             = new SCT_Hybrid("Hybrid", m_detectorManager, m_geometryManager, m_materials);
-  m_pigtail            = new SCT_Pigtail("Pigtail", m_detectorManager, m_geometryManager, m_materials);
+  m_sensor  = std::make_unique<SCT_Sensor>("BRLSensor", m_detectorManager, m_geometryManager, m_materials);
+  m_hybrid  = std::make_unique<SCT_Hybrid>("Hybrid", m_detectorManager, m_geometryManager, m_materials);
+  m_pigtail = std::make_unique<SCT_Pigtail>("Pigtail", m_detectorManager, m_geometryManager, m_materials);
 
   //
   // Define constants for convenience.
@@ -128,11 +120,8 @@ SCT_OuterSide::preBuild()
   const double ose2PosY = hybridPosY - 0.5*w_pigtail;
   const double ose2PosZ = hybridPosZ;
 
-  // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (02)*********************************
-  // *** -->>                                      (02)*********************************
-  m_env1RefPointVector = new GeoTrf::Vector3D(0.0, 0.0, 0.0);
-  m_env2RefPointVector = new GeoTrf::Vector3D(-ose2PosX, -ose2PosY, -ose2PosZ);
-  // *** End of modified lines. ------------------ (02)*********************************
+  m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(0.0, 0.0, 0.0);
+  m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-ose2PosX, -ose2PosY, -ose2PosZ);
 
   m_hybridPos             = new GeoTransform(GeoTrf::Translate3D(hybridPosX, hybridPosY, hybridPosZ));
   m_hybridPos->ref();
@@ -143,7 +132,7 @@ SCT_OuterSide::preBuild()
   // and so point to away from the  module center.
   // The two sensor+hybrid combinations are built in a similar way.
   //
- //                      ^ 
+  //                      ^ 
   //        ---   hybrid  | 
   //      ------- sensor  | x-axis
   //
@@ -151,8 +140,6 @@ SCT_OuterSide::preBuild()
   // 
   //Gaudi::Units::HepRotation rotSensor;
   //rotSensor.rotateZ(180*Gaudi::Units::deg);
-  //m_outerSidePos = new GeoTrf::Transform3D(rotOuter, GeoTrf::Vector3D(0.5 * (m_sensorGap + sectThickness), 0., 0.));
-  //m_sensorPos = new GeoTransform(GeoTrf::Transform3D(rotSensor, GeoTrf::Vector3D(sensorPosX, sensorPosY, sensorPosZ)));
   m_sensorPos             = new GeoTransform(GeoTrf::Translate3D(sensorPosX, sensorPosY, sensorPosZ));
   m_sensorPos->ref();
 
@@ -173,12 +160,7 @@ SCT_OuterSide::preBuild()
                                                          &OuterSideEnvelopeShape,
                                                          m_materials->gasMaterial());
 
-  // 28th Mar S.Mima modified.
-  // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (03)*********************************
-  //m_thickness = 0.5*t_sensor + m_hybridOffsetX + 0.5*t_ose2;
-  // *** -->>                                      (03)*********************************
   m_thickness = 0.5*t_ose1 + m_hybridOffsetX + 0.5*t_ose2;
-  // *** End of modified lines. ------------------ (03)*********************************
   m_width     = w_ose2;
   m_length    = l_ose1;
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx
index 3c180ab14c0a..92262a09defa 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_Sensor.h"
@@ -104,6 +104,7 @@ SCT_Sensor::makeDesign()
   // The readout side is at the +ve depth direction
   int readoutSide = +1;
 
+  // m_design will be owned and deleted by SCT_DetectorManager
   m_design = new SCT_BarrelModuleSideDesign(m_thickness,
                                             crystals,
                                             diodes,
@@ -148,6 +149,8 @@ SCT_Sensor::build(SCT_Identifier id)
 
     SiDetectorElement * detElement;
 
+    // detElement will be owned by SCT_DetectorManager
+    // and will be deleted in destructor of SiDetectorElementCollection in SCT_DetectorManager
     detElement =  new SiDetectorElement(id.getWaferId(), 
                                         m_design, 
                                         sensor,  
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
index 9e5471a91f8f..3172db64fc68 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_GeoModel/SCT_Ski.h"
@@ -9,9 +9,9 @@
 #include "SCT_GeoModel/SCT_BarrelParameters.h"
 #include "SCT_GeoModel/SCT_GeneralParameters.h"
 #include "SCT_GeoModel/SCT_Module.h"
-#include "SCT_GeoModel/SCT_BaseBoard.h" // 18:00 Wed 15th Jun 2005 D.Naito added.
+#include "SCT_GeoModel/SCT_BaseBoard.h" 
 #include "SCT_GeoModel/SCT_Dogleg.h"
-#include "SCT_GeoModel/SCT_CoolingBlock.h" // 14th Aug 2005 S.Mima added.
+#include "SCT_GeoModel/SCT_CoolingBlock.h"
 #include "SCT_GeoModel/SCT_CoolingPipe.h"
 
 #include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
@@ -55,11 +55,6 @@ SCT_Ski::SCT_Ski(const std::string & name,
 
 SCT_Ski::~SCT_Ski()
 {
-  delete m_dogleg;
-  delete m_coolingBlock;
-  delete m_coolingPipe;
-  delete m_env1RefPointVector;
-  delete m_env2RefPointVector;
   if (m_refPointTransform) m_refPointTransform->unref();
   if (m_coolingPipePos) m_coolingPipePos->unref();
 }
@@ -110,10 +105,10 @@ SCT_Ski::preBuild()
 
 
   // Make components.
-  m_dogleg = new SCT_Dogleg(getName()+"Dogleg", m_detectorManager, m_geometryManager, m_materials);
-  m_coolingBlock = new SCT_CoolingBlock(getName()+"CoolingBlock",
+  m_dogleg = std::make_unique<SCT_Dogleg>(getName()+"Dogleg", m_detectorManager, m_geometryManager, m_materials);
+  m_coolingBlock = std::make_unique<SCT_CoolingBlock>(getName()+"CoolingBlock",
                                         m_detectorManager, m_geometryManager, m_materials);
-  m_coolingPipe = new SCT_CoolingPipe(getName()+"CoolingPipe", m_length,
+  m_coolingPipe = std::make_unique<SCT_CoolingPipe>(getName()+"CoolingPipe", m_length,
                                       m_detectorManager, m_geometryManager, m_materials);
 
   // We need the sign of the tilt in numerous places
@@ -416,8 +411,8 @@ SCT_Ski::preBuild()
 
   // *** 10:00 Tue 31st May 2005 D.Naito modified. (14)*********************************
   // *** -->>                                      (14)*********************************
-  m_env1RefPointVector = new GeoTrf::Vector3D(-xCenter, -yCenter, 0.0);
-  m_env2RefPointVector = new GeoTrf::Vector3D(-xShift2, -yShift2, 0.0);
+  m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenter, -yCenter, 0.0);
+  m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xShift2, -yShift2, 0.0);
   m_env1Thickness      = xmax1-xmin1;
   m_env1Width          = ymax1-ymin1;
   m_env2Thickness      = xmax2-xmin2;
-- 
GitLab


From 7b0a1889a39dc610a2cb7ef47ba6c007d180386a Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Tue, 9 Jun 2020 14:39:17 +0200
Subject: [PATCH 077/266] Add optional isFullscan flag to
 Trig::DecisionAccess::associateToEventView

---
 .../TrigDecisionTool/DecisionAccess.h         | 10 +++++++--
 .../TrigDecisionTool/DecisionAccess.icc       | 22 ++++++++++++++-----
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
index dba550bcbd99..971ef2190c6c 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
@@ -190,14 +190,20 @@ namespace Trig {
      * Instance mapping done via matchIndex and optional matchKey (leave matchKey = 0 to not cut on this).
      * @param[in] inViewContainer The ReadHandle of the collection which was produced online inside an EventView.
      * @param[in] matchIndex The index of the desired EventView.
-     * @param[in] matchKey Optional SGKey of the index of the desired EventView (collection hosting the ROI used to span the Event View)
+     * @param[in] matchKey Optional. SGKey of the index of the desired EventView (collection hosting the ROI used to span the Event View)
+     * @param[in] isFullscan Optional. If true, and inViewContainer has no viewIndex decorations, then return iterators over the full
+     *                       span of the inViewContainer instead of throwing an exception.
+     *                       This allows the associateToEventView interface to be used also for non-EventView containers, 
+     *                       with the FS ROI used to indicate that the lack of decorations is expected rather than being
+     *                       indicative of a configuration problem.
      * @return Pair of iterators spanning a range of indices over the collection accessed through the ReadHandleKey
      **/
     template<class CONTAINER>
     std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > 
     associateToEventView(SG::ReadHandle<CONTAINER>& inViewContainer,
                          const uint32_t matchIndex,
-                         const uint32_t matchKey = 0) const;
+                         const uint32_t matchKey = 0,
+                         const bool isFullscan = false) const;
 
     /// @}
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
index 7ff7f47255e8..56c02e8abc6f 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
@@ -92,14 +92,20 @@ template<class CONTAINER>
 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > 
 Trig::DecisionAccess::associateToEventView(SG::ReadHandle<CONTAINER>& inViewContainer,
                                            const ElementLink<TrigRoiDescriptorCollection>& matchROI) const {
-  return associateToEventView(inViewContainer, matchROI.index(), matchROI.key());
+  // If we can resolve the link, then we can also check the fullscan flag.
+  bool isFullscan = false;
+  if (matchROI.isValid()) {
+    isFullscan = (*matchROI)->isFullscan();
+  }
+  return associateToEventView(inViewContainer, matchROI.index(), matchROI.key(), isFullscan);
 }
 
 template<class CONTAINER>
 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > 
 Trig::DecisionAccess::associateToEventView(SG::ReadHandle<CONTAINER>& inViewContainer,
                                            const uint32_t matchIndex,
-                                           const uint32_t matchKey) const {
+                                           const uint32_t matchKey,
+                                           const bool isFullscan) const {
   if (!inViewContainer.isValid()) {
     std::stringstream ss;
     ss << "Supplied ReadHandle '" << inViewContainer.key() << "' of type '" << ClassID_traits<CONTAINER>::typeName() << "' is not valid.";
@@ -112,9 +118,15 @@ Trig::DecisionAccess::associateToEventView(SG::ReadHandle<CONTAINER>& inViewCont
   static const SG::AuxElement::ConstAccessor< ElementLink<TrigRoiDescriptorCollection> > accessor("viewIndex");
   for (typename CONTAINER::const_iterator it = container->begin(); it != end; ++it) {
     if (!accessor.isAvailable(**it)) { // iterator dereferences to an OBJECT*, OBJECT* dereferences to an OBJECT
-      ATH_MSG_ERROR("Unable to read the viewIndex decoration from the supplied container. Was it created inside an EventView?");
-      throw std::runtime_error("Trig::DecisionAccess::associateToEventView Unable to read the viewIndex decoration from the "
-        "supplied container. Was it created inside an EventView?");
+      if (isFullscan) {
+        ATH_MSG_DEBUG("Supplied container has no viewIndex decoration. But isFullscan flag is TRUE. "
+          << "Returning iterators over whole container.");
+        return std::make_pair(container->begin(), container->end());
+      } else {
+        ATH_MSG_ERROR("Unable to read the viewIndex decoration from the supplied container. Was it created inside an EventView?");
+        throw std::runtime_error("Trig::DecisionAccess::associateToEventView Unable to read the viewIndex decoration from the "
+          "supplied container. Was it created inside an EventView?");
+      }
     }
     const ElementLink<TrigRoiDescriptorCollection> objectROI = accessor( **it );
     bool match = true;
-- 
GitLab


From 015a1e89c78e8b474706c5b7e3d7497d781edb7f Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus712.cern.ch>
Date: Tue, 9 Jun 2020 14:55:32 +0200
Subject: [PATCH 078/266] Check size before moving PJC container to eventStore

---
 Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
index 35a6ae6ea569..16eee29f7331 100644
--- a/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
@@ -46,8 +46,8 @@ StatusCode MuonSegmentPseudoJetAlgorithm::execute(const EventContext& ctx) const
   auto pjcont = std::make_unique<PseudoJetContainer>(extractor.release(), vpj);
   
   auto outcoll = SG::makeHandle<PseudoJetContainer>(m_outcoll,ctx);
-  ATH_CHECK(outcoll.record(std::move(pjcont)));
   ATH_MSG_DEBUG("New PseudoJetContainer size " << pjcont->size());
+  ATH_CHECK(outcoll.record(std::move(pjcont)));
 
   return StatusCode::SUCCESS;
 }
-- 
GitLab


From 2980c785eb0f3341e5f689d360fb4ab9ae841c86 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Tue, 9 Jun 2020 13:20:34 +0000
Subject: [PATCH 079/266] Remove import of non-existant assertCastorStager
 function (ATLASRECTS-5542)

---
 .../MuonRecExample/share/MuonRec_myTopOptions.py                 | 1 -
 .../MuonRecExample/share/MuonRec_myTopOptions_MT.py              | 1 -
 .../RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py       | 1 -
 .../share/RecJobTransformTests_MuonRec_myTopOptions_MT.py        | 1 -
 4 files changed, 4 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
index f7190ce06897..4f304b37278d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
@@ -20,7 +20,6 @@ import MuonRecExample.MuonRecStandaloneOnlySetup
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 
 from MuonRecExample import MuonRecUtils
-from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet
 
 #Need the beam spot for the TrackParticleCreator
 if not ('conddb' in dir()):
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
index dd87fc0a31b0..aca4275e75d4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
@@ -19,7 +19,6 @@ import MuonRecExample.MuonRecStandaloneOnlySetup
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 
 from MuonRecExample import MuonRecUtils
-from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet
 #--------------------------------------------------------------------------------
 # Input
 #--------------------------------------------------------------------------------
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py
index 1b73e28c5c09..eee05a6cadb1 100644
--- a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py
@@ -23,7 +23,6 @@ import MuonRecExample.MuonRecStandaloneOnlySetup
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 
 from MuonRecExample import MuonRecUtils
-from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet
 
 #Need the beam spot for the TrackParticleCreator
 if not ('conddb' in dir()):
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
index 702dd511c82d..01b64f1749c0 100644
--- a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
@@ -19,7 +19,6 @@ import MuonRecExample.MuonRecStandaloneOnlySetup
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 
 from MuonRecExample import MuonRecUtils
-from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet
 #--------------------------------------------------------------------------------
 # Input
 #--------------------------------------------------------------------------------
-- 
GitLab


From 07e32bc3470aca4417d7619da047a6109b0e8b74 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Tue, 9 Jun 2020 15:21:43 +0200
Subject: [PATCH 080/266] Use EventSelector from service manager Fix
 ATLASSIM-4605

When doing the large scale change removing ByteStreamInputSvc's
FullFileName (!33370) I did not realize that EventSelector was not defined in the
BSOverlay transform skeleton. This fetches the EventSelector from the
service manager.
---
 .../share/skeleton.BSOverlayFilter_tf.py                    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
index 01026f34be56..36e11a18f86f 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
@@ -37,11 +37,11 @@ BSFilterLog.info( '**** ByteStreamInputSvc configuration' )
 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 ByteStreamInputSvc = svcMgr.ByteStreamInputSvc
-# EventSelector.Input = open(runArgs.InputFileMapFile).readline().rstrip().split(',')
+# svcMgr.EventSelector.Input = open(runArgs.InputFileMapFile).readline().rstrip().split(',')
 if hasattr( runArgs, 'inputZeroBiasBSFile'):
-    EventSelector.Input=runArgs.inputZeroBiasBSFile
+    svcMgr.EventSelector.Input=runArgs.inputZeroBiasBSFile
 else:
-    EventSelector.Input=runArgs.inputBS_SKIMFile
+    svcMgr.EventSelector.Input=runArgs.inputBS_SKIMFile
 print ByteStreamInputSvc
 
 # ---------------------------
-- 
GitLab


From 6f1061bd8d39136452291d04fea1afaeb3c0b007 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Tue, 9 Jun 2020 08:45:28 -0500
Subject: [PATCH 081/266] SCT mon py3 fix

---
 .../SCT_Monitoring/share/SCTHitEffMonAlg_jobOptions.py          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitEffMonAlg_jobOptions.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitEffMonAlg_jobOptions.py
index 4fec99c73b40..d8ac262b86e1 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitEffMonAlg_jobOptions.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitEffMonAlg_jobOptions.py
@@ -120,7 +120,7 @@ myMonGroup[sctMon.GENERAL_INDEX].defineHistogram(varname= "LumiBlock, eff;" + "e
 
 # SCTEC, SCTB, SCTEA
 for isub in range(sctMon.N_REGIONS):
-    profileLabels = range(limit[isub])
+    profileLabels = list(range(limit[isub]))
     for k in range(limit[isub]):
         profileLabels[k] = dedicatedTitle(k, isub)
     # Efficiency
-- 
GitLab


From b426e6a61ad5ace01071b32ed1b672b22420481c Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 9 Jun 2020 16:19:23 +0200
Subject: [PATCH 082/266] DeterministicAnnealingFilter migrate impl to
 EventContext  interfaces

---
 .../DeterministicAnnealingFilter.h            |   99 +-
 .../src/DAF_SimpleWeightCalculator.cxx        |   12 +-
 .../src/DAF_WeightCalculator.cxx              |   12 +-
 .../src/DeterministicAnnealingFilter.cxx      | 1224 +++++++++--------
 4 files changed, 691 insertions(+), 656 deletions(-)

diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/TrkDeterministicAnnealingFilter/DeterministicAnnealingFilter.h b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/TrkDeterministicAnnealingFilter/DeterministicAnnealingFilter.h
index 8d2a7346050d..7d009b0d3a2d 100755
--- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/TrkDeterministicAnnealingFilter/DeterministicAnnealingFilter.h
+++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/TrkDeterministicAnnealingFilter/DeterministicAnnealingFilter.h
@@ -17,6 +17,7 @@
 #include "TrkFitterUtils/FitterTypes.h"     // typedefs
 #include "TrkFitterInterfaces/ITrackFitter.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
 #include "TrkFitterUtils/FitterStatusCode.h"    // needed for Trk::FitterStatusCode::Success
@@ -24,7 +25,7 @@
 #include "TrkParameters/TrackParameters.h"      // typedef
 #include "TrkEventUtils/TrkParametersComparisonFunction.h"  // typedef
 
-
+#include <memory>
 class IAlgTool;
 
 namespace Trk {
@@ -81,38 +82,46 @@ public:
     If non CompetingRIOsOnTrack are given it might include the creation of
     Trk::CompetingRIOsOnTrack depending on the jobOptions.
     runOutlier has no meaning in all of the DAF's fitting methods */
-    virtual Track* fit (const Track&,
-                        const RunOutlierRemoval  runOutlier=false,
-                        const ParticleHypothesis matEffects=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     /** refit a track adding a PrepRawDataSet: Trk::ICompetingRIOsOnTrackCreator is used
     to create Trk::CompetingRIOsOnTrack out of the additional PrepRawData first.
     Be careful: The dicision which PrepRawData should compete against each other can
     not be done here.
      - NOT IMPLEMENTED YET!!! */
-    virtual Track* fit(const Track&,
-                       const PrepRawDataSet&,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext&,
+      const Track&,
+      const PrepRawDataSet&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     /** fit a track to a PrepRawDataSet: Trk::ICompetingRIOsOnTrackCreator is used
     to create Trk::CompetingRIOsOnTrack out of the additional PrepRawData first.
     Be careful: The dicision which PrepRawData should compete against each other can
     not be done here.
     - NOT IMPLEMENTED YET!!! */
-    virtual Track* fit(const PrepRawDataSet&,
-                       const TrackParameters&,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext&,
+      const PrepRawDataSet&,
+      const TrackParameters&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     /** re-fit a track, adding a fittable measurement set:
          This function should normally be called with a MeasurementSet containing
         Trk::CompetingRIOsOnTrack
         - NOT IMPLEMENTED YET!!!*/
-    virtual Track* fit(const Track&,
-                       const MeasurementSet&,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext&,
+      const Track&,
+      const MeasurementSet&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     /** fit a track to a set of measurementBase.
         This function should normally be called with a MeasurementSet containing
@@ -120,22 +129,20 @@ public:
         The TrackParameters is a first estimate for the track.
         If non Trk::CompetingRIOsOnTrack are given the TrackParameters are
         used for computing the initial assignment probabilities.*/
-    virtual Track* fit(const MeasurementSet&,
-                       const TrackParameters&,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const override;
-
-    /** not implemented: makes no sense for the DAF (always returns a NULL pointer) */
-    virtual Track* fit(const SpacePointSet&,
-                       const TrackParameters&,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const MeasurementSet&,
+      const TrackParameters&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
     /** combined track fit:
         - NOT implemented yet!!!*/
-    virtual Track* fit(const Track&,
-                       const Track&,
-                       const RunOutlierRemoval,
-                       const ParticleHypothesis) const override;
+    virtual std::unique_ptr<Track> fit(const EventContext&,
+                                       const Track&,
+                                       const Track&,
+                                       const RunOutlierRemoval,
+                                       const ParticleHypothesis) const override;
     ///////////////////////////////////////////////////////////////////
     // Private methods:
     ///////////////////////////////////////////////////////////////////
@@ -157,7 +164,8 @@ private:
     //std::string                         m_option_compROTcreator;    //!< jobOption: name and instance of CompetingRIOsOnTrackTool
 
     //ToolHandle< const ITrackFitter* >               m_ITrackFitter;             //!< pointer to ITrack Fitter
-    //std::string                         m_option_KalmanFitter;      //!< jobOption: DEACTIVATED IN THE CURRENT VERSION! Name and instance of the ITrackFitter. Default and best choice: "none". If set to "none", the Kalman Forward Filter and Backward Smoother are used directly (recommended for speed reasons).
+    //std::string                         m_option_KalmanFitter;      //!< jobOption: DEACTIVATED IN THE CURRENT VERSION! 
+    //Name and instance of the ITrackFitter. Default and best choice: "none". If set to "none", the Kalman Forward Filter and Backward Smoother are used directly (recommended for speed reasons).
 
     ToolHandle< IForwardKalmanFitter >              m_forwardFitter;            //!< the tool handle for the Kalman forward filter
     //std::string                         m_option_FwFilterInstance;  //!< jobOption: instance of the Kalman forward filter
@@ -185,8 +193,20 @@ private:
     mutable Trajectory                  m_trajectory;               //!< trajectory of Trk::ProtoTrackStateOnSurface
     
     Trk::PropDirection                  m_directionToPerigee;
-    
-    enum FitStatusCodes {Call, Success, BadInput, ExtrapolationFailure, ForwardFilterFailure, SmootherFailure, OutlierFailure, PerigeeMakingFailure, NoTrkParsToUpdateCompROT, nFitStatusCodes};
+
+    enum FitStatusCodes
+    {
+      Call,
+      Success,
+      BadInput,
+      ExtrapolationFailure,
+      ForwardFilterFailure,
+      SmootherFailure,
+      OutlierFailure,
+      PerigeeMakingFailure,
+      NoTrkParsToUpdateCompROT,
+      nFitStatusCodes
+    };
     mutable std::vector< std::vector<int> > m_fitStatistics;
     mutable std::vector< std::vector<int> > m_failuresByIteration;
     enum StatIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, nStatIndex = 4};
@@ -202,8 +222,9 @@ private:
 //         const ParticleHypothesis matEffects=Trk::nonInteracting) const;
 
     Track* doDAFfitWithKalman(
-        const TrackParameters&,
-        const ParticleHypothesis matEffects=Trk::nonInteracting) const;
+      const EventContext& ctx,
+      const TrackParameters&,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const;
     /** method to create a track from internal trajectory which is common to all interfaces */
     Track*                     makeTrack(const ParticleHypothesis) const;
 //    /** special method to build Perigee parameters from the track */
@@ -228,9 +249,11 @@ private:
     void monitorTrackFits(FitStatusCodes, const double& eta, int iteration=0) const;
 
     /** call the validation tool */
-    void callValidation(int iterationIndex,
-                        const Trk::ParticleHypothesis  matEffects,
-                        FitterStatusCode fitStatCode=Trk::FitterStatusCode::Success ) const;
+    void callValidation(
+      const EventContext& ctx,
+      int iterationIndex,
+      const Trk::ParticleHypothesis matEffects,
+      FitterStatusCode fitStatCode = Trk::FitterStatusCode::Success) const;
 };
 
 } // end of namespace
diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx
index c3bcaae2c2a9..99d8efc3d9cf 100755
--- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx
+++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_SimpleWeightCalculator.cxx
@@ -73,7 +73,7 @@ const std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* Trk::DAF_SimpleW
         ATH_MSG_ERROR("vector of RIO_OnTrack and TrackParameters do not have the same size: assignmentProbabilities cannot be calculated");
         delete assgnProbVec;
         return nullptr;
-    } else {
+    } 
         // -----------------------------
         // loop over ROTs to calc non-normalized assignment probabilities
         ATH_MSG_VERBOSE("loop over ROTs");
@@ -88,7 +88,7 @@ const std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* Trk::DAF_SimpleW
             normalize( *assgnProbVec, ROTs, beta, cutValue);
         }
         return assgnProbVec;
-    }
+    
 }
 
 //calculate the assignment probability (assignment weight) for a single measurement
@@ -104,7 +104,7 @@ Trk::CompetingRIOsOnTrack::AssignmentProb Trk::DAF_SimpleWeightCalculator::calcu
     if ( (ROT.associatedSurface()) !=  (trkPar.associatedSurface()) ) {
         ATH_MSG_ERROR("RIO_OnTrack and TrackParameters do not have the same associatedSurface: assignmentProbability cannot be calculated");
         return 0;
-    } else {
+    } 
         ATH_MSG_VERBOSE("start calculation:");
         // code can be written in one line; avoiding this 'cause of readability
 
@@ -128,7 +128,7 @@ Trk::CompetingRIOsOnTrack::AssignmentProb Trk::DAF_SimpleWeightCalculator::calcu
             msg(MSG::VERBOSE)<<"exponent of prob: " << exponential <<endmsg;
         }
         return ( std::exp(-exponential) );
-    } // end if (equal surfaces)
+    // end if (equal surfaces)
 }
 
 //normalize given assignment probabilities (assignment weights) using a given cutValue and annealing factor
@@ -161,7 +161,7 @@ Trk::DAF_SimpleWeightCalculator::normalize (
     if (assgnProbs.size() != ROTs->size()) {
         ATH_MSG_ERROR("sizes of AssignmentProb vector and RIO_OnTrack vector do not match: no normalization done");
         return;
-    } else {
+    } 
         ATH_MSG_DEBUG("starting normalization:");
         // ----------------------------
         // calculate sum of assgnProbs:
@@ -187,7 +187,7 @@ Trk::DAF_SimpleWeightCalculator::normalize (
                 assgnProbs[i] *= factor;
             }
         } // end if (assgnProbSum > 0.)
-    } // end if(vector sizes match)
+    // end if(vector sizes match)
 }
 
 
diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_WeightCalculator.cxx b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_WeightCalculator.cxx
index 42d86ad40d0a..8b7d4e010a19 100755
--- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_WeightCalculator.cxx
+++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DAF_WeightCalculator.cxx
@@ -88,7 +88,7 @@ const std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* Trk::DAF_WeightC
         ATH_MSG_ERROR("vector of RIO_OnTrack and TrackParameters do not have the same size: assignmentProbabilities cannot be calculated");
         delete assgnProbVec;
         return nullptr;
-    } else {
+    } 
         // -----------------------------
         // loop over ROTs to calc non-normalized assignment probbailities
         ATH_MSG_VERBOSE("loop over ROTs");
@@ -103,7 +103,7 @@ const std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* Trk::DAF_WeightC
             normalize( *assgnProbVec, ROTs, beta, cutValue);
         }
         return assgnProbVec;
-    }
+    
 }
 
 //calculate the assignment probability (assignment weight) for a single measurement
@@ -119,7 +119,7 @@ Trk::CompetingRIOsOnTrack::AssignmentProb Trk::DAF_WeightCalculator::calculateWe
     if ( (ROT.associatedSurface()) !=  (trkPar.associatedSurface()) ) {
         ATH_MSG_ERROR("RIO_OnTrack and TrackParameters do not have the same associatedSurface: assignmentProbability cannot be calculated");
         return 0;
-    } else {
+    } 
         ATH_MSG_VERBOSE("start calculation:");
         // code can be written in one line; avoiding this 'cause of readability
 
@@ -153,7 +153,7 @@ Trk::CompetingRIOsOnTrack::AssignmentProb Trk::DAF_WeightCalculator::calculateWe
             msg(MSG::VERBOSE)<<"exponent of prob: " << exponential <<endmsg;
         }
         return ( factor * std::exp(-exponential) );
-    } // end if (equal surfaces)
+    // end if (equal surfaces)
 }
 
 //normalize given assignment probabilities (assignment weights) using a given cutValue and annealing factor
@@ -185,7 +185,7 @@ void Trk::DAF_WeightCalculator::normalize (
     if (assgnProbs.size() != ROTs->size()) {
         ATH_MSG_ERROR("sizes of AssignmentProb vector and RIO_OnTrack vector do not match: no normalization done");
         return;
-    } else {
+    } 
         ATH_MSG_DEBUG("starting normalization:");
         // ----------------------------
         // calculate sum of assgnProbs:
@@ -232,7 +232,7 @@ void Trk::DAF_WeightCalculator::normalize (
             **/
             for (double &p : assgnProbs){ p *= factor; }
         } // end if (assgnProbSum > 0.)
-    } // end if(vector sizes match)
+    // end if(vector sizes match)
 }
 
 
diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DeterministicAnnealingFilter.cxx b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DeterministicAnnealingFilter.cxx
index f6da1c324d8e..cd66740d9312 100755
--- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DeterministicAnnealingFilter.cxx
+++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/src/DeterministicAnnealingFilter.cxx
@@ -182,7 +182,7 @@ StatusCode Trk::DeterministicAnnealingFilter::initialize() {
       if (m_dna.retrieve().isFailure()) {
         ATH_MSG_ERROR( "DNA is configured but tool is not accessible - " << m_dna.typeAndName() );
         return StatusCode::FAILURE;
-      } else ATH_MSG_INFO( "retrieved tool " << m_dna.typeAndName() );
+      } ATH_MSG_INFO( "retrieved tool " << m_dna.typeAndName() );
     }
 
     // configure ForwardKalmanFitter
@@ -297,220 +297,266 @@ StatusCode Trk::DeterministicAnnealingFilter::finalize() {
 //////////////////////////////////////////////
 /// refit a track
 //////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit(const Trk::Track&  inputTrack,
-        const RunOutlierRemoval,
-        const Trk::ParticleHypothesis matEffects) const {
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(
+  const EventContext& ctx,
+  const Trk::Track& inputTrack,
+  const RunOutlierRemoval,
+  const Trk::ParticleHypothesis matEffects) const
+{
 
-    ATH_MSG_VERBOSE( "--> enter DeterministicAnnealingFilter::fit(Track,,)" );
+  ATH_MSG_VERBOSE("--> enter DeterministicAnnealingFilter::fit(Track,,)");
 
-    // protection against track not having any parameters
-    if (inputTrack.trackParameters()->empty()) {
-        ATH_MSG_FATAL( "need estimated track parameters near origin, reject fit" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
-    }
-    // protection against not having measurements on the input track
-    if (!inputTrack.trackStateOnSurfaces() || inputTrack.trackStateOnSurfaces()->size() < 2) {
-        ATH_MSG_WARNING( "called to refit empty track or track with too little information, reject fit" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
+  // protection against track not having any parameters
+  if (inputTrack.trackParameters()->empty()) {
+    ATH_MSG_FATAL("need estimated track parameters near origin, reject fit");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+  // protection against not having measurements on the input track
+  if (!inputTrack.trackStateOnSurfaces() ||
+      inputTrack.trackStateOnSurfaces()->size() < 2) {
+    ATH_MSG_WARNING("called to refit empty track or track with too little "
+                    "information, reject fit");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+
+  //  determine the Track Parameter which is the start of the trajectory,
+  //  i.e. closest to the origine
+  ATH_MSG_VERBOSE("get track parameters near origine");
+  const TrackParameters* minPar =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       *m_tparScaleSetter));
+
+  if (msgLvl(MSG::VERBOSE)) {
+    DataVector<const TrackParameters>::const_iterator it =
+      inputTrack.trackParameters()->begin();
+    DataVector<const TrackParameters>::const_iterator itEnd =
+      inputTrack.trackParameters()->end();
+    Amg::Vector3D refGP(m_option_sortingRefPoint[0],
+                        m_option_sortingRefPoint[1],
+                        m_option_sortingRefPoint[2]);
+    for (; it != itEnd; it++) {
+      msg(MSG::VERBOSE) << " radius of TrackPar is: " << (*it)->position().mag()
+                        << ", to ref is " << ((*it)->position() - refGP).mag()
+                        << endmsg;
     }
-
-    //  determine the Track Parameter which is the start of the trajectory,
-    //  i.e. closest to the origine
-    ATH_MSG_VERBOSE( "get track parameters near origine" );
-    const TrackParameters* minPar = *(std::min_element(inputTrack.trackParameters()->begin(),
-                                                        inputTrack.trackParameters()->end(),
-                                                        *m_tparScaleSetter));
-    
-    if (msgLvl(MSG::VERBOSE)) {
-        DataVector<const TrackParameters>::const_iterator it
-        = inputTrack.trackParameters()->begin();
-        DataVector<const TrackParameters>::const_iterator itEnd
-        = inputTrack.trackParameters()->end();
-        Amg::Vector3D refGP(  m_option_sortingRefPoint[0],
-                                    m_option_sortingRefPoint[1],
-                                    m_option_sortingRefPoint[2] );
-        for( ; it!=itEnd; it++) {
-            msg(MSG::VERBOSE) << " radius of TrackPar is: " <<
-            (*it)->position().mag() << ", to ref is " <<
-            ((*it)->position()-refGP).mag() << endmsg;
-        }
-        ATH_MSG_VERBOSE( " (those track parameters were not shown sorted)" );
+    ATH_MSG_VERBOSE(" (those track parameters were not shown sorted)");
+  }
+
+  // monitorTrackFits( Call, (minPar ? minPar->eta() : 100.) );
+
+  // --------------------------------------------------------------
+  // extract measurements from input track and
+  // try to build CompetingRIOsOnTrack out of single RIO_OnTrack
+  // (this makes sense e.g. for the TRT where you have ambiguities and to
+  // allow the DAF-logic to identify outliers)
+  // CompetingRIOsOnTrack which include several RIO_OnTrack can not be produced
+  // here. That has to be done in pattern recognition.
+  // in CompetingRIOsOnTrack the annealing factor is set again
+
+  ATH_MSG_VERBOSE("extract MeasurementSet from Track");
+  ATH_MSG_VERBOSE("Track contains " << inputTrack.trackStateOnSurfaces()->size()
+                                    << " TrackStateOnSurfaces");
+  DataVector<const TrackStateOnSurface>::const_iterator it =
+    inputTrack.trackStateOnSurfaces()->begin();
+  DataVector<const TrackStateOnSurface>::const_iterator itEnd =
+    inputTrack.trackStateOnSurfaces()->end();
+  int istate = 1;
+  // loop through TrackStateOnSurfaces to find RIO_OnTrack or
+  // CompetingRIOsOnTrack
+  for (; it != itEnd; ++it, istate++) {
+    if (!(*it)) {
+      ATH_MSG_WARNING("This track contains empty TrackStateOnSurface objects! "
+                      "Skipped them..");
+      continue;
     }
-
-    //monitorTrackFits( Call, (minPar ? minPar->eta() : 100.) );
-
-    // --------------------------------------------------------------
-    // extract measurements from input track and
-    // try to build CompetingRIOsOnTrack out of single RIO_OnTrack
-    // (this makes sense e.g. for the TRT where you have ambiguities and to
-    // allow the DAF-logic to identify outliers)
-    // CompetingRIOsOnTrack which include several RIO_OnTrack can not be produced
-    // here. That has to be done in pattern recognition.
-    // in CompetingRIOsOnTrack the annealing factor is set again
-
-    ATH_MSG_VERBOSE( "extract MeasurementSet from Track" );
-    ATH_MSG_VERBOSE( "Track contains " << inputTrack.trackStateOnSurfaces()->size() << " TrackStateOnSurfaces" );
-    DataVector<const TrackStateOnSurface>::const_iterator it    = inputTrack.trackStateOnSurfaces()->begin();
-    DataVector<const TrackStateOnSurface>::const_iterator itEnd = inputTrack.trackStateOnSurfaces()->end();
-    int istate=1;
-    // loop through TrackStateOnSurfaces to find RIO_OnTrack or CompetingRIOsOnTrack
-    for ( ; it!=itEnd; ++it, istate++) {
-        if (!(*it)) {
-            ATH_MSG_WARNING( "This track contains empty TrackStateOnSurface objects! Skipped them.." );
-            continue;
-        }
-        if (!((*it)->measurementOnTrack())) {
-            //if ((*it)->type(Trk::TrackStateOnSurface::Measurement)) {
-            //    ATH_MSG_ERROR( "measurementOnTrack == Null for a measurement!" );
-            //}
-            ATH_MSG_VERBOSE( "Track state #" << (istate>=9?" ":" 0") << istate << " is other than measurement." );
-            continue;
-        }
-        bool outlier = (*it)->type(TrackStateOnSurface::Outlier);
-        ATH_MSG_VERBOSE( "Track state #" << (istate>9?" ":" 0") << istate << " is " << (outlier ? "outlier" : "a good" ) << " measurement." );
-        //m_trajectory.push_back(ProtoTrackStateOnSurface(((*it)->measurementOnTrack()),outlier,false,istate));
-
-        const TrackParameters* trkPar =  (*it)->trackParameters();
-        // add state to the trajectory
-        addToTrajectory( (*it)->measurementOnTrack(), trkPar, outlier, istate );
-    } // end loop over TrackStateOnSurface
-
-    // ------------------------
-    // start the DAF procedure:
-
-    Track* theTrack = nullptr;
-    if (minPar) {
-        ATH_MSG_VERBOSE( "got track parameters near origine" );
-        // do the DAF fit
-        theTrack = doDAFfitWithKalman(*minPar, matEffects);
-    } else {
-        ATH_MSG_ERROR( "could not get track parameters near origine" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
+    if (!((*it)->measurementOnTrack())) {
+      // if ((*it)->type(Trk::TrackStateOnSurface::Measurement)) {
+      //    ATH_MSG_ERROR( "measurementOnTrack == Null for a measurement!" );
+      //}
+      ATH_MSG_VERBOSE("Track state #" << (istate >= 9 ? " " : " 0") << istate
+                                      << " is other than measurement.");
+      continue;
     }
-    m_trajectory.clear();
-    if (!theTrack) {
-        // iterations failed:
-        //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit with calls of validation tool
-        if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) && m_haveValidationTool) {
-            m_doValidation = true;
-            if (fit(inputTrack, false, matEffects)) {
-                ATH_MSG_WARNING( "Error: fit succeeded! Should not happen, if we repeat a failed fit!" );
-            }
-            m_doValidation = false;
-        }
+    bool outlier = (*it)->type(TrackStateOnSurface::Outlier);
+    ATH_MSG_VERBOSE("Track state #"
+                    << (istate > 9 ? " " : " 0") << istate << " is "
+                    << (outlier ? "outlier" : "a good") << " measurement.");
+    // m_trajectory.push_back(ProtoTrackStateOnSurface(((*it)->measurementOnTrack()),outlier,false,istate));
+
+    const TrackParameters* trkPar = (*it)->trackParameters();
+    // add state to the trajectory
+    addToTrajectory((*it)->measurementOnTrack(), trkPar, outlier, istate);
+  } // end loop over TrackStateOnSurface
+
+  // ------------------------
+  // start the DAF procedure:
+
+  Track* theTrack = nullptr;
+  if (minPar) {
+    ATH_MSG_VERBOSE("got track parameters near origine");
+    // do the DAF fit
+    theTrack = doDAFfitWithKalman(ctx, *minPar, matEffects);
+  } else {
+    ATH_MSG_ERROR("could not get track parameters near origine");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+  }
+  m_trajectory.clear();
+  if (!theTrack) {
+    // iterations failed:
+    //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit
+    //    with calls of validation tool
+    if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) &&
+        m_haveValidationTool) {
+      m_doValidation = true;
+      if (fit(inputTrack, false, matEffects)) {
+        ATH_MSG_WARNING("Error: fit succeeded! Should not happen, if we repeat "
+                        "a failed fit!");
+      }
+      m_doValidation = false;
     }
-    // ------------------------
-    // return fitted track:
-    return theTrack;
+  }
+  // ------------------------
+  // return fitted track:
+  return std::unique_ptr<Trk::Track>(theTrack);
 }
 
-
 //////////////////////////////////////////////
 /// fit PRD set
 //////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit(const Trk::PrepRawDataSet&  ,// prepRDColl,
-        const Trk::TrackParameters& ,// estimatedParametersNearOrigine,
-        const RunOutlierRemoval     ,// runOutlier,
-        const Trk::ParticleHypothesis  ) const {
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(
+  const EventContext&,
+  const Trk::PrepRawDataSet&,  // prepRDColl,
+  const Trk::TrackParameters&, // estimatedParametersNearOrigine,
+  const RunOutlierRemoval,     // runOutlier,
+  const Trk::ParticleHypothesis) const
+{
 
-    //bool verbose  = (m_log.level() <= MSG::VERBOSE);
-    ATH_MSG_ERROR( "fit(PRDset, , ) not implemented" );
-    return nullptr;
+  // bool verbose  = (m_log.level() <= MSG::VERBOSE);
+  ATH_MSG_ERROR("fit(PRDset, , ) not implemented");
+  return nullptr;
 }
 
 //////////////////////////////////////////////
 /// fit measurement set
 //////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit( const Trk::MeasurementSet&      inputMeasSet,
-                                                    const Trk::TrackParameters&     estimatedStartParameters,
-                                                    const RunOutlierRemoval,
-                                                    const Trk::ParticleHypothesis   matEffects) const {
-
-    ATH_MSG_VERBOSE( "--> entering DeterministicAnnealingFilter::fit(MeasurementSet,TrackParameters,,)" );
-    if ( inputMeasSet.empty() ) {
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(
+  const EventContext& ctx,
+  const Trk::MeasurementSet& inputMeasSet,
+  const Trk::TrackParameters& estimatedStartParameters,
+  const RunOutlierRemoval,
+  const Trk::ParticleHypothesis matEffects) const
+{
+
+  ATH_MSG_VERBOSE(
+    "--> entering "
+    "DeterministicAnnealingFilter::fit(MeasurementSet,TrackParameters,,)");
+  if (inputMeasSet.empty()) {
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+  // monitorTrackFits( Call, estimatedStartParameters.eta() );
+
+  MeasurementSet::const_iterator it;
+  MeasurementSet::const_iterator itEnd;
+  MeasurementSet sortedHitSet;
+
+  if (m_option_doHitSorting) {
+    // input vector is const, so copy it before sorting.
+    sortedHitSet = MeasurementSet(inputMeasSet);
+    Trk::MeasurementBaseComparisonFunction* MeasB_CompFunc =
+      new Trk::MeasurementBaseComparisonFunction(
+        estimatedStartParameters.position(),
+        estimatedStartParameters.momentum());
+    // sort measColl in increasing distance from origin using STL sorting
+    if (!is_sorted(sortedHitSet.begin(), sortedHitSet.end(), *MeasB_CompFunc)) {
+      sort(sortedHitSet.begin(), sortedHitSet.end(), *MeasB_CompFunc);
     }
-    //monitorTrackFits( Call, estimatedStartParameters.eta() );
-
-    MeasurementSet::const_iterator it;
-    MeasurementSet::const_iterator itEnd;
-    MeasurementSet sortedHitSet;
-
-    if (m_option_doHitSorting) {
-        // input vector is const, so copy it before sorting.
-        sortedHitSet = MeasurementSet(inputMeasSet);
-        Trk::MeasurementBaseComparisonFunction* MeasB_CompFunc = new Trk::MeasurementBaseComparisonFunction(
-                                                                                estimatedStartParameters.position(),
-                                                                                estimatedStartParameters.momentum());
-        // sort measColl in increasing distance from origin using STL sorting
-        if ( !is_sorted( sortedHitSet.begin(), sortedHitSet.end(), *MeasB_CompFunc ) ) {
-            sort( sortedHitSet.begin(), sortedHitSet.end(), *MeasB_CompFunc );
-        }
-        // some debug output
-        if (msgLvl(MSG::VERBOSE)) {
-            msg(MSG::VERBOSE) << "-F- The list of MeasurementBase has been ordered along the initial direction." <<endmsg;
-            MeasurementSet::const_iterator it1    = sortedHitSet.begin();
-            MeasurementSet::const_iterator it1End = sortedHitSet.end();
-            for( ; it1!=it1End; it1++) {
-              msg(MSG::VERBOSE) << "-F- radius of globalPos() is " 
-                                << (*it1)->globalPosition().mag() << ", transverse r "
-                                << (*it1)->globalPosition().perp() << endmsg;
-            }
-        }
-        delete MeasB_CompFunc;
-        it    = sortedHitSet.begin();
-        itEnd = sortedHitSet.end();
-    } else {
-        it    = inputMeasSet.begin();
-        itEnd = inputMeasSet.end();
+    // some debug output
+    if (msgLvl(MSG::VERBOSE)) {
+      msg(MSG::VERBOSE) << "-F- The list of MeasurementBase has been ordered "
+                           "along the initial direction."
+                        << endmsg;
+      MeasurementSet::const_iterator it1 = sortedHitSet.begin();
+      MeasurementSet::const_iterator it1End = sortedHitSet.end();
+      for (; it1 != it1End; it1++) {
+        msg(MSG::VERBOSE) << "-F- radius of globalPos() is "
+                          << (*it1)->globalPosition().mag() << ", transverse r "
+                          << (*it1)->globalPosition().perp() << endmsg;
+      }
     }
-    // fill measurements into fitter-internal trajectory: no outlier, external meas't
-
-    for(int istate=1 ; it!=itEnd; it++, istate++) {
-        // extrapolate estimated track parameters to surface of measurement
-        const Trk::TrackParameters* extrapolatedTrkPar = m_extrapolator->extrapolate(estimatedStartParameters, (*it)->associatedSurface(),
-                                                                Trk::alongMomentum, false, matEffects); // TODO: decide: perhaps do not use material interactions here
-        if (!extrapolatedTrkPar) {
-            ATH_MSG_WARNING( "extrapolation to measurement surface did not succeed during creation of ProtoTrajectory." );
-        }
-        // add state to the trajectory
-        addToTrajectory( (*it),     // measurement
-                        extrapolatedTrkPar,    // extrapolated track parameters, if extrapolation succeeded.
-                        false,    // no outliers
-                        istate );  // state number
-        delete extrapolatedTrkPar;
+    delete MeasB_CompFunc;
+    it = sortedHitSet.begin();
+    itEnd = sortedHitSet.end();
+  } else {
+    it = inputMeasSet.begin();
+    itEnd = inputMeasSet.end();
+  }
+  // fill measurements into fitter-internal trajectory: no outlier, external
+  // meas't
+
+  for (int istate = 1; it != itEnd; it++, istate++) {
+    // extrapolate estimated track parameters to surface of measurement
+    const Trk::TrackParameters* extrapolatedTrkPar =
+      m_extrapolator->extrapolate(ctx,
+                                  estimatedStartParameters,
+                                  (*it)->associatedSurface(),
+                                  Trk::alongMomentum,
+                                  false,
+                                  matEffects); // TODO: decide: perhaps do not
+                                               // use material interactions here
+    if (!extrapolatedTrkPar) {
+      ATH_MSG_WARNING("extrapolation to measurement surface did not succeed "
+                      "during creation of ProtoTrajectory.");
     }
-    // ------------------------
-    // start the DAF procedure:
-    Track* theTrack = doDAFfitWithKalman(estimatedStartParameters, matEffects);
-    m_trajectory.clear();
-    if (!theTrack) {
-        // iterations failed:
-        //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit with calls of validation tool
-        if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) && m_haveValidationTool) {
-            m_doValidation = true;
-            if (fit(inputMeasSet, estimatedStartParameters, false, matEffects)) {
-                ATH_MSG_WARNING( "Error: fit succeeded! Should not happen, if we repeat a failed fit!" );
-            }
-            m_doValidation = false;
-        }
+    // add state to the trajectory
+    addToTrajectory((*it),              // measurement
+                    extrapolatedTrkPar, // extrapolated track parameters, if
+                                        // extrapolation succeeded.
+                    false,              // no outliers
+                    istate);            // state number
+    delete extrapolatedTrkPar;
+  }
+  // ------------------------
+  // start the DAF procedure:
+  Track* theTrack =
+    doDAFfitWithKalman(ctx, estimatedStartParameters, matEffects);
+  m_trajectory.clear();
+  if (!theTrack) {
+    // iterations failed:
+    //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit
+    //    with calls of validation tool
+    if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) &&
+        m_haveValidationTool) {
+      m_doValidation = true;
+      if (fit(inputMeasSet, estimatedStartParameters, false, matEffects)) {
+        ATH_MSG_WARNING("Error: fit succeeded! Should not happen, if we repeat "
+                        "a failed fit!");
+      }
+      m_doValidation = false;
     }
-    // ------------------------
-    // return fitted track:
-    return theTrack;
+  }
+  // ------------------------
+  // return fitted track:
+  return std::unique_ptr<Trk::Track>(theTrack);
 }
 
 //////////////////////////////////////////////
 /// fit track and PRD set
 //////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit(const Track&,
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(
+        const EventContext&,
+        const Track&,
         const PrepRawDataSet&,
         const RunOutlierRemoval,
         const ParticleHypothesis) const {
@@ -522,426 +568,393 @@ Trk::Track* Trk::DeterministicAnnealingFilter::fit(const Track&,
 //////////////////////////////////////////////
 /// fit track and measurement set
 //////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit( const Trk::Track&               inputTrack,
-                                                    const Trk::MeasurementSet&      addMeasColl,
-                                                    const Trk::RunOutlierRemoval    runOutlier,
-                                                    const Trk::ParticleHypothesis   matEffects ) const {
-
-    // do not use base class method here, because it does an unnecessary deep-copy
-    // of all measurements!
-    // TODO: decide how to handle the extra information of the given track
-    //       (outlier info, track parameters)
-
-    ATH_MSG_VERBOSE( "--> entering DeterministicAnnealingFilter::fit(Track, MeasurementSet,,)" );
-    // protection against track not having any parameters
-    if (inputTrack.trackParameters()->empty()) {
-        ATH_MSG_ERROR( "need estimated track parameters near origine, reject fit" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
-    }
-    // protection against not having Measurements
-    if (inputTrack.measurementsOnTrack()->empty()) {
-        ATH_MSG_ERROR( "try to fit track+vec<MB> with an empty track, reject fit" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
-    }
-    // protection, if empty MeasurementSet
-    if (addMeasColl.empty()) {
-        ATH_MSG_ERROR( "try to add an empty MeasurementSet to the track, reject fit" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
-    }
-    
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(
+  const EventContext& ctx,
+  const Trk::Track& inputTrack,
+  const Trk::MeasurementSet& addMeasColl,
+  const Trk::RunOutlierRemoval runOutlier,
+  const Trk::ParticleHypothesis matEffects) const
+{
 
-    // create MeasurementBase subset, copy in additional MeasurementSet
-    MeasurementSet hitColl;
-
-    // collect MBs from Track
-    ATH_MSG_VERBOSE( "add MeasurementBase objects from Track to new set" );
-//    DataVector<const MeasurementBase>::const_iterator it    = inputTrack.measurementsOnTrack()->begin();
-//    DataVector<const MeasurementBase>::const_iterator itEnd = inputTrack.measurementsOnTrack()->end(); 
-//    for ( ; it!=itEnd; ++it) {
-    DataVector<const TrackStateOnSurface>::const_iterator it    = inputTrack.trackStateOnSurfaces()->begin();
-    DataVector<const TrackStateOnSurface>::const_iterator itEnd = inputTrack.trackStateOnSurfaces()->end();
-    // loop through TrackStateOnSurfaces to find RIO_OnTrack or CompetingRIOsOnTrack
-    for ( ; it!=itEnd; ++it) {
-        if (!(*it)) {
-            ATH_MSG_WARNING( "This track contains empty TrackStateOnSurface objects! Skipped them.." );
-            continue;
-        }
-        if (!((*it)->measurementOnTrack())) {
-            continue;
-        }
-        if ( (*it)->type(TrackStateOnSurface::Outlier) ) {
-            ATH_MSG_DEBUG( "outlier on track is removed from list of measurements" );
-            continue;
-        }
-        hitColl.push_back ( (*it)->measurementOnTrack() );
+  // do not use base class method here, because it does an unnecessary deep-copy
+  // of all measurements!
+  // TODO: decide how to handle the extra information of the given track
+  //       (outlier info, track parameters)
+
+  ATH_MSG_VERBOSE(
+    "--> entering DeterministicAnnealingFilter::fit(Track, MeasurementSet,,)");
+  // protection against track not having any parameters
+  if (inputTrack.trackParameters()->empty()) {
+    ATH_MSG_ERROR("need estimated track parameters near origine, reject fit");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+  // protection against not having Measurements
+  if (inputTrack.measurementsOnTrack()->empty()) {
+    ATH_MSG_ERROR("try to fit track+vec<MB> with an empty track, reject fit");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+  // protection, if empty MeasurementSet
+  if (addMeasColl.empty()) {
+    ATH_MSG_ERROR(
+      "try to add an empty MeasurementSet to the track, reject fit");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
+    return nullptr;
+  }
+
+  // create MeasurementBase subset, copy in additional MeasurementSet
+  MeasurementSet hitColl;
+
+  // collect MBs from Track
+  ATH_MSG_VERBOSE("add MeasurementBase objects from Track to new set");
+  //    DataVector<const MeasurementBase>::const_iterator it    =
+  //    inputTrack.measurementsOnTrack()->begin(); DataVector<const
+  //    MeasurementBase>::const_iterator itEnd =
+  //    inputTrack.measurementsOnTrack()->end(); for ( ; it!=itEnd; ++it) {
+  DataVector<const TrackStateOnSurface>::const_iterator it =
+    inputTrack.trackStateOnSurfaces()->begin();
+  DataVector<const TrackStateOnSurface>::const_iterator itEnd =
+    inputTrack.trackStateOnSurfaces()->end();
+  // loop through TrackStateOnSurfaces to find RIO_OnTrack or
+  // CompetingRIOsOnTrack
+  for (; it != itEnd; ++it) {
+    if (!(*it)) {
+      ATH_MSG_WARNING("This track contains empty TrackStateOnSurface objects! "
+                      "Skipped them..");
+      continue;
     }
-    // copy MBs from input list
-    MeasurementSet::const_iterator itSet    = addMeasColl.begin();
-    MeasurementSet::const_iterator itSetEnd = addMeasColl.end();
-    for ( ; itSet!=itSetEnd; ++itSet) {
-        if (!(*itSet)) {
-            ATH_MSG_WARNING( "There is an empty MeasurementBase object in the track! Skip this object.." );
-            continue;
-        }
-        hitColl.push_back ( (*itSet) );
+    if (!((*it)->measurementOnTrack())) {
+      continue;
     }
-
-    // get TrkParameter closest to origine
-    ATH_MSG_VERBOSE( "get track parameters near origine" );
-    const TrackParameters* minPar = *(std::min_element( inputTrack.trackParameters()->begin(),
-                                                        inputTrack.trackParameters()->end(),
-                                                        *m_tparScaleSetter ));
-
-    if (!minPar) {
-        ATH_MSG_WARNING( "Cannot get valid track parameters from input track, reject fit!" );
-        monitorTrackFits( Call, 100. );
-        monitorTrackFits( BadInput, 100. );
-        return nullptr;
+    if ((*it)->type(TrackStateOnSurface::Outlier)) {
+      ATH_MSG_DEBUG("outlier on track is removed from list of measurements");
+      continue;
     }
-    // fit set of MeasurementBase using main method,
-    //    start with first TrkParameter in inputTrack
-    ATH_MSG_VERBOSE( "call fit(MBSet,TP,,)" );
-    Track* fittedTrack = fit(hitColl,*minPar, runOutlier, matEffects);
-    m_trajectory.clear();
-    if (!fittedTrack) {
-        // iterations failed:
-        //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit with calls of validation tool
-        if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) && m_haveValidationTool) {
-            m_doValidation = true;
-            if (fit(inputTrack, addMeasColl, runOutlier, matEffects)) {
-                ATH_MSG_WARNING( "Error: fit succeeded! Should not happen, if we repeat a failed fit!" );
-            }
-            m_doValidation = false;
-        }
+    hitColl.push_back((*it)->measurementOnTrack());
+  }
+  // copy MBs from input list
+  MeasurementSet::const_iterator itSet = addMeasColl.begin();
+  MeasurementSet::const_iterator itSetEnd = addMeasColl.end();
+  for (; itSet != itSetEnd; ++itSet) {
+    if (!(*itSet)) {
+      ATH_MSG_WARNING("There is an empty MeasurementBase object in the track! "
+                      "Skip this object..");
+      continue;
     }
-    return fittedTrack;
-}
-
-//////////////////////////////////////////////
-/// fit spacepoint set
-//////////////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit(const SpacePointSet&,
-        const TrackParameters&,
-        const RunOutlierRemoval,
-        const ParticleHypothesis) const {
-
-    //bool verbose  = (m_log.level() <= MSG::VERBOSE);
-    ATH_MSG_ERROR( "fit(SpacePointSet, , , ) does not make sense for the Deterministic Annealing Filter, return NULL" );
+    hitColl.push_back((*itSet));
+  }
+
+  // get TrkParameter closest to origine
+  ATH_MSG_VERBOSE("get track parameters near origine");
+  const TrackParameters* minPar =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       *m_tparScaleSetter));
+
+  if (!minPar) {
+    ATH_MSG_WARNING(
+      "Cannot get valid track parameters from input track, reject fit!");
+    monitorTrackFits(Call, 100.);
+    monitorTrackFits(BadInput, 100.);
     return nullptr;
+  }
+  // fit set of MeasurementBase using main method,
+  //    start with first TrkParameter in inputTrack
+  ATH_MSG_VERBOSE("call fit(MBSet,TP,,)");
+  std::unique_ptr<Trk::Track> fittedTrack =
+    fit(ctx, hitColl, *minPar, runOutlier, matEffects);
+  m_trajectory.clear();
+  if (!fittedTrack) {
+    // iterations failed:
+    //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit
+    //    with calls of validation tool
+    if (m_option_callValidationToolForFailedFitsOnly && (!m_doValidation) &&
+        m_haveValidationTool) {
+      m_doValidation = true;
+      if (fit(ctx, inputTrack, addMeasColl, runOutlier, matEffects)) {
+        ATH_MSG_WARNING("Error: fit succeeded! Should not happen, if we repeat "
+                        "a failed fit!");
+      }
+      m_doValidation = false;
+    }
+  }
+  return fittedTrack;
 }
+
 ///////////////////////////////////////
 // combined fit of two tracks
 ///////////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::fit( const Trk::Track&,
-                                                    const Trk::Track&,
-                                                    const Trk::RunOutlierRemoval,
-                                                    const Trk::ParticleHypothesis ) const {
-    ATH_MSG_ERROR( "fit(Track, Track, ...) not implemented yet, return NULL pointer" );
-    return nullptr;
+std::unique_ptr<Trk::Track>
+Trk::DeterministicAnnealingFilter::fit(const EventContext&,
+                                       const Trk::Track&,
+                                       const Trk::Track&,
+                                       const Trk::RunOutlierRemoval,
+                                       const Trk::ParticleHypothesis) const
+{
+  ATH_MSG_ERROR(
+    "fit(Track, Track, ...) not implemented yet, return NULL pointer");
+  return nullptr;
 }
 
-/////////////////////////////////
-/// doDAFfitWithIFitter -- the main procedure using ITrackFitter
-/////////////////////////////////
-// Trk::Track* Trk::DeterministicAnnealingFilter::doDAFfitWithIFitter(
-//     const MeasurementSet& measSet,
-//     const TrackParameters& trkPar,
-//     const ParticleHypothesis matEffects) const {
-//     
-//     if (m_debuglevel) ATH_MSG_VERBOSE( "-----> enter DeterministicAnnealingFilter::doDAFfit()" );
-// 
-//     //----------------------------------
-//     // do the first fit (i.e. annealingIteration==0):
-//     // run KalmanFitter without OutlierLogic
-//     Track* theTrack = m_ITrackFitter->fit(measSet, trkPar, false, matEffects);
-//     if (!theTrack) {
-//         ATH_MSG_WARNING( "Kalman fitter has rejected the track, return NULL" );
-//         return 0;
-//     }
-//     if (m_FitterValidationTool) {
-//         // write validation data for iteration 0
-//         m_FitterValidationTool->writeTrackData(*theTrack, 0);
-//     }
-//     //----------------------------------
-//     // do the annealing iterations:
-//     Track* theNewTrack = 0;
-//     for (unsigned int annealingIteration=1; annealingIteration < m_option_annealingScheme.size(); annealingIteration++) {
-//         ATH_MSG_VERBOSE( "****** starting Annealing Iteration " << annealingIteration << "****** " );
-//         // MeasurementSet for the next fit
-//         MeasurementSet measColl;
-//         // loop through TrackStateOnSurfaces to set annealingFactor in CompetingRIOsOnTrack
-//         if (m_debuglevel) {
-//             ATH_MSG_VERBOSE( "loop through TrackStateOnSurface to set AnnealingFactor to " << m_option_annealingScheme[annealingIteration] );
-//             ATH_MSG_VERBOSE( "    and update CompetingRIOsOnTrack. "  );
-//             ATH_MSG_VERBOSE( "Track contains " << theTrack->trackStateOnSurfaces()->size() << " TrackStateOnSurfaces" );
-//         }
-//         DataVector< const TrackStateOnSurface >::const_iterator it    = theTrack->trackStateOnSurfaces()->begin();
-//         DataVector< const TrackStateOnSurface >::const_iterator itEnd = theTrack->trackStateOnSurfaces()->end();
-//         for ( ; it!=itEnd; ++it) {
-//             if (!((*it)->measurementOnTrack())) {
-//                 if ((*it)->type(Trk::TrackStateOnSurface::Measurement)) {
-//                     ATH_MSG_ERROR( "measurementOnTrack == Null for a measurement!" );
-//                 }
-//                 continue;
-//             }
-//             const TrackParameters* trkPar =  (*it)->trackParameters();
-//             if (!trkPar) {
-//                 if (m_debuglevel) ATH_MSG_VERBOSE( "current TrackStateOnSurface has no TrackParameters, just use it's MeasurementBase." );
-//                 measColl.push_back((*it)->measurementOnTrack());
-//                 continue; // next TrackStateOnSurface
-//             }
-//             // set annealing factor in CompetingRIOsOnTrack
-//             const CompetingRIOsOnTrack* compROT = dynamic_cast<const CompetingRIOsOnTrack*>( (*it)->measurementOnTrack() );
-//             if (compROT) {
-//                 if (m_debuglevel) ATH_MSG_VERBOSE( "current MeasurementBase is a CompetingRIOsOnTrack: set annealing factor" );
-//                 m_compROTcreator->updateCompetingROT(*compROT, *trkPar, m_option_annealingScheme[annealingIteration]);
-//                 // use CompetingRIOsOnTrack
-//                 measColl.push_back(compROT);
-//                 continue; // next TrackStateOnSurface
-//             } // end if (compROT)
-//             // current MeasurementBase not added to measColl yet:
-//             if (m_debuglevel) ATH_MSG_VERBOSE( "use MeasurementBase" );
-//             measColl.push_back((*it)->measurementOnTrack());
-//             //}
-//         } // end for (TrackStateOnSurface iterator)
-//         if (m_debuglevel) ATH_MSG_VERBOSE( "end of loop: MeasurementSet contains " << measColl.size() << " measurements" );
-//         // get Track Parameter closest to origine
-//         //ATH_MSG_VERBOSE( "get track parameters near origine" );
-//         const TrackParameters* minPar = *(std::min_element(theTrack->trackParameters()->begin(),
-//                                           theTrack->trackParameters()->end(),
-//                                           *m_tparScaleSetter));
-//         if (!minPar) {
-//             ATH_MSG_ERROR( "Got no track parameters near origine, stop fitting" );
-//             delete theTrack;
-//             return 0;
-//         }
-//         if (m_debuglevel) ATH_MSG_VERBOSE( "Got track parameters near origine" );
-//         // fit again with KalmanFitter:
-//         theNewTrack = m_ITrackFitter->fit(measColl, *minPar, false, matEffects);
-//         //        ATH_MSG_VERBOSE( "use theTrack->trackParameters()->begin() as initial parameters for KalmanFitter" );
-//         //        theNewTrack = m_ITrackFitter->fit(measColl, *(*(theTrack->trackParameters()->begin())), false, matEffects);
-//         if (!theNewTrack) {
-//             ATH_MSG_WARNING( "Kalman fitter has rejected the track, return NULL" );
-//             delete theTrack;
-//             return 0;
-//         }
-//         if (m_FitterValidationTool) {
-//             // write validation data for iteration with index annealingIteration
-//             m_FitterValidationTool->writeTrackData(*theNewTrack, annealingIteration);
-//         }
-// 
-//         // shift our attention to new track:
-//         delete theTrack; // be careful: the pointers in measColl are not valid anymore, because they belonged to theTrack!
-//         theTrack = theNewTrack;
-//     } // end for: annealing iteration loop
-//     // there we are...
-//     ATH_MSG_INFO( "******* Made a track *********" );
-//     return theTrack;
-// }
-
-
 /////////////////////////////////
 /// doDAFfitWithKalman -- the main procedure using the Kalman sub-tools directly
 /////////////////////////////////
-Trk::Track* Trk::DeterministicAnnealingFilter::doDAFfitWithKalman(
-    const TrackParameters& trkPar,
-    const ParticleHypothesis matEffects) const {
-
-    monitorTrackFits( Call, trkPar.eta() );
-
-    ATH_MSG_VERBOSE( "-----> enter DeterministicAnnealingFilter::doDAFfit()" );
-    const TrackParameters* estimatedStartParameters = &trkPar;
-    const TrackParameters* clonedParameters = nullptr;
-    FitQuality* fitQual  = nullptr;
-    KalmanMatEffectsController controlledMatEff(matEffects, !m_dna.empty());
-
-    //----------------------------------
-    // do the annealing iterations:
-    for (unsigned int annealingIteration=0; annealingIteration < m_option_annealingScheme.size(); annealingIteration++) {
-        ATH_MSG_VERBOSE( "****** starting Annealing Iteration " << annealingIteration << "****** " );
-        // setting the new annealing factors and cleaning the trajectory from previous
-        // track parameters is not needed in the first (annealingIteration == 0) iteration.
-        if (annealingIteration > 0 ) {
-            // loop over ProtoTrackStateOnSurfaces to set annealingFactor in CompetingRIOsOnTrack
-            ATH_MSG_VERBOSE( "loop through TrackStateOnSurface to set AnnealingFactor to " << m_option_annealingScheme[annealingIteration] );
-            ATH_MSG_VERBOSE( "    and update CompetingRIOsOnTrack. "  );
-            Trk::Trajectory::iterator it = m_trajectory.begin();
-            int i=0;
-            for (; it!=m_trajectory.end(); it++, i++) {
-                //get first parameters on the track:
-                if ( !clonedParameters && !(it->isOutlier())) {
-                    if (it->smoothedTrackParameters()) clonedParameters = it->smoothedTrackParameters()->clone();
-                }
-                const CompetingRIOsOnTrack* compROT = dynamic_cast<const CompetingRIOsOnTrack*>( it->measurement() );
-                if (compROT) {
-                    if ( !(it->isOutlier()) ) {
-                        // set annealing factor in CompetingRIOsOnTrack which
-                        // are not marked as outliers
-                        const TrackParameters* smoothedTrkPar = it->smoothedTrackParameters();
-                        if (!smoothedTrkPar) {
-                            ATH_MSG_WARNING( "current ProtoTrackStateOnSurface has no TrackParameters: Can not update CompetingRIOsOnTrack" );
-                            continue; // next ProtoTrackStateOnSurface
-                        }
-                        //if (m_debuglevel) ATH_MSG_VERBOSE( "current MeasurementBase is a CompetingRIOsOnTrack: set annealing factor" );
-                        CompetingRIOsOnTrack* newCompROT = compROT->clone();
-                        m_compROTcreator->updateCompetingROT(*newCompROT, *smoothedTrkPar, m_option_annealingScheme[annealingIteration]);
-                        it->replaceMeasurement(newCompROT);
-                        compROT = newCompROT;
-                    } else {
-                        // set annealing factor in CompetingRIOsOnTrack which
-                        // are marked as outliers (the Kalman forward Fitter marks
-                        // measurements as outliers if the measurement update was bad,
-                        // and no smoothed TrackParameters are created for them):
-                        // extrapolate previous track parameters to the surface of the outlier:
-
-                        // TODO search of the next valid TrackParameters can be coded more elegantly:
-                        const Trk::TrackParameters* previousTrkPar = nullptr;
-                        Trk::PropDirection direction = Trk::alongMomentum;
-                        Trajectory::const_iterator it2 = it;
-                        while (!previousTrkPar) {
-                            if (it2 != m_trajectory.begin()) {
-                                it2--;
-                            } else {
-                                break;
-                            }
-                            if (!(it2->isOutlier()) && (it2->smoothedTrackParameters())) {
-                                previousTrkPar = it2->smoothedTrackParameters();
-                            }
-                        } // end while
-                        if (!previousTrkPar) {
-                            //previousTrkPar = estimatedStartParameters;
-                            while (!previousTrkPar) {
-                                if (!it->isOutlier() && (it->smoothedTrackParameters())) {
-                                    previousTrkPar = it->smoothedTrackParameters();
-                                } else {
-                                    if (it == m_trajectory.end()) {
-                                        ATH_MSG_WARNING( "can not update assignment probabilities: no useful parameters on track!" );
-                                        break;
-                                    }
-                                }
-                                ++it;
-                            }
-                            if (!previousTrkPar) {
-                                continue;
-                            }
-                            direction = Trk::oppositeMomentum;
-                        } // end if (!previousTrkPar)
-                        // extrapolate to surface
-                        if (previousTrkPar) {
-                            const Trk::TrackParameters* extrapolatedTrkPar = m_extrapolator->extrapolate(*previousTrkPar, compROT->associatedSurface(),
-                                                                                    direction, false, matEffects); // TODO: decide: perhaps do not use material interactions here
-                            if (!extrapolatedTrkPar) {
-                                ATH_MSG_WARNING( "Extrapolation to outlier surface did not succeed: Assignment probabilities of outlier cannot be updated" );
-                            } else {
-                                CompetingRIOsOnTrack* newCompROT = compROT->clone();
-                                m_compROTcreator->updateCompetingROT(*newCompROT, *extrapolatedTrkPar, m_option_annealingScheme[annealingIteration]);
-                                delete extrapolatedTrkPar;
-                                extrapolatedTrkPar = nullptr;
-                                it->replaceMeasurement(newCompROT);
-                                compROT = newCompROT;
-                            }
-                        }
-                    }// end if outlier
-                    // set the outlier-flag for measurements which have an extremely small assignment probability,
-                    // i.e. they are not used by the forward filter and backward smoother (this saves time and avoids
-                    // possible numerical instabilities due to large covariances of the weighted mean measurements)
-                    // sum up all assignment probs:
-                    double sumAssgnProb = 0.;
-                    for (unsigned int index = 0; index < compROT->numberOfContainedROTs(); index++) {
-                        sumAssgnProb += compROT->assignmentProbability(index);
-                    }
-                    if (sumAssgnProb < m_option_DropOutlierCut) {
-                        // summed up assignment probability is below cut value,
-                        //    mark as outlier
-                        it->isOutlier(true);
-                    } else {
-                        // TODO: decide: do we re-introduce outliers which have a good assignment probability now?
-                        it->isOutlier(false);
-                    } // end if (sumAssgnProb < m_option_DropOutlierCut)
-
-                    ATH_MSG_VERBOSE( "T"<< i << (it->isOutlier() ? ": X" : ": M" ) << " sumProb=" << sumAssgnProb );
-
-                } // end if (compROT)
-            } // end for (ProtoTrackStateOnSurface iterator)
-            // get innermost Track Parameter (belonging to first measurement on the trajectory)
-            // we need to clone them, because they will be deleted by clearFitResultsAfterOutlier(...)
-            // before the new fitting process is started.            
-            //clonedParameters = m_smoother->firstMeasurement(m_trajectory)->smoothedTrackParameters()->cloneWithoutError();
-            estimatedStartParameters = clonedParameters;
-            if (!estimatedStartParameters) {
-                ATH_MSG_WARNING( "first measurement ProtoTrackStateOnSurface has no TrackParameters: Use initial track paramters for fit" );
-                estimatedStartParameters = &trkPar;
-            }
+Trk::Track*
+Trk::DeterministicAnnealingFilter::doDAFfitWithKalman(
+  const EventContext& ctx,
+  const TrackParameters& trkPar,
+  const ParticleHypothesis matEffects) const
+{
 
-            // clear old track parameters and fit qualities from trajectory
-            // delete old states here, instead of using clearFitResultsAfterOutlier() ...
-            for (it = m_trajectory.begin(); it!=m_trajectory.end(); it++, i++) {
-                if (it->forwardTrackParameters()) delete it->checkoutForwardPar();
-                if (it->smoothedTrackParameters()) delete it->checkoutSmoothedPar();
-                if (it->fitQuality()) delete it->checkoutFitQuality();
-                if (it->dnaMaterialEffects()) delete it->checkoutDNA_MaterialEffects();
-            }
-            //m_smoother->clearFitResultsAfterOutlier(m_trajectory,fitQual,1);
-            delete fitQual;
-            fitQual = nullptr;
-            ATH_MSG_VERBOSE( endmsg << "********** call forward kalman filter, iteration #"<< annealingIteration << " **********" << endmsg );
-        } // end if(annealingIteration > 0 )
-
-        // fit again with KalmanFitter:
-        FitterStatusCode fitstatus = m_forwardFitter->fit(  m_trajectory,
-                                                            *estimatedStartParameters,
-                                                            false,
-                                                            controlledMatEff,
-                                                            false,   // do not recreate RIO_OnTrack (this would destroy the CompetingRIOsOnTrack)
-                                                            -1);     // "-1" means to use estStartPar and ignore info on trajectory.
-        if (msgLvl(MSG::VERBOSE)) m_utility->dumpTrajectory(m_trajectory, name());
-        // protect against failed fit
-        if (fitstatus.isFailure()) {
-            ATH_MSG_DEBUG( "forward fitter #" << annealingIteration << " rejected fit" << endmsg << endmsg );
-            monitorTrackFits( ForwardFilterFailure, estimatedStartParameters->eta(), annealingIteration);
-            if (m_doValidation) callValidation(annealingIteration, matEffects, fitstatus);
-            return nullptr;
-        }
-        if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << endmsg
-                                    << "********** Forward fit passed, now call smoother #"
-                                    << annealingIteration
-                                    << ". ************* " << endmsg << endmsg;
-
-        // run backward smoother
-        fitstatus = m_smoother->fit(m_trajectory, fitQual, controlledMatEff);
-        // call validation tool for smoothed trajectory
-        if (m_doValidation) callValidation(annealingIteration, matEffects, fitstatus);
-        // protect against failed fit
-        if (fitstatus.isFailure()) {
-            ATH_MSG_DEBUG( "smoother #" << annealingIteration << " rejected fit" << endmsg << endmsg );
-            monitorTrackFits( SmootherFailure, estimatedStartParameters->eta(), annealingIteration );
-            return nullptr;
-        }
-        if (msgLvl(MSG::VERBOSE)) {
-            msg(MSG::VERBOSE) << endmsg
-                                 << "************ Backward smoother #" << annealingIteration
-                                 << " passed. ************* " << endmsg << endmsg;
-            m_utility->dumpTrajectory(m_trajectory, name());
+  monitorTrackFits(Call, trkPar.eta());
+
+  ATH_MSG_VERBOSE("-----> enter DeterministicAnnealingFilter::doDAFfit()");
+  const TrackParameters* estimatedStartParameters = &trkPar;
+  const TrackParameters* clonedParameters = nullptr;
+  FitQuality* fitQual = nullptr;
+  KalmanMatEffectsController controlledMatEff(matEffects, !m_dna.empty());
+
+  //----------------------------------
+  // do the annealing iterations:
+  for (unsigned int annealingIteration = 0;
+       annealingIteration < m_option_annealingScheme.size();
+       annealingIteration++) {
+    ATH_MSG_VERBOSE("****** starting Annealing Iteration " << annealingIteration
+                                                           << "****** ");
+    // setting the new annealing factors and cleaning the trajectory from
+    // previous track parameters is not needed in the first (annealingIteration
+    // == 0) iteration.
+    if (annealingIteration > 0) {
+      // loop over ProtoTrackStateOnSurfaces to set annealingFactor in
+      // CompetingRIOsOnTrack
+      ATH_MSG_VERBOSE(
+        "loop through TrackStateOnSurface to set AnnealingFactor to "
+        << m_option_annealingScheme[annealingIteration]);
+      ATH_MSG_VERBOSE("    and update CompetingRIOsOnTrack. ");
+      Trk::Trajectory::iterator it = m_trajectory.begin();
+      int i = 0;
+      for (; it != m_trajectory.end(); it++, i++) {
+        // get first parameters on the track:
+        if (!clonedParameters && !(it->isOutlier())) {
+          if (it->smoothedTrackParameters())
+            clonedParameters = it->smoothedTrackParameters()->clone();
         }
-        //if (m_option_doValidationAction) m_extrapolator->validationAction();
-
-        delete clonedParameters;
-        clonedParameters = nullptr;
-    } // end for: annealing iteration loop
-    // FitQuality is calculate in makeTrack() to take assignment probabilties into account, delete the one
-    // made by the smoother
-    delete fitQual;
-    fitQual = nullptr;
-    return makeTrack(matEffects);
+        const CompetingRIOsOnTrack* compROT =
+          dynamic_cast<const CompetingRIOsOnTrack*>(it->measurement());
+        if (compROT) {
+          if (!(it->isOutlier())) {
+            // set annealing factor in CompetingRIOsOnTrack which
+            // are not marked as outliers
+            const TrackParameters* smoothedTrkPar =
+              it->smoothedTrackParameters();
+            if (!smoothedTrkPar) {
+              ATH_MSG_WARNING(
+                "current ProtoTrackStateOnSurface has no TrackParameters: Can "
+                "not update CompetingRIOsOnTrack");
+              continue; // next ProtoTrackStateOnSurface
+            }
+            // if (m_debuglevel) ATH_MSG_VERBOSE( "current MeasurementBase is a
+            // CompetingRIOsOnTrack: set annealing factor" );
+            CompetingRIOsOnTrack* newCompROT = compROT->clone();
+            m_compROTcreator->updateCompetingROT(
+              *newCompROT,
+              *smoothedTrkPar,
+              m_option_annealingScheme[annealingIteration]);
+            it->replaceMeasurement(newCompROT);
+            compROT = newCompROT;
+          } else {
+            // set annealing factor in CompetingRIOsOnTrack which
+            // are marked as outliers (the Kalman forward Fitter marks
+            // measurements as outliers if the measurement update was bad,
+            // and no smoothed TrackParameters are created for them):
+            // extrapolate previous track parameters to the surface of the
+            // outlier:
+
+            // TODO search of the next valid TrackParameters can be coded more
+            // elegantly:
+            const Trk::TrackParameters* previousTrkPar = nullptr;
+            Trk::PropDirection direction = Trk::alongMomentum;
+            Trajectory::const_iterator it2 = it;
+            while (!previousTrkPar) {
+              if (it2 != m_trajectory.begin()) {
+                it2--;
+              } else {
+                break;
+              }
+              if (!(it2->isOutlier()) && (it2->smoothedTrackParameters())) {
+                previousTrkPar = it2->smoothedTrackParameters();
+              }
+            } // end while
+            if (!previousTrkPar) {
+              // previousTrkPar = estimatedStartParameters;
+              while (!previousTrkPar) {
+                if (!it->isOutlier() && (it->smoothedTrackParameters())) {
+                  previousTrkPar = it->smoothedTrackParameters();
+                } else {
+                  if (it == m_trajectory.end()) {
+                    ATH_MSG_WARNING("can not update assignment probabilities: "
+                                    "no useful parameters on track!");
+                    break;
+                  }
+                }
+                ++it;
+              }
+              if (!previousTrkPar) {
+                continue;
+              }
+              direction = Trk::oppositeMomentum;
+            } // end if (!previousTrkPar)
+            // extrapolate to surface
+            if (previousTrkPar) {
+              const Trk::TrackParameters* extrapolatedTrkPar =
+                m_extrapolator->extrapolate(
+                  ctx,
+                  *previousTrkPar,
+                  compROT->associatedSurface(),
+                  direction,
+                  false,
+                  matEffects); // TODO: decide: perhaps do not use
+                               // material interactions here
+              if (!extrapolatedTrkPar) {
+                ATH_MSG_WARNING("Extrapolation to outlier surface did not "
+                                "succeed: Assignment probabilities of outlier "
+                                "cannot be updated");
+              } else {
+                CompetingRIOsOnTrack* newCompROT = compROT->clone();
+                m_compROTcreator->updateCompetingROT(
+                  *newCompROT,
+                  *extrapolatedTrkPar,
+                  m_option_annealingScheme[annealingIteration]);
+                delete extrapolatedTrkPar;
+                extrapolatedTrkPar = nullptr;
+                it->replaceMeasurement(newCompROT);
+                compROT = newCompROT;
+              }
+            }
+          } // end if outlier
+          // set the outlier-flag for measurements which have an extremely small
+          // assignment probability, i.e. they are not used by the forward
+          // filter and backward smoother (this saves time and avoids possible
+          // numerical instabilities due to large covariances of the weighted
+          // mean measurements) sum up all assignment probs:
+          double sumAssgnProb = 0.;
+          for (unsigned int index = 0; index < compROT->numberOfContainedROTs();
+               index++) {
+            sumAssgnProb += compROT->assignmentProbability(index);
+          }
+          if (sumAssgnProb < m_option_DropOutlierCut) {
+            // summed up assignment probability is below cut value,
+            //    mark as outlier
+            it->isOutlier(true);
+          } else {
+            // TODO: decide: do we re-introduce outliers which have a good
+            // assignment probability now?
+            it->isOutlier(false);
+          } // end if (sumAssgnProb < m_option_DropOutlierCut)
+
+          ATH_MSG_VERBOSE("T" << i << (it->isOutlier() ? ": X" : ": M")
+                              << " sumProb=" << sumAssgnProb);
+
+        } // end if (compROT)
+      }   // end for (ProtoTrackStateOnSurface iterator)
+      // get innermost Track Parameter (belonging to first measurement on the
+      // trajectory) we need to clone them, because they will be deleted by
+      // clearFitResultsAfterOutlier(...) before the new fitting process is
+      // started.
+      // clonedParameters =
+      // m_smoother->firstMeasurement(m_trajectory)->smoothedTrackParameters()->cloneWithoutError();
+      estimatedStartParameters = clonedParameters;
+      if (!estimatedStartParameters) {
+        ATH_MSG_WARNING("first measurement ProtoTrackStateOnSurface has no "
+                        "TrackParameters: Use initial track paramters for fit");
+        estimatedStartParameters = &trkPar;
+      }
+
+      // clear old track parameters and fit qualities from trajectory
+      // delete old states here, instead of using clearFitResultsAfterOutlier()
+      // ...
+      for (it = m_trajectory.begin(); it != m_trajectory.end(); it++, i++) {
+        if (it->forwardTrackParameters())
+          delete it->checkoutForwardPar();
+        if (it->smoothedTrackParameters())
+          delete it->checkoutSmoothedPar();
+        if (it->fitQuality())
+          delete it->checkoutFitQuality();
+        if (it->dnaMaterialEffects())
+          delete it->checkoutDNA_MaterialEffects();
+      }
+      // m_smoother->clearFitResultsAfterOutlier(m_trajectory,fitQual,1);
+      delete fitQual;
+      fitQual = nullptr;
+      ATH_MSG_VERBOSE(endmsg
+                      << "********** call forward kalman filter, iteration #"
+                      << annealingIteration << " **********" << endmsg);
+    } // end if(annealingIteration > 0 )
+
+    // fit again with KalmanFitter:
+    FitterStatusCode fitstatus = m_forwardFitter->fit(
+      m_trajectory,
+      *estimatedStartParameters,
+      false,
+      controlledMatEff,
+      false, // do not recreate RIO_OnTrack (this would destroy the
+             // CompetingRIOsOnTrack)
+      -1);   // "-1" means to use estStartPar and ignore info on trajectory.
+    if (msgLvl(MSG::VERBOSE))
+      m_utility->dumpTrajectory(m_trajectory, name());
+    // protect against failed fit
+    if (fitstatus.isFailure()) {
+      ATH_MSG_DEBUG("forward fitter #" << annealingIteration << " rejected fit"
+                                       << endmsg << endmsg);
+      monitorTrackFits(ForwardFilterFailure,
+                       estimatedStartParameters->eta(),
+                       annealingIteration);
+      if (m_doValidation)
+        callValidation(ctx, annealingIteration, matEffects, fitstatus);
+      return nullptr;
+    }
+    if (msgLvl(MSG::VERBOSE))
+      msg(MSG::VERBOSE) << endmsg
+                        << "********** Forward fit passed, now call smoother #"
+                        << annealingIteration << ". ************* " << endmsg
+                        << endmsg;
+
+    // run backward smoother
+    fitstatus = m_smoother->fit(m_trajectory, fitQual, controlledMatEff);
+    // call validation tool for smoothed trajectory
+    if (m_doValidation)
+      callValidation(ctx, annealingIteration, matEffects, fitstatus);
+    // protect against failed fit
+    if (fitstatus.isFailure()) {
+      ATH_MSG_DEBUG("smoother #" << annealingIteration << " rejected fit"
+                                 << endmsg << endmsg);
+      monitorTrackFits(
+        SmootherFailure, estimatedStartParameters->eta(), annealingIteration);
+      return nullptr;
+    }
+    if (msgLvl(MSG::VERBOSE)) {
+      msg(MSG::VERBOSE) << endmsg << "************ Backward smoother #"
+                        << annealingIteration << " passed. ************* "
+                        << endmsg << endmsg;
+      m_utility->dumpTrajectory(m_trajectory, name());
+    }
+    // if (m_option_doValidationAction) m_extrapolator->validationAction();
+
+    delete clonedParameters;
+    clonedParameters = nullptr;
+  } // end for: annealing iteration loop
+  // FitQuality is calculate in makeTrack() to take assignment probabilties into
+  // account, delete the one made by the smoother
+  delete fitQual;
+  fitQual = nullptr;
+  return makeTrack(matEffects);
 }
 
-
 ///////////////////////////////////////////
 /// create a track object from the internal trajectory
 ///////////////////////////////////////////
@@ -1122,9 +1135,9 @@ const Trk::TrackStateOnSurface* Trk::DeterministicAnnealingFilter::internallyMak
     if (!per) {
         ATH_MSG_WARNING( "Perigee-making failed: extrapolation did not succeed." );
         return nullptr;
-    } else {
+    } 
         ATH_MSG_VERBOSE( "Perigee parameters have been made." );
-    }
+    
     std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern; 
     typePattern.set(Trk::TrackStateOnSurface::Perigee); 
     TrackStateOnSurface* tsos = new Trk::TrackStateOnSurface(nullptr, per, nullptr, nullptr, typePattern); 
@@ -1195,7 +1208,7 @@ void Trk::DeterministicAnnealingFilter::addToTrajectory(const MeasurementBase* m
                                                                 istate) );  // state number
             ATH_MSG_VERBOSE( "CompetingRIOsOnTrack created: use it instead of RIO_OnTrack" );
             return;
-        } else {
+        } 
             // use RIO_OnTrack
             m_trajectory.push_back(ProtoTrackStateOnSurface(    ROT,
                                                                 isOutlier,   // isOutlier? (use flag of the input track)
@@ -1203,7 +1216,7 @@ void Trk::DeterministicAnnealingFilter::addToTrajectory(const MeasurementBase* m
                                                                 istate) ); // state number
             ATH_MSG_VERBOSE( "CompetingRIOsOnTrack was not created: use original RIO_OnTrack" );
             return;
-        }
+        
     } // end if(ROT)
     // current MeasurementBase not added to trajectory yet:
     m_trajectory.push_back(ProtoTrackStateOnSurface(    measurement,
@@ -1211,7 +1224,6 @@ void Trk::DeterministicAnnealingFilter::addToTrajectory(const MeasurementBase* m
                                                         false,     // ProtoTrackState does not own the measurement, it belongs to the input track
                                                         istate) ); // state number
     ATH_MSG_VERBOSE( "type of MeasurementBase not identified, just use it" );
-    return;
 }
 
 
@@ -1227,14 +1239,14 @@ const Trk::TrackStateOnSurface* Trk::DeterministicAnnealingFilter::createStateFr
         // do not use the track parameters for outliers
         return new TrackStateOnSurface( protoState.checkoutMeasurement(),
                                           nullptr,nullptr,nullptr,typePattern );
-    } else {
+    } 
         typePattern.set(TrackStateOnSurface::Measurement);
         return new TrackStateOnSurface( protoState.checkoutMeasurement(),   // the measurement
                                         protoState.checkoutSmoothedPar(),   // smoothed track parameter
                                         nullptr,                                  // no fit quality
                                         mefot,                              // no material effects
                                         typePattern );                      // type pattern
-    }
+    
 }
 
 
@@ -1253,12 +1265,14 @@ void Trk::DeterministicAnnealingFilter::monitorTrackFits(FitStatusCodes code, co
         else if (fabs(eta) < 1.60) ((m_failuresByIteration[iteration])[iTransi])++;
         else if (fabs(eta) < 2.10) ((m_failuresByIteration[iteration])[iEndcap])++;
     }
-    return;
-}
+    }
 
-void Trk::DeterministicAnnealingFilter::callValidation( int iterationIndex,
-                                                        const Trk::ParticleHypothesis  matEffects,
-                                                        FitterStatusCode fitStatCode ) const
+void
+Trk::DeterministicAnnealingFilter::callValidation(
+  const EventContext& ctx,
+  int iterationIndex,
+  const Trk::ParticleHypothesis matEffects,
+  FitterStatusCode fitStatCode) const
 {
     ATH_MSG_DEBUG( "call validation for track iteration " << iterationIndex << "with status " << fitStatCode.getCode() << "/" << fitStatCode );
     // extrapolate to perigee at origin for validation data
@@ -1283,9 +1297,8 @@ void Trk::DeterministicAnnealingFilter::callValidation( int iterationIndex,
     const Trk::TrackParameters* perPar = nullptr;
     if (nearestParam) {
         // extrapolate to perigee
-        perPar = m_extrapolator->extrapolate(   *nearestParam, perSurf,
-                                                m_directionToPerigee,
-                                                false, matEffects);
+        perPar = m_extrapolator->extrapolate(
+          ctx, *nearestParam, perSurf, m_directionToPerigee, false, matEffects);
         per = dynamic_cast<const Trk::Perigee*>(perPar);
     } else {
         ATH_MSG_WARNING( "Perigee-making for validation failed: no useful parameters on track!" );
@@ -1295,6 +1308,5 @@ void Trk::DeterministicAnnealingFilter::callValidation( int iterationIndex,
     // FICME. just ignore as this is only for validation.
     sc.ignore(); 
     delete perPar;
-    return;
 }
 
-- 
GitLab


From b07fbb626397a60976ebc6116d556ba9639e645d Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 9 Jun 2020 16:22:08 +0200
Subject: [PATCH 083/266] Simplify LArFEBConfigCondAlg

---
 .../LArRecUtils/src/LArFEBConfigCondAlg.cxx   | 38 +++++--------------
 .../LArRecUtils/src/LArFEBConfigCondAlg.h     |  2 +-
 2 files changed, 11 insertions(+), 29 deletions(-)

diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
index 8f33c6e145b3..6b5090fd1d22 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
@@ -7,11 +7,7 @@
 
 
 LArFEBConfigCondAlg::LArFEBConfigCondAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthReentrantAlgorithm(name,pSvcLocator),m_onlineID(nullptr) {
-
-  declareProperty("ListOfFolders",m_listOfFolders);
-
-}
+  AthReentrantAlgorithm(name,pSvcLocator),m_onlineID(nullptr) {}
 
 
 LArFEBConfigCondAlg::~LArFEBConfigCondAlg() {}
@@ -26,11 +22,8 @@ StatusCode LArFEBConfigCondAlg::initialize() {
     ATH_MSG_WARNING( "List of folders is emtpy, do nothing");
     return StatusCode::SUCCESS;
   }
-
-  for (size_t i=0;i<m_listOfFolders.size();++i) {
-     ATH_CHECK(m_listOfFolders[i].initialize());
-  }//end loop over folders
-     
+  
+  ATH_CHECK(m_listOfFolders.initialize());
   ATH_CHECK(m_configKey.initialize());
 
   ATH_MSG_DEBUG("Successfully initialized LArFEBConfigCondAlg");
@@ -48,26 +41,16 @@ StatusCode LArFEBConfigCondAlg::execute(const EventContext& ctx) const {
       return StatusCode::SUCCESS;
   }
 
-  // Define validity of the output cond object 
-  const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
-  const EventIDBase stop{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
-  EventIDRange rangeW{start, stop};
 
   std::vector<const CondAttrListCollection*> attrvec;
 
-  for (auto fldkey: m_listOfFolders) {
+  for (const auto& fldkey: m_listOfFolders) {
      SG::ReadCondHandle<CondAttrListCollection> cHdl(fldkey, ctx);
      const CondAttrListCollection* cattr = *cHdl;
      if(cattr) {
         ATH_MSG_DEBUG("Folder: "<<cHdl.key()<<" has size: "<<std::distance(cattr->begin(),cattr->end()));
         attrvec.push_back(cattr);
-        EventIDRange rangeW_tmp;
-        if(!cHdl.range(rangeW_tmp)) {
-          ATH_MSG_ERROR("Failed to retrieve validity range for " << cHdl.key());
-          return StatusCode::FAILURE;
-        }
-        ATH_MSG_DEBUG("and validity range: "<<rangeW_tmp);
-        rangeW.intersect(rangeW,rangeW_tmp);
+	writeHandle.addDependency(cHdl);
      } else {
          ATH_MSG_WARNING("Why do not have FEB config folder " << fldkey.fullKey());
      }
@@ -96,14 +79,13 @@ StatusCode LArFEBConfigCondAlg::execute(const EventContext& ctx) const {
   ATH_MSG_INFO("Read gain thresholds for " << nFebs << " Febs from " << m_listOfFolders.size() << " database folders.");
 
   // Record output
-  const EventIDRange crangeW(rangeW);
-  if(writeHandle.record(crangeW,febConfig.release()).isFailure()) {
-     ATH_MSG_ERROR("Could not record LArFebConfig object with " << writeHandle.key()
-                      << " with EventRange " << crangeW << " into Conditions Store");
-     return StatusCode::FAILURE;
+  if(writeHandle.record(std::move(febConfig)).isFailure()) {
+      ATH_MSG_ERROR("Could not record LArFebConfig object with " << writeHandle.key()
+		    << " with EventRange " << writeHandle.getRange() << " into Conditions Store");
+      return StatusCode::FAILURE;
   }
 
-  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << crangeW << " into Conditions Store");
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
 
   return StatusCode::SUCCESS;
 }
diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h
index 76a6c0d7c933..b15bbd43707b 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h
+++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h
@@ -28,7 +28,7 @@ class LArFEBConfigCondAlg: public AthReentrantAlgorithm {
  private:
 
   const LArOnlineID* m_onlineID;
-  SG::ReadCondHandleKeyArray<CondAttrListCollection> m_listOfFolders;
+  SG::ReadCondHandleKeyArray<CondAttrListCollection> m_listOfFolders{this,"ListOfFolders",{},"List of input folders"};
   SG::WriteCondHandleKey<LArFebConfig> m_configKey{this, "keyOutput", "LArFebConfig", "Output key for LArFebConfig"};   
 };
 
-- 
GitLab


From ecdbf85842568e0dc3fca2cea31caeed83d9f28c Mon Sep 17 00:00:00 2001
From: adbailey <adam.bailey@cern.ch>
Date: Tue, 9 Jun 2020 17:13:23 +0200
Subject: [PATCH 084/266] Pass tau track container to track tools via execute
 function instead of a link from the tau. New functions created in base
 classes. Updated if statements in tau algorithms to call correct execute
 functions. Updated TauTrackRNN calibration file.

---
 Reconstruction/tauRec/python/tauRecFlags.py   |  2 +-
 Reconstruction/tauRec/src/TauProcessorAlg.cxx | 37 +++++++------------
 Reconstruction/tauRec/src/TauRunnerAlg.cxx    | 16 ++++----
 .../tauRecTools/Root/TauRecToolBase.cxx       | 12 +++++-
 .../tauRecTools/Root/TauTrackClassifier.cxx   | 15 ++------
 .../Root/TauTrackRNNClassifier.cxx            | 15 ++------
 .../tauRecTools/src/TauTrackFinder.cxx        | 24 ++++--------
 .../tauRecTools/src/TauTrackFinder.h          |  2 +-
 .../tauRecTools/tauRecTools/ITauToolBase.h    |  4 +-
 .../tauRecTools/tauRecTools/TauRecToolBase.h  |  4 +-
 .../tauRecTools/TauTrackClassifier.h          |  2 +-
 .../tauRecTools/TauTrackRNNClassifier.h       |  4 +-
 12 files changed, 58 insertions(+), 79 deletions(-)

diff --git a/Reconstruction/tauRec/python/tauRecFlags.py b/Reconstruction/tauRec/python/tauRecFlags.py
index fef5f98b99b6..3e9f8fa0b4e9 100644
--- a/Reconstruction/tauRec/python/tauRecFlags.py
+++ b/Reconstruction/tauRec/python/tauRecFlags.py
@@ -88,7 +88,7 @@ class tauRecRNNTrackClassificationConfig(JobProperty):
     """
     statusOn=True
     allowedTypes=['string']
-    StoredValue=["TauTrackRNN_offline_BLSTM_v1.json"]
+    StoredValue=["TauTrackRNN_LSTM_L40_Sum_v0.json"]
 
 class tauRecSeedMaxEta(JobProperty):
     """ max allowed abs_eta of jet seed
diff --git a/Reconstruction/tauRec/src/TauProcessorAlg.cxx b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
index c14f633e7f5a..bcfd12998e95 100644
--- a/Reconstruction/tauRec/src/TauProcessorAlg.cxx
+++ b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
@@ -173,9 +173,6 @@ StatusCode TauProcessorAlg::execute() {
       xAOD::TauJet* pTau = new xAOD::TauJet();
       pContainer->push_back( pTau );
       pTau->setJet(pSeedContainer, pSeed);
-
-      // This sets one track and link. Need to have at least 1 track linked to retrieve track container
-      setEmptyTauTrack(pTau, pTauTrackCont);
       
       //-----------------------------------------------------------------
       // Loop stops when Failure indicated by one of the tools
@@ -184,16 +181,22 @@ StatusCode TauProcessorAlg::execute() {
       for (ToolHandle<ITauToolBase>& tool : m_tools) {
 	ATH_MSG_DEBUG("ProcessorAlg Invoking tool " << tool->name());
 
-        if (tool->type() == "TauVertexFinder" ) { 
-          sc = tool->executeVertexFinder(*pTau);
-        }
-        else if ( tool->type() == "TauTrackFinder") { 
-          sc = tool->executeTrackFinder(*pTau);
-        }
-        else if ( tool->name().find("ShotFinder") != std::string::npos){
+	if (tool->type() == "TauVertexFinder" ) {
+	  sc = tool->executeVertexFinder(*pTau);
+	}
+	else if ( tool->type() == "TauTrackFinder") {
+	  sc = tool->executeTrackFinder(*pTau, *pTauTrackCont);
+	}
+	else if ( tool->type() == "tauRecTools::TauTrackClassifier") {
+	  sc = tool->executeTrackClassifier(*pTau, *pTauTrackCont);
+	}
+	else if ( tool->type() == "tauRecTools::TauTrackRNNClassifier") {
+	  sc = tool->executeRNNTrackClassifier(*pTau, *pTauTrackCont);
+	}
+	else if ( tool->type() == "TauShotFinder"){
 	  sc = tool->executeShotFinder(*pTau, *tauShotClusContainer, *tauShotPFOContainer);
 	}
-	else if ( tool->name().find("Pi0ClusterFinder") != std::string::npos){
+	else if ( tool->type() == "TauPi0CreateROI"){
 	  sc = tool->executePi0CreateROI(*pTau, *Pi0CellContainer, addedCellsMap);
 	}
 	else {
@@ -227,15 +230,3 @@ StatusCode TauProcessorAlg::execute() {
   return StatusCode::SUCCESS;
 }
 
-void TauProcessorAlg::setEmptyTauTrack(xAOD::TauJet* &pTau, 
-				       xAOD::TauTrackContainer* tauTrackContainer)
-{  
-  // Make a new tau track, add to container
-  xAOD::TauTrack* pTrack = new xAOD::TauTrack();
-  tauTrackContainer->push_back(pTrack);
-    
-  // Create an element link for that track
-  ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-  linkToTauTrack.toContainedElement(*tauTrackContainer, pTrack);
-  pTau->addTauTrackLink(linkToTauTrack);
-}
diff --git a/Reconstruction/tauRec/src/TauRunnerAlg.cxx b/Reconstruction/tauRec/src/TauRunnerAlg.cxx
index eccf6f11699f..9932035bf787 100644
--- a/Reconstruction/tauRec/src/TauRunnerAlg.cxx
+++ b/Reconstruction/tauRec/src/TauRunnerAlg.cxx
@@ -175,22 +175,22 @@ StatusCode TauRunnerAlg::execute() {
     
       for (ToolHandle<ITauToolBase>& tool : m_tools) {
 	ATH_MSG_DEBUG("RunnerAlg Invoking tool " << tool->name());
-	if ( tool->name().find("Pi0ClusterCreator") != std::string::npos){
-          sc = tool->executePi0ClusterCreator(*pTau, *neutralPFOContainer, *hadronicClusterPFOContainer, *pi0CaloClusterContainer, *pPi0ClusterContainer);
-        }
-	else if ( tool->name().find("VertexVariables") != std::string::npos){
+	if ( tool->type() == "TauPi0ClusterCreator"){
+	  sc = tool->executePi0ClusterCreator(*pTau, *neutralPFOContainer, *hadronicClusterPFOContainer, *pi0CaloClusterContainer, *pPi0ClusterContainer);
+	}
+	else if ( tool->type() == "TauVertexVariables"){
 	  sc = tool->executeVertexVariables(*pTau, *pSecVtxContainer);
 	}
-	else if ( tool->name().find("Pi0ClusterScaler") != std::string::npos){
+	else if ( tool->type() == "TauPi0ClusterScaler"){
 	  sc = tool->executePi0ClusterScaler(*pTau, *neutralPFOContainer, *chargedPFOContainer);
 	}
-	else if ( tool->name().find("Pi0ScoreCalculator") != std::string::npos){
+	else if ( tool->type() == "TauPi0ScoreCalculator"){
 	  sc = tool->executePi0nPFO(*pTau, *neutralPFOContainer);
 	}
-	else if ( tool->name().find("Pi0Selector") != std::string::npos){
+	else if ( tool->type() == "TauPi0Selector"){
 	  sc = tool->executePi0nPFO(*pTau, *neutralPFOContainer);
 	}
-	else if ( tool->name().find("PanTau") != std::string::npos){
+	else if ( tool->type() == "PanTau::PanTauProcessor"){
 	  sc = tool->executePanTau(*pTau, *pi0Container);
 	}
 	else {
diff --git a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
index bb42ed938341..a04300b96c7d 100644
--- a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
+++ b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
@@ -154,7 +154,17 @@ StatusCode TauRecToolBase::executeVertexFinder(xAOD::TauJet&, const xAOD::Vertex
   return StatusCode::FAILURE;
 }
 
-StatusCode TauRecToolBase::executeTrackFinder(xAOD::TauJet&, const xAOD::TrackParticleContainer*) {
+StatusCode TauRecToolBase::executeTrackFinder(xAOD::TauJet&, xAOD::TauTrackContainer&, const xAOD::TrackParticleContainer*) {
+  ATH_MSG_ERROR("function not implemented");
+  return StatusCode::FAILURE;
+}
+
+StatusCode TauRecToolBase::executeTrackClassifier(xAOD::TauJet&, xAOD::TauTrackContainer&) const{
+  ATH_MSG_ERROR("function not implemented");
+  return StatusCode::FAILURE;
+}
+
+StatusCode TauRecToolBase::executeRNNTrackClassifier(xAOD::TauJet&, xAOD::TauTrackContainer&){
   ATH_MSG_ERROR("function not implemented");
   return StatusCode::FAILURE;
 }
diff --git a/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx b/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
index 04fd8719b09b..707628fa6031 100644
--- a/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
+++ b/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
@@ -61,20 +61,11 @@ StatusCode TauTrackClassifier::finalize()
   return StatusCode::SUCCESS;
 }
 
-    
+
 //______________________________________________________________________________
-StatusCode TauTrackClassifier::execute(xAOD::TauJet& xTau) const
+StatusCode TauTrackClassifier::executeTrackClassifier(xAOD::TauJet& xTau, xAOD::TauTrackContainer& tauTrackCon) const
 {
-  // Get track container via link from tau - instead of using read handle (not written to store yet) 
-  // Check that size > 0
-  ElementLink< xAOD::TauTrackContainer > link;
-  xAOD::TauTrackContainer* tauTrackCon = 0;
-  if (xTau.allTauTrackLinks().size() > 0) {
-    link = xTau.allTauTrackLinks().at(0);//we don't care about this specific link, just the container
-    tauTrackCon = link.getDataNonConstPtr();
-  }  
-
-  std::vector<xAOD::TauTrack*> vTracks = xAOD::TauHelpers::allTauTracksNonConst(&xTau, tauTrackCon);
+  std::vector<xAOD::TauTrack*> vTracks = xAOD::TauHelpers::allTauTracksNonConst(&xTau, &tauTrackCon);
   for (xAOD::TauTrack* xTrack : vTracks)
   {
     // reset all track flags and set status to unclassified
diff --git a/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx b/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
index 7845aec15cbc..57c393848427 100644
--- a/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
+++ b/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
@@ -46,18 +46,9 @@ StatusCode TauTrackRNNClassifier::initialize()
 }
 
 //______________________________________________________________________________
-StatusCode TauTrackRNNClassifier::execute(xAOD::TauJet& xTau) const
-{
-  // Get track container via link from tau - instead of using read handle (not written to store yet) 
-  // Check that size > 0
-  ElementLink< xAOD::TauTrackContainer > link;
-  xAOD::TauTrackContainer* tauTrackCon = nullptr;
-  if (xTau.allTauTrackLinks().size() > 0) {
-    link = xTau.allTauTrackLinks().at(0); //we don't care about this specific link, just the container
-    tauTrackCon = link.getDataNonConstPtr();
-  }  
-
-  std::vector<xAOD::TauTrack*> vTracks = xAOD::TauHelpers::allTauTracksNonConst(&xTau, tauTrackCon);
+StatusCode TauTrackRNNClassifier::executeRNNTrackClassifier(xAOD::TauJet& xTau, xAOD::TauTrackContainer& tauTrackCon){
+
+  std::vector<xAOD::TauTrack*> vTracks = xAOD::TauHelpers::allTauTracksNonConst(&xTau, &tauTrackCon);
 
   for (xAOD::TauTrack* xTrack : vTracks)
   {
diff --git a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
index 587dbc7a97fb..ef2c932447b4 100644
--- a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
+++ b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
@@ -47,15 +47,7 @@ StatusCode TauTrackFinder::finalize() {
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::TrackParticleContainer* trackContainer) {
-
-  ElementLink< xAOD::TauTrackContainer > link = pTau.allTauTrackLinksNonConst().at(0);//we don't care about this specific link, just the container
-  xAOD::TauTrackContainer* tauTrackCon = link.getDataNonConstPtr();
-  
-  // Added an empty track and link in the processor alg, required so that the above will work for the very first tau
-  // Does that once per tau in the processor alg, so remove the last track and link once per tau here
-  (&(pTau.allTauTrackLinksNonConst()) )->pop_back();
-  tauTrackCon->pop_back();
+StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon, const xAOD::TrackParticleContainer* trackContainer) {
   
   std::vector<const xAOD::TrackParticle*> tauTracks;
   std::vector<const xAOD::TrackParticle*> wideTracks;
@@ -99,7 +91,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
       {
 	alreadyUsed = false;
 	//loop over all up-to-now core tracks	
-	for( const xAOD::TauTrack* tau_trk : (*tauTrackCon) ) {
+	for( const xAOD::TauTrack* tau_trk : (tauTrackCon) ) {
 	  if(! tau_trk->flagWithMask( (1<<xAOD::TauJetParameters::TauTrackFlag::coreTrack) | (1<<xAOD::TauJetParameters::TauTrackFlag::passTrkSelector))) continue; //originally it was coreTrack&passTrkSelector
 	  if( (*track_it) == tau_trk->track()) alreadyUsed = true;
 	}
@@ -123,7 +115,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
     charge += trackParticle->charge();
 
     xAOD::TauTrack* track = new xAOD::TauTrack();
-    tauTrackCon->push_back(track);
+    tauTrackCon.push_back(track);
 
     ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
     linkToTrackParticle.toContainedElement(*trackParticleCont, trackParticle);
@@ -137,7 +129,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
     track->setFlag(xAOD::TauJetParameters::TauTrackFlag::unclassified, true);
     
     ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-    linkToTauTrack.toContainedElement(*tauTrackCon, track);
+    linkToTauTrack.toContainedElement(tauTrackCon, track);
     pTau.addTauTrackLink(linkToTauTrack);
 
     ATH_MSG_VERBOSE(name()     << " added core track nr: " << i
@@ -157,7 +149,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
 		    );
 
     xAOD::TauTrack* track = new xAOD::TauTrack();
-    tauTrackCon->push_back(track);
+    tauTrackCon.push_back(track);
 
     ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
     linkToTrackParticle.toContainedElement(*trackParticleCont, trackParticle);
@@ -172,7 +164,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
     track->setFlag(xAOD::TauJetParameters::TauTrackFlag::unclassified, true);
 
     ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-    linkToTauTrack.toContainedElement(*tauTrackCon, track);
+    linkToTauTrack.toContainedElement(tauTrackCon, track);
     pTau.addTauTrackLink(linkToTauTrack);
 
   }
@@ -190,7 +182,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
 		    );
 
     xAOD::TauTrack* track = new xAOD::TauTrack();
-    tauTrackCon->push_back(track);
+    tauTrackCon.push_back(track);
 
     ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
     linkToTrackParticle.toContainedElement(*trackParticleCont, trackParticle);
@@ -203,7 +195,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, const xAOD::Tr
     track->setFlag(xAOD::TauJetParameters::TauTrackFlag::unclassified, true);
 
     ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-    linkToTauTrack.toContainedElement(*tauTrackCon, track);
+    linkToTauTrack.toContainedElement(tauTrackCon, track);
     pTau.addTauTrackLink(linkToTauTrack);
 
   }
diff --git a/Reconstruction/tauRecTools/src/TauTrackFinder.h b/Reconstruction/tauRecTools/src/TauTrackFinder.h
index 1dc276a568e2..bd84a382d880 100644
--- a/Reconstruction/tauRecTools/src/TauTrackFinder.h
+++ b/Reconstruction/tauRecTools/src/TauTrackFinder.h
@@ -58,7 +58,7 @@ public:
     //! Algorithm functions
     //-------------------------------------------------------------
     virtual StatusCode initialize() override;
-    virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, const xAOD::TrackParticleContainer* trackContainer = nullptr) override;
+    virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon, const xAOD::TrackParticleContainer* trackContainer = nullptr) override;
     virtual StatusCode finalize() override;
     
 private:
diff --git a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
index 93d406be7819..56c467c91b88 100644
--- a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
@@ -51,7 +51,9 @@ class ITauToolBase : virtual public asg::IAsgTool
   virtual StatusCode executeVertexFinder(xAOD::TauJet& pTau, 
                                          const xAOD::VertexContainer* vertexContainer = nullptr, 
                                          const xAOD::TrackParticleContainer* trackContainer = nullptr) = 0;
-  virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, const xAOD::TrackParticleContainer* trackContainer = nullptr) = 0;  
+  virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer, const xAOD::TrackParticleContainer* trackContainer = nullptr) = 0;
+  virtual StatusCode executeTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const = 0;
+  virtual StatusCode executeRNNTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) = 0;
   virtual StatusCode executeShotFinder(xAOD::TauJet& pTau, xAOD::CaloClusterContainer& shotClusterContainer, xAOD::PFOContainer& PFOContainer ) = 0;
 #ifndef XAOD_ANALYSIS
   virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, std::vector<CaloCell*>& map ) = 0;
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
index 58a8b232ed77..f910f820fbea 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
@@ -43,7 +43,9 @@ class TauRecToolBase : public asg::AsgTool, virtual public ITauToolBase {
   virtual StatusCode executeVertexFinder(xAOD::TauJet& pTau, 
                                          const xAOD::VertexContainer* vertexContainer = nullptr, 
                                          const xAOD::TrackParticleContainer* trackContainer = nullptr) override;
-  virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, const xAOD::TrackParticleContainer* trackContainer = nullptr) override;  
+  virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer, const xAOD::TrackParticleContainer* trackContainer = nullptr) override;
+  virtual StatusCode executeTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const override;
+  virtual StatusCode executeRNNTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) override;
   virtual StatusCode executeShotFinder(xAOD::TauJet& pTau, xAOD::CaloClusterContainer& shotClusterContainer, xAOD::PFOContainer& PFOContainer ) override;
 #ifndef XAOD_ANALYSIS
   virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, std::vector<CaloCell*>& map ) override;
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauTrackClassifier.h b/Reconstruction/tauRecTools/tauRecTools/TauTrackClassifier.h
index 5d37f45e3230..3c296e293165 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauTrackClassifier.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauTrackClassifier.h
@@ -42,7 +42,7 @@ public:
   ~TauTrackClassifier();
 
   virtual StatusCode initialize() override;
-  virtual StatusCode execute(xAOD::TauJet& pTau) const override;
+  virtual StatusCode executeTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer ) const override;
   virtual StatusCode finalize() override;
 
 private:
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauTrackRNNClassifier.h b/Reconstruction/tauRecTools/tauRecTools/TauTrackRNNClassifier.h
index 18bfa0c59ccc..79c6e4bcef8a 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauTrackRNNClassifier.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauTrackRNNClassifier.h
@@ -53,9 +53,9 @@ public:
   // retrieve all track classifier sub tools
   virtual StatusCode initialize() override;
  // pass all tracks in the tau cone to all track classifier sub tools
-  virtual StatusCode execute(xAOD::TauJet& pTau) const override;
+  virtual StatusCode executeRNNTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) override;
 
-private:
+ private:
   ToolHandleArray<TrackRNN> m_vClassifier {this, "Classifiers", {}};
 }; // class TauTrackRNNClassifier
   
-- 
GitLab


From 5d8bacc4b08900adfd55d7c271fa3792c4d3bb66 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Tue, 9 Jun 2020 17:52:49 +0200
Subject: [PATCH 085/266] Ensure dependency between TrigBSExtraction and
 RoiWriter

---
 .../TriggerJobOpts/python/HLTTriggerResultGetter.py       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py
index 35af30f752df..fd2bf326217f 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py
@@ -201,6 +201,9 @@ class ByteStreamUnpackGetterRun2(Configured):
         # BS unpacking
         from TrigBSExtraction.TrigBSExtractionConf import TrigBSExtraction
         extr = TrigBSExtraction()
+
+        # Add fictional output to ensure data dependency in AthenaMT
+        extr.ExtraOutputs += [("TrigBSExtractionOutput", "StoreGateSvc+TrigBSExtractionOutput")]
         
         if hasHLT:
             from TrigNavigation.TrigNavigationConfig import HLTNavigationOffline
@@ -440,7 +443,10 @@ class HLTTriggerResultGetter(Configured):
         if rec.doAOD() or rec.doWriteAOD():
             # schedule the RoiDescriptorStore conversion
             # log.warning( "HLTTriggerResultGetter - setting up RoiWriter" )
-            topSequence += RoiWriter()
+            roiWriter = RoiWriter()
+            # Add fictional input to ensure data dependency in AthenaMT
+            roiWriter.ExtraInputs += [("TrigBSExtractionOutput", "StoreGateSvc+TrigBSExtractionOutput")]
+            topSequence += roiWriter
             # write out the RoiDescriptorStores
             from TrigEDMConfig.TriggerEDMRun2 import TriggerRoiList
             objKeyStore.addManyTypesStreamAOD( TriggerRoiList )
-- 
GitLab


From 5b454c661b87e3e5ea989f9d4e19554268b12afa Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Tue, 9 Jun 2020 18:50:00 +0200
Subject: [PATCH 086/266] Ensure correct data dependency for transient
 ByteStream conversion

---
 .../TriggerJobOpts/share/jobOfragment_TransBS_standalone.py   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/jobOfragment_TransBS_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/jobOfragment_TransBS_standalone.py
index eb3095e9bbce..e7c7ecb009fc 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/jobOfragment_TransBS_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/jobOfragment_TransBS_standalone.py
@@ -15,8 +15,10 @@ StreamBS.ExtraOutputs += [transTypeKey]
 
 
 if not TriggerFlags.fakeLVL1():
-   theApp.Dlls += ["TrigT1ResultByteStream"]
+   from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamEncodersRecExSetup
+   L1ByteStreamEncodersRecExSetup()
    StreamBS.ItemList += ["ROIB::RoIBResult#*"]
+   StreamBS.ExtraInputs += [('ROIB::RoIBResult', 'StoreGateSvc+RoIBResult')]
 
 if TriggerFlags.doID():
    # TRT
-- 
GitLab


From 9c6c2d982bfea29fe64070d5c3c31f5921016650 Mon Sep 17 00:00:00 2001
From: Guillaume Unal <Guillaume.Unal@cern.ch>
Date: Tue, 9 Jun 2020 19:38:45 +0200
Subject: [PATCH 087/266] remove caching in LArShapeComplete and LArOFCComplete

---
 .../LArRawConditions/LArOFCComplete.h         | 24 ------------------
 .../LArRawConditions/LArShapeComplete.h       | 25 -------------------
 .../LArRawConditions/src/LArOFCComplete.cxx   |  1 -
 .../LArRawConditions/src/LArShapeComplete.cxx |  1 -
 4 files changed, 51 deletions(-)

diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFCComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFCComplete.h
index ded02380f216..03968377d382 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFCComplete.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFCComplete.h
@@ -62,39 +62,15 @@ class LArOFCComplete: public ILArOFC,
 
   void dumpOFC(std::string output_file_name) const ;
 
-  //Overload the const-get method of the underlying LArConditionsContainer
-  //for speed improvment
-  CONTAINER::ConstReference get(const HWIdentifier id, int gain) const;
 
  private: 
   static const std::vector<float> m_empty;
 
-  //In a typical application of this class, the methods ofc_a,ofc_b,timeBinWidht,etc., 
-  //are called consecutivly for the same cell and gain. Therefore it makes sense to 
-  //cache a pointer to the LArOFCP1 object.
-  //Used by tthe overloaded const-get method
-  struct cache_t {
-    HWIdentifier id;
-    int gain;
-    CONTAINER::ConstReference obj;
-  };
-  mutable cache_t m_cache;
  };
 
 #include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArOFCComplete, 101879462, 1) 
 CONDCONT_DEF( LArOFCComplete , 144694594 , ILArOFC );
 
-inline
-LArOFCComplete::CONTAINER::ConstReference
-LArOFCComplete::get(const HWIdentifier id, int gain) const {  
- if (m_cache.id!=id || m_cache.gain!=gain) {
-    m_cache.obj=LArConditionsContainer<LArOFCP1>::get(id,gain);
-    m_cache.id=id;
-    m_cache.gain=gain;
-  }
-  return m_cache.obj;
-}
- 
 
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArShapeComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArShapeComplete.h
index 9d529717d761..a9a5cab3c356 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArShapeComplete.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArShapeComplete.h
@@ -61,41 +61,16 @@ class LArShapeComplete: public ILArShape,
 	   const std::vector<std::vector<float> >& vShapeDer,
 	   float timeOffset=0, float timeBinWidth=25./24.);
 
-  //Overload the const-get method of the underlying LArConditionsContainer
-  //for speed improvment
-  CONTAINER::ConstReference get(const HWIdentifier id, int gain) const;
-
  protected: 
 
  private: 
   static const std::vector<float> m_empty;
 
-  //In a typical application of this class, the methods Shape, ShapeDer, timeBinWidht, etc., 
-  //are called consecutivly for the same cell and gain. Therefore it makes sense to 
-  //cache a pointer to the LArShapeP1 object.
-  //Used by tthe overloaded const-get method
-  struct cache_t {
-    HWIdentifier id;
-    int gain;
-    CONTAINER::ConstReference obj;
-  };
-  mutable cache_t m_cache;
-
 };
 
 #include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArShapeComplete, 249350685, 1 )
 CONDCONT_DEF( LArShapeComplete, 55610575, ILArShape );
 
-inline
-LArShapeComplete::CONTAINER::ConstReference
-LArShapeComplete::get(const HWIdentifier id, int gain) const {  
-  if (m_cache.id!=id || m_cache.gain!=gain) {
-    m_cache.obj=LArConditionsContainer<LArShapeP2>::get(id,gain);
-    m_cache.id=id;
-    m_cache.gain=gain;
-  }
-  return m_cache.obj;
-}
 
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/src/LArOFCComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArOFCComplete.cxx
index 29f7fbf15a82..913eb6a43640 100755
--- a/LArCalorimeter/LArRawConditions/src/LArOFCComplete.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArOFCComplete.cxx
@@ -8,7 +8,6 @@
 const std::vector<float> LArOFCComplete::m_empty;
 
 LArOFCComplete::LArOFCComplete(){ 
-  m_cache.gain=-1;
 }
 
 LArOFCComplete::~LArOFCComplete() {}
diff --git a/LArCalorimeter/LArRawConditions/src/LArShapeComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArShapeComplete.cxx
index 7c5fd1327ccb..b4f940f148ad 100755
--- a/LArCalorimeter/LArRawConditions/src/LArShapeComplete.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArShapeComplete.cxx
@@ -8,7 +8,6 @@
 const std::vector<float> LArShapeComplete::m_empty;
 
 LArShapeComplete::LArShapeComplete(){ 
-  m_cache.gain=-1;
 }
 
 LArShapeComplete::~LArShapeComplete() {}
-- 
GitLab


From 04b6deea517a66319e36fda8e7ad5f2be819da5f Mon Sep 17 00:00:00 2001
From: Alaettin Serhan Mete <alaettin.serhan.mete@cern.ch>
Date: Tue, 9 Jun 2020 17:51:21 +0000
Subject: [PATCH 088/266] Code clean-up for PerfMonMT

---
 .../PerfMonComps/python/MTJobOptCfg.py        |   4 -
 .../PerfMonComps/python/PerfMonFlags.py       |   2 +-
 .../share/PerfMonMTSvc_jobOptions.py          |  20 +--
 .../share/PerfMonMTSvc_plotter.py             | 165 ------------------
 .../PerfMonComps/src/PerfMonMTSvc.cxx         |  72 ++++----
 .../PerfMonComps/src/PerfMonMTSvc.h           |   4 +-
 .../PerfMonComps/src/PerfMonMTUtils.h         | 140 +++++++--------
 7 files changed, 115 insertions(+), 292 deletions(-)
 delete mode 100644 Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_plotter.py

diff --git a/Control/PerformanceMonitoring/PerfMonComps/python/MTJobOptCfg.py b/Control/PerformanceMonitoring/PerfMonComps/python/MTJobOptCfg.py
index 58650844c3ce..35b25d9ba707 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/python/MTJobOptCfg.py
+++ b/Control/PerformanceMonitoring/PerfMonComps/python/MTJobOptCfg.py
@@ -48,7 +48,6 @@ class PerfMonMTSvc ( _PerfMonMTSvc  ):
 
         ## Set the monitoring check points
         from AthenaCommon.ConcurrencyFlags import jobproperties as jp
-        handle.checkPointFactor = max(10,jp.ConcurrencyFlags.NumThreads())
         handle.numberOfThreads = max(1,jp.ConcurrencyFlags.NumThreads())
         handle.numberOfSlots = max(1,jp.ConcurrencyFlags.NumConcurrentEvents())
 
@@ -61,9 +60,6 @@ class PerfMonMTSvc ( _PerfMonMTSvc  ):
         if jobproperties.PerfMonFlags.doFullMonMT():
             handle.doComponentLevelMonitoring = True
 
-        ## Turn on JSON reporting
-        handle.reportResultsToJSON = True
-
         return
 
     pass # class PerfMonMTSvc
diff --git a/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonFlags.py b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonFlags.py
index 5df1cf262176..6dddf2c60f60 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonFlags.py
+++ b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonFlags.py
@@ -136,7 +136,7 @@ class doMonitoringMT(JobProperty):
         # Setup PerfMonAlg
         from AthenaCommon.AlgSequence import AthSequencer
         topSequence = AthSequencer("AthAlgSeq")
-        if not hasattr(topSequence, "PerfMonMTSvcAlg"):
+        if not hasattr(topSequence, "PerfMonMTAlg"):
             from PerfMonComps.PerfMonCompsConf import PerfMonMTAlg
             topSequence += PerfMonMTAlg("PerfMonMTAlg")
         return
diff --git a/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_jobOptions.py b/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_jobOptions.py
index dcc0c03ecc1d..3936f4053b11 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_jobOptions.py
+++ b/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_jobOptions.py
@@ -6,30 +6,16 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 import os,psutil
 
-log = logging.getLogger("PerfMonMTSvc_jobOptions.py")
+log = logging.getLogger("PerfMonMT")
 log.info("Setting up PerfMonMT...")
 
-
 ###############################
 # Load PerfMonMTSvc
 ###############################
 if not hasattr(svcMgr, 'PerfMonMTSvc'):
     from PerfMonComps.MTJobOptCfg import PerfMonMTSvc
     svcMgr += PerfMonMTSvc("PerfMonMTSvc")
-    # Report results into json by default
-    svcMgr.PerfMonMTSvc.reportResultsToJSON = True
-    # Enable event loop monitoring by default
-    svcMgr.PerfMonMTSvc.doEventLoopMonitoring = True
-    # Disable component level monitoring by default
-    svcMgr.PerfMonMTSvc.doComponentLevelMonitoring = False
-    # Enable detailed table printing by default
-    svcMgr.PerfMonMTSvc.printDetailedTables = True
-    # Print only the top 50 components (sorted by CPU time) by default
-    svcMgr.PerfMonMTSvc.printNComps = 50
-    # Configure the check point sequence in the event loop monitoring.
-    # By default common difference is the number of threads with which the job is running
-    svcMgr.PerfMonMTSvc.checkPointType = "Arithmetic" 
-    svcMgr.PerfMonMTSvc.checkPointFactor = max(10,jp.ConcurrencyFlags.NumThreads())
+    # Set the job start time
     svcMgr.PerfMonMTSvc.wallTimeOffset = psutil.Process(os.getpid()).create_time() * 1000 # Get the job start time in ms
     # Set number of threads/slots
     svcMgr.PerfMonMTSvc.numberOfThreads = max(1,jp.ConcurrencyFlags.NumThreads())
@@ -40,7 +26,7 @@ if not hasattr(svcMgr, 'PerfMonMTSvc'):
 ###############################
 from AthenaCommon.AlgSequence import AthSequencer
 topSequence = AthSequencer("AthAlgSeq")
-if not hasattr(topSequence, "PerfMonMTSvcAlg"):
+if not hasattr(topSequence, "PerfMonMTAlg"):
     from PerfMonComps.PerfMonCompsConf import PerfMonMTAlg
     topSequence += PerfMonMTAlg("PerfMonMTAlg")
     pass
diff --git a/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_plotter.py b/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_plotter.py
deleted file mode 100644
index c2264f07ad88..000000000000
--- a/Control/PerformanceMonitoring/PerfMonComps/share/PerfMonMTSvc_plotter.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-# @author: Hasan Ozturk <haozturk@cern.ch>
-
-
-__author__  = "Hasan Ozturk <haozturk@cern.ch"
-__doc__     = "A python module which parses the PerfMonMTSvc results and makes plots"
-
-
-import sys
-import json
-
-import matplotlib
-matplotlib.use('PDF') # use PDF backend
-import matplotlib.pyplot as plt
-import numpy as np
-
-import operator
-
-if ( len(sys.argv) != 2 ):
-  print("Please give result file as an argument!")
-
-# Get the result Json file
-result_file = sys.argv[1] 
-
-
-
-def snapshot_plotter(snapshot_data, plotname):
-  
-
-  snapshot_steps = [ 'Finalize', 'Execute','Initialize']
-  #snapshot_steps = []
-  snapshot_cpu_times = []
-  snapshot_wall_times = []
-
-  # Get rid of code duplication
-  cpu_time = snapshot_data['Finalize']['cpu_time']
-  wall_time = snapshot_data['Finalize']['wall_time']
-  snapshot_cpu_times.append(cpu_time)
-  snapshot_wall_times.append(wall_time)
-
-  cpu_time = snapshot_data['Event_loop']['cpu_time']
-  wall_time = snapshot_data['Event_loop']['wall_time']
-  snapshot_cpu_times.append(cpu_time)
-  snapshot_wall_times.append(wall_time)
-
-  cpu_time = snapshot_data['Initialize']['cpu_time']
-  wall_time = snapshot_data['Initialize']['wall_time']
-  snapshot_cpu_times.append(cpu_time)
-  snapshot_wall_times.append(wall_time)
-
-  ind = np.arange(len(snapshot_steps))
-  width = 0.35
-     
-  fig, ax = plt.subplots()
-
-  rects1 = ax.barh(ind - width/2, snapshot_cpu_times, width, label = 'CPU Time') 
-  rects2 = ax.barh(ind + width/2, snapshot_wall_times, width, label = 'Wall Time') 
-  ax.set_xlabel('Time(ms)')
-  ax.set_ylabel('Steps')
-  ax.set_title('Snapshot Level Monitoring')
-  ax.set_yticks(ind)
-  ax.set_yticklabels(snapshot_steps)
-  ax.legend()
-
-  fig.set_tight_layout( True )
-  fig.savefig(plotname) 
-
-def comp_plotter(complevel_data, plotname):
-  # Plot Component Level Monitoring
- 
-  #fig = plt.figure(figsize=(31,150))
-  fig = plt.figure(figsize=(50,150))
-  stepNum = len(complevel_data)
- 
-  measurement_threshold = 5 # 5 ms
-
-  for i, step in enumerate(complevel_data):
-
-    components = []
-    cpu_times = []
-    wall_times = []
-    
-    for component in complevel_data[step]:
-      cpu_time = complevel_data[step][component]['cpu_time']
-      wall_time = complevel_data[step][component]['wall_time']
-      
-      # Only take components whose measurements are higher a certain threshold
-      if cpu_time + wall_time > measurement_threshold:
-        components.append(component)   
-        cpu_times.append(cpu_time) # Clear!
-        wall_times.append(wall_time)
-
-    # Sort the components 
-
-    # Prepare the necessary data structures for sorting ( could be more efficient!  )
-    cpu_wall_tuple_list = zip(cpu_times, wall_times)
-    comp_dict = dict( zip(components, cpu_wall_tuple_list) )
-    sortby_list = [ cpu + wall for cpu, wall in zip(cpu_times, wall_times)]
-    sort_dict = dict(zip(components, sortby_list))
-    
-    # Sort the components according to wall_time + cpu time
-    sorted_comp_tuple_list = sorted(sort_dict.items() , key = operator.itemgetter(1))
-
-    sorted_components = []
-    sorted_cpu_times = []
-    sorted_wall_times = []
- 
-    # Fill the necessary lists for plotting
-    for idx in sorted_comp_tuple_list:
-      curr_comp = idx[0]
-      curr_cpu = comp_dict[curr_comp][0]
-      curr_wall = comp_dict[curr_comp][1]
-
-      sorted_components.append(curr_comp)
-      sorted_cpu_times.append(curr_cpu)
-      sorted_wall_times.append(curr_wall)
-    
-    # if there is no nonzero measurement in the step, then skip it
-    if len(sorted_components) == 0:
-      continue
-
-    # Horizontal Bar Chart
-    ax = fig.add_subplot(stepNum,1,i+1)
-
-    index = np.arange(len(sorted_components))
-    bar_width = 0.35
-    opacity = 0.8
-
-    rects1 = plt.barh(index + (1.5)*bar_width, sorted_cpu_times,bar_width,
-    alpha=opacity,
-    label='CPU Time')
-
-    rects2 = plt.barh(index + bar_width/2, sorted_wall_times, bar_width,
-    alpha=opacity,
-    label='Wall Time')
-
-    plt.ylabel('Components',fontsize = 35)
-    plt.xlabel('Time(ms)', fontsize = 35)
-    plt.title(step, fontsize = 40, fontweight = "bold")
-    plt.yticks(index + bar_width, sorted_components)
-    plt.legend(prop={'size': 30})
-    
-    ax.tick_params(axis='both', which='major', labelsize=30)
-    ax.tick_params(axis='both', which='minor', labelsize=30)
-
-
-    fig.set_tight_layout( True )
-    
-   
-  fig.savefig(plotname)
-
-
-with open( result_file ) as json_file:
-  data = json.load(json_file)
-
-  snapshot_data = data['Snapshot_level']
-  snapshot_plotter(snapshot_data, 'snapshot_level.pdf')
-  
-  serial_complevel_data = data['Serial_Component_level']
-  comp_plotter(serial_complevel_data, 'serial_complevel.pdf')
-
-  parallel_complevel_data = data['Parallel_Component_level']
-  comp_plotter(parallel_complevel_data, 'parallel_complevel.pdf')
-
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
index cd52c4c97ace..8a812befddc3 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
@@ -16,8 +16,6 @@
 // STD includes
 #include <algorithm>
 
-using json = nlohmann::json;  // for convenience
-
 /*
  * Constructor
  */
@@ -60,6 +58,12 @@ StatusCode PerfMonMTSvc::initialize() {
   // Print where we are
   ATH_MSG_INFO("Initializing " << name());
 
+  // Check if /proc exists, if not memory statistics are not available
+  const bool procExists = PMonMT::doesDirectoryExist("/proc");
+  if(!procExists) {
+    ATH_MSG_INFO("The system doesn't support /proc. Therefore, memory measurements are not available");
+  }
+
   // Print some information minimal information about our configuration
   ATH_MSG_INFO("Service is configured for [" << m_numberOfThreads.toString() << "] threads " <<
                "analyzing [" << m_numberOfSlots.toString() << "] events concurrently");
@@ -248,20 +252,20 @@ void PerfMonMTSvc::eventLevelMon() {
   // Lock for data integrity
   std::lock_guard<std::mutex> lock(m_mutex_capture);
 
-  // If enabled, do event level monitoring
-  if (m_doEventLoopMonitoring) {
-    if (isCheckPoint()) {
-      // Capture
-      m_measurement_events.capture_event(m_eventCounter);
-      m_eventLevelData.record_event(m_measurement_events, m_eventCounter);
-      // Report instantly - no more than m_eventLoopMsgLimit times
-      if(m_eventLoopMsgCounter < m_eventLoopMsgLimit) {
-        report2Log_EventLevel_instant();
-        m_eventLoopMsgCounter++;
-      }
+  // Increment the internal counter
+  incrementEventCounter();
+
+  // Monitor
+  if (m_doEventLoopMonitoring && isCheckPoint()) {
+    // Capture
+    m_measurement_events.capture_event();
+    m_eventLevelData.record_event(m_measurement_events, m_eventCounter);
+    // Report instantly - no more than m_eventLoopMsgLimit times
+    if(m_eventLoopMsgCounter < m_eventLoopMsgLimit) {
+      report2Log_EventLevel_instant();
+      m_eventLoopMsgCounter++;
     }
   }
-  incrementEventCounter();
 }
 
 /*
@@ -274,10 +278,17 @@ void PerfMonMTSvc::incrementEventCounter() { m_eventCounter++; }
  * Is it event-level monitoring check point yet?
  */
 bool PerfMonMTSvc::isCheckPoint() {
+  // Always check 1, 10, 25 for short tests
+  if (m_eventCounter == 1 || m_eventCounter == 10 || m_eventCounter == 25)
+    return true;
+
+  // Check the user settings
   if (m_checkPointType == "Arithmetic")
     return (m_eventCounter % m_checkPointFactor == 0);
-  else
+  else if (m_checkPointType == "Geometric")
     return isPower(m_eventCounter, m_checkPointFactor);
+  else
+    return false;
 }
 
 /*
@@ -308,19 +319,13 @@ void PerfMonMTSvc::report2Log() {
   // Header
   report2Log_Description();
 
-  // Detailed tables
-  const bool procExists = doesDirectoryExist("/proc");
-  if (!procExists) {
-    ATH_MSG_INFO("There is no /proc directory in this system, therefore memory monitoring has failed!");
-  }
-
   // Component-level
-  if (m_printDetailedTables && procExists && m_doComponentLevelMonitoring) {
+  if (m_printDetailedTables && m_doComponentLevelMonitoring) {
     report2Log_ComponentLevel();
   }
 
   // Event-level
-  if (m_printDetailedTables && procExists && m_doEventLoopMonitoring) {
+  if (m_printDetailedTables && m_doEventLoopMonitoring) {
     report2Log_EventLevel();
   }
 
@@ -434,7 +439,7 @@ void PerfMonMTSvc::report2Log_EventLevel() {
       m_eventLoopMsgCounter++;
     }
     // Add to leak estimate
-    if (it.first >= std::max(uint64_t(10), uint64_t(m_checkPointFactor))) {
+    if (it.first >= 25) {
       m_fit_vmem.addPoint(it.first, it.second.mem_stats.at("vmem"));
       m_fit_pss.addPoint(it.first, it.second.mem_stats.at("pss"));
     }
@@ -507,21 +512,17 @@ void PerfMonMTSvc::report2Log_CpuInfo() const {
  * Report data to JSON
  */
 void PerfMonMTSvc::report2JsonFile() {
-  json j;
+  nlohmann::json j;
 
   // CPU and Wall-time
   report2JsonFile_Summary(j);  // Snapshots
 
   // Memory
-  const bool procExists = doesDirectoryExist("/proc");
-
-  if (procExists) {
-    if (m_doComponentLevelMonitoring) {
-      report2JsonFile_ComponentLevel(j);  // Component-level
-    }
-    if (m_doEventLoopMonitoring) {
-      report2JsonFile_EventLevel(j);  // Event-level
-    }
+  if (m_doComponentLevelMonitoring) {
+    report2JsonFile_ComponentLevel(j);  // Component-level
+  }
+  if (m_doEventLoopMonitoring) {
+    report2JsonFile_EventLevel(j);  // Event-level
   }
 
   // Write
@@ -746,6 +747,9 @@ std::string PerfMonMTSvc::scaleMem(long memMeas) const {
   return stringObj;
 }
 
+/*
+ * Collect some hardware information
+ */
 std::string PerfMonMTSvc::get_cpu_model_info() const {
   std::string cpu_model;
 
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
index 1981f195d1e4..5ff69c0e2f51 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
@@ -123,7 +123,7 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
       "True if component level monitoring is enabled, false o/w. Component monitoring may cause a decrease in the "
       "performance due to the usage of locks."};
   /// Report results to JSON
-  Gaudi::Property<bool> m_reportResultsToJSON{this, "reportResultsToJSON", false, "Report results into the json file."};
+  Gaudi::Property<bool> m_reportResultsToJSON{this, "reportResultsToJSON", true, "Report results into the json file."};
   /// Name of the JSON file
   Gaudi::Property<std::string> m_jsonFileName{this, "jsonFileName", "PerfMonMTSvc_result.json",
                                               "Name of the JSON file that contains the results."};
@@ -136,7 +136,7 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
       "Type of the check point sequence: Arithmetic(0, k, 2k...) or Geometric(0,k,k^2...)."};
   /// Frequency of event level monitoring
   Gaudi::Property<uint64_t> m_checkPointFactor{
-      this, "checkPointFactor", 10,
+      this, "checkPointFactor", 50,
       "Common difference if check point sequence is arithmetic, Common ratio if it is Geometric."};
   /// Offset for the wall-time, comes from configuration
   Gaudi::Property<double> m_wallTimeOffset{this, "wallTimeOffset", 0, "Job start wall time in miliseconds."};
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
index 1436fbf007cc..2b592779bd74 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
@@ -24,7 +24,6 @@ typedef std::map<std::string, long> memory_map_t;  // Component : Memory Measure
  * Inline function prototypes
  */
 inline memory_map_t operator-(memory_map_t& map1, memory_map_t& map2);
-inline bool doesDirectoryExist(const std::string dir);
 
 /*
  * Necessary tools
@@ -39,6 +38,8 @@ memory_map_t get_mem_stats();
 // Efficient memory measurements
 double get_malloc();
 double get_vmem();
+// Simple check if directory exists
+bool doesDirectoryExist(const std::string dir);
 
 // Step name and Component name pairs. Ex: Initialize - StoreGateSvc
 struct StepComp {
@@ -53,16 +54,12 @@ struct StepComp {
 
 // Basic Measurement
 struct Measurement {
-  typedef std::map<int, Measurement> event_meas_map_t;  // Event number: Measurement
 
   // Variables to store measurements
   double cpu_time, wall_time; // Timing
   memory_map_t mem_stats; // Memory: Vmem, Rss, Pss, Swap
   double vmem, malloc; // Memory: Vmem, Malloc (faster than above)
 
-  // Event level measurements
-  event_meas_map_t eventLevel_meas_map;  // [Event count so far]: Measurement
-
   // Peak values for Vmem, Rss and Pss
   long vmemPeak = LONG_MIN;
   long rssPeak = LONG_MIN;
@@ -75,9 +72,7 @@ struct Measurement {
     wall_time = get_wall_time();
 
     // Memory 
-    if (doesDirectoryExist("/proc")) {
-      mem_stats = get_mem_stats();
-    }
+    mem_stats = get_mem_stats();
   }
 
   // Capture component-level measurements
@@ -91,32 +86,21 @@ struct Measurement {
 
     // Efficient Memory Measurements
     malloc = get_malloc();
-    if (doesDirectoryExist("/proc")) {
-      vmem = get_vmem();
-    }
+    vmem = get_vmem();
   }
 
   // Capture event-level measurements 
-  void capture_event(int eventCount) {
+  void capture_event() {
     // Timing 
     cpu_time = get_process_cpu_time();
     wall_time = get_wall_time();
-    Measurement meas;
-
-    if (doesDirectoryExist("/proc")) {
-      mem_stats = get_mem_stats();
-      meas.mem_stats = mem_stats;
-
-      if (mem_stats["vmem"] > vmemPeak) vmemPeak = mem_stats["vmem"];
-      if (mem_stats["rss"] > rssPeak) rssPeak = mem_stats["rss"];
-      if (mem_stats["pss"] > pssPeak) pssPeak = mem_stats["pss"];
-    }
 
-    meas.cpu_time = cpu_time;
-    meas.wall_time = wall_time;
+    // Memory
+    mem_stats = get_mem_stats();
 
-    // Capture for event level measurements
-    eventLevel_meas_map[eventCount] = meas;
+    if (mem_stats["vmem"] > vmemPeak) vmemPeak = mem_stats["vmem"];
+    if (mem_stats["rss"] > rssPeak) rssPeak = mem_stats["rss"];
+    if (mem_stats["pss"] > pssPeak) pssPeak = mem_stats["pss"];
   }
 
   Measurement() : cpu_time{0.}, wall_time{0.}, vmem{0.}, malloc{0.} {
@@ -149,7 +133,7 @@ struct MeasurementData {
     m_tmp_wall = meas.wall_time;
 
     // Non-efficient memory measurements
-    if (doesDirectoryExist("/proc")) m_memMon_tmp_map = meas.mem_stats;
+    m_memMon_tmp_map = meas.mem_stats;
   }
 
   // [Component Level Monitoring - Serial Steps] : Record the measurement for the current state
@@ -158,7 +142,7 @@ struct MeasurementData {
     m_delta_wall = meas.wall_time - m_tmp_wall;
 
     // Non-efficient memory measurements
-    if (doesDirectoryExist("/proc")) m_memMon_delta_map = meas.mem_stats - m_memMon_tmp_map;
+    m_memMon_delta_map = meas.mem_stats - m_memMon_tmp_map;
   }
 
   // [Component Level Monitoring] : Start
@@ -172,7 +156,7 @@ struct MeasurementData {
 
     // Efficient memory measurements
     m_tmp_malloc = meas.malloc;
-    if (doesDirectoryExist("/proc")) m_tmp_vmem = meas.vmem;
+    m_tmp_vmem = meas.vmem;
   } 
 
   // [Component Level Monitoring] : Stop
@@ -190,20 +174,17 @@ struct MeasurementData {
 
     // Efficient memory measurements
     m_delta_malloc += meas.malloc - m_tmp_malloc;
-    if (doesDirectoryExist("/proc")) m_delta_vmem += meas.vmem - m_tmp_vmem;
+    m_delta_vmem += meas.vmem - m_tmp_vmem;
   } 
 
   // [Event Level Monitoring - Parallel Steps] : Record the measurement for the current checkpoint
-  void record_event(Measurement& meas, int eventCount) {
-    m_eventLevel_delta_map[eventCount].cpu_time = meas.eventLevel_meas_map[eventCount].cpu_time;
-    m_eventLevel_delta_map[eventCount].wall_time = meas.eventLevel_meas_map[eventCount].wall_time - m_offset_wall;
-
-    if (doesDirectoryExist("/proc")) {
-      m_eventLevel_delta_map[eventCount].mem_stats["vmem"] = meas.eventLevel_meas_map[eventCount].mem_stats["vmem"];
-      m_eventLevel_delta_map[eventCount].mem_stats["rss"] = meas.eventLevel_meas_map[eventCount].mem_stats["rss"];
-      m_eventLevel_delta_map[eventCount].mem_stats["pss"] = meas.eventLevel_meas_map[eventCount].mem_stats["pss"];
-      m_eventLevel_delta_map[eventCount].mem_stats["swap"] = meas.eventLevel_meas_map[eventCount].mem_stats["swap"];
-    }
+  void record_event(const Measurement& meas, int eventCount) {
+    // Timing
+    m_eventLevel_delta_map[eventCount].cpu_time = meas.cpu_time;
+    m_eventLevel_delta_map[eventCount].wall_time = meas.wall_time - m_offset_wall;
+
+    // Memory
+    m_eventLevel_delta_map[eventCount].mem_stats = meas.mem_stats;
   }
 
   void set_wall_time_offset(double wall_time_offset) { m_offset_wall = wall_time_offset; }
@@ -297,49 +278,67 @@ inline double PMonMT::get_wall_time() {
  */
 
 // Read from proc's smaps file. It is costly to do this operation too often.
+// In a realistic RAWtoESD job, the smaps for the the whole application can get large.
+// Therefore, this operation might take about 100 ms per call, which is fairly substantial.
+// However, this is one of the most reliable way to get PSS.
+// Therefore, keep it as is but don't call it too often!
 inline memory_map_t PMonMT::get_mem_stats() {
+  // Result object
   memory_map_t result;
-  std::string fileName = "/proc/self/smaps";
-  std::ifstream smaps_file(fileName);
-
-  std::string line;
-  std::string key;
-  std::string value;
 
-  while (getline(smaps_file, line)) {
-    std::stringstream ss(line);
-    ss >> key >> value;
-
-    if (key == "Size:") {
-      result["vmem"] += stol(value);
-    }
-    if (key == "Rss:") {
-      result["rss"] += stol(value);
-    }
-    if (key == "Pss:") {
-      result["pss"] += stol(value);
-    }
-    if (key == "Swap:") {
-      result["swap"] += stol(value);
+  // Zero initialize
+  result["vmem"] = result["rss"] = result["pss"] = result["swap"] = 0;
+
+  // This is the input where we read the stats from
+  static const std::string fileName = "/proc/self/smaps";
+  std::ifstream smaps_file{fileName};
+
+  std::string line{}, key{}, value{};
+
+  // Loop over the file
+  while (smaps_file) {
+    // Read interesting key value pairs
+    smaps_file >> key >> value;
+    smaps_file.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
+
+    if(smaps_file) {
+      if (key == "Size:") {
+        result["vmem"] += std::stol(value);
+      }
+      if (key == "Rss:") {
+        result["rss"] += std::stol(value);
+      }
+      if (key == "Pss:") {
+        result["pss"] += std::stol(value);
+      }
+      if (key == "Swap:") {
+        result["swap"] += std::stol(value);
+      }
     }
   }
+
   return result;
 }
 
 // This operation is less costly than the previous one. Since statm is a much smaller file compared to smaps.
 inline double PMonMT::get_vmem() {
-  const std::string fileName = "/proc/self/statm";
-  std::ifstream statm_file(fileName);
+  // Result
+  double result = 0.;
 
-  std::string vmem_in_pages;  // vmem measured in pages
-  std::string line;
+  // This is where we read the stats from
+  static const std::string fileName = "/proc/self/statm";
+  std::ifstream statm_file{fileName};
+
+  std::string vmem_in_pages{}, line{};  // vmem measured in pages
+
+  // We simply get the first line
   if (getline(statm_file, line)) {
-    std::stringstream ss(line);
+    std::stringstream ss{line};
     ss >> vmem_in_pages;  // The first number in this file is the vmem measured in pages
   }
 
-  const double page_size = sysconf(_SC_PAGESIZE) / 1024.0;  // page size in KB
-  const double result = stod(vmem_in_pages) * page_size;
+  static const double page_size = sysconf(_SC_PAGESIZE) / 1024.0;  // page size in KB
+  result = std::stod(vmem_in_pages) * page_size;
 
   return result;
 }
@@ -391,7 +390,10 @@ inline memory_map_t operator-(memory_map_t& map1, memory_map_t& map2) {
   return result_map;
 }
 
-inline bool doesDirectoryExist(const std::string dir) {
+/*
+ * Simple check if a given directory exists
+ */
+inline bool PMonMT::doesDirectoryExist(const std::string dir) {
   struct stat buffer;
   return (stat(dir.c_str(), &buffer) == 0);
 }
-- 
GitLab


From d5d2b495e1ce806d7302ac77fecf6ee855b7b1cd Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Tue, 9 Jun 2020 17:58:37 +0000
Subject: [PATCH 089/266] Allow to read amdb geometry from AmdcDb

---
 .../GeoModel/AtlasGeoModel/python/MuonGM.py   |   4 +-
 .../Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h         |   4 +-
 .../AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h    |   7 +-
 .../AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h     |  10 +-
 .../Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx      |   1 +
 .../AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx     |  34 +-
 .../AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx      |  20 +-
 .../MuonConfig/python/MuonGeometryConfig.py   |   1 -
 .../MuonGMdbObjects/CMakeLists.txt            |   4 +-
 .../MuonGMdbObjects/DblQ00Acut.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Alin.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Almn.h              |  10 +-
 .../MuonGMdbObjects/DblQ00Aptp.h              |   9 +-
 .../MuonGMdbObjects/DblQ00Asmp.h              |  12 +-
 .../MuonGMdbObjects/DblQ00Aszt.h              |  13 +-
 .../MuonGMdbObjects/DblQ00Atln.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Atyp.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Awln.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Dbam.h              |  11 +-
 .../MuonGMdbObjects/DblQ00IAcsc.h             |  13 +-
 .../MuonGMdbObjects/DblQ00Wchv.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wcmi.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wcro.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wcsc.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wded.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wlbi.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wmdt.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wrpc.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wspa.h              |  10 +-
 .../MuonGMdbObjects/DblQ00Wsup.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Wtgc.h              |  11 +-
 .../MuonGMdbObjects/DblQ00Xtomo.h             |  16 +-
 .../MuonGMdbObjects/src/DblQ00Acut.cxx        |  67 ++--
 .../MuonGMdbObjects/src/DblQ00Alin.cxx        |  75 +++--
 .../MuonGMdbObjects/src/DblQ00Almn.cxx        |  83 +++--
 .../MuonGMdbObjects/src/DblQ00Aptp.cxx        |  89 ++++--
 .../MuonGMdbObjects/src/DblQ00Asmp.cxx        |  68 ++--
 .../MuonGMdbObjects/src/DblQ00Aszt.cxx        |  93 ++++--
 .../MuonGMdbObjects/src/DblQ00Atln.cxx        |  70 ++--
 .../MuonGMdbObjects/src/DblQ00Atyp.cxx        |  68 ++--
 .../MuonGMdbObjects/src/DblQ00Awln.cxx        |  78 +++--
 .../MuonGMdbObjects/src/DblQ00Dbam.cxx        |  83 +++--
 .../MuonGMdbObjects/src/DblQ00IAcsc.cxx       | 111 ++++---
 .../MuonGMdbObjects/src/DblQ00Wchv.cxx        |  73 +++--
 .../MuonGMdbObjects/src/DblQ00Wcmi.cxx        |  71 ++--
 .../MuonGMdbObjects/src/DblQ00Wcro.cxx        |  70 ++--
 .../MuonGMdbObjects/src/DblQ00Wcsc.cxx        | 106 ++++--
 .../MuonGMdbObjects/src/DblQ00Wded.cxx        |  70 ++--
 .../MuonGMdbObjects/src/DblQ00Wlbi.cxx        |  73 +++--
 .../MuonGMdbObjects/src/DblQ00Wmdt.cxx        |  86 +++--
 .../MuonGMdbObjects/src/DblQ00Wrpc.cxx        |  84 +++--
 .../MuonGMdbObjects/src/DblQ00Wspa.cxx        |  69 ++--
 .../MuonGMdbObjects/src/DblQ00Wsup.cxx        |  79 +++--
 .../MuonGMdbObjects/src/DblQ00Wtgc.cxx        |  79 +++--
 .../MuonGMdbObjects/src/DblQ00Xtomo.cxx       |  99 +++++-
 MuonSpectrometer/MuonGeoModel/CMakeLists.txt  |   5 +-
 .../MuonGeoModel/MuonDetectorFactory001.h     |   3 +
 .../MuonGeoModel/MuonDetectorTool.h           |   2 +-
 .../share/MuonGeoModel_MinimalSetup.py        |   4 +-
 .../src/MuonDetectorFactory001.cxx            | 177 +++++-----
 .../MuonGeoModel/src/MuonDetectorTool.cxx     |  39 ++-
 .../MuonGeoModel/src/RDBReaderAtlas.cxx       | 302 +++++++++++++-----
 .../test/MuonGeoModelTestMaps.py              |  16 +-
 Projects/AthSimulation/package_filters.txt    |   4 +
 64 files changed, 1864 insertions(+), 876 deletions(-)

diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
index 8c0210f2825d..7315d5bb9b67 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.JobProperties import jobproperties
 from AthenaCommon.DetFlags      import DetFlags
@@ -17,9 +17,7 @@ elif ( DetFlags.detdescr.Muon_on() ):
                                                     HasSTgc=MuonGeometryFlags.hasSTGC(),
                                                     HasMM=MuonGeometryFlags.hasMM()) ]
     import os
-    GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0
     if ( ( not DetFlags.simulate.any_on() or DetFlags.overlay.any_on() ) and "AthSimulation_DIR" not in os.environ ):
-#      GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
         pass
     else:
       GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseConditionDb = 0
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
index bbcd576b4b8b..14b6f95fd171 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
@@ -47,8 +47,8 @@ class AmdcDb final : public AthService, virtual public IRDBAccessSvcWithUpdate {
   
   virtual IRDBRecordset_ptr getRecordsetPtr(const std::string& node,
                                             const std::string& tag,
-                                            const std::string& tag2node ,
-                                            const std::string& connName) override;
+                                            const std::string& tag2node="",
+                                            const std::string& connName="") override;
 
   //Functions of IRDBAccessSvc Not implemented
   virtual bool connect   (const std::string& connName) override;
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h
index 9e539b12d1fe..e7200df3d4a6 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef AmdcDbSvcMakerFromAmdc_H
@@ -23,7 +23,7 @@ class AmdcDbRecord;
 class AmdcDbSvcMakerFromAmdc{
 public:
     AmdcDbSvcMakerFromAmdc();
-    virtual ~AmdcDbSvcMakerFromAmdc();
+    virtual ~AmdcDbSvcMakerFromAmdc()=default;
 
 public:
 ///////////////////////////////////
@@ -54,10 +54,9 @@ private:
    int GetEpsAngle   (std::string NameOfTheSet) ;
    
    void AMDC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
-
+   void AGDD(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
    void ATYP(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
    void ACUT(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
-
    void WRPC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
    void AWLN(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
    void WTGC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc);
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h
index 3367892de38d..5290740e77d4 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef AmdcDbSvcMakerFromRDB_H
@@ -27,7 +27,7 @@ namespace AmdcDb_detail {
 class AmdcDbSvcMakerFromRDB{
 public:
     AmdcDbSvcMakerFromRDB();
-    virtual ~AmdcDbSvcMakerFromRDB();
+    virtual ~AmdcDbSvcMakerFromRDB()=default;
 
 public:
 ///////////////////////////////////
@@ -62,10 +62,9 @@ private:
    int GetEpsAngle   (std::string NameOfTheSet) ;
    
    void AMDC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
-
+   void AGDD(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void ATYP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void ACUT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
-
    void WRPC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void AWLN(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void WTGC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
@@ -85,9 +84,10 @@ private:
    void ALIN(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void ALMN(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void APTP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
-
    void ASZT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    void ISZT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
+ 
+   void AgddXMLVariables(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
 
    void HwSwIdMapping(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc);
    
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx
index b40e6e76469a..1fcbe908bd82 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx
@@ -26,6 +26,7 @@ void AmdcDb2Sql::SetUseKeysOn(int UseKeysOn){ m_UseKeysOn  = UseKeysOn ;}
 void AmdcDb2Sql::DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIRDBAccessSvc){
 
   DoSql(TagFileName,"AMDC",tag,pIRDBAccessSvc);
+  DoSql(TagFileName,"AGDD",tag,pIRDBAccessSvc);
   DoSql(TagFileName,"ATYP",tag,pIRDBAccessSvc);
   DoSql(TagFileName,"ACUT",tag,pIRDBAccessSvc);
   DoSql(TagFileName,"WRPC",tag,pIRDBAccessSvc);
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx
index c90562f22a4e..89285e9eacf0 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx
@@ -26,10 +26,6 @@ AmdcDbSvcMakerFromAmdc::AmdcDbSvcMakerFromAmdc(){
 
 }
 
-
-AmdcDbSvcMakerFromAmdc::~AmdcDbSvcMakerFromAmdc(){}
-
-
 // Set a AmdcDbSvc
 void AmdcDbSvcMakerFromAmdc::SetUglyCodeOn(int UglyCodeOn){ m_UglyCodeOn  = UglyCodeOn ;}
 void AmdcDbSvcMakerFromAmdc::SetEpsLengthMM(int EpsLengthMM){ m_EpsLengthMM  = EpsLengthMM ;}
@@ -41,6 +37,7 @@ void AmdcDbSvcMakerFromAmdc::SetEpsAngle   (std::string NameOfTheSet, int EpsAng
 void AmdcDbSvcMakerFromAmdc::Set(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){
 
   AMDC(pAmdcsimrec,pAmdcDbSvc);
+  AGDD(pAmdcsimrec,pAmdcDbSvc);
 
   ATYP(pAmdcsimrec,pAmdcDbSvc);
   ACUT(pAmdcsimrec,pAmdcDbSvc);
@@ -81,14 +78,10 @@ int AmdcDbSvcMakerFromAmdc::GetEpsAngle   (std::string NameOfTheSet){ if (m_Map_
 void AmdcDbSvcMakerFromAmdc::AMDC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){
 
   std::string NameOfTheSet = "AMDC";
-//   int LocalEpsLengthMM = GetEpsLengthMM(NameOfTheSet) ;
-//   int LocalEpsLengthCM = GetEpsLengthCM(NameOfTheSet) ;
-//   int LocalEpsAngle    = GetEpsAngle   (NameOfTheSet) ;
 
   std::string DbVar	   = "";
   std::string DbVarComment = "";
   int	      iDbVal	   = 0 ;
-//double      dDbVal	   = 0.;
   std::string sDbVal	   = ""; 
 
   AmdcDbRecordset* pAmdcDbRecordset = new AmdcDbRecordset();
@@ -116,17 +109,32 @@ void AmdcDbSvcMakerFromAmdc::AMDC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc)
 
 }
 
+void AmdcDbSvcMakerFromAmdc::AGDD(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){
+  std::string NameOfTheSet = "AGDD";
+  std::string DbVar       = "";
+  std::string DbVarComment = "";
+  int iDbVal       = 0 ;
+  std::string sDbVal      = ""; 
+  AmdcDbRecordset* pAmdcDbRecordset = new AmdcDbRecordset();
+  m_UniversalIdKounter = m_UniversalIdKounter + 1;
+  AmdcDbRecord* pAmdcDbRecord = new AmdcDbRecord(m_UniversalIdKounter,NameOfTheSet);
+  DbVar = "VERS"    ; DbVarComment="VERSION"        ; iDbVal = m_version                      ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal);
+  std::string TheAmdcName = pAmdcsimrec->AmdcName() ;
+  DbVar = "VNAME"   ; DbVarComment="NAME"           ; sDbVal  = TheAmdcName.substr(0,4)       ; pAmdcDbRecord->addString(DbVar,DbVarComment,sDbVal);
+  std::string TheBlob = pAmdcsimrec->GetAgddString() ;
+  DbVar = "LENAGDD" ; DbVarComment="STRING LENGTH"   ; iDbVal = TheBlob.size()                ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal);
+  DbVar = "NLINE"   ; DbVarComment="CHAR4 NUMBER"    ; iDbVal = int ( (TheBlob.size()+2.)/4. ) ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal);
+  DbVar = "DATA"    ; DbVarComment="(NLINE)-ASCII"   ; sDbVal = TheBlob                        ; pAmdcDbRecord->addBlob(DbVar,DbVarComment,sDbVal);
+  pAmdcDbRecordset->addIRDBRecord(pAmdcDbRecord);
+  pAmdcDbSvc->addIRDBRecordset(NameOfTheSet,pAmdcDbRecordset);
+}
+
 void AmdcDbSvcMakerFromAmdc::ATYP(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){
 
   std::string NameOfTheSet = "ATYP";
-//   int LocalEpsLengthMM = GetEpsLengthMM(NameOfTheSet) ;
-//   int LocalEpsLengthCM = GetEpsLengthCM(NameOfTheSet) ;
-//   int LocalEpsAngle    = GetEpsAngle   (NameOfTheSet) ;
-
   std::string DbVar	   = "";
   std::string DbVarComment = "";
   int	      iDbVal	   = 0 ;
-//double      dDbVal	   = 0.;
   std::string sDbVal	   = ""; 
 
   AmdcDbRecordset* pAmdcDbRecordset = new AmdcDbRecordset();
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
index 38578744d59a..da7eb91953fa 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "AmdcDb/AmdcDbSvcMakerFromRDB.h"
@@ -11,7 +11,6 @@
 #include "AmdcDb/AmdcDbRecord.h"
 #include "boost/range/iterator_range.hpp"
 
-
 namespace AmdcDb_detail {
 
 
@@ -96,6 +95,13 @@ VarDesc AMDC_Vars[] = {
   {VarDesc::String, "DATA", "(NLINE)-ASCII"},
 };
 
+VarDesc AGDD_Vars[] = {
+  {VarDesc::Int, "VERS", "VERSION"},
+  {VarDesc::String, "VNAME", "NAME"},
+  {VarDesc::Int, "LENAGDD", "STRING LENGTH"},
+  {VarDesc::Int, "NLINE", "CHAR4 NUMBER"},
+  {VarDesc::String, "DATA", "(NLINE)-ASCII"},
+};
 
 VarDesc ATYP_Vars[] = {
   {VarDesc::Int, "VERS", "VERSION"},
@@ -537,8 +543,6 @@ AmdcDbSvcMakerFromRDB::AmdcDbSvcMakerFromRDB(){
   
 }
 
-AmdcDbSvcMakerFromRDB::~AmdcDbSvcMakerFromRDB(){}
-
 // Set a AmdcDbSvc
 void AmdcDbSvcMakerFromRDB::SetEpsLengthMM(int EpsLengthMM){ m_EpsLengthMM  = EpsLengthMM ;}
 void AmdcDbSvcMakerFromRDB::SetEpsLengthCM(int EpsLengthCM){ m_EpsLengthCM  = EpsLengthCM ;}
@@ -557,10 +561,9 @@ void AmdcDbSvcMakerFromRDB::Set(
   m_detectorNode = detectorNode ;
   
   AMDC(pIRDBAccessSvc,pAmdcDbSvc);
-  
+  AGDD(pIRDBAccessSvc,pAmdcDbSvc);
   ATYP(pIRDBAccessSvc,pAmdcDbSvc);
   ACUT(pIRDBAccessSvc,pAmdcDbSvc);
-  
   WRPC(pIRDBAccessSvc,pAmdcDbSvc);
   AWLN(pIRDBAccessSvc,pAmdcDbSvc);
   WTGC(pIRDBAccessSvc,pAmdcDbSvc);
@@ -580,7 +583,6 @@ void AmdcDbSvcMakerFromRDB::Set(
   ALIN(pIRDBAccessSvc,pAmdcDbSvc);
   ALMN(pIRDBAccessSvc,pAmdcDbSvc);
   APTP(pIRDBAccessSvc,pAmdcDbSvc);
-  
   ASZT(pIRDBAccessSvc,pAmdcDbSvc);
   ISZT(pIRDBAccessSvc,pAmdcDbSvc);
 
@@ -600,6 +602,10 @@ void AmdcDbSvcMakerFromRDB::AMDC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcD
   addVars ("AMDC", RANGE(AMDC_Vars), pIRDBAccessSvc, pAmdcDbSvc);
 }
 
+void AmdcDbSvcMakerFromRDB::AGDD(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc)
+{
+  addVars ("AGDD", RANGE(AGDD_Vars), pIRDBAccessSvc, pAmdcDbSvc);
+}
 
 void AmdcDbSvcMakerFromRDB::ATYP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc)
 {
diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
index 6f42015f4d92..49e06d18e393 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
@@ -23,7 +23,6 @@ def MuonGeoModelCfg(flags):
         )
     detTool.UseConditionDb = 1
     detTool.UseIlinesFromGM = 1
-    detTool.BuildFromNova = 0
 
     enableAlignment = flags.Common.Project != 'AthSimulation' and not flags.Detector.SimulateMuon and not flags.Detector.OverlayMuon
     if enableAlignment:
diff --git a/MuonSpectrometer/MuonGMdbObjects/CMakeLists.txt b/MuonSpectrometer/MuonGMdbObjects/CMakeLists.txt
index 92e4dcedfb3e..368e24c02212 100644
--- a/MuonSpectrometer/MuonGMdbObjects/CMakeLists.txt
+++ b/MuonSpectrometer/MuonGMdbObjects/CMakeLists.txt
@@ -6,7 +6,7 @@
 atlas_subdir( MuonGMdbObjects )
 
 # Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
+atlas_depends_on_subdirs( Amdcsimrec/AmdcDb
                           Database/RDBAccessSvc )
 
 # External dependencies:
@@ -17,7 +17,7 @@ find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 atlas_add_library( MuonGMdbObjects
                    src/*.cxx
                    PUBLIC_HEADERS MuonGMdbObjects
-                   LINK_LIBRARIES RDBAccessSvcLib
+                   LINK_LIBRARIES RDBAccessSvcLib AmdcDbLib
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} )
 
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Acut.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Acut.h
index 2d3515f0f463..61c69e8d33b0 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Acut.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Acut.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_ACUT_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Acut {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Acut {
 public:
     DblQ00Acut(){};
     ~DblQ00Acut();
     DblQ00Acut(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Acut(AmdcDb* acut);
 
     // data members for DblQ00/ACUT fields
     struct ACUT {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Alin.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Alin.h
index fb923bdb4405..ce349433556f 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Alin.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Alin.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_ALIN_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Alin {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Alin {
 public:
     DblQ00Alin(){};
     ~DblQ00Alin();
     DblQ00Alin(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Alin(AmdcDb* alin);
 
     // data members for DblQ00/ALIN fields
     struct ALIN {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Almn.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Almn.h
index efb9e5248e4c..ee7c63894283 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Almn.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Almn.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,18 +14,18 @@
 #define DBLQ00_ALMN_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
 
-namespace MuonGM
-{
-    
+class AmdcDb;
 
+namespace MuonGM {
 class DblQ00Almn {
-
 public:
     DblQ00Almn(){};
     ~DblQ00Almn();
     DblQ00Almn(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Almn(AmdcDb* almn);
     
     // data members for DblQ00/ALMN fields
     struct ALMN {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aptp.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aptp.h
index 9ce480a02d57..a95950ac3c83 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aptp.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aptp.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,17 +14,18 @@
 #define DBLQ00_APTP_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
 
-namespace MuonGM
-{
+class AmdcDb;
 
+namespace MuonGM {
 class DblQ00Aptp {
-
 public:
     DblQ00Aptp(){};
     ~DblQ00Aptp();
     DblQ00Aptp(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Aptp(AmdcDb* aptp);
 
     // data members for DblQ00/APTP fields
     struct APTP {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Asmp.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Asmp.h
index b1dc95e1973a..5dc4b29dd0b1 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Asmp.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Asmp.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,18 +14,20 @@
 #define DBLQ00_ASMP_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
 
-namespace MuonGM
-{
-class DblQ00Asmp {
+class AmdcDb;
 
+namespace MuonGM {
+class DblQ00Asmp {
 public:
     DblQ00Asmp(){};
     ~DblQ00Asmp();
     DblQ00Asmp(std::unique_ptr<IRDBQuery>&&);
-    // data members for DblQ00/ASMP fields
+    DblQ00Asmp(AmdcDb* asmp);
 
+    // data members for DblQ00/ASMP fields
     struct ASMP {
         int version; // VERSION
         int indx; // STATION NUMBER (INSIDE TYPE)
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aszt.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aszt.h
index 44b15573ad57..36bacc4e258a 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aszt.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Aszt.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -10,25 +10,24 @@
  // entered: 07/28/04
  // comment: MUON STATION ELEMENT
 
-#include <string>
-
 #ifndef DBLQ00_ASZT_H
 #define DBLQ00_ASZT_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
+#include <string>
 
-namespace MuonGM
-{
-    
+class AmdcDb;
 
+namespace MuonGM {
 class DblQ00Aszt {
-
 public:
     DblQ00Aszt();
     ~DblQ00Aszt();
     DblQ00Aszt(std::unique_ptr<IRDBQuery>&&);
     DblQ00Aszt(std::string asciiFileName);
+    DblQ00Aszt(AmdcDb* aszt);
     
     void WriteAsztToAsciiFile(std::string filename);
 
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atln.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atln.h
index 67a29d3c53d8..fadbb72de6de 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atln.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atln.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,17 +14,18 @@
 #define DBLQ00_ATLN_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
 
-namespace MuonGM
-{
-    
-class DblQ00Atln {
+class AmdcDb;
 
+namespace MuonGM {
+class DblQ00Atln {
 public:
     DblQ00Atln(){};
     ~DblQ00Atln();
     DblQ00Atln(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Atln(AmdcDb* atln);
 
     // data members for DblQ00/ATLN fields
     struct ATLN {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atyp.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atyp.h
index a045ddfe259a..75c3570a7341 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atyp.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Atyp.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,17 +14,18 @@
 #define DBLQ00_ATYP_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
 
-namespace MuonGM
-{
-    
-class DblQ00Atyp {
+class AmdcDb;
 
+namespace MuonGM {
+class DblQ00Atyp {
 public:
     DblQ00Atyp(){};
     ~DblQ00Atyp();
     DblQ00Atyp(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Atyp(AmdcDb* atyp);
     
     // data members for DblQ00/ATYP fields
     struct ATYP {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Awln.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Awln.h
index d700386741a9..9b9adecbb08c 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Awln.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Awln.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_AWLN_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Awln {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Awln {
 public:
     DblQ00Awln(){};
     ~DblQ00Awln();
     DblQ00Awln(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Awln(AmdcDb* awln);
     
     // data members for DblQ00/AWLN fields
     struct AWLN {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Dbam.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Dbam.h
index 1541081fde24..8cfb02b84591 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Dbam.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Dbam.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_DBAM_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Dbam {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Dbam {
 public:
     DblQ00Dbam(){};
     ~DblQ00Dbam();
     DblQ00Dbam(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Dbam(AmdcDb* dbam);
 
     // data members for DblQ00/DBAM fields
     struct DBAM {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00IAcsc.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00IAcsc.h
index ab1f54305465..e05d179267b4 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00IAcsc.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00IAcsc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -10,25 +10,24 @@
  // entered: 07/28/04
  // comment: CSC internal alignment parameters - class to read from DB
 
-#include <string>
-
 #ifndef DBLQ00_IACSC_H
 #define DBLQ00_IACSC_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
+#include <string>
 
-namespace MuonGM
-{
-    
+class AmdcDb;
 
+namespace MuonGM {
 class DblQ00IAcsc {
-
 public:
     DblQ00IAcsc();
     ~DblQ00IAcsc();
     DblQ00IAcsc(std::unique_ptr<IRDBQuery>&&);
     DblQ00IAcsc(std::string asciiFileName);
+    DblQ00IAcsc(AmdcDb* iacsc);
     
     void WriteIAcscToAsciiFile(std::string filename);
 
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wchv.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wchv.h
index ace268b82b2a..a715ab98eab1 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wchv.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wchv.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WCHV_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wchv {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wchv {
 public:
     DblQ00Wchv(){};
     ~DblQ00Wchv();
     DblQ00Wchv(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wchv(AmdcDb* wchv);
     
     // data members for DblQ00/WCHV fields
     struct WCHV {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcmi.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcmi.h
index 0977b12810a0..147429f18504 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcmi.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcmi.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WCMI_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wcmi {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wcmi {
 public:
     DblQ00Wcmi(){};
     ~DblQ00Wcmi();
     DblQ00Wcmi(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wcmi(AmdcDb* wcmi);
 
     // data members for DblQ00/WCMI fields
     struct WCMI {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcro.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcro.h
index d7d88940ec7d..5e8b4b6f16bd 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcro.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcro.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WCRO_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wcro {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wcro {
 public:
     DblQ00Wcro(){};
     ~DblQ00Wcro();
     DblQ00Wcro(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wcro(AmdcDb* wcro);
     
     // data members for DblQ00/WCRO fields
     struct WCRO {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcsc.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcsc.h
index f75be5690456..9625229c8f98 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcsc.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wcsc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WCSC_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wcsc {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wcsc {
 public:
     DblQ00Wcsc(){};
     ~DblQ00Wcsc();
     DblQ00Wcsc(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wcsc(AmdcDb* wcsc);
 
     // data members for DblQ00/WCSC fields
     struct WCSC {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wded.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wded.h
index 601ac612a1d3..e851d1a17cce 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wded.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wded.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WDED_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wded {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wded {
 public:
     DblQ00Wded(){};
     ~DblQ00Wded();
     DblQ00Wded(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wded(AmdcDb* wded);
 
     // data members for DblQ00/WDED fields
     struct WDED {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wlbi.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wlbi.h
index a63b3573a974..7c400111a096 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wlbi.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wlbi.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WLBI_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wlbi {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wlbi {
 public:
     DblQ00Wlbi(){};
     ~DblQ00Wlbi();
     DblQ00Wlbi(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wlbi(AmdcDb* wlbi);
 
     struct WLBI {
         int version; // VERSION
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wmdt.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wmdt.h
index 6c64b803e304..93012da4ce3f 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wmdt.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wmdt.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WMDT_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wmdt {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wmdt {
 public:
     DblQ00Wmdt(){};
     ~DblQ00Wmdt();
     DblQ00Wmdt(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wmdt(AmdcDb* wmdt);
 
     // data members for DblQ00/WMDT fields
     struct WMDT {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wrpc.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wrpc.h
index 399158d91a33..b9fa5e2bd311 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wrpc.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wrpc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WRPC_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wrpc {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wrpc {
 public:
     DblQ00Wrpc(){};
     ~DblQ00Wrpc();
     DblQ00Wrpc(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wrpc(AmdcDb* wrpc);
     
     // data members for DblQ00/WRPC fields
     struct WRPC {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wspa.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wspa.h
index 081a91ae1ac9..9b0db5619e5f 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wspa.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wspa.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -15,14 +15,16 @@
 
 #include "RDBAccessSvc/IRDBQuery.h"
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wspa {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wspa {
 public:
     DblQ00Wspa(){};
     ~DblQ00Wspa();
     DblQ00Wspa(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wspa(AmdcDb* wspa);
 
     // data members for DblQ00/WSPA fields
     struct WSPA {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wsup.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wsup.h
index 2d8ab09f3d87..7a55b2449498 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wsup.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wsup.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WSUP_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wsup {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wsup {
 public:
     DblQ00Wsup(){};
     ~DblQ00Wsup();
     DblQ00Wsup(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wsup(AmdcDb* wsup);
 
     // data members for DblQ00/WSUP fields
     struct WSUP {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wtgc.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wtgc.h
index 4ff2d3e18449..ed359d0960b3 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wtgc.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Wtgc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -14,15 +14,18 @@
 #define DBLQ00_WTGC_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
-namespace MuonGM
-{
-class DblQ00Wtgc {
 
+class AmdcDb;
+
+namespace MuonGM {
+class DblQ00Wtgc {
 public:
     DblQ00Wtgc(){};
     ~DblQ00Wtgc();
     DblQ00Wtgc(std::unique_ptr<IRDBQuery>&&);
+    DblQ00Wtgc(AmdcDb* wtgc);
 
     // data members for DblQ00/WTGC fields
     struct WTGC {
diff --git a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Xtomo.h b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Xtomo.h
index 706a7fe70ce7..49912fbc753d 100644
--- a/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Xtomo.h
+++ b/MuonSpectrometer/MuonGMdbObjects/MuonGMdbObjects/DblQ00Xtomo.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************
@@ -10,27 +10,23 @@
  // entered: 2012-09-24
  // comment: Mdt AsBuilt parameters - class to read from DB
 
-#include <string>
-
 #ifndef DBLQ00_XTOMO_H
 #define DBLQ00_XTOMO_H
 
 #include "RDBAccessSvc/IRDBQuery.h"
+
 #include <memory>
+#include <string>
 
-namespace MuonGM
-{
-    
+class AmdcDb;
 
+namespace MuonGM {
 class DblQ00Xtomo {
-
 public:
     DblQ00Xtomo();
     ~DblQ00Xtomo();
     DblQ00Xtomo(std::unique_ptr<IRDBQuery>&& xtomo);
-//    DblQ00Xtomo(std::string asciiFileName);
-    
-//    void WriteXtomoToAsciiFile(std::string filename);
+    DblQ00Xtomo(AmdcDb* xtomo);
 
     // data members for DblQ00/XTOMO fields
     struct XTOMO {
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Acut.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Acut.cxx
index 42959289a5bf..ecb03bc47321 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Acut.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Acut.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Acut.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Acut.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <stdexcept>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Acut::DblQ00Acut(std::unique_ptr<IRDBQuery>&& acut)
- : m_nObj(0)
-{
+DblQ00Acut::DblQ00Acut(std::unique_ptr<IRDBQuery>&& acut) :
+    m_nObj(0) {
   if(acut) {
     acut->execute();
     m_nObj = acut->size();
@@ -53,7 +41,46 @@ DblQ00Acut::DblQ00Acut(std::unique_ptr<IRDBQuery>&& acut)
     std::cerr<<"NO Acut banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Acut::DblQ00Acut(AmdcDb* acut) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = acut->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ACUT[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Acut banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  } 
+
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].i = (*it)->getInt("I");
+     m_d[i].icut = (*it)->getInt("ICUT");
+     m_d[i].n = (*it)->getInt("N");
+  }
+}
+
 DblQ00Acut::~DblQ00Acut()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Alin.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Alin.cxx
index 91d4c041dd2b..c4361ead9677 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Alin.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Alin.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Alin.cxx,v 1.5 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Alin.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Alin::DblQ00Alin(std::unique_ptr<IRDBQuery>&& alin)
- : m_nObj(0)
-{
+DblQ00Alin::DblQ00Alin(std::unique_ptr<IRDBQuery>&& alin) :
+    m_nObj(0) {
   if(alin) {
     alin->execute();
     m_nObj = alin->size();
@@ -75,7 +63,54 @@ DblQ00Alin::DblQ00Alin(std::unique_ptr<IRDBQuery>&& alin)
     std::cerr<<"NO Alin banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Alin::DblQ00Alin(AmdcDb* alin) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = alin->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ALIN[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Alin banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+ 
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].dx = (*it)->getFloat("DX");
+     m_d[i].dy = (*it)->getFloat("DY");
+     m_d[i].i = (*it)->getInt("I");
+     m_d[i].width_xs = (*it)->getFloat("WIDTH_XS");
+     m_d[i].width_xl = (*it)->getFloat("WIDTH_XL");
+     m_d[i].length_y = (*it)->getFloat("LENGTH_Y");
+     m_d[i].excent = (*it)->getFloat("EXCENT");
+     m_d[i].dead1 = (*it)->getFloat("DEAD1");
+     m_d[i].jtyp = (*it)->getInt("JTYP");
+     m_d[i].indx = (*it)->getInt("INDX");
+     m_d[i].icut = (*it)->getInt("ICUT");
+  }
+}
+
 DblQ00Alin::~DblQ00Alin()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Almn.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Almn.cxx
index eddcc30269b4..4ab2802195a6 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Almn.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Almn.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Almn.cxx,v 1.5 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Almn.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Almn::DblQ00Almn(std::unique_ptr<IRDBQuery>&& almn)
- : m_nObj(0)
-{
+DblQ00Almn::DblQ00Almn(std::unique_ptr<IRDBQuery>&& almn) :
+    m_nObj(0) {
   if(almn) {
     almn->execute();
     m_nObj = almn->size();
@@ -91,7 +79,62 @@ DblQ00Almn::DblQ00Almn(std::unique_ptr<IRDBQuery>&& almn)
     std::cerr<<"NO Almn banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Almn::DblQ00Almn(AmdcDb* almn) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = almn->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ALMN[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Almn banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].i = (*it)->getInt("I");
+     m_d[i].dx = (*it)->getFloat("DX");
+     m_d[i].dy = (*it)->getFloat("DY");
+     m_d[i].dz = (*it)->getFloat("DZ");
+     m_d[i].job = (*it)->getInt("JOB");
+     sprintf(m_d[i].tec,"%s",(*it)->getString("TEC").c_str());
+     m_d[i].iw = (*it)->getInt("IW");
+     m_d[i].isplit_x = (*it)->getInt("ISPLIT_X");
+     m_d[i].isplit_y = (*it)->getInt("ISPLIT_Y");
+     m_d[i].ishape = (*it)->getInt("ISHAPE");
+     m_d[i].width_xs = (*it)->getFloat("WIDTH_XS");
+     m_d[i].width_xl = (*it)->getFloat("WIDTH_XL");
+     m_d[i].length_y = (*it)->getFloat("LENGTH_Y");
+     m_d[i].excent = (*it)->getFloat("EXCENT");
+     m_d[i].dead1 = (*it)->getFloat("DEAD1");
+     m_d[i].dead2 = (*it)->getFloat("DEAD2");
+     m_d[i].dead3 = (*it)->getFloat("DEAD3");
+     m_d[i].jtyp =  (*it)->getInt("JTYP");
+     m_d[i].indx =  (*it)->getInt("INDX");
+  }
+}
+
 DblQ00Almn::~DblQ00Almn()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aptp.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aptp.cxx
index d1f9a281114e..2603209828af 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aptp.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aptp.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,20 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Aptp.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Aptp.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Aptp::DblQ00Aptp(std::unique_ptr<IRDBQuery>&& aptp)
- : m_nObj(0)
-{
+DblQ00Aptp::DblQ00Aptp(std::unique_ptr<IRDBQuery>&& aptp) :
+    m_nObj(0) {
   if(aptp) {
     aptp->execute();
     m_nObj = aptp->size();
@@ -63,9 +51,6 @@ DblQ00Aptp::DblQ00Aptp(std::unique_ptr<IRDBQuery>&& aptp)
         m_d[i].icut        = aptp->data<int>(fieldIcut);
         for (unsigned int j=0; j<8; j++)
         {
- //            std::ostringstream tem;
-//             tem << j;
-//             std::string tag = "APTP_DATA.IPHI_"+tem.str();
             m_d[i].iphi[j]     = aptp->data<int>(fieldIphi+j);        
         }
         m_d[i].iz          = aptp->data<int>(fieldIz);
@@ -76,9 +61,6 @@ DblQ00Aptp::DblQ00Aptp(std::unique_ptr<IRDBQuery>&& aptp)
         m_d[i].alfa        = aptp->data<float>(fieldAlfa);      
         m_d[i].beta        = aptp->data<float>(fieldBeta);     
         m_d[i].gamma       = aptp->data<float>(fieldGamma);
-//         std::cerr<<i<<" type, iz, iphi, z, r, s "<<m_d[i].type<<" "<<m_d[i].iz <<" ";
-//         for(unsigned int j=0; j<8; j++)std::cerr<<m_d[i].iphi[j];
-//         std::cerr<<" "<<m_d[i].z<<" "<<m_d[i].r<<" "<<m_d[i].s    <<std::endl;
         i++;
     }
     aptp->finalize();
@@ -88,7 +70,62 @@ DblQ00Aptp::DblQ00Aptp(std::unique_ptr<IRDBQuery>&& aptp)
     std::cerr<<"NO Aptp banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Aptp::DblQ00Aptp(AmdcDb* aptp) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = aptp->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new APTP[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Aptp banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].line =  (*it)->getInt("LINE");
+     sprintf(m_d[i].type,"%s",(*it)->getString("TYP").c_str());
+     m_d[i].i = (*it)->getInt("I");
+     m_d[i].icut = (*it)->getInt("ICUT");
+     for(int DB_JFF=0; DB_JFF<8 ; DB_JFF++) {
+        std::string DbVar = "";
+        std::ostringstream Aostringstream;
+        Aostringstream << DB_JFF;
+        DbVar = "IPHI_"+Aostringstream.str();
+        m_d[i].iphi[DB_JFF] =(*it)->getInt(DbVar);
+     }
+     m_d[i].iz = (*it)->getInt("IZ");
+     m_d[i].dphi = (*it)->getFloat("DPHI");
+     m_d[i].z = (*it)->getFloat("Z");
+     m_d[i].r = (*it)->getFloat("R");
+     m_d[i].s = (*it)->getFloat("S");
+     m_d[i].alfa = (*it)->getFloat("ALFA");
+     m_d[i].beta = (*it)->getFloat("BETA");
+     m_d[i].gamma = (*it)->getFloat("GAMMA");
+  }
+}
+
 DblQ00Aptp::~DblQ00Aptp()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Asmp.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Asmp.cxx
index 3662c64d0178..539c6a22d9e8 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Asmp.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Asmp.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,18 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Asmp.cxx,v 1.5 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Asmp.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Asmp::DblQ00Asmp(std::unique_ptr<IRDBQuery>&& asmp)
- : m_nObj(0)
-{
+DblQ00Asmp::DblQ00Asmp(std::unique_ptr<IRDBQuery>&& asmp) :
+    m_nObj(0) {
   if(asmp) {
     asmp->execute();
     m_nObj = asmp->size();
@@ -53,7 +40,46 @@ DblQ00Asmp::DblQ00Asmp(std::unique_ptr<IRDBQuery>&& asmp)
     std::cerr<<"NO Asmp banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Asmp::DblQ00Asmp(AmdcDb* asmp) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = asmp->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ASMP[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Asmp banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].indx =  (*it)->getInt("INDX");
+     m_d[i].n = (*it)->getInt("N");
+     m_d[i].jtyp = (*it)->getInt("JTYP");
+  }
+}
+
 DblQ00Asmp::~DblQ00Asmp()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aszt.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aszt.cxx
index 487ad755f42d..d61d998a0e1f 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aszt.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Aszt.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,27 +7,15 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Aszt.cxx,v 1.8 2009-03-30 18:13:51 roberth Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Aszt.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <algorithm>
 #include <iostream>
 #include <fstream>
 #include <cstdlib>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
@@ -36,9 +24,8 @@ DblQ00Aszt::DblQ00Aszt() : m_d(NULL)
     m_nObj = 0;
 }
     
-DblQ00Aszt::DblQ00Aszt(std::unique_ptr<IRDBQuery>&& aszt)
- : m_nObj(0)
-{
+DblQ00Aszt::DblQ00Aszt(std::unique_ptr<IRDBQuery>&& aszt) :
+    m_nObj(0) {
   if(aszt) {
     aszt->execute();
     m_nObj = aszt->size();
@@ -70,9 +57,56 @@ DblQ00Aszt::DblQ00Aszt(std::unique_ptr<IRDBQuery>&& aszt)
     std::cerr<<"NO Aszt banks in the MuonDD Database"<<std::endl;
   }
 }
+
+DblQ00Aszt::DblQ00Aszt(AmdcDb* aszt) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = aszt->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ASZT[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Aszt banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
   
-DblQ00Aszt::DblQ00Aszt(std::string asciiFileName)
-{
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].line = (*it)->getInt("LINE");          
+     m_d[i].jff = (*it)->getInt("JFF");
+     m_d[i].jzz = (*it)->getInt("JZZ");
+     m_d[i].job = (*it)->getInt("JOB");
+     m_d[i].tras = (*it)->getFloat("TRAS");
+     m_d[i].traz = (*it)->getFloat("TRAZ");
+     m_d[i].trat = (*it)->getFloat("TRAT");
+     m_d[i].rots = (*it)->getFloat("ROTS");
+     m_d[i].rotz = (*it)->getFloat("ROTZ");
+     m_d[i].rott = (*it)->getFloat("ROTT");
+     m_d[i].i = (*it)->getInt("I");
+     sprintf(m_d[i].type,"%s",(*it)->getString("TYP").c_str());
+  }
+}
+
+DblQ00Aszt::DblQ00Aszt(std::string asciiFileName) {
 
   std::cerr<<"Aszt with asciiFileName = : <"<<asciiFileName<<"> "<<std::endl;
   // open file and count number of lines
@@ -91,7 +125,6 @@ DblQ00Aszt::DblQ00Aszt(std::string asciiFileName)
   if (m_nObj == 0) std::cerr<<"NO Aszt banks in "<<asciiFileName<<std::endl;
   
   int j=0;
-  //int index;
 
   // close and reopen file for input
   asztFile.close();
@@ -99,9 +132,6 @@ DblQ00Aszt::DblQ00Aszt(std::string asciiFileName)
 
   char AlineMarker;
   while ( asztFile 
-          //	  >> index 
-          //	  >> m_d[j].version 
-          //	  >> m_d[j].line
           >> AlineMarker 
 	  >> m_d[j].type
 	  >> m_d[j].jff
@@ -115,7 +145,6 @@ DblQ00Aszt::DblQ00Aszt(std::string asciiFileName)
 	  >> m_d[j].rott
 	  )
   {  
-    //std::cout<<" Aszt:: line "<<j+1<<" --- jtyp, jff, jzz "<<m_d[j].type<<" "<<m_d[j].jff<<" "<<m_d[j].jzz  <<std::endl;
       m_d[j].line = j+1;
       m_d[j].tras = 0.1*m_d[j].tras; // ProcessAlignments expects cm !
       m_d[j].traz = 0.1*m_d[j].traz; // ProcessAlignments expects cm !
@@ -126,11 +155,9 @@ DblQ00Aszt::DblQ00Aszt(std::string asciiFileName)
 
   if (j!=(int)m_nObj) { 
     std::cerr<<"problem with DblQ00Aszt: j="<<j<<" m_nObj="<<(int)m_nObj<<std::endl; 
-    //exit(3); 
-  }  
-
+  }
 }
-  
+
 DblQ00Aszt::~DblQ00Aszt()
 {
     if  (m_nObj > 0) delete [] m_d;
@@ -142,9 +169,6 @@ void DblQ00Aszt::WriteAsztToAsciiFile(std::string filename)
   asztFile.open(filename.c_str());
   for (int j=0;j<(int)m_nObj;j++) {
     asztFile
-        //        <<j<<" "
-        //        <<m_d[j].version<<" " 
-        //        << m_d[j].line  <<" "
         <<"A "
         << m_d[j].type  <<" " 
         << m_d[j].jff   <<" " 
@@ -156,7 +180,6 @@ void DblQ00Aszt::WriteAsztToAsciiFile(std::string filename)
         << m_d[j].rots  <<" " 
         << m_d[j].rotz  <<" " 
         << m_d[j].rott  <<" " 
-        //	    << m_d[j].i 
         << "\n";
   }
   asztFile.close();  
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atln.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atln.cxx
index 7043a581a9cf..572eac28e306 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atln.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atln.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Atln.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Atln.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Atln::DblQ00Atln(std::unique_ptr<IRDBQuery>&& atln)
- : m_nObj(0)
-{
+DblQ00Atln::DblQ00Atln(std::unique_ptr<IRDBQuery>&& atln) :
+    m_nObj(0) {
   if(atln) {
     atln->execute();
     m_nObj = atln->size();
@@ -64,7 +52,49 @@ DblQ00Atln::DblQ00Atln(std::unique_ptr<IRDBQuery>&& atln)
     std::cerr<<"NO Atln banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Atln::DblQ00Atln(AmdcDb* atln) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = atln->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ATLN[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Atln banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].i = (*it)->getInt("I");
+     m_d[i].icovol = (*it)->getInt("ICOVOL");
+     m_d[i].zpovol = (*it)->getFloat("ZPOVOL");
+     m_d[i].widvol = (*it)->getFloat("WIDVOL");
+     sprintf(m_d[i].namvol,"%s",(*it)->getString("NAMVOL").c_str());
+     m_d[i].jsta = (*it)->getInt("JSTA");
+  }
+}
+
 DblQ00Atln::~DblQ00Atln()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atyp.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atyp.cxx
index 75c28303ec32..11e2a56f337f 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atyp.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Atyp.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,31 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Atyp.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Atyp.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Atyp::DblQ00Atyp(std::unique_ptr<IRDBQuery>&& atyp)
- : m_nObj(0)
-{
+DblQ00Atyp::DblQ00Atyp(std::unique_ptr<IRDBQuery>&& atyp) :
+    m_nObj(0) {
   if(atyp) {
     atyp->execute();
     m_nObj = atyp->size();
@@ -44,7 +32,6 @@ DblQ00Atyp::DblQ00Atyp(std::unique_ptr<IRDBQuery>&& atyp)
         m_d[i].jtyp           = atyp->data<int>("ATYP_DATA.JTYP");          
         m_d[i].nsta           = atyp->data<int>("ATYP_DATA.NSTA");          
         sprintf(m_d[i].type,"%s",atyp->data<std::string>("ATYP_DATA.TYP").c_str());
-        //std::cerr<<" Atyp:: version, type, jtyp, nsta "<<m_d[i].version<<" "<<m_d[i].type<<" "<<m_d[i].jtyp<<" "<<m_d[i].nsta  <<std::endl;
         i++;
     }
     atyp->finalize();
@@ -54,7 +41,46 @@ DblQ00Atyp::DblQ00Atyp(std::unique_ptr<IRDBQuery>&& atyp)
     std::cerr<<"NO Atyp banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Atyp::DblQ00Atyp(AmdcDb* atyp) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = atyp->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new ATYP[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Atyp banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");
+     m_d[i].jtyp = (*it)->getInt("JTYP");
+     m_d[i].nsta = (*it)->getInt("NSTA");
+     sprintf(m_d[i].type,"%s",(*it)->getString("TYP").c_str());
+  }
+}
+
 DblQ00Atyp::~DblQ00Atyp()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Awln.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Awln.cxx
index 912291a13439..17904fd4aaeb 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Awln.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Awln.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Awln.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Awln.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Awln::DblQ00Awln(std::unique_ptr<IRDBQuery>&& awln)
- : m_nObj(0)
-{
+DblQ00Awln::DblQ00Awln(std::unique_ptr<IRDBQuery>&& awln) :
+    m_nObj(0) {
   if(awln) {
     awln->execute();
     m_nObj = awln->size();
@@ -53,8 +40,6 @@ DblQ00Awln::DblQ00Awln(std::unique_ptr<IRDBQuery>&& awln)
         m_d[i].dedsep        = awln->data<float>("AWLN_DATA.DEDSEP");
         m_d[i].nsrost        = awln->data<int>("AWLN_DATA.NSROST");  
         m_d[i].nzrost        = awln->data<int>("AWLN_DATA.NZROST");
-        //        std::cerr<<" wRPC"<<m_d[i].jsta<<" s,zpitch  "<<m_d[i].spitch <<" "<<m_d[i].zpitch
-        //         <<" ns,zrest "<<m_d[i].nsrest<<" "<<m_d[i].nzrest<<std::endl;
         i++;
     }
     awln->finalize();
@@ -64,7 +49,54 @@ DblQ00Awln::DblQ00Awln(std::unique_ptr<IRDBQuery>&& awln)
     std::cerr<<"NO Awln banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Awln::DblQ00Awln(AmdcDb* awln) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = awln->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new AWLN[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Aszt banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");    
+     m_d[i].spitch = (*it)->getFloat("SPITCH");  
+     m_d[i].zpitch = (*it)->getFloat("ZPITCH");  
+     m_d[i].dedstr = (*it)->getFloat("DEDSTR");  
+     m_d[i].nsrest = (*it)->getInt("NSREST");  
+     m_d[i].nzrest = (*it)->getInt("NZREST");
+     m_d[i].sfirst = (*it)->getFloat("SFIRST");
+     m_d[i].zfirst = (*it)->getFloat("ZFIRST");
+     m_d[i].dedsep = (*it)->getFloat("DEDSEP");
+     m_d[i].nsrost = (*it)->getInt("NSROST");  
+     m_d[i].nzrost = (*it)->getInt("NZROST");
+  }
+}
+
 DblQ00Awln::~DblQ00Awln()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Dbam.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Dbam.cxx
index bd3dae580b06..986d08a704bc 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Dbam.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Dbam.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,33 +7,21 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Dbam.cxx,v 1.5 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Dbam.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
 #include <stdexcept>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Dbam::DblQ00Dbam(std::unique_ptr<IRDBQuery>&& dbam)
- : m_nObj(0)
-{
+DblQ00Dbam::DblQ00Dbam(std::unique_ptr<IRDBQuery>&& dbam) :
+    m_nObj(0) {
   if(dbam) {
     dbam->execute();
     m_nObj = dbam->size();
@@ -65,13 +53,9 @@ DblQ00Dbam::DblQ00Dbam(std::unique_ptr<IRDBQuery>&& dbam)
             }
             catch (const std::runtime_error&)
             {
-                //std::cerr<<"End of station-name list"<<std::endl;
                 break;
             }
-            //std::cerr<<j<<" Dbam amdb = "<<m_d[i].amdb<<" "<<j<<" "<<m_d[i].name[j]<<std::endl;
         }
-//         std::cerr<<" Dbam amdb = "<<m_d[i].amdb<<" test "<<m_d[i].test
-//                  <<" version/nvrs "<<m_d[i].version<<"/"<<m_d[i].nvrs<<std::endl;
         i++;
     }
     dbam->finalize();
@@ -81,7 +65,58 @@ DblQ00Dbam::DblQ00Dbam(std::unique_ptr<IRDBQuery>&& dbam)
     std::cerr<<"NO Dbam banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Dbam::DblQ00Dbam(AmdcDb* dbam) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = dbam->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new DBAM[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Dbam banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].nvrs = (*it)->getInt("NVRS");
+     m_d[i].mtyp = (*it)->getInt("MTYP");
+     m_d[i].numbox = (*it)->getInt("NUMBOX");
+     sprintf(m_d[i].amdb,"%s",(*it)->getString("AMDB").c_str()); 
+     if(((*it)->getString("TEST")).compare("NOT FOUND") == 0 ) sprintf(m_d[i].test,"unknown");
+     else sprintf(m_d[i].test,"%s",(*it)->getString("TEST").c_str());
+
+     for(unsigned int j=0; j<53; j++)
+     {
+       std::ostringstream tem;
+       tem << j;
+       std::string tag = "NAME_"+tem.str();
+       if(((*it)->getString(tag)).compare("NOT FOUND") == 0 ) break;
+       sprintf(m_d[i].name[j],"%s",(*it)->getString(tag).c_str());
+     }
+  }
+}
+
 DblQ00Dbam::~DblQ00Dbam()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00IAcsc.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00IAcsc.cxx
index 4fbdf143c28e..cfe09283070b 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00IAcsc.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00IAcsc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,46 +7,28 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Iacsc.cxx,v 1.8 2009-03-30 18:13:51 roberth Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00IAcsc.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <algorithm>
 #include <iostream>
 #include <fstream>
 #include <cstdlib>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 DblQ00IAcsc::DblQ00IAcsc()
 {
     m_nObj = 0;
-    m_d = 0;
-//    std::cerr <<" here we are"<<std::endl;
-    
+    m_d = 0;    
 }
-    
-DblQ00IAcsc::DblQ00IAcsc(std::unique_ptr<IRDBQuery>&& iacsc)
- : m_nObj(0)
-{
-    //std::cerr<<" pointer to ISZT data "<< iacsc<<std::endl;
-    
+
+DblQ00IAcsc::DblQ00IAcsc(std::unique_ptr<IRDBQuery>&& iacsc) :
+    m_nObj(0) {
   if(iacsc) {
     iacsc->execute();
-    //std::cerr<<" after execute"<<std::endl;
     
     m_nObj = iacsc->size();
     m_d = new IACSC[m_nObj];
@@ -54,7 +36,6 @@ DblQ00IAcsc::DblQ00IAcsc(std::unique_ptr<IRDBQuery>&& iacsc)
 
     int i=0;
     while(iacsc->next()) {
-	//std::cerr<<" do we ever come here ???"<<std::endl;
 	
         m_d[i].version        = iacsc->data<int>("ISZT_DATA.VERS");    
         m_d[i].line           = i; 
@@ -62,21 +43,13 @@ DblQ00IAcsc::DblQ00IAcsc(std::unique_ptr<IRDBQuery>&& iacsc)
         m_d[i].jzz            = iacsc->data<int>("ISZT_DATA.JZZ");
         m_d[i].job            = iacsc->data<int>("ISZT_DATA.JOB");
         m_d[i].wireLayer      = iacsc->data<int>("ISZT_DATA.JLAY");
-	//std::cerr<<" do we ever come here1 ???"<<std::endl;
-	
         m_d[i].tras           = 10.*iacsc->data<float>("ISZT_DATA.TRAS"); // I lines in mm, but ISZT in cm
         m_d[i].traz           = 10.*iacsc->data<float>("ISZT_DATA.TRAZ"); // I lines in mm, but ISZT in cm
         m_d[i].trat           = 10.*iacsc->data<float>("ISZT_DATA.TRAT"); // I lines in mm, but ISZT in cm
         m_d[i].rots           = iacsc->data<float>("ISZT_DATA.ROTS");
         m_d[i].rotz           = iacsc->data<float>("ISZT_DATA.ROTZ");
         m_d[i].rott           = iacsc->data<float>("ISZT_DATA.ROTT");
-        //m_d[i].i              = iacsc->data<int>("ISZT_DATA.I");
-	//std::cerr<<" do we ever come here 2???"<<std::endl;
-
         sprintf(m_d[i].type,"%s",iacsc->data<std::string>("ISZT_DATA.TYP").c_str());
-	//std::cerr<<" do we ever come here 3???"<<std::endl;
-
-        //std::cerr<<" IAcsc:: version, type, jtyp, nsta "<<m_d[i].version<<" "<<m_d[i].line<<" "<<std::endl;
         i++;
     }
     iacsc->finalize();
@@ -86,10 +59,56 @@ DblQ00IAcsc::DblQ00IAcsc(std::unique_ptr<IRDBQuery>&& iacsc)
     std::cerr<<"NO IAcsc banks in the MuonDD Database"<<std::endl;
   }
 }
-  
-DblQ00IAcsc::DblQ00IAcsc(std::string asciiFileName)
-{
 
+DblQ00IAcsc::DblQ00IAcsc(AmdcDb* iacsc) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = iacsc->getRecordsetPtr("ISZT","Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new IACSC[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO IAcsc banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].line = i; 
+     m_d[i].jff = (*it)->getInt("JFF");
+     m_d[i].jzz = (*it)->getInt("JZZ");
+     m_d[i].job = (*it)->getInt("JOB");
+     m_d[i].wireLayer = (*it)->getInt("JLAY");
+     m_d[i].tras = 10.*(*it)->getFloat("TRAS");
+     m_d[i].traz = 10.*(*it)->getFloat("TRAZ");
+     m_d[i].trat = 10.*(*it)->getFloat("TRAT");
+     m_d[i].rots = (*it)->getFloat("ROTS");
+     m_d[i].rotz = (*it)->getFloat("ROTZ");
+     m_d[i].rott = (*it)->getFloat("ROTT");
+     sprintf(m_d[i].type,"%s",(*it)->getString("TYP").c_str());
+  }
+}
+
+DblQ00IAcsc::DblQ00IAcsc(std::string asciiFileName) {
   std::cerr<<"IAcsc with asciiFileName = : <"<<asciiFileName<<"> "<<std::endl;
   // open file and count number of lines
   m_nObj=0;
@@ -107,7 +126,6 @@ DblQ00IAcsc::DblQ00IAcsc(std::string asciiFileName)
   if (m_nObj == 0) std::cerr<<"NO IAcsc banks in "<<asciiFileName<<std::endl;
   
   int j=0;
-  //int index;
 
   // close and reopen file for input
   iacscFile.close();
@@ -115,9 +133,6 @@ DblQ00IAcsc::DblQ00IAcsc(std::string asciiFileName)
 
   char AlineMarker;
   while ( iacscFile 
-          //	  >> index 
-          //	  >> m_d[j].version 
-          //	  >> m_d[j].line
           >> AlineMarker 
 	  >> m_d[j].type
 	  >> m_d[j].jff
@@ -136,20 +151,16 @@ DblQ00IAcsc::DblQ00IAcsc(std::string asciiFileName)
 	     <<m_d[j].jff<<" "<<m_d[j].jzz  <<" "
 	     <<m_d[j].job<<" "<<m_d[j].wireLayer  <<std::endl;
       m_d[j].line = j+1;
-      // m_d[j].tras = m_d[j].tras; ProcessAlignments expects cm !
-      // m_d[j].traz = m_d[j].traz; ProcessAlignments expects cm !
-      // m_d[j].trat = m_d[j].trat; ProcessAlignments expects cm !
       j++;
   }
   
 
   if (j!=(int)m_nObj) { 
     std::cerr<<"problem with DblQ00IAcsc: j="<<j<<" m_nObj="<<(int)m_nObj<<std::endl; 
-    //exit(3); 
   }  
 
 }
-  
+
 DblQ00IAcsc::~DblQ00IAcsc()
 {
     if  (m_nObj > 0) delete [] m_d;
@@ -161,9 +172,6 @@ void DblQ00IAcsc::WriteIAcscToAsciiFile(std::string filename)
   iacscFile.open(filename.c_str());
   for (int j=0;j<(int)m_nObj;j++) {
     iacscFile
-        //        <<j<<" "
-        //        <<m_d[j].version<<" " 
-        //        << m_d[j].line  <<" "
         <<"A "
         << m_d[j].type        <<" " 
         << m_d[j].jff         <<" " 
@@ -176,7 +184,6 @@ void DblQ00IAcsc::WriteIAcscToAsciiFile(std::string filename)
         << m_d[j].rots  <<" " 
         << m_d[j].rotz  <<" " 
         << m_d[j].rott  <<" " 
-        //	    << m_d[j].i 
         << "\n";
   }
   iacscFile.close();  
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wchv.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wchv.cxx
index 5a48ae62a948..f056dc6fa539 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wchv.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wchv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wchv.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wchv.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wchv::DblQ00Wchv(std::unique_ptr<IRDBQuery>&& wchv)
- : m_nObj(0)
-{
+DblQ00Wchv::DblQ00Wchv(std::unique_ptr<IRDBQuery>&& wchv) :
+    m_nObj(0) {
   if(wchv) {
     wchv->execute();
     m_nObj = wchv->size();
@@ -47,9 +34,6 @@ DblQ00Wchv::DblQ00Wchv(std::unique_ptr<IRDBQuery>&& wchv)
         m_d[i].heightness     = wchv->data<float>("WCHV_DATA.HEIGHTNESS");
         m_d[i].largeness      = wchv->data<float>("WCHV_DATA.LARGENESS");
         m_d[i].thickness      = wchv->data<float>("WCHV_DATA.THICKNESS");
-//         std::cerr<<i<<" type, iz, iphi, z, r, s "<<m_d[i].type<<" "<<m_d[i].iz <<" ";
-//         for(unsigned int j=0; j<8; j++)std::cerr<<m_d[i].iphi[j];
-//         std::cerr<<" "<<m_d[i].z<<" "<<m_d[i].r<<" "<<m_d[i].s    <<std::endl;
         i++;
     }
     wchv->finalize();
@@ -59,7 +43,48 @@ DblQ00Wchv::DblQ00Wchv(std::unique_ptr<IRDBQuery>&& wchv)
     std::cerr<<"NO Wchv banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wchv::DblQ00Wchv(AmdcDb* wchv) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wchv->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WCHV[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wchv banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].num = (*it)->getInt("NUM");
+     m_d[i].heightness = (*it)->getFloat("HEIGHTNESS");
+     m_d[i].largeness = (*it)->getFloat("LARGENESS");
+     m_d[i].thickness = (*it)->getFloat("THICKNESS");
+  }
+}
+
 DblQ00Wchv::~DblQ00Wchv()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcmi.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcmi.cxx
index d4c53e3cfdec..bf3edef510f1 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcmi.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcmi.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wcmi.cxx,v 1.5 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wcmi.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wcmi::DblQ00Wcmi(std::unique_ptr<IRDBQuery>&& wcmi)
- : m_nObj(0)
-{
+DblQ00Wcmi::DblQ00Wcmi(std::unique_ptr<IRDBQuery>&& wcmi) :
+    m_nObj(0) {
   if(wcmi) {
     wcmi->execute();
     m_nObj = wcmi->size();
@@ -47,7 +34,6 @@ DblQ00Wcmi::DblQ00Wcmi(std::unique_ptr<IRDBQuery>&& wcmi)
         m_d[i].heightness     = wcmi->data<float>("WCMI_DATA.HEIGHTNESS");
         m_d[i].largeness      = wcmi->data<float>("WCMI_DATA.LARGENESS");
         m_d[i].thickness      = wcmi->data<float>("WCMI_DATA.THICKNESS");
-        //std::cerr<<" FROM ORACLE: CMI "<<m_d[i].jsta<<" h/l/t "<<m_d[i].heightness<<" "<<m_d[i].largeness <<" "<<m_d[i].thickness <<std::endl;
 	i++;
     }
     wcmi->finalize();
@@ -57,7 +43,48 @@ DblQ00Wcmi::DblQ00Wcmi(std::unique_ptr<IRDBQuery>&& wcmi)
     std::cerr<<"NO Wcmi banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wcmi::DblQ00Wcmi(AmdcDb* wcmi) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wcmi->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WCMI[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wcmi banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].num = (*it)->getInt("NUM");
+     m_d[i].heightness = (*it)->getFloat("HEIGHTNESS");
+     m_d[i].largeness = (*it)->getFloat("LARGENESS");
+     m_d[i].thickness = (*it)->getFloat("THICKNESS");
+  }
+}
+
 DblQ00Wcmi::~DblQ00Wcmi()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcro.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcro.cxx
index 25b0bacf61ed..3e4a1a9fd3e5 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcro.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcro.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wcro.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wcro.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wcro::DblQ00Wcro(std::unique_ptr<IRDBQuery>&& wcro)
- : m_nObj(0)
-{
+DblQ00Wcro::DblQ00Wcro(std::unique_ptr<IRDBQuery>&& wcro) :
+    m_nObj(0) {
   if(wcro) {
     wcro->execute();
     m_nObj = wcro->size();
@@ -56,7 +43,48 @@ DblQ00Wcro::DblQ00Wcro(std::unique_ptr<IRDBQuery>&& wcro)
     std::cerr<<"NO Wcro banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wcro::DblQ00Wcro(AmdcDb* wcro) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wcro->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WCRO[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wcro banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].num = (*it)->getInt("NUM");
+     m_d[i].heightness = (*it)->getFloat("HEIGHTNESS");
+     m_d[i].largeness = (*it)->getFloat("LARGENESS");
+     m_d[i].thickness = (*it)->getFloat("THICKNESS");
+  }
+}
+
 DblQ00Wcro::~DblQ00Wcro()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcsc.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcsc.cxx
index d267064eb3fb..ee8cce4eb5b0 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcsc.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wcsc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,33 +7,20 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wcsc.cxx,v 1.6 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wcsc.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
 #include <stdexcept>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Wcsc::DblQ00Wcsc(std::unique_ptr<IRDBQuery>&& wcsc)
- : m_nObj(0)
-{
+DblQ00Wcsc::DblQ00Wcsc(std::unique_ptr<IRDBQuery>&& wcsc) :
+    m_nObj(0) {
   if(wcsc) {
     wcsc->execute();
     m_nObj = wcsc->size();
@@ -67,21 +54,16 @@ DblQ00Wcsc::DblQ00Wcsc(std::unique_ptr<IRDBQuery>&& wcsc)
         m_d[i].pba2wi      = wcsc->data<float>("WCSC_DATA.PBA2WI"); 
         m_d[i].pba3wi      = wcsc->data<float>("WCSC_DATA.PBA3WI"); 
         m_d[i].psndco      = wcsc->data<float>("WCSC_DATA.PSNDCO");
-        //std::cerr<<" original psndco = "<<m_d[i].psndco<<std::endl;
         m_d[i].azcat = 0.;
         float  azcat = 0.;
         try {
             azcat = wcsc->data<float>("WCSC_DATA.AZCAT");
             m_d[i].azcat =   azcat;
-            //m_d[i].psndco =  m_d[i].azcat;
-            //std::cerr<<" redefined psndco = "<<m_d[i].psndco<<std::endl;
         }
         catch (const std::runtime_error&)
         {
             std::cerr<<" azcat field does not exists !"<<std::endl;
             m_d[i].azcat =   0.;
-            //m_d[i].psndco =  0.;
-            //std::cerr<<" redefined psndco to 0 "<<m_d[i].psndco<<std::endl;
         }
        i++;
     }
@@ -92,7 +74,79 @@ DblQ00Wcsc::DblQ00Wcsc(std::unique_ptr<IRDBQuery>&& wcsc)
     std::cerr<<"NO Wcsc banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wcsc::DblQ00Wcsc(AmdcDb* wcsc) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wcsc->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WCSC[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wcsc banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");    
+     m_d[i].laycsc = (*it)->getInt("LAYCSC");
+     m_d[i].ttotal = (*it)->getFloat("TTOTAL");
+     m_d[i].tnomex = (*it)->getFloat("TNOMEX"); 
+     m_d[i].tlag10 = (*it)->getFloat("TLAG10"); 
+     m_d[i].wispa = (*it)->getFloat("WISPA"); 
+     m_d[i].dancat = (*it)->getFloat("DANCAT"); 
+     m_d[i].pcatre = (*it)->getFloat("PCATRE"); 
+     m_d[i].gstrip = (*it)->getFloat("GSTRIP"); 
+     m_d[i].wrestr = (*it)->getFloat("WRESTR"); 
+     m_d[i].wflstr = (*it)->getFloat("WFLSTR"); 
+     m_d[i].trrwas = (*it)->getFloat("TRRWAS"); 
+     m_d[i].wroxa = (*it)->getFloat("WROXA"); 
+     m_d[i].groxwi = (*it)->getFloat("GROXWI"); 
+     m_d[i].wgasba = (*it)->getFloat("WGASBA"); 
+     m_d[i].tgasba = (*it)->getFloat("TGASBA"); 
+     m_d[i].wgascu = (*it)->getFloat("WGASCU"); 
+     m_d[i].tgascu = (*it)->getFloat("TGASCU"); 
+     m_d[i].wfixwi = (*it)->getFloat("WFIXWI"); 
+     m_d[i].tfixwi = (*it)->getFloat("TFIXWI"); 
+     m_d[i].pba1wi = (*it)->getFloat("PBA1WI"); 
+     m_d[i].pba2wi = (*it)->getFloat("PBA2WI"); 
+     m_d[i].pba3wi = (*it)->getFloat("PBA3WI"); 
+     m_d[i].psndco = (*it)->getFloat("PSNDCO");
+     m_d[i].azcat = 0.;
+     float azcat = 0.;
+     if((*it)->getFloat("AZCAT") != 999999999999.) 
+     {
+       azcat = (*it)->getFloat("AZCAT");
+       m_d[i].azcat =   azcat;
+     }
+     else
+     {
+       std::cerr<<" azcat field does not exists !"<<std::endl;
+       m_d[i].azcat = 0.;
+     }
+  }
+}
+
 DblQ00Wcsc::~DblQ00Wcsc()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wded.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wded.cxx
index d1696a9766ce..3b9ca39deb17 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wded.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wded.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wded.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wded.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wded::DblQ00Wded(std::unique_ptr<IRDBQuery>&& wded)
- : m_nObj(0)
-{
+DblQ00Wded::DblQ00Wded(std::unique_ptr<IRDBQuery>&& wded) :
+    m_nObj(0) {
   if(wded) {
     wded->execute();
     m_nObj = wded->size();
@@ -56,7 +43,48 @@ DblQ00Wded::DblQ00Wded(std::unique_ptr<IRDBQuery>&& wded)
     std::cerr<<"NO Wded banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wded::DblQ00Wded(AmdcDb* wded) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wded->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WDED[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wded banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].nb = (*it)->getInt("NB");
+     m_d[i].x0 = (*it)->getFloat("X0");
+     m_d[i].auphcb = (*it)->getFloat("AUPHCB");
+     m_d[i].tckded = (*it)->getFloat("TCKDED");
+  }
+}
+
 DblQ00Wded::~DblQ00Wded()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wlbi.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wlbi.cxx
index 1f15902d1689..473192c3ba51 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wlbi.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wlbi.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,35 +7,22 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wlbi.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wlbi.h"
 #include "RelationalAccess/ICursor.h"
 #include "CoralBase/AttributeList.h"
 #include "CoralBase/Attribute.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wlbi::DblQ00Wlbi(std::unique_ptr<IRDBQuery>&& wlbi)
- : m_nObj(0)
-{
+DblQ00Wlbi::DblQ00Wlbi(std::unique_ptr<IRDBQuery>&& wlbi) :
+    m_nObj(0) {
   if(wlbi) {
     wlbi->execute();
     m_nObj = wlbi->size();
@@ -68,7 +55,51 @@ DblQ00Wlbi::DblQ00Wlbi(std::unique_ptr<IRDBQuery>&& wlbi)
     std::cerr<<"NO Wlbi banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wlbi::DblQ00Wlbi(AmdcDb* wlbi) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wlbi->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WLBI[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wlbi banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].num = (*it)->getInt("NUM");
+     m_d[i].height = (*it)->getFloat("HEIGHT");
+     m_d[i].thickness = (*it)->getFloat("THICKNESS");
+     if((*it)->getFloat("LOWERTHICK") != 999999999999.) m_d[i].lowerThickness   = (*it)->getFloat("LOWERTHICK");
+     else m_d[i].lowerThickness   = m_d[i].thickness ;
+     if ((*it)->getFloat(".SHIFTYSTATION") != 999999999999.) m_d[i].yShift   = (*it)->getFloat("SHIFTYSTATION");
+     else m_d[i].yShift   = 0.;
+  }
+}
+
 DblQ00Wlbi::~DblQ00Wlbi()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wmdt.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wmdt.cxx
index e2ea1befea87..bd4ca08af3fa 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wmdt.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wmdt.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,20 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wmdt.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wmdt.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Wmdt::DblQ00Wmdt(std::unique_ptr<IRDBQuery>&& wmdt)
- : m_nObj(0)
-{
+DblQ00Wmdt::DblQ00Wmdt(std::unique_ptr<IRDBQuery>&& wmdt) :
+    m_nObj(0) {
   if(wmdt) {
     wmdt->execute();
     m_nObj = wmdt->size();
@@ -60,10 +48,6 @@ DblQ00Wmdt::DblQ00Wmdt(std::unique_ptr<IRDBQuery>&& wmdt)
             m_d[i].tubxco[j]     = wmdt->data<float>(tagx);        
             m_d[i].tubyco[j]     = wmdt->data<float>(tagy);        
         }
-//         std::cerr<<i<<" WMDT"<<m_d[i].iw<<" nlay, ptch, wal "<<m_d[i].laymdt <<" "<<m_d[i].tubpit<<" "<<m_d[i].tubwal
-//                  <<"\n tubx "; for (int j=0; j<m_d[i].laymdt; j++) std::cerr<<m_d[i].tubxco[j]<<" ";
-//         std::cerr<<"\n tuby "; for (int j=0; j<m_d[i].laymdt; j++) std::cerr<<m_d[i].tubyco[j]<<" ";
-//         std::cerr<<std::endl;
         i++;
     }
     wmdt->finalize();
@@ -73,7 +57,61 @@ DblQ00Wmdt::DblQ00Wmdt(std::unique_ptr<IRDBQuery>&& wmdt)
     std::cerr<<"NO Wmdt banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wmdt::DblQ00Wmdt(AmdcDb* wmdt) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wmdt->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WMDT[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wmdt banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].iw = (*it)->getInt("IW");
+     m_d[i].laymdt = (*it)->getInt("LAYMDT");
+     sprintf(m_d[i].typ,"%s",(*it)->getString("TYP").c_str());
+     m_d[i].x0 = (*it)->getFloat("X0");
+     m_d[i].tubpit = (*it)->getFloat("TUBPIT");
+     m_d[i].tubrad = (*it)->getFloat("TUBRAD");
+     m_d[i].tubsta = (*it)->getFloat("TUBSTA");
+     m_d[i].tubdea = (*it)->getFloat("TUBDEA");
+     m_d[i].tubwal = (*it)->getFloat("TUBWAL");
+     for(unsigned int j=0; j<4; j++)
+     {
+       std::ostringstream tem;
+       tem << j;
+       std::string tagx = "TUBXCO_"+tem.str();
+       std::string tagy = "TUBYCO_"+tem.str();
+       m_d[i].tubxco[j] = (*it)->getFloat(tagx);        
+       m_d[i].tubyco[j] = (*it)->getFloat(tagy);        
+     }
+  }
+}
+
 DblQ00Wmdt::~DblQ00Wmdt()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wrpc.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wrpc.cxx
index 1b4a22cca129..d2dfd39d10b8 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wrpc.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wrpc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wrpc.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wrpc.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wrpc::DblQ00Wrpc(std::unique_ptr<IRDBQuery>&& wrpc)
- : m_nObj(0)
-{
+DblQ00Wrpc::DblQ00Wrpc(std::unique_ptr<IRDBQuery>&& wrpc) :
+    m_nObj(0) {
   if(wrpc) {
     wrpc->execute();
     m_nObj = wrpc->size();
@@ -70,7 +57,62 @@ DblQ00Wrpc::DblQ00Wrpc(std::unique_ptr<IRDBQuery>&& wrpc)
     std::cerr<<"NO Wrpc banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wrpc::DblQ00Wrpc(AmdcDb* wrpc) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wrpc->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WRPC[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wrpc banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].nvrs = (*it)->getInt("NVRS");
+     m_d[i].layrpc = (*it)->getInt("LAYRPC");
+     m_d[i].tckrla = (*it)->getFloat("TCKRLA");
+     m_d[i].tottck = (*it)->getFloat("TOTTCK");
+     m_d[i].tckfsp = (*it)->getFloat("TCKFSP");
+     m_d[i].ackfsp = (*it)->getFloat("ACKFSP");
+     m_d[i].tlohcb = (*it)->getFloat("TLOHCB");
+     m_d[i].alohcb = (*it)->getFloat("ALOHCB");
+     m_d[i].tckbak = (*it)->getFloat("TCKBAK");
+     m_d[i].tckgas = (*it)->getFloat("TCKGAS");
+     m_d[i].tckssu = (*it)->getFloat("TCKSSU");
+     m_d[i].tckstr = (*it)->getFloat("TCKSTR");
+     m_d[i].sdedmi = (*it)->getFloat("SDEDMI");
+     m_d[i].zdedmi = (*it)->getFloat("ZDEDMI");
+     m_d[i].spdiam = (*it)->getFloat("SPDIAM");
+     m_d[i].sppitc = (*it)->getFloat("SPPITC");
+     m_d[i].stroff[0] = (*it)->getFloat("STROFF_0");
+     m_d[i].stroff[1] = (*it)->getFloat("STROFF_1");
+     m_d[i].stroff[2] = (*it)->getFloat("STROFF_2");
+  }
+}
+
 DblQ00Wrpc::~DblQ00Wrpc()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wspa.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wspa.cxx
index fe370a71d8f5..0840a0d251f9 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wspa.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wspa.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wspa.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wspa.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wspa::DblQ00Wspa(std::unique_ptr<IRDBQuery>&& wspa)
- : m_nObj(0)
-{
+DblQ00Wspa::DblQ00Wspa(std::unique_ptr<IRDBQuery>&& wspa) :
+    m_nObj(0) {
   if(wspa) {
     wspa->execute();
     m_nObj = wspa->size();
@@ -55,7 +42,47 @@ DblQ00Wspa::DblQ00Wspa(std::unique_ptr<IRDBQuery>&& wspa)
     std::cerr<<"NO Wspa banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wspa::DblQ00Wspa(AmdcDb* wspa) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wspa->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WSPA[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wspa banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].nb = (*it)->getInt("NB");
+     m_d[i].x0 = (*it)->getFloat("X0");
+     m_d[i].tckspa = (*it)->getFloat("TCKSPA");
+  }
+}
+
 DblQ00Wspa::~DblQ00Wspa()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wsup.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wsup.cxx
index 9adc1eddd0ee..9640257f6375 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wsup.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wsup.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,32 +7,19 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wsup.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wsup.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
-//#include <stdio>
-
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
 
 namespace MuonGM
 {
 
-DblQ00Wsup::DblQ00Wsup(std::unique_ptr<IRDBQuery>&& wsup)
- : m_nObj(0)
-{
+DblQ00Wsup::DblQ00Wsup(std::unique_ptr<IRDBQuery>&& wsup) :
+    m_nObj(0) {
   if(wsup) {
     wsup->execute();
     m_nObj = wsup->size();
@@ -65,7 +52,57 @@ DblQ00Wsup::DblQ00Wsup(std::unique_ptr<IRDBQuery>&& wsup)
     std::cerr<<"NO Wsup banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wsup::DblQ00Wsup(AmdcDb* wsup) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wsup->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WSUP[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wsup banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].nxxsup = (*it)->getInt("NXXSUP");
+     m_d[i].nzzsup = (*it)->getInt("NZZSUP");
+     m_d[i].x0 = (*it)->getFloat("X0");
+     m_d[i].thickn = (*it)->getFloat("THICKN");
+     for(unsigned int j=0; j<4; j++)
+     {
+       std::ostringstream tem;
+       tem << j;
+       std::string tagx = "XXSUP_"+tem.str();
+       std::string tagy = "ZZSUP_"+tem.str();
+       m_d[i].xxsup[j] = (*it)->getFloat(tagx);        
+       m_d[i].zzsup[j] = (*it)->getFloat(tagy);        
+     }
+  }
+}
+
 DblQ00Wsup::~DblQ00Wsup()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wtgc.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wtgc.cxx
index 31dbaa8c3cf6..e09c3075e6f9 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wtgc.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Wtgc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,33 +7,21 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: DblQ00Wtgc.cxx,v 1.4 2007-02-12 17:33:50 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
-//<<<<<< INCLUDES                                                       >>>>>>
-
 #include "MuonGMdbObjects/DblQ00Wtgc.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
 #include <stdexcept>
 
-//<<<<<< PRIVATE DEFINES                                                >>>>>>
-//<<<<<< PRIVATE CONSTANTS                                              >>>>>>
-//<<<<<< PRIVATE TYPES                                                  >>>>>>
-//<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-//<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
-//<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
-//<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
-
 namespace MuonGM
 {
 
-DblQ00Wtgc::DblQ00Wtgc(std::unique_ptr<IRDBQuery>&& wtgc)
- : m_nObj(0)
-{
+DblQ00Wtgc::DblQ00Wtgc(std::unique_ptr<IRDBQuery>&& wtgc) :
+    m_nObj(0) {
   if(wtgc) {
     wtgc->execute();
     m_nObj = wtgc->size();
@@ -59,7 +47,6 @@ DblQ00Wtgc::DblQ00Wtgc(std::unique_ptr<IRDBQuery>&& wtgc)
             }
             catch (const std::runtime_error&)
             {
-                //std::cerr<<"MuonGM::DblQ00-Wtgc- End of material-name list"<<std::endl;
                 break;
             }
         }
@@ -72,7 +59,57 @@ DblQ00Wtgc::DblQ00Wtgc(std::unique_ptr<IRDBQuery>&& wtgc)
     std::cerr<<"NO Wtgc banks in the MuonDD Database"<<std::endl;
   }
 }
-    
+
+DblQ00Wtgc::DblQ00Wtgc(AmdcDb* wtgc) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = wtgc->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new WTGC[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Wtgc banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
+  
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+     m_d[i].version = (*it)->getInt("VERS");    
+     m_d[i].jsta = (*it)->getInt("JSTA");
+     m_d[i].nbevol = (*it)->getInt("NBEVOL");
+     m_d[i].x0 = (*it)->getFloat("X0");
+     m_d[i].widchb = (*it)->getFloat("WIDCHB");
+     m_d[i].fwirch = (*it)->getFloat("FWIRCH");
+     m_d[i].fwixch = (*it)->getFloat("FWIXCH");
+     for(unsigned int j=0; j<9; j++)
+     {
+       std::ostringstream tem;
+       tem << j;
+       std::string tag = "ALLNAME_"+tem.str();
+       if(((*it)->getString(tag)).compare("NOT FOUND") == 0 ) break;
+       sprintf(m_d[i].allname[j],"%s",(*it)->getString(tag).c_str());
+     }
+  }
+}
+
 DblQ00Wtgc::~DblQ00Wtgc()
 {
     delete [] m_d;
diff --git a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Xtomo.cxx b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Xtomo.cxx
index a4bfd1e653df..c76cbeb64b79 100644
--- a/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Xtomo.cxx
+++ b/MuonSpectrometer/MuonGMdbObjects/src/DblQ00Xtomo.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,20 +7,22 @@
  -----------------------------------------
  ***************************************************************************/
 
-
 #include "MuonGMdbObjects/DblQ00Xtomo.h"
+#include "RDBAccessSvc/IRDBRecordset.h"
+#include "AmdcDb/AmdcDb.h"
+#include "AmdcDb/AmdcDbRecord.h"
+
 #include <iostream>
 
 namespace MuonGM
 {
-DblQ00Xtomo::DblQ00Xtomo() : m_nObj(0)
-{
-   m_d = NULL;
+DblQ00Xtomo::DblQ00Xtomo() :
+    m_nObj(0) {
+   m_d = nullptr;
 }
     
-DblQ00Xtomo::DblQ00Xtomo(std::unique_ptr<IRDBQuery>&& xtomo)
- : m_nObj(0)
-{
+DblQ00Xtomo::DblQ00Xtomo(std::unique_ptr<IRDBQuery>&& xtomo) :
+    m_nObj(0) {
   std::cout << "In DblQ00Xtomo(data)" << std::endl;
   if(xtomo) {
     xtomo->execute();
@@ -81,13 +83,90 @@ DblQ00Xtomo::DblQ00Xtomo(std::unique_ptr<IRDBQuery>&& xtomo)
     xtomo->finalize();
 
   } else {
-    m_d = 0;
+    m_d = nullptr;
     std::cerr << "No XtomoData table in the MuonDD Database" << std::endl;
   }
 
 }
+
+DblQ00Xtomo::DblQ00Xtomo(AmdcDb* xtomo) :
+    m_nObj(0) {
+  IRDBRecordset_ptr pIRDBRecordset = xtomo->getRecordsetPtr(std::string(getObjName()),"Amdc");
+  std::vector<IRDBRecord*>::const_iterator it = pIRDBRecordset->begin();
+
+  m_nObj = pIRDBRecordset->size();
+  m_d = new XTOMO[m_nObj];
+  if (m_nObj == 0) std::cerr<<"NO Xtomo banks in the AmdcDbRecord"<<std::endl;
+
+  const AmdcDbRecord* pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+  if (pAmdcDbRecord == 0){
+    std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+    return;
+  }
   
- 
+  std::vector< std::string> VariableList = pAmdcDbRecord->getVariableList();
+  int ItemTot = VariableList.size() ;
+  for(int Item=0 ; Item<ItemTot ; Item++){
+    std::string DbVar = VariableList[Item];
+  }
+
+  int i = -1;
+  it = pIRDBRecordset->begin();
+  for( ; it<pIRDBRecordset->end(); it++){
+     pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it));
+     if(pAmdcDbRecord == 0){
+       std::cerr << "No way to cast in AmdcDbRecord for " << getObjName() << std::endl;
+       return;
+     }
+
+     i = i + 1;
+
+      m_d[i].line = i;
+      m_d[i].XTOMOCHBERNAME = (*it)->getString("XTOMODATA_DATA.XTOMOCHBERNAME"); 
+      m_d[i].XTOMOSITE = (*it)->getString("XTOMODATA_DATA.XTOMOSITE"); 
+      m_d[i].XTOMOSITEID = (*it)->getInt("XTOMODATA_DATA.XTOMOSITEID");
+      m_d[i].XTOMOTIME = (*it)->getInt("XTOMODATA_DATA.XTOMOTIME"); 
+      m_d[i].XTOMOPASSED = (*it)->getInt("XTOMODATA_DATA.XTOMOPASSED");
+      m_d[i].XTOMOSIDE = (*it)->getString("XTOMODATA_DATA.XTOMOSIDE");
+      m_d[i].XTOMONBERTUBE1 = (*it)->getInt("XTOMODATA_DATA.XTOMONBERTUBE1");
+      m_d[i].XTOMONBERTUBE2 = (*it)->getInt("XTOMODATA_DATA.XTOMONBERTUBE2");
+      m_d[i].XTOMONBERML = (*it)->getInt("XTOMODATA_DATA.XTOMONBERML");
+      m_d[i].XTOMONBERLAYER = (*it)->getInt("XTOMODATA_DATA.XTOMONBERLAYER");
+      try {
+  m_d[i].XTOMOML1STAGG = (*it)->getInt("XTOMODATA_DATA.XTOMOML1STAGG");
+      } catch (std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
+      try {
+        m_d[i].XTOMOML2STAGG = (*it)->getInt("XTOMODATA_DATA.XTOMOML2STAGG");
+      } catch (std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
+      try {
+        m_d[i].XTOMOD1 = (*it)->getFloat("XTOMODATA_DATA.XTOMOD1");
+      } catch (std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
+      try {
+        m_d[i].XTOMONMEZ = (*it)->getInt("XTOMODATA_DATA.XTOMONMEZ");
+      } catch (std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
+      m_d[i].XTOMOML1NYTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1NYTUB");
+      m_d[i].XTOMOML1NZTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1NZTUB"); 
+      m_d[i].XTOMOML1NDELA = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1NDELA"); 
+      m_d[i].XTOMOML1NYPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1NYPIT"); 
+      m_d[i].XTOMOML1NZPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1NZPIT"); 
+      m_d[i].XTOMOML1PYTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1PYTUB"); 
+      m_d[i].XTOMOML1PZTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1PZTUB"); 
+      m_d[i].XTOMOML1PDELA = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1PDELA"); 
+      m_d[i].XTOMOML1PYPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1PYPIT"); 
+      m_d[i].XTOMOML1PZPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML1PZPIT"); 
+      m_d[i].XTOMOML2NYTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2NYTUB"); 
+      m_d[i].XTOMOML2NZTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2NZTUB"); 
+      m_d[i].XTOMOML2NDELA = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2NDELA"); 
+      m_d[i].XTOMOML2NYPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2NYPIT"); 
+      m_d[i].XTOMOML2NZPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2NZPIT"); 
+      m_d[i].XTOMOML2PYTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2PYTUB"); 
+      m_d[i].XTOMOML2PZTUB = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2PZTUB"); 
+      m_d[i].XTOMOML2PDELA = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2PDELA"); 
+      m_d[i].XTOMOML2PYPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2PYPIT"); 
+      m_d[i].XTOMOML2PZPIT = (*it)->getFloat("XTOMODATA_DATA.XTOMOML2PZPIT"); 
+  }
+}
+
 DblQ00Xtomo::~DblQ00Xtomo()
 {
     if  (m_nObj > 0 && m_d) delete [] m_d;
diff --git a/MuonSpectrometer/MuonGeoModel/CMakeLists.txt b/MuonSpectrometer/MuonGeoModel/CMakeLists.txt
index 4839ed8800f2..240ff7dc5909 100644
--- a/MuonSpectrometer/MuonGeoModel/CMakeLists.txt
+++ b/MuonSpectrometer/MuonGeoModel/CMakeLists.txt
@@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
                           MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
                           MuonSpectrometer/MuonGMdbObjects
+                          Amdcsimrec/AmdcDb
                           PRIVATE
                           Database/AthenaPOOL/AthenaPoolUtilities
                           Database/RDBAccessSvc
@@ -36,13 +37,13 @@ atlas_add_library( MuonGeoModelLib
                    src/*.cxx
                    PUBLIC_HEADERS MuonGeoModel
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects StoreGateLib SGtests MuonIdHelpersLib
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects StoreGateLib SGtests MuonIdHelpersLib AmdcDbLib
                    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils )
 
 atlas_add_component( MuonGeoModel
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel StoreGateLib SGtests GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils MuonIdHelpersLib MuonGeoModelLib )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel StoreGateLib SGtests GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils MuonIdHelpersLib MuonGeoModelLib AmdcDbLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
index 0fddbc2cf6a4..42c9d5169443 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
@@ -42,6 +42,7 @@ public:
   inline void setDBkey(std::string v);
   inline void setDBnode(std::string v);
 
+  inline void setAmdcDb(bool value);
   inline void setLayout(std::string );
   inline void setCutoutsFlag(int );
   inline void setCutoutsBogFlag(int );
@@ -75,6 +76,7 @@ private:
   std::string m_DBkey;
   std::string m_DBnode;
 
+  bool m_isAmdcDb;
   std::string m_layout;
   int m_includeCutouts;
   int m_includeCutoutsBog;
@@ -117,6 +119,7 @@ void MuonDetectorFactory001::setDBMuonVersion(std::string v) {m_DBMuonVersion =
 void MuonDetectorFactory001::setDBkey(std::string v) {m_DBkey = v;}
 void MuonDetectorFactory001::setDBnode(std::string v) {m_DBnode = v;}
 
+void MuonDetectorFactory001::setAmdcDb(bool value) {m_isAmdcDb = value;}
 void MuonDetectorFactory001::setLayout(std::string str) {m_layout = str;}
 void MuonDetectorFactory001::setCutoutsFlag(int flag) {m_includeCutouts = flag;}
 void MuonDetectorFactory001::setCutoutsBogFlag(int flag) {m_includeCutoutsBog = flag;}
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
index add78c6b2ff6..9e7b4eec6bde 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
@@ -39,7 +39,7 @@ private:
   std::string m_layout;
   int m_accessCondDb;
   int m_asciiCondData;
-  int m_nova;  
+  Gaudi::Property<int> m_amdcDb { this, "BuildFromAmdcDb", 0, "Build the geometry from AMDB file (expert only!)" };
   int m_includeCutouts;
   int m_includeCutoutsBog;
   int m_includeCtbBis;
diff --git a/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py b/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
index fe6438c95a89..d36058e1789c 100644
--- a/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
+++ b/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
@@ -1,11 +1,11 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 from AtlasGeoModel import GeoModelInit
 
 from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
 GeoModelSvc = GeoModelSvc()
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 GeoModelSvc.DetectorTools += [ MuonDetectorTool() ]
-GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0
-# GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = ""
 GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseConditionDb = 0
 GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseAsciiConditionData = 0
 GeoModelSvc.SupportedGeometry=21
diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
index 0f500c9f4117..12b0f35fea88 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
@@ -261,24 +261,18 @@ namespace MuonGM {
     log << " *** Start building the Muon Geometry Tree **********************"
         << endmsg;
 
-    DBReader* dbr = NULL;
     std::string OracleTag =  m_DBkey;
     std::string OracleNode = m_DBnode;
 
-    // Production Rome Final
-    // OracleTag = "ATLAS-Rome-Final-00";
-    // dbr = new RDBReaderAtlas(m_pDetStore, m_pRDBAccess, OracleTag, OracleNode);
-
     if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "calling RDBReaderAtlas with m_altAsciiDBMap" << endmsg;
 
-    dbr = new RDBReaderAtlas(
+    RDBReaderAtlas* dbr = new RDBReaderAtlas(
       m_pDetStore, m_pRDBAccess,
       OracleTag, OracleNode,
       m_dumpAlines, m_useCscIntAlinesFromGM, m_dumpCscIntAlines, &m_altAsciiDBMap
     );
 
-    RDBReaderAtlas* thisDbr = (RDBReaderAtlas*)dbr;
-    thisDbr->setControlCscIntAlines(m_controlCscIntAlines);
+    dbr->setControlCscIntAlines(m_controlCscIntAlines);
 
     // set here the flag deciding whether to include cutouts:
     // m_includeCutouts = 1 => include cutouts
@@ -384,78 +378,113 @@ namespace MuonGM {
     GeoLogVol*  l4;
     GeoPcon* c4 = new GeoPcon( 0, 360*Gaudi::Units::deg );
 
-    //--- --- --- CREATE ENVELOPE --- --- ---
-    // First try to get data from the GeomDB
-    IRDBRecordset_ptr muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem",OracleTag,OracleNode);
-
-    // -- Next two lines allow to use MuonSystem-00 by default instead of hardwired numbers
-    //    even for geometry tags where MuonSystem was not collected
-    if(muonSysRec->size()==0) {
-      muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem","MuonSystem-00");
-      log << MSG::INFO
-          << "MuonSystem description from default node in GeomDB, i.e. MuonSystem-00"
-          << endmsg;
+    if(m_isAmdcDb) {
+      log<< MSG::INFO <<" Using hardcoded envelope dimesions from MuonSystem-11 table" <<endmsg;
+      c4->addPlane(-26046. , 1050.  ,  1500.  );
+      c4->addPlane(-23001. , 1050.  ,  1500.  );
+      c4->addPlane(-23001. , 1050.  ,  2750.  );
+      c4->addPlane(-22030. , 1050.  ,  2750.  );
+      c4->addPlane(-22030. ,  436.  , 12650.  );
+      c4->addPlane(-18650. ,  436.  , 12650.  );
+      c4->addPlane(-18650. ,  279.  , 13400.  );
+      c4->addPlane(-12900. ,  279.  , 13400.  );
+      c4->addPlane(-12900. ,   70.  , 13910.  );
+      c4->addPlane( -6783. ,   70.  , 13910.  );
+      c4->addPlane( -6783. ,  420.  , 13910.  );
+      c4->addPlane( -6736. ,  420.  , 13910.  );
+      c4->addPlane( -6736. , 3800.  , 13910.  );
+      c4->addPlane( -6550. , 3800.  , 13910.  );
+      c4->addPlane( -6550. , 4255.  , 13000.  );
+      c4->addPlane(  6550. , 4255.  , 13000.  );
+      c4->addPlane(  6550. , 3800.  , 13910.  );
+      c4->addPlane(  6736. , 3800.  , 13910.  );
+      c4->addPlane(  6736. ,  420.  , 13910.  );
+      c4->addPlane(  6783. ,  420.  , 13910.  );
+      c4->addPlane(  6783. ,   70.  , 13910.  );
+      c4->addPlane( 12900. ,   70.  , 13910.  );
+      c4->addPlane( 12900. ,  279.  , 13400.  );
+      c4->addPlane( 18650. ,  279.  , 13400.  );
+      c4->addPlane( 18650. ,  436.  , 12650.  );
+      c4->addPlane( 22030. ,  436.  , 12650.  );
+      c4->addPlane( 22030. , 1050.  ,  2750.  );
+      c4->addPlane( 23001. , 1050.  ,  2750.  );
+      c4->addPlane( 23001. , 1050.  ,  1500.  );
+      c4->addPlane( 26046. , 1050.  ,  1500.  );         
     } else {
-      log << MSG::INFO
-          << "MuonSystem description from OracleTag=<" << OracleTag << "> and node=<" << OracleNode << ">"
-          << endmsg;
-    }
 
-    // --- Envelope from DB ....
-    if(muonSysRec->size()!=0) {
-      // Data retrieved
-      muonsysIndMap indmap;
-      muonsysIndMap::const_iterator iter;
-      const IRDBRecord* currentRecord;
-
-      // First fill the contents of muonsysIndMap
-      for (unsigned int ind=0; ind<muonSysRec->size(); ind++) {
-        int key = (*muonSysRec)[ind]->getInt("PLANE_ID");
-        indmap[key] = ind;
+      //--- --- --- CREATE ENVELOPE --- --- ---
+      // First try to get data from the GeomDB
+      IRDBRecordset_ptr muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem",OracleTag,OracleNode);
+
+      // -- Next two lines allow to use MuonSystem-00 by default instead of hardwired numbers
+      //    even for geometry tags where MuonSystem was not collected
+      if(muonSysRec->size()==0) {
+        muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem","MuonSystem-00");
+        log << MSG::INFO
+            << "MuonSystem description from default node in GeomDB, i.e. MuonSystem-00"
+            << endmsg;
+      } else {
+        log << MSG::INFO
+            << "MuonSystem description from OracleTag=<" << OracleTag << "> and node=<" << OracleNode << ">"
+            << endmsg;
       }
 
-      // Create the polycone
-      for(unsigned int ind=0; ind<indmap.size(); ind++) {
-        iter = indmap.find(ind);
-
-        if(iter==indmap.end()) {
-          throw std::runtime_error("Error in MuonDetectorFactory, missing plane in MuonSystem");
-        } else {
-          currentRecord = (*muonSysRec)[(*iter).second];
-          c4->addPlane(currentRecord->getDouble("ZPLANE"),
-                       currentRecord->getDouble("RMIN"),
-                       currentRecord->getDouble("RMAX"));
+      // --- Envelope from DB ....
+      if(muonSysRec->size()!=0) {
+        // Data retrieved
+        muonsysIndMap indmap;
+        muonsysIndMap::const_iterator iter;
+        const IRDBRecord* currentRecord;
+
+        // First fill the contents of muonsysIndMap
+        for (unsigned int ind=0; ind<muonSysRec->size(); ind++) {
+          int key = (*muonSysRec)[ind]->getInt("PLANE_ID");
+          indmap[key] = ind;
         }
-      }
-    } else {// ... end if  Envelope from DB ---
-      // Muon System node is not present, go for handcoded version
-      log << MSG::INFO
-          << "MuonSystem description not available in GeomDB - using hard-wired description"
-          << endmsg;
-
-      double ir   = m_muon->barrelInnerRadius;
-      double pir  = m_muon->innerRadius;
-      double orad = m_muon->outerRadius;
-      double l    = m_muon->length;
-      double eff  = m_muon->endcapFrontFace;
-
-      double extraR = m_muon->extraR;
-      double extraZ = m_muon->extraZ;
-
 
-      c4->addPlane(     -l, pir, extraR);
-      c4->addPlane(-extraZ, pir, extraR);
-      c4->addPlane(-extraZ, pir, orad);
-
-      c4->addPlane(-eff, pir, orad);
-      c4->addPlane(-eff,  ir, orad);
-      c4->addPlane(+eff,  ir, orad);
-      c4->addPlane(+eff, pir, orad);
-
-      c4->addPlane(extraZ, pir, orad);
-      c4->addPlane(extraZ, pir, extraR);
-      c4->addPlane(     l, pir, extraR);
-    } // ... end if  Envelope from DB ---
+        // Create the polycone
+        for(unsigned int ind=0; ind<indmap.size(); ind++) {
+          iter = indmap.find(ind);
+
+          if(iter==indmap.end()) {
+            throw std::runtime_error("Error in MuonDetectorFactory, missing plane in MuonSystem");
+          } else {
+            currentRecord = (*muonSysRec)[(*iter).second];
+            c4->addPlane(currentRecord->getDouble("ZPLANE"),
+                         currentRecord->getDouble("RMIN"),
+                         currentRecord->getDouble("RMAX"));
+          }
+        }
+      } else {// ... end if  Envelope from DB ---
+        // Muon System node is not present, go for handcoded version
+        log << MSG::INFO
+            << "MuonSystem description not available in GeomDB - using hard-wired description"
+            << endmsg;
+
+        double ir   = m_muon->barrelInnerRadius;
+        double pir  = m_muon->innerRadius;
+        double orad = m_muon->outerRadius;
+        double l    = m_muon->length;
+        double eff  = m_muon->endcapFrontFace;
+
+        double extraR = m_muon->extraR;
+        double extraZ = m_muon->extraZ;
+
+
+        c4->addPlane(     -l, pir, extraR);
+        c4->addPlane(-extraZ, pir, extraR);
+        c4->addPlane(-extraZ, pir, orad);
+
+        c4->addPlane(-eff, pir, orad);
+        c4->addPlane(-eff,  ir, orad);
+        c4->addPlane(+eff,  ir, orad);
+        c4->addPlane(+eff, pir, orad);
+
+        c4->addPlane(extraZ, pir, orad);
+        c4->addPlane(extraZ, pir, extraR);
+        c4->addPlane(     l, pir, extraR);
+      } // ... end if  Envelope from DB ---
+    } // end if not m_isAmdcDb
 
     l4 = new GeoLogVol( "MuonSys", c4, m4 );
 
diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
index 5e5cfb481243..1e410e8a7ff1 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
@@ -2,27 +2,25 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "MuonGeoModel/MuonDetectorTool.h" 
-// #include "MuonGeoModel/MuonDetectorFactory001.h"
+#include "MuonGeoModel/MuonDetectorTool.h"
+
 #include "MuonGeoModel/StationSelector.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/TgcReadoutElement.h"
 #include "MuonDetDescrUtils/MuonSectorMapping.h"
-
 #include "GeoModelInterfaces/IGeoModelSvc.h"
 #include "GeoModelUtilities/GeoModelExperiment.h"
 #include "GeoModelInterfaces/StoredMaterialManager.h"
 #include "GeoModelKernel/GeoPhysVol.h"
 #include "GeoModelKernel/GeoPerfUtils.h"
-
 #include "RDBAccessSvc/IRDBAccessSvc.h"
 #include "RDBAccessSvc/IRDBRecord.h"
 #include "RDBAccessSvc/IRDBRecordset.h"
-
+#include "AmdcDb/AmdcDb.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "AthenaKernel/ClassID_traits.h"
 
 #include <fstream>
-#include "AthenaKernel/ClassID_traits.h"
 
 using namespace MuonGM;
 
@@ -34,7 +32,6 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string&
       m_layout("R.08"),
       m_accessCondDb(1),
       m_asciiCondData(0),
-      m_nova(0),
       m_includeCutouts(0),
       m_includeCutoutsBog(0),
       m_includeCtbBis(0),
@@ -63,7 +60,6 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string&
     declareProperty("LayoutName"			, m_layout );
     declareProperty("UseConditionDb"			, m_accessCondDb);
     declareProperty("UseAsciiConditionData"		, m_asciiCondData);
-    declareProperty("BuildFromNova",m_nova);
     declareProperty("IncludeCutouts"			, m_includeCutouts);
     declareProperty("IncludeCutoutsBog"			, m_includeCutoutsBog);
     declareProperty("IncludeCtbBis"			, m_includeCtbBis);
@@ -320,22 +316,31 @@ MuonDetectorTool::createFactory(MuonDetectorFactory001& theFactory) const
   
   if ( 0 == m_detector ) {
     IRDBAccessSvc* access = 0;
-    ATH_CHECK(service("RDBAccessSvc",access));
-    
-    // MuonDetectorFactory001 theFactory(detStore().operator->());
-    
+    if(m_amdcDb) ATH_CHECK(service("AmdcDb",access));
+    else ATH_CHECK(service("RDBAccessSvc",access));
+ 
+    bool isAmdcDb = false;
+    if( dynamic_cast<AmdcDb*>(access) && m_amdcDb) {
+      ATH_MSG_INFO("AmdcDb is used instead of RDBAccessSvc");
+      AmdcDb* p_access = dynamic_cast<AmdcDb*>(access);
+      isAmdcDb = true;
+      if (p_access->InitializedSvc()) {
+        ATH_MSG_INFO("AmdcDb->InitializedSvc() is true") ;
+      }else{
+        ATH_MSG_INFO("AmdcDb->InitializedSvc() is false");
+        if(p_access->initialize()) ATH_MSG_INFO("Now it's initialized. Go ahead and use it!");
+        ATH_MSG_INFO("\t\t BUT PAY ATTENTION THE HARD WIRED ENVELOPE IS USED (see MuonDetectorFactory001.cxx)!!");
+      }
+    }
+
     theFactory.setDBAtlasVersion(AtlasVersion);
     theFactory.setDBMuonVersion(MuonVersion);
     theFactory.setDBkey( detectorKey );
     theFactory.setDBnode(detectorNode);
     theFactory.setABLinesAsciiSideA(m_NSWABLinesAsciiSideA);
     theFactory.setABLinesAsciiSideC(m_NSWABLinesAsciiSideC);
-    
-    // theFactory.setLayout(m_layout);
+    theFactory.setAmdcDb(isAmdcDb);
     theFactory.setLayout(tempLayout);
-    //theFactory.setIncludeInertMats(m_includeInertMaterials);
-    //theFactory.setIdhFromCnv(m_idhfromconverters);
-    //theFactory.setMinimalGeoFlag(m_minimalgeo);
     theFactory.setCutoutsFlag(m_includeCutouts);
     theFactory.setCutoutsBogFlag(m_includeCutoutsBog);
     theFactory.setCtbBisFlag(m_includeCtbBis);
diff --git a/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx b/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx
index 2945716c04f8..0bc1b2a361e8 100755
--- a/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-
 #include "MuonGeoModel/RDBReaderAtlas.h"
+
 #include "MuonReadoutGeometry/GlobalUtilities.h"
 #include "MuonGeoModel/StationSelector.h"
 #include "MuonGeoModel/MdtComponent.h"
@@ -14,7 +14,7 @@
 #include "RDBAccessSvc/IRDBQuery.h"
 #include "MuonReadoutGeometry/TgcReadoutParams.h"
 #include "GaudiKernel/SystemOfUnits.h"
-
+#include "AmdcDb/AmdcDb.h"
 #include "MuonGeoModel/TGC_Technology.h"
 
 namespace MuonGM {
@@ -26,96 +26,212 @@ RDBReaderAtlas::RDBReaderAtlas(StoreGateSvc *pDetStore, IRDBAccessSvc* pRDBAcces
                                bool dumpCscInternalAlinesFromOracle,
                                const std::map<std::string,std::string>* asciiFileDBMap):
   DBReader(pDetStore),
+  m_controlCscIntAlines(0),
+  m_dhdbam(nullptr),
+  m_dbam(nullptr),
+  m_dhatyp(nullptr),
+  m_atyp(nullptr),
+  m_dhasmp(nullptr),
+  m_asmp(nullptr),
+  m_dhalmn(nullptr),
+  m_almn(nullptr),
+  m_dhaptp(nullptr),
+  m_aptp(nullptr),
+  m_dhwrpc(nullptr),
+  m_wrpc(nullptr),
+  m_dhwtgc(nullptr),
+  m_wtgc(nullptr),
+  m_dhacut(nullptr),
+  m_acut(nullptr),
+  m_dhalin(nullptr),
+  m_alin(nullptr),
+  m_dhwmdt(nullptr),
+  m_wmdt(nullptr),
+  m_dhwcsc(nullptr),
+  m_wcsc(nullptr),
+  m_dhwrpcall(nullptr),
+  m_wrpcall(nullptr),
+  m_dhwtgcall(nullptr),
+  m_wtgcall(nullptr),
+  m_dhwded(nullptr),
+  m_wded(nullptr),
+  m_dhwsup(nullptr),
+  m_wsup(nullptr),
+  m_dhwspa(nullptr),
+  m_wspa(nullptr),
+  m_dhwchv(nullptr),
+  m_wchv(nullptr),
+  m_dhwcro(nullptr),
+  m_wcro(nullptr),
+  m_dhwcmi(nullptr),
+  m_wcmi(nullptr),
+  m_dhwlbi(nullptr),
+  m_wlbi(nullptr),
+  m_dhaszt(nullptr),
+  m_aszt(nullptr),
+  m_dhiacsc(nullptr),
+  m_iacsc(nullptr),
+  m_dhxtomo(nullptr),
+  m_xtomo(nullptr),
   m_geoTag(geoTag),
   m_geoNode(geoNode),
   m_pRDBAccess(pRDBAccess),
   m_useICSCAlines(useCscInternalAlinesFromOracle)
 {
-
-  m_controlCscIntAlines = 0;
   m_msgSvc = Athena::getMessageSvc();
   MsgStream log(m_msgSvc, "MuGM:RDBReadAtlas");
   m_SCdbaccess = StatusCode::FAILURE;
 
-  log << MSG::INFO
+  AmdcDb* theAmdcDb = dynamic_cast<AmdcDb*>(m_pRDBAccess);
+  if(theAmdcDb) {
+    log<<MSG::INFO<<"You are now using tables provided by the AmdcDb!!"<<endmsg;
+  } else {
+    log << MSG::INFO
       << "Start retriving dbObjects with tag = <" << geoTag << "> node <" << geoNode << ">"
       << endmsg;
+  }
   // here putting RDB data in private "objects" form
   std::unique_ptr<IRDBQuery> dbdata;
-  dbdata = m_pRDBAccess->getQuery("ATYP",geoTag,geoNode);
-  m_dhatyp = new DblQ00Atyp(std::move(dbdata));
-
+  if(theAmdcDb) {
+    m_dhatyp = new DblQ00Atyp(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ATYP",geoTag,geoNode);
+    m_dhatyp = new DblQ00Atyp(std::move(dbdata));
+  }
   m_atyp = m_dhatyp->data();
-  dbdata = m_pRDBAccess->getQuery("ASMP",geoTag,geoNode);
-  m_dhasmp = new DblQ00Asmp(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhasmp = new DblQ00Asmp(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ASMP",geoTag,geoNode);
+    m_dhasmp = new DblQ00Asmp(std::move(dbdata));
+  }
   m_asmp = m_dhasmp->data();
-  dbdata = m_pRDBAccess->getQuery("ALMN",geoTag,geoNode);
-  m_dhalmn = new DblQ00Almn(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhalmn = new DblQ00Almn(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ALMN",geoTag,geoNode);
+    m_dhalmn = new DblQ00Almn(std::move(dbdata));
+  }
   m_almn = m_dhalmn->data();
-  dbdata = m_pRDBAccess->getQuery("APTP",geoTag,geoNode);
-  m_dhaptp = new DblQ00Aptp(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhaptp = new DblQ00Aptp(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("APTP",geoTag,geoNode);
+    m_dhaptp = new DblQ00Aptp(std::move(dbdata));
+  }
   m_aptp = m_dhaptp->data();
-  dbdata = m_pRDBAccess->getQuery("ACUT",geoTag,geoNode);
-  m_dhacut = new DblQ00Acut(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhacut = new DblQ00Acut(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ACUT",geoTag,geoNode);
+    m_dhacut = new DblQ00Acut(std::move(dbdata));
+  }
   m_acut = m_dhacut->data();
-  dbdata = m_pRDBAccess->getQuery("ALIN",geoTag,geoNode);
-  m_dhalin = new DblQ00Alin(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhalin = new DblQ00Alin(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ALIN",geoTag,geoNode);
+    m_dhalin = new DblQ00Alin(std::move(dbdata));
+  }
   m_alin = m_dhalin->data();
-  dbdata = m_pRDBAccess->getQuery("DBAM",geoTag,geoNode);
-  m_dhdbam = new DblQ00Dbam(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhdbam = new DblQ00Dbam(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("DBAM",geoTag,geoNode);
+    m_dhdbam = new DblQ00Dbam(std::move(dbdata));
+  }
   m_dbam = m_dhdbam->data();
-  dbdata = m_pRDBAccess->getQuery("AWLN",geoTag,geoNode);
-  m_dhwrpc = new DblQ00Awln(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwrpc = new DblQ00Awln(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("AWLN",geoTag,geoNode);
+    m_dhwrpc = new DblQ00Awln(std::move(dbdata));
+  }
   m_wrpc= m_dhwrpc->data();
-  dbdata = m_pRDBAccess->getQuery("ATLN",geoTag,geoNode);
-  m_dhwtgc = new DblQ00Atln(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwtgc = new DblQ00Atln(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("ATLN",geoTag,geoNode);
+    m_dhwtgc = new DblQ00Atln(std::move(dbdata));
+  }
   m_wtgc= m_dhwtgc->data();
-  dbdata = m_pRDBAccess->getQuery("WMDT",geoTag,geoNode);
-  m_dhwmdt = new DblQ00Wmdt(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwmdt = new DblQ00Wmdt(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WMDT",geoTag,geoNode);
+    m_dhwmdt = new DblQ00Wmdt(std::move(dbdata));
+  }
   m_wmdt= m_dhwmdt->data();
-  dbdata = m_pRDBAccess->getQuery("WCSC",geoTag,geoNode);
-  m_dhwcsc = new DblQ00Wcsc(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwcsc = new DblQ00Wcsc(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WCSC",geoTag,geoNode);
+    m_dhwcsc = new DblQ00Wcsc(std::move(dbdata));
+  }
   m_wcsc= m_dhwcsc->data();
-  dbdata = m_pRDBAccess->getQuery("WRPC",geoTag,geoNode);
-  m_dhwrpcall = new DblQ00Wrpc(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwrpcall = new DblQ00Wrpc(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WRPC",geoTag,geoNode);
+    m_dhwrpcall = new DblQ00Wrpc(std::move(dbdata));
+  }
   m_wrpcall= m_dhwrpcall->data();
-  dbdata = m_pRDBAccess->getQuery("WTGC",geoTag,geoNode);
-  m_dhwtgcall = new DblQ00Wtgc(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwtgcall = new DblQ00Wtgc(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WTGC",geoTag,geoNode);
+    m_dhwtgcall = new DblQ00Wtgc(std::move(dbdata));
+  }
   m_wtgcall= m_dhwtgcall->data();
-  dbdata = m_pRDBAccess->getQuery("WSPA",geoTag,geoNode);
-  m_dhwspa = new DblQ00Wspa(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwspa = new DblQ00Wspa(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WSPA",geoTag,geoNode);
+    m_dhwspa = new DblQ00Wspa(std::move(dbdata));
+  }
   m_wspa= m_dhwspa->data();
-  dbdata = m_pRDBAccess->getQuery("WDED",geoTag,geoNode);
-  m_dhwded = new DblQ00Wded(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwded = new DblQ00Wded(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WDED",geoTag,geoNode);
+    m_dhwded = new DblQ00Wded(std::move(dbdata));
+  }
   m_wded= m_dhwded->data();
-  dbdata = m_pRDBAccess->getQuery("WSUP",geoTag,geoNode);
-  m_dhwsup = new DblQ00Wsup(std::move(dbdata));
 
+  if(theAmdcDb) {
+    m_dhwsup = new DblQ00Wsup(theAmdcDb);
+  } else {
+    dbdata = m_pRDBAccess->getQuery("WSUP",geoTag,geoNode);
+    m_dhwsup = new DblQ00Wsup(std::move(dbdata));
+  }
   m_wsup= m_dhwsup->data();
+
   // Mdt AsBuilt parameters
-  dbdata = m_pRDBAccess->getQuery("XtomoData",geoTag,geoNode);
-  log << MSG::INFO << "After getQuery XtomoData" << endmsg;
-  m_dhxtomo = new DblQ00Xtomo(std::move(dbdata));
-  log << MSG::INFO << "After new DblQ00Xtomo" << endmsg;
-  m_xtomo = m_dhxtomo->data();
-  log << MSG::INFO << "After m_dhxtomo.data()" << endmsg;
+  if(theAmdcDb) {
+    log << MSG::INFO << "skipping XtomoData" << endmsg;
+  } else {
+    dbdata = m_pRDBAccess->getQuery("XtomoData",geoTag,geoNode);
+    log << MSG::INFO << "After getQuery XtomoData" << endmsg;
+    m_dhxtomo = new DblQ00Xtomo(std::move(dbdata));
+    log << MSG::INFO << "After new DblQ00Xtomo" << endmsg;
+  }
+  if(m_dhxtomo) m_xtomo = m_dhxtomo->data();
 
   // ASZT
-  m_dhaszt = 0;
   if (asciiFileDBMap!=0 &&
       asciiFileDBMap->find("ASZT") != asciiFileDBMap->end()) {
 
@@ -138,28 +254,31 @@ RDBReaderAtlas::RDBReaderAtlas(StoreGateSvc *pDetStore, IRDBAccessSvc* pRDBAcces
   if (m_dhaszt==0 || m_dhaszt->size()==0) {
     log << MSG::INFO << "No Ascii aszt input found: looking for A-lines in ORACLE" << endmsg;
 
-    dbdata = m_pRDBAccess->getQuery("ASZT",geoTag,geoNode);
-    if (!dbdata) {
-      m_dhaszt = new DblQ00Aszt();
-      log << MSG::INFO << "No ASZT table in Oracle" << endmsg;
+    if(theAmdcDb){
+      m_dhaszt = new DblQ00Aszt(theAmdcDb);
     } else {
-      log << MSG::INFO << "ASZT table found in Oracle" << endmsg;
-      m_dhaszt = new DblQ00Aszt(std::move(dbdata));
-      log << MSG::INFO << "ASZT size is " << m_dhaszt->size() << endmsg;
+      dbdata = m_pRDBAccess->getQuery("ASZT",geoTag,geoNode);
+      if (!dbdata) {
+        m_dhaszt = new DblQ00Aszt();
+        log << MSG::INFO << "No ASZT table in Oracle" << endmsg;
+      } else {
+        log << MSG::INFO << "ASZT table found in Oracle" << endmsg;
+        m_dhaszt = new DblQ00Aszt(std::move(dbdata));
+        log << MSG::INFO << "ASZT size is " << m_dhaszt->size() << endmsg;
+      }
     }
   } else {
     log << MSG::INFO << "ASZT table in Oracle, if any, will not be read" << endmsg;
   }
-  m_aszt= m_dhaszt->data();
+  if(m_dhaszt) m_aszt = m_dhaszt->data();
 
   //
-  if (dumpAlinesFromOracle) {
+  if (dumpAlinesFromOracle && m_dhaszt) {
     log << MSG::DEBUG << "writing ASZT values to file" << endmsg;
     m_dhaszt->WriteAsztToAsciiFile("aszt_fromAscii_or_Oracle.txt");
   }
 
   // Internal CSC Alignment parameters
-  m_dhiacsc = 0;
   if (asciiFileDBMap!=0 &&
       asciiFileDBMap->find("IACSC") != asciiFileDBMap->end()) {
 
@@ -181,52 +300,60 @@ RDBReaderAtlas::RDBReaderAtlas(StoreGateSvc *pDetStore, IRDBAccessSvc* pRDBAcces
     log << MSG::INFO << "No Ascii iacsc input found: looking for A-lines in ORACLE" << endmsg;
     dbdata = m_pRDBAccess->getQuery("ISZT",geoTag,geoNode);
 
-    if (!dbdata) {
-      m_dhiacsc = new DblQ00IAcsc();
-      log << MSG::INFO << "No ISZT table in Oracle" << endmsg;
+    if(theAmdcDb){
+      log << MSG::INFO << "skipping ISZT" << endmsg;
+      m_dhiacsc = nullptr;
     } else {
-      log << MSG::INFO << "ISZT table found in Oracle" << endmsg;
-      m_dhiacsc = new DblQ00IAcsc(std::move(dbdata));
+      if (!dbdata) {
+        m_dhiacsc = new DblQ00IAcsc();
+        log << MSG::INFO << "No ISZT table in Oracle" << endmsg;
+      } else {
+        log << MSG::INFO << "ISZT table found in Oracle" << endmsg;
+        m_dhiacsc = new DblQ00IAcsc(std::move(dbdata));
+      }
     }
-
   } else {
     log << MSG::INFO << "ISZT table in Oracle, if any, will not be read" << endmsg;
   }
-  m_iacsc= m_dhiacsc->data();
+  if(m_dhiacsc) m_iacsc = m_dhiacsc->data();
 
   //
-  if (dumpCscInternalAlinesFromOracle) {
+  if (dumpCscInternalAlinesFromOracle && m_dhiacsc) {
     log << MSG::DEBUG << "writing ISZT values to file" << endmsg;
     m_dhiacsc->WriteIAcscToAsciiFile("IAcsc_fromAscii_or_Oracle.txt");
   }
 
-  if (geoTag != "ATLAS-00") {
+  if(theAmdcDb) {
+    m_dhwchv = new DblQ00Wchv(theAmdcDb);
+  } else {
     dbdata = m_pRDBAccess->getQuery("WCHV",geoTag,geoNode);
     m_dhwchv = new DblQ00Wchv(std::move(dbdata));
+  }
+  m_wchv= m_dhwchv->data();
 
-    m_wchv= m_dhwchv->data();
+  if(theAmdcDb) {
+    m_dhwcro = new DblQ00Wcro(theAmdcDb);
+  } else {
     dbdata = m_pRDBAccess->getQuery("WCRO",geoTag,geoNode);
     m_dhwcro = new DblQ00Wcro(std::move(dbdata));
+  }
+  m_wcro= m_dhwcro->data();
 
-    m_wcro= m_dhwcro->data();
+  if(theAmdcDb) {
+    m_dhwcmi = new DblQ00Wcmi(theAmdcDb);
+  } else {
     dbdata = m_pRDBAccess->getQuery("WCMI",geoTag,geoNode);
     m_dhwcmi = new DblQ00Wcmi(std::move(dbdata));
+  }
+  m_wcmi= m_dhwcmi->data();
 
-    m_wcmi= m_dhwcmi->data();
+  if(theAmdcDb) {
+    m_dhwlbi = new DblQ00Wlbi(theAmdcDb);
+  } else {
     dbdata = m_pRDBAccess->getQuery("WLBI",geoTag,geoNode);
     m_dhwlbi = new DblQ00Wlbi(std::move(dbdata));
-
-    m_wlbi= m_dhwlbi->data();
-  } else {
-    m_dhwchv = NULL;
-    m_wchv = NULL;
-    m_dhwcro = NULL;
-    m_wcro = NULL;
-    m_dhwcmi = NULL;
-    m_wcmi = NULL;
-    m_dhwlbi = NULL;
-    m_wlbi = NULL;
   }
+  m_wlbi= m_dhwlbi->data();
 
   // everything fetched
   m_SCdbaccess = StatusCode::SUCCESS;
@@ -266,7 +393,7 @@ StatusCode RDBReaderAtlas::ProcessDB()
   }
 
   // Process Alignements
-  if (m_dhaszt->size() >0) {
+  if (m_dhaszt && m_dhaszt->size() >0) {
     MuonGM::ProcessAlignements(m_dhaszt, m_aszt);
   }
 
@@ -274,12 +401,12 @@ StatusCode RDBReaderAtlas::ProcessDB()
   RDBReaderAtlas::ProcessTGCreadout();
 
   // Process CSC Internal Alignements
-  if (m_dhiacsc->size() >0 && m_useICSCAlines) {
+  if (m_dhiacsc && m_dhiacsc->size() >0 && m_useICSCAlines) {
     ProcessCscInternalAlignments();
   }
 
   // Proccess Mdt AsBuilt parameters
-  if (m_dhxtomo->size() > 0) {
+  if (m_dhxtomo && m_dhxtomo->size() > 0) {
     ProcessMdtAsBuiltParams();
   }
 
@@ -490,12 +617,17 @@ void RDBReaderAtlas::ProcessTGCreadout () {
     //
     // in case of layout Q and following
     //
-    // if (m_geoTag == "ATLAS-01") ggln = m_pRDBAccess->getRecordset("GGLN","GGLN-02");
-    // else ggln = m_pRDBAccess->getRecordset("GGLN",m_geoTag,m_geoNode);
+    AmdcDb* theAmdcDb = dynamic_cast<AmdcDb*>(m_pRDBAccess);
     IRDBRecordset_ptr ggln = m_pRDBAccess->getRecordsetPtr("GGLN",m_geoTag,m_geoNode);
+    if (theAmdcDb) ggln = theAmdcDb->getRecordsetPtr("GGLN",m_geoTag,m_geoNode);
+
+    int version(0);
+    float wirespacing(0);
+    if(ggln->size()){
+      version = (int) (*ggln)[0]->getInt("VERS");
+      wirespacing = (*ggln)[0]->getFloat("WIRESP")*Gaudi::Units::mm;
+    }
 
-    int version = (int) (*ggln)[0]->getInt("VERS");
-    float wirespacing = (*ggln)[0]->getFloat("WIRESP")*Gaudi::Units::mm;
     log << MSG::INFO
         << " ProcessTGCreadout - version " << version << " wirespacing " << wirespacing << endmsg;
 
diff --git a/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py b/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
index 778c1f79e5f7..eefaa27f36dd 100644
--- a/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
+++ b/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-#----
 include ( "DetDescrCnvSvc/DetStore_joboptions.py" )
 theApp.setup( NO_EVSEL )
 
@@ -8,26 +7,13 @@ theApp.setup( NO_EVSEL )
 #(0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
 MessageSvc.OutputLevel = 3
 
-#----
-#DetDescrVersion = "Rome-Final"
 include ( "AtlasGeoModel/SetGeometryVersion.py" )
 theApp.Dlls += [ "GeoModelSvc" ]
 theApp.ExtSvc += [ "GeoModelSvc"]
 include( "AtlasGeoModel/MuonGeoModel.py" )
 
-#include( "NovaCnvSvc/NovaCnvSvc_jobOptions.py" )
-#include( "NovaConverters/NovaConverters_jobOptions.py" )
-#GeoModelSvc = Service("GeoModelSvc")
-#GeoModelSvc.Detectors += [ "MuonDetectorTool" ]
-## options 
-#GeoModelSvc.MuonDetectorTool.BuildFromNova = 1
-#NovaCnvSvc.Version = 1
-
 theApp.EvtSel = "EventSelector";
 theApp.EvtMax = 0;
-#EventSelector = Service ("EventSelector");
-#EventSelector.firstRun=1;
-#EventSelector.lastRun=10000;
 
 theApp.DLLs += [ "MuonGeoModelTest"]
 
diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt
index 20caeb65b6c9..ae9ce6dae546 100644
--- a/Projects/AthSimulation/package_filters.txt
+++ b/Projects/AthSimulation/package_filters.txt
@@ -239,6 +239,10 @@
 + MagneticField/MagFieldUtils
 + MagneticField/MagFieldConditions
 + MagneticField/MagFieldElements
++ MuonSpectrometer/Amdcsimrec/AmdcAth
++ MuonSpectrometer/Amdcsimrec/AmdcCore
++ MuonSpectrometer/Amdcsimrec/AmdcDb
++ MuonSpectrometer/Amdcsimrec/AmdcStand
 + MuonSpectrometer/MuonAlignment/MuonAlignmentData
 + MuonSpectrometer/MuonCnv/MuonIdCnv
 + MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool
-- 
GitLab


From 5de6f460e662ee3ff78707e0119e49fbfe69dda8 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 9 Jun 2020 19:29:10 +0100
Subject: [PATCH 090/266] TrkKalmanFilter make EventContext Aware

---
 .../IKalmanPiecewiseAnnealingFilter.h         |   4 +-
 .../TrkKalmanFitter/ForwardKalmanFitter.h     |   2 +-
 .../ForwardRefTrackKalmanFitter.h             |   2 +-
 .../TrkKalmanFitter/KalmanFitter.h            | 120 ++++---
 .../KalmanPiecewiseAnnealingFilter.h          |   4 +-
 .../src/ForwardKalmanFitter.cxx               |   2 +-
 .../src/ForwardRefTrackKalmanFitter.cxx       |   2 +-
 .../TrkKalmanFitter/src/KalmanFitter.cxx      | 297 ++++++++++--------
 .../src/KalmanOutlierLogic.cxx                |   2 +-
 .../src/KalmanOutlierRecovery_InDet.cxx       |   6 +-
 .../src/KalmanPiecewiseAnnealingFilter.cxx    |   4 +-
 .../src/MeasRecalibSteeringTool.cxx           |  14 +-
 12 files changed, 262 insertions(+), 197 deletions(-)

diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IKalmanPiecewiseAnnealingFilter.h b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IKalmanPiecewiseAnnealingFilter.h
index 37bf69d7ed95..ae690a90cfeb 100644
--- a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IKalmanPiecewiseAnnealingFilter.h
+++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IKalmanPiecewiseAnnealingFilter.h
@@ -38,13 +38,13 @@ namespace Trk
 
     /** @brief run DAF on the full trajectory, starting from first fittable state and
                parameters therein, do not do last smoother */
-    virtual const FitterStatusCode
+    virtual FitterStatusCode
       filterTrajectory (Trajectory& trajectory,
                         const ParticleHypothesis& ) const =0;
 
     /** @brief run DAT on a piece of the current trajectory, starting from start and
                until size is reached, modifying the pred/upd parameters, do not do last smoother  */
-    virtual const FitterStatusCode
+    virtual FitterStatusCode
       filterTrajectoryPiece (Trajectory& trajectory,
                              Trajectory::iterator&,
                              const TrackParameters*&,
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardKalmanFitter.h b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardKalmanFitter.h
index 5626b399f11d..3354b335bbf9 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardKalmanFitter.h
+++ b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardKalmanFitter.h
@@ -129,7 +129,7 @@ private:
                                   ProtoTrackStateOnSurface*) const;
 
     //! internal method printing the current state
-    void printGlobalParams(int istate, std::string ptype,
+    void printGlobalParams(int istate, const std::string& ptype,
                            const TrackParameters*,
                            const DNA_MaterialEffects* = nullptr) const;
 
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardRefTrackKalmanFitter.h b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardRefTrackKalmanFitter.h
index 5e1ef675f133..6b0a3dc0b939 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardRefTrackKalmanFitter.h
+++ b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/ForwardRefTrackKalmanFitter.h
@@ -105,7 +105,7 @@ public:
 private:
 		
     //! internal method printing the current state
-    void printGlobalParams(int istate, std::string ptype,
+    void printGlobalParams(int istate, const std::string& ptype,
                            const TrackParameters&,
                            const AmgVector(5)&) const;
 
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanFitter.h b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanFitter.h
index 6b405e93df0f..91a6991ce9ac 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanFitter.h
+++ b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanFitter.h
@@ -16,6 +16,7 @@
 
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "TrkEventUtils/TrkParametersComparisonFunction.h"
 #include "TrkFitterUtils/ProtoTrackStateOnSurface.h"
@@ -34,7 +35,7 @@
 
 #include "GeoPrimitives/GeoPrimitives.h"
 #include <array>
-
+#include <memory>
 class AtlasDetectorID;            //!< to identify measurements
 
 namespace Trk {
@@ -81,45 +82,51 @@ namespace Trk {
     using ITrackFitter::fit;
 
     //! refit a track
-    virtual Track* fit(const Track&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     //! fit a set of PrepRawData objects
-    virtual Track* fit(const PrepRawDataSet&,
-                       const TrackParameters&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
-    
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const PrepRawDataSet&,
+      const TrackParameters&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
     //! fit a set of MeasurementBase objects
-    virtual Track* fit(const MeasurementSet&,
-                       const TrackParameters&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
-    
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const MeasurementSet&,
+      const TrackParameters&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
     //! extend a track fit including a new set of PrepRawData objects
-    virtual Track* fit(const Track&,
-                       const PrepRawDataSet&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const PrepRawDataSet&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     //! extend a track fit including a new set of MeasurementBase objects
-    virtual Track* fit(const Track&,
-                       const MeasurementSet&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const MeasurementSet&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     //! combined track fit
-    virtual Track* fit(const Track&,
-                       const Track&,
-                       const RunOutlierRemoval  runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting
-                       ) const override;
+    virtual std::unique_ptr<Track> fit(
+      const EventContext& ctx,
+      const Track&,
+      const Track&,
+      const RunOutlierRemoval runOutlier = false,
+      const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
 
     /** @brief retrieve statuscode of last fit.
 
@@ -138,11 +145,12 @@ private:
                                                  ) const;
 
     //! method providing the filter code common to all interfaces
-    bool                       iterateKalmanFilter(const Trk::TrackParameters*&,
-                                                   FitQuality*&,
-                                                   const RunOutlierRemoval,
-                                                   const Trk::KalmanMatEffectsController&,
-                                                   const double& this_eta=0.0) const;
+    bool iterateKalmanFilter(const EventContext& ctx,
+                             const Trk::TrackParameters*&,
+                             FitQuality*&,
+                             const RunOutlierRemoval,
+                             const Trk::KalmanMatEffectsController&,
+                             const double& this_eta = 0.0) const;
 
     //! method providing a 2nd concept for iterating, by internal annealing
     bool                       invokeAnnealingFilter(const Trk::TrackParameters*&,
@@ -157,11 +165,12 @@ private:
                                                     const TrackParameters&) const;
 
     //! method to create a track which is common to all interfaces
-    Trk::Track*                makeTrack(const Trk::FitQuality*,
-                                         const Trk::TrackParameters&,
-                                         const Trk::KalmanMatEffectsController*,
-                                         const double&,
-					 const Trk::TrackInfo*) const;
+    Trk::Track* makeTrack(const EventContext& ctx,
+                          const Trk::FitQuality*,
+                          const Trk::TrackParameters&,
+                          const Trk::KalmanMatEffectsController*,
+                          const double&,
+                          const Trk::TrackInfo*) const;
 
     //! special method to build Perigee parameters from the track
     const TrackStateOnSurface* makePerigee(const SmoothedTrajectory*,
@@ -169,19 +178,26 @@ private:
                                            const ParticleHypothesis matEffects=Trk::nonInteracting) const;
 
     //! special method to build Perigee parameters from the internal KF trajectory
-    const TrackStateOnSurface* internallyMakePerigee(const PerigeeSurface&,
-                                                     const ParticleHypothesis) const;
+    const TrackStateOnSurface* internallyMakePerigee(
+      const EventContext& ctx,
+      const PerigeeSurface&,
+      const ParticleHypothesis) const;
 
     //! special method to build reference parameters at other surface than PerigeeSf
-    const TrackStateOnSurface* makeReferenceState(const Surface&,
-                                                  const ParticleHypothesis) const;
-		
+    const TrackStateOnSurface* makeReferenceState(
+      const EventContext& ctx,
+      const Surface&,
+      const ParticleHypothesis) const;
+
     //! call a validation tool from the TrkValidation package
-    void callValidation( int iterationIndex, const Trk::ParticleHypothesis  matEffects,
-                         FitterStatusCode fitStatCode=Trk::FitterStatusCode::Success ) const;
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
+    void callValidation(
+      const EventContext& ctx,
+      int iterationIndex,
+      const Trk::ParticleHypothesis matEffects,
+      FitterStatusCode fitStatCode = Trk::FitterStatusCode::Success) const;
+    ///////////////////////////////////////////////////////////////////
+    // Private data:
+    ///////////////////////////////////////////////////////////////////
     mutable MsgStream             m_log;         //!< msgstream as private member (-> speed)
 
     //! extrapolation tool: does propagation and applies material effects
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanPiecewiseAnnealingFilter.h b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanPiecewiseAnnealingFilter.h
index 9c8e65acc7fc..30ed7bac7198 100644
--- a/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanPiecewiseAnnealingFilter.h
+++ b/Tracking/TrkFitter/TrkKalmanFitter/TrkKalmanFitter/KalmanPiecewiseAnnealingFilter.h
@@ -58,12 +58,12 @@ namespace Trk
 
       /** @brief the main method: run DAF on the full trajectory, starting from first fittable
                  state and from parameters therein, do not do last smoother */
-      virtual const FitterStatusCode
+      virtual FitterStatusCode
         filterTrajectory (Trajectory& trajectory, const ParticleHypothesis&) const;
 
       /** @brief the main method: run DAF on a piece of the current trajectory, starting at iterator
                  and using upd/predPar, do not do last smoother */
-      virtual const FitterStatusCode
+      virtual FitterStatusCode
         filterTrajectoryPiece (Trajectory& trajectory,
                                Trajectory::iterator&,
                                const TrackParameters*&,
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
index 83d12fba8381..007cd4d2f18d 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
@@ -812,7 +812,7 @@ Trk::FitterStatusCode Trk::ForwardKalmanFitter::enterSeedIntoTrajectory
 
 
 // private -- helper to make pretty debug output
-void Trk::ForwardKalmanFitter::printGlobalParams(int istate, std::string ptype,
+void Trk::ForwardKalmanFitter::printGlobalParams(int istate, const std::string& ptype,
                                                  const Trk::TrackParameters* param,
                                                  const Trk::DNA_MaterialEffects* mefot)
   const
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardRefTrackKalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardRefTrackKalmanFitter.cxx
index 5ae320df7564..49fe75d0da93 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardRefTrackKalmanFitter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardRefTrackKalmanFitter.cxx
@@ -535,7 +535,7 @@ Trk::FitterStatusCode Trk::ForwardRefTrackKalmanFitter::enterSeedIntoTrajectory
 
 
 // private -- helper to make pretty debug output
-void Trk::ForwardRefTrackKalmanFitter::printGlobalParams(int istate, std::string ptype,
+void Trk::ForwardRefTrackKalmanFitter::printGlobalParams(int istate, const std::string& ptype,
                                                          const Trk::TrackParameters& ref,
                                                          const AmgVector(5)& diff) const
 {
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
index d6ad48c74cb9..90c908422b12 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
@@ -162,19 +162,19 @@ StatusCode Trk::KalmanFitter::initialize()
   if (m_updator.empty() || m_updator.retrieve().isFailure()) {
     ATH_MSG_FATAL ("can not retrieve meas't updator of type " << m_updator.typeAndName());
     return StatusCode::FAILURE;
-  } else ATH_MSG_INFO ("retrieved tool " << m_updator.typeAndName());
+  } ATH_MSG_INFO ("retrieved tool " << m_updator.typeAndName());
 
   if (m_extrapolator.empty() || m_extrapolator.retrieve().isFailure()) {
     ATH_MSG_FATAL ("can not retrieve extrapolator of type " << m_extrapolator.typeAndName());
     return StatusCode::FAILURE;
-  } else ATH_MSG_INFO ("retrieved tool " << m_extrapolator.typeAndName());
+  } ATH_MSG_INFO ("retrieved tool " << m_extrapolator.typeAndName());
   
   // --- get ROT creator (OPTIONAL tool)
   if (!m_ROTcreator.empty()) {
     if (m_ROTcreator.retrieve().isFailure()) {
       ATH_MSG_FATAL("can not retrieve ROT creator of type " << m_ROTcreator.typeAndName());
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved tool " << m_ROTcreator.typeAndName());
+    } ATH_MSG_INFO ("retrieved tool " << m_ROTcreator.typeAndName());
   }
 
   // --- get DynamicNoiseAdjustor for brem fits (OPTIONAL tools)
@@ -182,14 +182,14 @@ StatusCode Trk::KalmanFitter::initialize()
     if (m_dynamicNoiseAdjustor.retrieve().isFailure()) {
       ATH_MSG_ERROR ("DNA is configured but tool is not accessible - " << m_dynamicNoiseAdjustor.typeAndName());
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved tool for electron noise model " << m_dynamicNoiseAdjustor.typeAndName());
+    } ATH_MSG_INFO ("retrieved tool for electron noise model " << m_dynamicNoiseAdjustor.typeAndName());
   }
   if (!m_brempointAnalyser.empty()) {
     if (m_brempointAnalyser.retrieve().isFailure()) {
       ATH_MSG_ERROR ("DNA separator/brempoint analyser is configured but not accessible - "
 		     << m_brempointAnalyser.typeAndName());
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved tool " << m_brempointAnalyser.typeAndName() );
+    } ATH_MSG_INFO ("retrieved tool " << m_brempointAnalyser.typeAndName() );
   }
 
   // --- get AlignableSurfaceProvider (OPTIONAL tool)
@@ -197,7 +197,7 @@ StatusCode Trk::KalmanFitter::initialize()
     if (m_alignableSfProvider.retrieve().isFailure()) {
       ATH_MSG_ERROR( "AlignableSfPrv is configured but tool is not accessible - "<< m_alignableSfProvider.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_DEBUG( "retrieved tool " << m_alignableSfProvider.typeAndName());
+    } ATH_MSG_DEBUG( "retrieved tool " << m_alignableSfProvider.typeAndName());
   }
 
   // Get recalibrator, if it exists it also flags re-calibration (OPTIONAL tool)
@@ -206,7 +206,7 @@ StatusCode Trk::KalmanFitter::initialize()
     if (m_recalibrator.retrieve().isFailure()) {
       ATH_MSG_ERROR( "can not retrieve configured recalibrator of type " << m_recalibrator.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_DEBUG("retrieved tool " << m_recalibrator.typeAndName() );
+    } ATH_MSG_DEBUG("retrieved tool " << m_recalibrator.typeAndName() );
   } else ATH_MSG_INFO("RIO_OnTracks will be preserved and not recalibrated unless PRD given as input." );
   if (m_ROTcreator.empty() && !m_recalibrator.empty()) {
     ATH_MSG_ERROR( "can not demand re-calibration without configured RIO_OnTrackCreator!" );
@@ -403,9 +403,11 @@ StatusCode Trk::KalmanFitter::finalize()
 
 // refit a track
 // -------------------------------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&        inputTrack,
-                                   const RunOutlierRemoval  runOutlier,
-                                   const Trk::ParticleHypothesis prtHypothesis) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::Track& inputTrack,
+                       const RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis prtHypothesis) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,,)    with Track from author = "
@@ -464,19 +466,21 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&        inputTrack,
   if (m_forwardFitter->enterSeedIntoTrajectory(m_trajectory,*minPar,m_cov0,kalMec,true)
       != Trk::FitterStatusCode::Success) return nullptr;
   m_fitStatus = m_forwardFitter->fit(m_trajectory,*minPar,runOutlier,kalMec,true);
-  if (m_callValidationTool) callValidation(0, kalMec.particleType(), m_fitStatus);
+  if (m_callValidationTool)
+    callValidation(ctx, 0, kalMec.particleType(), m_fitStatus);
 
   // call KalmanFilter with iterations on the outliers
   FitQuality* fitQual  = nullptr;
-  if ( iterateKalmanFilter(minPar, fitQual, runOutlier, kalMec, this_eta) ||
-       invokeAnnealingFilter(minPar, fitQual, runOutlier, kalMec, this_eta) ) {
+  if (iterateKalmanFilter(ctx, minPar, fitQual, runOutlier, kalMec, this_eta) ||
+      invokeAnnealingFilter(minPar, fitQual, runOutlier, kalMec, this_eta)) {
     // make output track from the internal trajectory
     assert( fitQual );
-    Track* fittedTrack = makeTrack(fitQual,*minPar, &kalMec, this_eta,&(inputTrack.info()) );
+    Track* fittedTrack =
+      makeTrack(ctx, fitQual, *minPar, &kalMec, this_eta, &(inputTrack.info()));
     m_trajectory.clear();
     if (!fittedTrack) delete fitQual;
-    return fittedTrack;
-  } else {
+    return std::unique_ptr<Trk::Track>(fittedTrack);
+  } 
     delete fitQual;
     m_trajectory.clear();
     // iterations failed:
@@ -490,16 +494,18 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&        inputTrack,
     }
     ATH_MSG_DEBUG( "fit(track) during iterations failed." );
     return nullptr;
-  }
+  
 }
 
 
 // fit a set of PrepRawData objects
 // --------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::PrepRawDataSet&   inputPRDColl,
-                                   const Trk::TrackParameters&  estimatedStartParameters,
-                                   const RunOutlierRemoval      runOutlier,
-                                   const Trk::ParticleHypothesis     prtHypothesis) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::PrepRawDataSet& inputPRDColl,
+                       const Trk::TrackParameters& estimatedStartParameters,
+                       const RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis prtHypothesis) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   if (!check_operability(1, runOutlier, prtHypothesis,inputPRDColl.empty())) return nullptr;
@@ -542,7 +548,8 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::PrepRawDataSet&   inputPRDColl,
     m_fitStatus = m_forwardFitter->fit(m_trajectory, inputPRDColl,
                                        estimatedStartParameters, runOutlier, kalMec);
   }
-  if (m_callValidationTool) callValidation(0, kalMec.particleType(), m_fitStatus);
+  if (m_callValidationTool)
+    callValidation(ctx, 0, kalMec.particleType(), m_fitStatus);
   float this_eta=0.0;     // statistics
   m_maximalNdof = m_utility->rankedNumberOfMeasurements(m_trajectory)-5;
   if (msgLvl(MSG::DEBUG)) {
@@ -553,27 +560,31 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::PrepRawDataSet&   inputPRDColl,
   // call KalmanFilter with iterations on the outliers
   const Trk::TrackParameters* startPar = &estimatedStartParameters;
   FitQuality* fitQual  = nullptr;
-  if ( iterateKalmanFilter(startPar, fitQual, runOutlier, kalMec, this_eta) ||
-       invokeAnnealingFilter(startPar, fitQual, runOutlier, kalMec, this_eta) ) {
+  if (iterateKalmanFilter(
+        ctx, startPar, fitQual, runOutlier, kalMec, this_eta) ||
+      invokeAnnealingFilter(startPar, fitQual, runOutlier, kalMec, this_eta)) {
     // make output track from the internal trajectory
     assert( fitQual );
-    Track* fittedTrack = makeTrack(fitQual,*startPar, &kalMec, this_eta, nullptr);
+    Track* fittedTrack =
+      makeTrack(ctx, fitQual, *startPar, &kalMec, this_eta, nullptr);
     m_trajectory.clear();
     if (!fittedTrack) delete fitQual;
-    return fittedTrack;
-  } else {
+    return std::unique_ptr<Trk::Track>(fittedTrack);
+  } 
     delete fitQual;
     m_trajectory.clear();
     return nullptr;
-  }
+  
 }
 
 // fit a set of MeasurementBase objects
 // --------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::MeasurementSet&   inputMeasSet,
-                                   const Trk::TrackParameters&  estimatedStartParameters,
-                                   const RunOutlierRemoval      runOutlier,
-                                   const Trk::ParticleHypothesis matEffects) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::MeasurementSet& inputMeasSet,
+                       const Trk::TrackParameters& estimatedStartParameters,
+                       const RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis matEffects) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   if (!check_operability(2 ,runOutlier, matEffects,inputMeasSet.empty())) return nullptr;
@@ -645,19 +656,21 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::MeasurementSet&   inputMeasSet,
   ATH_MSG_VERBOSE ("\n***** call forward kalman filter, iteration # 1 *****\n");
   m_fitStatus = m_forwardFitter->fit(m_trajectory, estimatedStartParameters,
                                      runOutlier, kalMec, false);
-  if (m_callValidationTool) callValidation(0, kalMec.particleType(), m_fitStatus);
+  if (m_callValidationTool) callValidation(ctx,0, kalMec.particleType(), m_fitStatus);
 
   // --- call KalmanFilter with iterations on the outliers
   const Trk::TrackParameters* startPar = &estimatedStartParameters;
   FitQuality* fitQual  = nullptr;
-  if ( iterateKalmanFilter(startPar, fitQual, runOutlier, kalMec, this_eta) ||
-       invokeAnnealingFilter(startPar,fitQual,runOutlier, kalMec, this_eta) ) {
+  if (iterateKalmanFilter(
+        ctx, startPar, fitQual, runOutlier, kalMec, this_eta) ||
+      invokeAnnealingFilter(startPar, fitQual, runOutlier, kalMec, this_eta)) {
     // make output track from the internal trajectory:
-    Track* fittedTrack = makeTrack(fitQual,*startPar,&kalMec, this_eta, nullptr);
+    Track* fittedTrack =
+      makeTrack(ctx, fitQual, *startPar, &kalMec, this_eta, nullptr);
     m_trajectory.clear();
     if (!fittedTrack) delete fitQual;
-    return fittedTrack;
-  } else {
+    return std::unique_ptr<Trk::Track>(fittedTrack);
+  } 
     if (fitQual) delete fitQual;
     m_trajectory.clear();
     // iterations failed:
@@ -671,16 +684,17 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::MeasurementSet&   inputMeasSet,
     }
     ATH_MSG_DEBUG( "fit(vec<MB>) during iteration failed." );
     return nullptr;
-  }
+  
 }
 
 // extend a track fit to include an additional set of PrepRawData objects
 // --------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             inputTrack,
-                                   const Trk::PrepRawDataSet&    addPrdColl,
-                                   const Trk::RunOutlierRemoval  runOutlier,
-                                   const Trk::ParticleHypothesis matEffects
-                                   ) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::Track& inputTrack,
+                       const Trk::PrepRawDataSet& addPrdColl,
+                       const Trk::RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis matEffects) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,PrdSet,,)");
@@ -689,7 +703,7 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             inputTrack,
   // protection, if empty PrepRawDataSet
   if (addPrdColl.empty()) {
     ATH_MSG_WARNING ("client tries to add an empty PrepRawDataSet to the track fit.");
-    return fit(inputTrack, runOutlier, matEffects);
+    return fit(ctx,inputTrack, runOutlier, matEffects);
   }
 
   /*  determine the Track Parameter which is the start of the trajectory,
@@ -707,8 +721,9 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             inputTrack,
   PrepRawDataSet orderedPRDColl = 
     m_inputPreparator->stripPrepRawData(inputTrack,addPrdColl,m_option_enforceSorting,
                                         true /* do not lose outliers! */);
-  Trk::Track* fittedTrack = fit(orderedPRDColl,*estimatedStartParameters,runOutlier,matEffects);
-  const TrackInfo existingInfo = inputTrack.info(); 
+  std::unique_ptr<Trk::Track> fittedTrack =
+    fit(ctx, orderedPRDColl, *estimatedStartParameters, runOutlier, matEffects);
+  const TrackInfo& existingInfo = inputTrack.info(); 
   if (fittedTrack) fittedTrack->info().addPatternRecoAndProperties(existingInfo);
   return fittedTrack;
 }
@@ -717,11 +732,12 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             inputTrack,
 // re-implements the TrkFitterUtils/TrackFitter.cxx general code in a more
 // mem efficient and stable way
 // --------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&            inputTrack,
-                                   const Trk::MeasurementSet&   addMeasColl,
-                                   const Trk::RunOutlierRemoval runOutlier,
-                                   const Trk::ParticleHypothesis  matEffects
-                                   ) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::Track& inputTrack,
+                       const Trk::MeasurementSet& addMeasColl,
+                       const Trk::RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis matEffects) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Meas'BaseSet,,)");
@@ -730,7 +746,7 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&            inputTrack,
   // protection, if empty MeasurementSet
   if (addMeasColl.empty()) {
     ATH_MSG_WARNING( "client tries to add an empty MeasurementSet to the track fit." );
-    return fit(inputTrack, runOutlier, matEffects);
+    return fit(ctx,inputTrack, runOutlier, matEffects);
   }
 
   // fill internal trajectory through external preparator class
@@ -767,21 +783,27 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&            inputTrack,
   ATH_MSG_VERBOSE ("\n***** call forward kalman filter, iteration # 1 *****\n");
   m_fitStatus = m_forwardFitter->fit(m_trajectory, *estimatedStartParameters,
                                      runOutlier, kalMec, true);
-  if (m_callValidationTool) callValidation(0, kalMec.particleType(), m_fitStatus);
-
+  if (m_callValidationTool)
+    callValidation(ctx, 0, kalMec.particleType(), m_fitStatus);
 
   // --- call KalmanFilter with iterations on the outliers
   FitQuality* fitQual  = nullptr;
-  if ( iterateKalmanFilter(estimatedStartParameters, fitQual, 
-                           runOutlier, kalMec, this_eta)  || 
-       invokeAnnealingFilter(estimatedStartParameters, fitQual, runOutlier, kalMec, this_eta) ) {
+  if (iterateKalmanFilter(
+        ctx, estimatedStartParameters, fitQual, runOutlier, kalMec, this_eta) ||
+      invokeAnnealingFilter(
+        estimatedStartParameters, fitQual, runOutlier, kalMec, this_eta)) {
     // make output track from the internal trajectory:
     assert( fitQual);
-    Track* fittedTrack = makeTrack(fitQual,*estimatedStartParameters,&kalMec, this_eta, &(inputTrack.info()));
+    Track* fittedTrack = makeTrack(ctx,
+                                   fitQual,
+                                   *estimatedStartParameters,
+                                   &kalMec,
+                                   this_eta,
+                                   &(inputTrack.info()));
     m_trajectory.clear();
     if (!fittedTrack) delete fitQual;
-    return fittedTrack;
-  } else {
+    return std::unique_ptr<Trk::Track>(fittedTrack);
+  } 
     delete fitQual;
     fitQual = nullptr;
     m_trajectory.clear();
@@ -789,25 +811,26 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&            inputTrack,
     //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit with calls of validation tool
     if (m_option_callValidationToolForFailedFitsOnly && (!m_callValidationTool) && m_haveValidationTool) {
         m_callValidationTool = true;
-        Track* fittedAgainTrack = fit(inputTrack, addMeasColl, runOutlier, kalMec.particleType());
+        std::unique_ptr<Trk::Track> fittedAgainTrack =
+          fit(ctx, inputTrack, addMeasColl, runOutlier, kalMec.particleType());
         if (fittedAgainTrack) {
           ATH_MSG_WARNING ("inconsistent: fit succeeded! Should not happen if we repeat a failed fit!");
-          delete fittedAgainTrack;
         }
         m_callValidationTool = false;
     }
     ATH_MSG_DEBUG ("fit(track,vec<MB>) during iteration failed.");
     return nullptr;
-  }
+  
 }
 
 // combined fit of two tracks
 // --------------------------------
-Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             intrk1,
-                                   const Trk::Track&             intrk2,
-                                   const Trk::RunOutlierRemoval  runOutlier,
-                                   const Trk::ParticleHypothesis matEffects
-                                   ) const
+std::unique_ptr<Trk::Track>
+Trk::KalmanFitter::fit(const EventContext& ctx,
+                       const Trk::Track& intrk1,
+                       const Trk::Track& intrk2,
+                       const Trk::RunOutlierRemoval runOutlier,
+                       const Trk::ParticleHypothesis matEffects) const
 {
   m_fitStatus = Trk::FitterStatusCode::BadInput;
   ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Track,)");
@@ -864,40 +887,43 @@ Trk::Track* Trk::KalmanFitter::fit(const Trk::Track&             intrk1,
       != Trk::FitterStatusCode::Success) return nullptr;
   ATH_MSG_VERBOSE ("\n***** call forward kalman filter, iteration # 1 *****\n");
   m_fitStatus = m_forwardFitter->fit(m_trajectory,*minPar,runOutlier, kalMec, true);
-  if (m_callValidationTool) callValidation(0, kalMec.particleType(), m_fitStatus);
+  if (m_callValidationTool)
+    callValidation(ctx, 0, kalMec.particleType(), m_fitStatus);
 
   // call KalmanFilter with iterations on the outliers
   FitQuality* fitQual  = nullptr;
-  if ( iterateKalmanFilter(minPar, fitQual, runOutlier, kalMec, this_eta)  || 
-       invokeAnnealingFilter(minPar,fitQual,runOutlier, kalMec, this_eta) ) {
+  if (iterateKalmanFilter(ctx, minPar, fitQual, runOutlier, kalMec, this_eta) ||
+      invokeAnnealingFilter(minPar, fitQual, runOutlier, kalMec, this_eta)) {
     // make output track from the internal trajectory
     assert( fitQual );
-    Track* fittedTrack = makeTrack(fitQual,*minPar, &kalMec, this_eta, &(intrk1.info()) );
+    Track* fittedTrack =
+      makeTrack(ctx, fitQual, *minPar, &kalMec, this_eta, &(intrk1.info()));
     m_trajectory.clear();
     if (!fittedTrack) delete fitQual;
-    const TrackInfo existingInfo2 = intrk2.info(); 
+    const TrackInfo& existingInfo2 = intrk2.info(); 
     if (fittedTrack) fittedTrack->info().addPatternReco(existingInfo2);
-    return fittedTrack;
-  } else {
+    return std::unique_ptr<Trk::Track>(fittedTrack);
+  } 
     delete fitQual;
     m_trajectory.clear();
     // iterations failed:
     //    if m_option_callValidationToolForFailedFitsOnly repeat the track fit with calls of validation tool
     if (m_option_callValidationToolForFailedFitsOnly && (!m_callValidationTool) && m_haveValidationTool) {
         m_callValidationTool = true;
-        if (fit(intrk1, intrk2, runOutlier, kalMec.particleType())) {
-	  ATH_MSG_WARNING ("Error: fit succeeded! Should not happen, if we repeat a failed fit!");
+        if (fit(ctx, intrk1, intrk2, runOutlier, kalMec.particleType())) {
+          ATH_MSG_WARNING ("Error: fit succeeded! Should not happen, if we repeat a failed fit!");
         }
         m_callValidationTool = false;
     }
     return nullptr;
-  }
+  
 }
 
 // Main internal iteration logic for all interfaces:
 // run fwd-filter, smoother and then evaluate results with DNA, outliers, local pattern
 // ---------------------------------------------------------------------------------
-bool Trk::KalmanFitter::iterateKalmanFilter(const Trk::TrackParameters*&  startPar,
+bool Trk::KalmanFitter::iterateKalmanFilter(const EventContext& ctx,
+                                            const Trk::TrackParameters*&  startPar,
                                             Trk::FitQuality*&       newFitQuality,
                                             const RunOutlierRemoval       runOutlier,
                                             const Trk::KalmanMatEffectsController& kalMec,
@@ -918,9 +944,10 @@ bool Trk::KalmanFitter::iterateKalmanFilter(const Trk::TrackParameters*&  startP
       m_fitStatus = m_forwardFitter->fit(m_trajectory, *startPar, runOutlier, kalMec,
                                          /*allowRecalibration=*/false, iFilterBeginState);
       // call validation tool if provided
-      if (m_callValidationTool) callValidation((nOutlierIterations-1)*2, 
-                                               kalMec.particleType(), m_fitStatus);
-
+      if (m_callValidationTool)
+        callValidation(ctx,(nOutlierIterations - 1) * 2,
+                       kalMec.particleType(),
+                       m_fitStatus);
     }
     if (msgLvl(MSG::VERBOSE)) m_utility->dumpTrajectory(m_trajectory, name());
 
@@ -940,7 +967,10 @@ bool Trk::KalmanFitter::iterateKalmanFilter(const Trk::TrackParameters*&  startP
     else 
       m_fitStatus = m_smoother->fit(m_trajectory, newFitQuality, kalMec);
     // call validation tool if provided
-    if (m_callValidationTool) callValidation((nOutlierIterations-1)*2+1, kalMec.particleType(), m_fitStatus);
+    if (m_callValidationTool)
+      callValidation(ctx, (nOutlierIterations - 1) * 2 + 1,
+                     kalMec.particleType(),
+                     m_fitStatus);
 
     // protect against failed fit
     if (m_fitStatus.isFailure()) {
@@ -1170,10 +1200,10 @@ bool Trk::KalmanFitter::invokeAnnealingFilter(const Trk::TrackParameters*&  star
         if (msgLvl(MSG::INFO)) monitorTrackFits( InternalDafUsed, this_eta );
         m_fitStatus = Trk::FitterStatusCode::Success;
         return true;
-      } else {
+      } 
         ATH_MSG_DEBUG ("intDAF called, but to no good!");
         if (msgLvl(MSG::INFO)) monitorTrackFits( DafNoImprovement, this_eta );
-      }
+      
     }
   }
 
@@ -1271,11 +1301,14 @@ bool Trk::KalmanFitter::prepareNextIteration(const unsigned int& upcomingIterati
 
 // PRIVATE method: create a track object
 // --------------------------------------
-Trk::Track* Trk::KalmanFitter::makeTrack(const Trk::FitQuality*         FQ,
-                                         const Trk::TrackParameters&    refPar,
-                                         const Trk::KalmanMatEffectsController*  matEffController,
-                                         const double&                  this_eta,
-					 const Trk::TrackInfo*          existingInfo) const
+Trk::Track*
+Trk::KalmanFitter::makeTrack(
+  const EventContext& ctx,
+  const Trk::FitQuality* FQ,
+  const Trk::TrackParameters& refPar,
+  const Trk::KalmanMatEffectsController* matEffController,
+  const double& this_eta,
+  const Trk::TrackInfo* existingInfo) const
 {
   ATH_MSG_VERBOSE ("--> enter KalmanFitter::makeTrack()");
   if (msgLvl(MSG::VERBOSE)) m_utility->dumpTrajectory(m_trajectory, name());
@@ -1287,13 +1320,14 @@ Trk::Track* Trk::KalmanFitter::makeTrack(const Trk::FitQuality*         FQ,
     if (msgLvl(MSG::DEBUG)) monitorTrackFits( MinimalTrackFailure, this_eta );
     m_fitStatus = Trk::FitterStatusCode::FewFittableMeasurements;
     return nullptr;
-  } else {
+  } 
     SmoothedTrajectory* finalTrajectory = new SmoothedTrajectory();
 
     // add new TSoS with parameters on reference surface (e.g. physics Perigee)
     if (m_option_PerigeeAtOrigin) {
       const Trk::PerigeeSurface   perSurf;
-      const TrackStateOnSurface*  perState = internallyMakePerigee(perSurf,matEffController->particleType());
+      const TrackStateOnSurface* perState =
+        internallyMakePerigee(ctx, perSurf, matEffController->particleType());
       if (perState) finalTrajectory->push_back( perState );
       else {
         ATH_MSG_DEBUG ("********** perigee making failed, drop track");
@@ -1302,8 +1336,8 @@ Trk::Track* Trk::KalmanFitter::makeTrack(const Trk::FitQuality*         FQ,
         delete finalTrajectory;  return nullptr;
       }
     } else {
-      const TrackStateOnSurface* refState = makeReferenceState(refPar.associatedSurface(),
-                                                               matEffController->particleType());
+      const TrackStateOnSurface* refState = makeReferenceState(
+        ctx, refPar.associatedSurface(), matEffController->particleType());
       if (refState) {
         finalTrajectory->push_back( refState );
         ATH_MSG_VERBOSE ("added track state at reference surface.");
@@ -1358,12 +1392,14 @@ Trk::Track* Trk::KalmanFitter::makeTrack(const Trk::FitQuality*         FQ,
     }
     m_fitStatus = Trk::FitterStatusCode::Success;
     return fittedTrack;
-  }
+  
 }
 
-const Trk::TrackStateOnSurface* Trk::KalmanFitter::internallyMakePerigee
-                      (const Trk::PerigeeSurface&     perSurf,
-                       const Trk::ParticleHypothesis  matEffects) const
+const Trk::TrackStateOnSurface*
+Trk::KalmanFitter::internallyMakePerigee(
+  const EventContext& ctx,
+  const Trk::PerigeeSurface& perSurf,
+  const Trk::ParticleHypothesis matEffects) const
 {
   Trajectory::const_iterator it = m_trajectory.begin();
   const Trk::TrackParameters* nearestParam   = nullptr;
@@ -1388,24 +1424,29 @@ const Trk::TrackStateOnSurface* Trk::KalmanFitter::internallyMakePerigee
 				      *m_tparScaleSetter));
   }
   // extrapolate to perigee
-  const Trk::TrackParameters* per
-    = m_extrapolator->extrapolate(*nearestParam, perSurf,
-                                  ( m_sortingRefPoint.mag() > 1.0E-10 ?  // is it 0,0,0 ?
-                                    Trk::anyDirection : Trk::oppositeMomentum),
-                                  false, matEffects);
+  const Trk::TrackParameters* per = m_extrapolator->extrapolate(
+    ctx,
+    *nearestParam,
+    perSurf,
+    (m_sortingRefPoint.mag() > 1.0E-10 ? Trk::anyDirection
+                                       : Trk::oppositeMomentum),
+    false,
+    matEffects);
   if (!per) {
     ATH_MSG_DEBUG ("Perigee-making failed: extrapolation did not succeed.");
     return nullptr;
-  } else ATH_MSG_VERBOSE ("Perigee parameters have been made.");
+  } ATH_MSG_VERBOSE ("Perigee parameters have been made.");
 
   std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
   typePattern.set(TrackStateOnSurface::Perigee);
   return new TrackStateOnSurface(nullptr , per, nullptr,  nullptr, typePattern );
 }
 
-const Trk::TrackStateOnSurface* Trk::KalmanFitter::makeReferenceState
-                      (const Trk::Surface&            refSurface,
-                       const Trk::ParticleHypothesis  matEffects) const
+const Trk::TrackStateOnSurface*
+Trk::KalmanFitter::makeReferenceState(
+  const EventContext& ctx,
+  const Trk::Surface& refSurface,
+  const Trk::ParticleHypothesis matEffects) const
 {
   Trajectory::const_iterator it = m_trajectory.begin();
   const Trk::TrackParameters* nearestParam   = nullptr;
@@ -1425,15 +1466,19 @@ const Trk::TrackStateOnSurface* Trk::KalmanFitter::makeReferenceState
   nearestParam = *(std::min_element(parameterTrajectory.begin(),
                                     parameterTrajectory.end(),
                                     nearestSurfaceDefinition));
-  const Trk::TrackParameters* fittedRefParams
-    = m_extrapolator->extrapolate(*nearestParam, refSurface,
-                                  ( m_sortingRefPoint.mag() > 1.0E-10 ?  // is it 0,0,0 ?
-                                    Trk::anyDirection : Trk::oppositeMomentum),
-                                  false, matEffects);
+  const Trk::TrackParameters* fittedRefParams = m_extrapolator->extrapolate(
+    ctx,
+    *nearestParam,
+    refSurface,
+    (m_sortingRefPoint.mag() > 1.0E-10 ? // is it 0,0,0 ?
+       Trk::anyDirection
+                                       : Trk::oppositeMomentum),
+    false,
+    matEffects);
   if (!fittedRefParams) {
     ATH_MSG_DEBUG (" No ref-params made: extrapolation failed.");
     return nullptr;
-  } else ATH_MSG_VERBOSE ("Reference parameters have been made.");
+  } ATH_MSG_VERBOSE ("Reference parameters have been made.");
 
   std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
   typePattern.set(TrackStateOnSurface::Perigee);
@@ -1449,7 +1494,6 @@ void Trk::KalmanFitter::monitorTrackFits(FitStatisticsCode code, const double& e
   if (std::abs(eta) < 0.80 ) ((m_fitStatistics[code])[Trk::KalmanFitter::iBarrel])++;
   else if (std::abs(eta) < 1.60) ((m_fitStatistics[code])[Trk::KalmanFitter::iTransi])++;
   else if (std::abs(eta) < 2.50) ((m_fitStatistics[code])[Trk::KalmanFitter::iEndcap])++;
-  return;
 }
 
 void Trk::KalmanFitter::updateChi2Asymmetry(std::vector<int>& Nsuccess,
@@ -1518,10 +1562,11 @@ bool Trk::KalmanFitter::check_operability(int iSet, const RunOutlierRemoval& run
   return true;
 }
 
-
-void Trk::KalmanFitter::callValidation( int iterationIndex,
-                                        const Trk::ParticleHypothesis  matEffects,
-                                        FitterStatusCode fitStatCode ) const
+void
+Trk::KalmanFitter::callValidation(const EventContext& ctx,
+                                  int iterationIndex,
+                                  const Trk::ParticleHypothesis matEffects,
+                                  FitterStatusCode fitStatCode) const
 {
     ATH_MSG_DEBUG( "call validation for track iteration " << iterationIndex << "with status " << fitStatCode.getCode() );
     // extrapolate to perigee at origin for validation data
@@ -1546,10 +1591,15 @@ void Trk::KalmanFitter::callValidation( int iterationIndex,
     const Trk::TrackParameters* perPar = nullptr;
     if (nearestParam) {
         // extrapolate to perigee
-        perPar = m_extrapolator->extrapolate(   *nearestParam, perSurf,
-                                                m_sortingRefPoint.mag() > 1.0E-10 ?  // is it 0,0,0 ?
-                                                    Trk::anyDirection : Trk::oppositeMomentum,
-                                                false, matEffects);
+        perPar = m_extrapolator->extrapolate(ctx,
+                                             *nearestParam,
+                                             perSurf,
+                                             m_sortingRefPoint.mag() > 1.0E-10
+                                               ? // is it 0,0,0 ?
+                                               Trk::anyDirection
+                                               : Trk::oppositeMomentum,
+                                             false,
+                                             matEffects);
         per = dynamic_cast<const Trk::Perigee*>(perPar);
     } else {
         ATH_MSG_WARNING("Perigee-making for validation failed: no useful parameters on track!" );
@@ -1559,5 +1609,4 @@ void Trk::KalmanFitter::callValidation( int iterationIndex,
     // FIXME. just ignore as this is only for validation.
     sc.ignore(); 
     delete perPar;
-    return ;
 }
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
index 505a37674aeb..a804655fcdf6 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
@@ -379,7 +379,7 @@ bool Trk::KalmanOutlierLogic::reject(const Trk::FitQuality& fitQuality) const
                      fitQuality.chiSquared()/std::abs(fitQuality.numberDoF()) <<
                      ", prob= " << prob << " fails quality cut" );
       return true;
-    } else ATH_MSG_VERBOSE ("-O- trajectory passes quality cut, prob= " << prob);
+    } ATH_MSG_VERBOSE ("-O- trajectory passes quality cut, prob= " << prob);
   } else {
     if ( !(fitQuality.numberDoF() > 0))
       ATH_MSG_DEBUG ("-O- number d.o.f not positive - reject trajectory.");
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
index 9732e4d7d5da..92380f32992b 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
@@ -228,7 +228,7 @@ bool Trk::KalmanOutlierRecovery_InDet::flagNewOutliers(Trk::Trajectory& T,
           it->isOutlier(GeneralOutlier,fitIteration);
         firstNew = 1;
         return true;
-      } else {
+      } 
 
       const int badRankedNumberOfMeas = m_utility->rankedNumberOfMeasurements(T);
       Trk::Trajectory::iterator lastSctState = T.end();
@@ -420,7 +420,7 @@ bool Trk::KalmanOutlierRecovery_InDet::flagNewOutliers(Trk::Trajectory& T,
               it->isOutlier(false);
         }
       }
-    }
+    
     }      
 
   } // stop recovery for bad cases
@@ -572,7 +572,7 @@ bool Trk::KalmanOutlierRecovery_InDet::reject(const Trk::FitQuality& fitQuality)
                      << fitQuality.chiSquared()/std::abs(fitQuality.numberDoF())
                      << ", prob= " << prob << " fails quality cut" );
       return true;
-    } else ATH_MSG_VERBOSE ( "-O- trajectory passes quality cut, prob= " << prob );
+    } ATH_MSG_VERBOSE ( "-O- trajectory passes quality cut, prob= " << prob );
   } else {
     if ( !(fitQuality.numberDoF() > 0))
       ATH_MSG_DEBUG ("-O- number d.o.f not positive - reject trajectory.");
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanPiecewiseAnnealingFilter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanPiecewiseAnnealingFilter.cxx
index 90da23c3f950..ee329b5d8684 100644
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanPiecewiseAnnealingFilter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanPiecewiseAnnealingFilter.cxx
@@ -333,7 +333,7 @@ bool Trk::KalmanPiecewiseAnnealingFilter::annealingProblem_all
 
 }
 
-const Trk::FitterStatusCode
+Trk::FitterStatusCode
 Trk::KalmanPiecewiseAnnealingFilter::filterTrajectory
 (Trajectory& trajectory, const ParticleHypothesis&   particleType) const
 {
@@ -346,7 +346,7 @@ Trk::KalmanPiecewiseAnnealingFilter::filterTrajectory
 
 //================ main method: the piece-wise filter ==========================
 
-const Trk::FitterStatusCode
+Trk::FitterStatusCode
 Trk::KalmanPiecewiseAnnealingFilter::filterTrajectoryPiece 
 (Trajectory& trajectory,
  Trajectory::iterator& start,
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/MeasRecalibSteeringTool.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/MeasRecalibSteeringTool.cxx
index 777c4a4656a4..85ae0bd130a3 100644
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/MeasRecalibSteeringTool.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/MeasRecalibSteeringTool.cxx
@@ -69,7 +69,7 @@ StatusCode Trk::MeasRecalibSteeringTool::initialize()
   if (m_rotCreator.retrieve().isFailure()) {
     ATH_MSG_ERROR ("can not retrieve ROT creator of type " << m_rotCreator.typeAndName());
     return StatusCode::FAILURE;
-  } else ATH_MSG_INFO ("retrieved tool " << m_rotCreator.typeAndName());
+  } ATH_MSG_INFO ("retrieved tool " << m_rotCreator.typeAndName());
 
   // FIXME replace this zoo of tools with something smart, like flags through RC interface
 
@@ -78,22 +78,22 @@ StatusCode Trk::MeasRecalibSteeringTool::initialize()
       ATH_MSG_ERROR ("can not retrieve ROT creator for broad Pixel clusters " <<
                      m_broadPixelClusterCreator.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved " << m_broadPixelClusterCreator.typeAndName());
+    } ATH_MSG_INFO ("retrieved " << m_broadPixelClusterCreator.typeAndName());
     if (m_broadSctClusterCreator.retrieve().isFailure()) {
       ATH_MSG_ERROR ("can not retrieve ROT creator for broad SCT clusters " <<
                      m_broadSctClusterCreator.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved " << m_broadSctClusterCreator.typeAndName());
+    } ATH_MSG_INFO ("retrieved " << m_broadSctClusterCreator.typeAndName());
     if (m_trtDriftCircleCreator.retrieve().isFailure()) {
       ATH_MSG_ERROR ("can not retrieve ROT creator for full drift-time hits of type " <<
                      m_trtDriftCircleCreator.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved tool " << m_trtDriftCircleCreator.typeAndName());
+    } ATH_MSG_INFO ("retrieved tool " << m_trtDriftCircleCreator.typeAndName());
     if (m_trtTubeHitCreator.retrieve().isFailure()) {
       ATH_MSG_ERROR ("can not retrieve ROT creator for straw tube hits of type " <<
                      m_trtTubeHitCreator.typeAndName() );
       return StatusCode::FAILURE;
-    } else ATH_MSG_INFO ("retrieved tool " << m_trtTubeHitCreator.typeAndName());
+    } ATH_MSG_INFO ("retrieved tool " << m_trtTubeHitCreator.typeAndName());
   }
 
   // if (m_haveMuonTools) ...
@@ -163,9 +163,9 @@ Trk::MeasRecalibSteeringTool::makePreciseMeasurement
         //      }
     }
     return nullptr;
-  } else {
+  } 
     return m_rotCreator->correct(*(rot->prepRawData()), trkPar);
-  }
+  
 }
 
 Trk::TrackState::CalibrationType
-- 
GitLab


From ccc858ca522e682b63ca9503c99747ad085c600b Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Tue, 9 Jun 2020 21:00:06 +0200
Subject: [PATCH 091/266] TileMonitoring+TileRecEx: Use private tools in TMDB
 raw channel maker

JO used in online monitoring and reconstrcution of Tile calibration runs
have been udpated to use private tools in Tile TMDB raw channel maker,
to use new geometry, and to configure private tool to calculate OFC on the fly.
---
 .../share/jobOptions_TileCalibRec.py          | 37 +++++++++++--------
 .../share/TileRec_topOptions.py               | 24 ++++++------
 2 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
index 32663d765300..d789814f9a55 100644
--- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
+++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
@@ -716,7 +716,7 @@ if ReadPool:
     # Set Geometry version
     if not 'DetDescrVersion' in dir():
         if RUN2:
-            DetDescrVersion = 'ATLAS-R2-2015-04-00-00'
+            DetDescrVersion = 'ATLAS-R2-2016-01-00-01'
         else:
             DetDescrVersion = 'ATLAS-R1-2012-02-00-00'
 else:
@@ -811,6 +811,7 @@ OfcFromCoolOF1 = doTileOF1 and OfcFromCOOL and (conddb.GetInstance() == 'CONDBR2
 #============================================================
 #=== configure TileCondToolOfc
 #============================================================
+tileCondToolOfc = None
 if not OfcFromCOOL and (doTileOpt2 or doTileOptATLAS or doTileOF1):
     from TileConditions.TileConditionsConf import TileCondToolOfc
     tileCondToolOfc = TileCondToolOfc()
@@ -818,10 +819,6 @@ if not OfcFromCOOL and (doTileOpt2 or doTileOptATLAS or doTileOF1):
     tileCondToolOfc.OptFilterDeltaCorrelation = False # False - use matrix from DB
     tileCondToolOfc.OutputLevel = OutputLevel
 
-    ToolSvc += tileCondToolOfc
-
-    #  'LAS' or "CIS" or 'PHY' pulse shape
-
     printfunc (tileCondToolOfc)
 
 #============================================================
@@ -913,6 +910,8 @@ if doTileOpt2:
             if TileCompareMode or TileEmulateDSP:
                 tileRawChannelBuilderOpt2Filter.EmulateDSP = True # use dsp emulation
         tileRawChannelBuilderOpt2Filter.UseDSPCorrection = not TileBiGainRun
+        if tileCondToolOfc:
+            tileRawChannelBuilderOpt2Filter.TileCondToolOfc = tileCondToolOfc
 
         printfunc (tileRawChannelBuilderOpt2Filter)
 
@@ -927,6 +926,8 @@ if doTileOptATLAS and tileRawChannelBuilderOptATLAS:
     if TileCompareMode or TileEmulateDSP:
         tileRawChannelBuilderOptATLAS.EmulateDSP = True # use dsp emulation
     tileRawChannelBuilderOptATLAS.UseDSPCorrection = not TileBiGainRun
+    if tileCondToolOfc:
+        tileRawChannelBuilderOptATLAS.TileCondToolOfc = tileCondToolOfc
 
     printfunc (tileRawChannelBuilderOptATLAS)
     
@@ -937,6 +938,8 @@ if doTileMF and tileRawChannelBuilderMF:
 
     tileRawChannelBuilderMF.BestPhase   = PhaseFromCOOL; # Phase from COOL or assume phase=0
     tileRawChannelBuilderMF.UseDSPCorrection = not TileBiGainRun
+    if tileCondToolOfc:
+        tileRawChannelBuilderMF.TileCondToolOfc = tileCondToolOfc
 
     printfunc (tileRawChannelBuilderMF )
 
@@ -950,6 +953,8 @@ if doTileOF1 and tileRawChannelBuilderOF1:
     if TileCompareMode or TileEmulateDSP:
         tileRawChannelBuilderOF1.EmulateDSP = True # use dsp emulation
     tileRawChannelBuilderOF1.UseDSPCorrection = not TileBiGainRun
+    if tileCondToolOfc:
+        tileRawChannelBuilderOF1.TileCondToolOfc = tileCondToolOfc
 
     printfunc (tileRawChannelBuilderOF1)
 
@@ -1026,27 +1031,27 @@ if doTileTMDBRawChannel:
     # Set up TileCondToolPulseShape to be used in
     # TileCondToolOfc
     from TileConditions.TileCondToolConf import getTileCondToolMuRcvPulseShape
-    ToolSvc += getTileCondToolMuRcvPulseShape('FILE', 'TileCondToolMuRcvPulseShape')
+    muRcvPulseShape = getTileCondToolMuRcvPulseShape('FILE', 'TileCondToolMuRcvPulseShape')
     
     # Set up TileCondToolOfc to be used in TileRawChannelBuilderMF
-    ToolSvc += CfgMgr.TileCondToolOfc(name = 'TileCondToolMuRcvOfc'
+    muRcvOfc = CfgMgr.TileCondToolOfc(name = 'TileCondToolMuRcvOfc'
                                       , OptFilterDeltaCorrelation = True
-                                      , TileCondToolPulseShape = ToolSvc.TileCondToolMuRcvPulseShape)
+                                      , TileCondToolPulseShape = muRcvPulseShape)
     
     
     # Set up TileRawChannelBuilderOpt2 to be used
-    ToolSvc += CfgMgr.TileRawChannelBuilderOpt2Filter(name = 'TileMuRcvRawChannelBuilderOpt2'
-                                                      , TileRawChannelContainer = 'TileMuRcvRawChannelOpt2'
-                                                      , PedestalMode = 1
-                                                      , Minus1Iteration = TRUE
-                                                      , calibrateEnergy = False
-                                                      , correctTime = False
-                                                      , TileCondToolOfc = ToolSvc.TileCondToolMuRcvOfc)
+    muRcvRawChannelBuilder = CfgMgr.TileRawChannelBuilderOpt2Filter(name = 'TileMuRcvRawChannelBuilderOpt2'
+                                                                    , TileRawChannelContainer = 'TileMuRcvRawChannelOpt2'
+                                                                    , PedestalMode = 1
+                                                                    , Minus1Iteration = TRUE
+                                                                    , calibrateEnergy = False
+                                                                    , correctTime = False
+                                                                    , TileCondToolOfc = muRcvOfc)
     
     
     topSequence += CfgMgr.TileRawChannelMaker(name = 'TileMuRcvRChMaker'
                                               , TileDigitsContainer = 'MuRcvDigitsCnt'
-                                              , TileRawChannelBuilder = [ ToolSvc.TileMuRcvRawChannelBuilderOpt2 ])
+                                              , TileRawChannelBuilder = [ muRcvRawChannelBuilder ])
 
 if (doTileNtuple or doD3PD):
 
diff --git a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
index 22e1c02deed8..7281b80a06b9 100644
--- a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
+++ b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
@@ -151,7 +151,7 @@ if not athenaCommonFlags.isOnline():
 # init DetDescr
 from AthenaCommon.GlobalFlags import jobproperties
 if not 'DetDescrVersion' in dir():
-    DetDescrVersion = 'ATLAS-R2-2015-04-00-00'
+    DetDescrVersion = 'ATLAS-R2-2016-01-00-01'
 jobproperties.Global.DetDescrVersion = DetDescrVersion 
 log.info('DetDescrVersion = %s' % (jobproperties.Global.DetDescrVersion()))
 
@@ -270,22 +270,22 @@ if doTileTMDBRawChannel:
     # Set up TileCondToolPulseShape to be used in
     # TileCondToolOfc
     from TileConditions.TileCondToolConf import getTileCondToolMuRcvPulseShape
-    ToolSvc += getTileCondToolMuRcvPulseShape('FILE', 'TileCondToolMuRcvPulseShape')
+    muRcvPulseShape = getTileCondToolMuRcvPulseShape('FILE', 'TileCondToolMuRcvPulseShape')
     
     # Set up TileCondToolOfc to be used in TileRawChannelBuilderMF
-    ToolSvc += CfgMgr.TileCondToolOfc(name = 'TileCondToolMuRcvOfc'
+    muRcvOfc = CfgMgr.TileCondToolOfc(name = 'TileCondToolMuRcvOfc'
                                       , OptFilterDeltaCorrelation = True
-                                      , TileCondToolPulseShape = ToolSvc.TileCondToolMuRcvPulseShape)
+                                      , TileCondToolPulseShape = muRcvPulseShape)
 
 
     # Set up TileRawChannelBuilderOpt2 to be used
-    ToolSvc += CfgMgr.TileRawChannelBuilderOpt2Filter(name = 'TileMuRcvRawChannelBuilderOpt2'
-                                                      , TileRawChannelContainer = 'TileMuRcvRawChannelOpt2'
-                                                      , PedestalMode = 1
-                                                      , Minus1Iteration = TRUE
-                                                      , calibrateEnergy = False
-                                                      , correctTime = False
-                                                      , TileCondToolOfc = ToolSvc.TileCondToolMuRcvOfc)
+    muRcvRawChannelBuilder = CfgMgr.TileRawChannelBuilderOpt2Filter(name = 'TileMuRcvRawChannelBuilderOpt2'
+                                                                    , TileRawChannelContainer = 'TileMuRcvRawChannelOpt2'
+                                                                    , PedestalMode = 1
+                                                                    , Minus1Iteration = TRUE
+                                                                    , calibrateEnergy = False
+                                                                    , correctTime = False
+                                                                    , TileCondToolOfc = muRcvOfc)
 
 
     # Set up TileRawChannelBuilderMF to be used
@@ -300,7 +300,7 @@ if doTileTMDBRawChannel:
 
     topSequence += CfgMgr.TileRawChannelMaker(name = 'TileMuRcvRChMaker'
                                               , TileDigitsContainer = 'MuRcvDigitsCnt'
-                                              , TileRawChannelBuilder = [ ToolSvc.TileMuRcvRawChannelBuilderOpt2 ])
+                                              , TileRawChannelBuilder = [ muRcvRawChannelBuilder ])
 
 #----------------
 # TileMonitoring
-- 
GitLab


From d182a2b224d598c4bc26b29bb906c61029128b98 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:10:15 +0200
Subject: [PATCH 092/266] AthenaServices: Thread-safety checking fix.

Need to declare all overloads of AthDictLoaderSvc::load_type as
not thread-safe, as they call one another.
---
 Control/AthenaServices/src/AthDictLoaderSvc.cxx | 4 ++--
 Control/AthenaServices/src/AthDictLoaderSvc.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Control/AthenaServices/src/AthDictLoaderSvc.cxx b/Control/AthenaServices/src/AthDictLoaderSvc.cxx
index 1140b37d2f27..be0751a16b82 100644
--- a/Control/AthenaServices/src/AthDictLoaderSvc.cxx
+++ b/Control/AthenaServices/src/AthDictLoaderSvc.cxx
@@ -164,7 +164,7 @@ AthDictLoaderSvc::load_type ATLAS_NOT_THREAD_SAFE (const std::string& type_name)
  *         succeed *IF* the dictionary for that type has been generated.
  */
 const RootType
-AthDictLoaderSvc::load_type (const std::type_info& typeinfo)
+AthDictLoaderSvc::load_type ATLAS_NOT_THREAD_SAFE (const std::type_info& typeinfo)
 {
   ATH_MSG_DEBUG 
     ("loading [" << System::typeinfoName(typeinfo) << " (from typeinfo)]...");
@@ -175,7 +175,7 @@ AthDictLoaderSvc::load_type (const std::type_info& typeinfo)
  *         by any necessary means.
  */
 const RootType
-AthDictLoaderSvc::load_type (CLID clid)
+AthDictLoaderSvc::load_type ATLAS_NOT_THREAD_SAFE (CLID clid)
 {
   std::string name = "<N/A>";
   if (!m_clidSvc->getTypeNameOfID(clid, name).isSuccess()) {
diff --git a/Control/AthenaServices/src/AthDictLoaderSvc.h b/Control/AthenaServices/src/AthDictLoaderSvc.h
index 11f5d28c1a00..fb611289eecd 100644
--- a/Control/AthenaServices/src/AthDictLoaderSvc.h
+++ b/Control/AthenaServices/src/AthDictLoaderSvc.h
@@ -98,13 +98,13 @@ class ATLAS_CHECK_THREAD_SAFETY AthDictLoaderSvc
    *         succeed *IF* the dictionary for that type has been generated.
    */
   virtual
-  const RootType load_type (const std::type_info& typeinfo);
+  const RootType load_type ATLAS_NOT_THREAD_SAFE (const std::type_info& typeinfo);
 
   /** @brief retrieve a @c Reflex::Type by name (auto)loading the dictionary
    *         by any necessary means.
    */
   virtual
-  const RootType load_type (CLID clid);
+  const RootType load_type ATLAS_NOT_THREAD_SAFE (CLID clid);
 
   /////////////////////////////////////////////////////////////////// 
   // Private data: 
-- 
GitLab


From a5f19f9846bd1f83988c86d9ec8dcd7967dfbce8 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:09:55 +0200
Subject: [PATCH 093/266] AthenaKernel: Fix for thread-safety checking.

Need to declare all overloads of IDictLoaderSvc::load_type as not
thread-safe, as they end up calling one another.
---
 Control/AthenaKernel/AthenaKernel/IDictLoaderSvc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/IDictLoaderSvc.h b/Control/AthenaKernel/AthenaKernel/IDictLoaderSvc.h
index 52d2e9f776ea..b1a403c6ff46 100644
--- a/Control/AthenaKernel/AthenaKernel/IDictLoaderSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IDictLoaderSvc.h
@@ -81,13 +81,13 @@ class IDictLoaderSvc
    *         succeed *IF* the dictionary for that type has been generated.
    */
   virtual
-  const RootType load_type (const std::type_info& typeinfo) = 0;
+  const RootType load_type ATLAS_NOT_THREAD_SAFE (const std::type_info& typeinfo) = 0;
 
   /** @brief retrieve a @c RootType by name (auto)loading the dictionary
    *         by any necessary means.
    */
   virtual
-  const RootType load_type (CLID clid) = 0;
+  const RootType load_type ATLAS_NOT_THREAD_SAFE (CLID clid) = 0;
 
 }; 
 
-- 
GitLab


From 50dfcf25c46787d2345a30885146f6df510b7937 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:13:55 +0200
Subject: [PATCH 094/266] TrkVolumes: Add missing NOT_THREAD_SAFE annotations.

We were not properly checking virtual calls for the NOT_THREAD_SAFE
property.  This is being fixed, but this reveals some places
were needed NOT_THREAD_SAFE annotations were missing.  Add them where needed.
---
 .../TrkDetDescr/TrkVolumes/TrkVolumes/AbstractVolume.h    | 8 +++++---
 Tracking/TrkDetDescr/TrkVolumes/src/AbstractVolume.cxx    | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Tracking/TrkDetDescr/TrkVolumes/TrkVolumes/AbstractVolume.h b/Tracking/TrkDetDescr/TrkVolumes/TrkVolumes/AbstractVolume.h
index b9ef7e0978b3..875007cda7c9 100755
--- a/Tracking/TrkDetDescr/TrkVolumes/TrkVolumes/AbstractVolume.h
+++ b/Tracking/TrkDetDescr/TrkVolumes/TrkVolumes/AbstractVolume.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -17,6 +17,8 @@
 #include <vector>
 // Eigen
 #include "GeoPrimitives/GeoPrimitives.h"
+
+#include "CxxUtils/checker_macros.h"
 
 class MsgStream;
 
@@ -55,7 +57,7 @@ namespace Trk {
      AbstractVolume(const AbstractVolume& vol);
      
      /**Constructor with Amg::Transform3D*, VolumeBounds*, passing ownership */
-     AbstractVolume(Amg::Transform3D* htrans, VolumeBounds* volbounds);
+     AbstractVolume(Amg::Transform3D* htrans, VolumeBounds* volbounds) ATLAS_CTORDTOR_NOT_THREAD_SAFE;
      
      /**Virtual Destructor*/
      virtual ~AbstractVolume();
@@ -71,7 +73,7 @@ namespace Trk {
          
    private:
      /**Private method to create BoundarySurfaces */  
-     void createBoundarySurfaces();
+     void createBoundarySurfaces ATLAS_NOT_THREAD_SAFE ();
      
      std::vector< SharedObject<const BoundarySurface<AbstractVolume> > >* m_boundarySurfaces;  //!< boundary Surfaces
                                
diff --git a/Tracking/TrkDetDescr/TrkVolumes/src/AbstractVolume.cxx b/Tracking/TrkDetDescr/TrkVolumes/src/AbstractVolume.cxx
index 2bcfda31833d..97992d43bb42 100755
--- a/Tracking/TrkDetDescr/TrkVolumes/src/AbstractVolume.cxx
+++ b/Tracking/TrkDetDescr/TrkVolumes/src/AbstractVolume.cxx
@@ -68,7 +68,7 @@ const std::vector< Trk::SharedObject<const Trk::BoundarySurface<Trk::AbstractVol
 { return (*m_boundarySurfaces); }
 
 
-void Trk::AbstractVolume::createBoundarySurfaces()
+void Trk::AbstractVolume::createBoundarySurfaces ATLAS_NOT_THREAD_SAFE ()
 {
   // prepare the BoundarySurfaces
   m_boundarySurfaces = new std::vector< Trk::SharedObject<const Trk::BoundarySurface<Trk::AbstractVolume> > >;
-- 
GitLab


From d8553655998ff34a9fc29466cf16ea8c653247dd Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:14:11 +0200
Subject: [PATCH 095/266] TrkGeometry: Add missing NOT_THREAD_SAFE annotations.

We were not properly checking virtual calls for the NOT_THREAD_SAFE
property.  This is being fixed, but this reveals some places
were needed NOT_THREAD_SAFE annotations were missing.  Add them where needed.
---
 .../TrkGeometry/TrackingGeometry.h            |  3 +-
 .../TrkGeometry/TrkGeometry/TrackingVolume.h  | 28 ++++++++++++-------
 .../TrkGeometry/src/TrackingGeometry.cxx      |  2 +-
 .../TrkGeometry/src/TrackingVolume.cxx        |  4 +--
 4 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h
index 8af0aacf8f24..02efbc103fc2 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h
@@ -22,6 +22,7 @@
 #include "AthenaKernel/MsgStreamMember.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
+#include "CxxUtils/checker_macros.h"
 
 class MsgStream;
 
@@ -124,7 +125,7 @@ namespace Trk {
       
       /**  Geometry Builder busineess:
            synchronize all layers to enclosed volume dimensions */
-      void synchronizeLayers(MsgStream& msgstream, const TrackingVolume* vol=nullptr) const;
+      void synchronizeLayers ATLAS_NOT_THREAD_SAFE (MsgStream& msgstream, const TrackingVolume* vol=nullptr) const;
            
     
       /** private method the Navigation Level */
diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingVolume.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingVolume.h
index c7c7482be89a..072c141f83bf 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingVolume.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingVolume.h
@@ -133,14 +133,16 @@ namespace Trk {
                      VolumeBounds*   volbounds,
                      const Material& matprop,
                      const std::vector<const DetachedTrackingVolume*>* detachedSubVolumes,
-                     const std::string& volumeName="undefined");                            
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with detached subvolumes  
         -  mixed =======> 2 b) detached volumes */
       TrackingVolume(const Volume& volume,
                      const Material& matprop,
                      const std::vector<const DetachedTrackingVolume*>* detachedSubVolumes,
-                     const std::string& volumeName="undefined");                            
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with unordered subvolumes
         - mixed =======> 1 d) unordered volumes  */
@@ -148,14 +150,16 @@ namespace Trk {
                      VolumeBounds*   volbounds,
                      const Material& matprop,
                      const std::vector<const TrackingVolume*>* unorderedSubVolumes,
-                     const std::string& volumeName="undefined");                            
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with unordered subvolumes 
         - mixed =======> 2 d) unordered volumes  */
       TrackingVolume(const Volume& volume,
                      const Material& matprop,
                      const std::vector<const TrackingVolume*>* unorderedSubVolumes,
-                     const std::string& volumeName="undefined");                            
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
       
       /** Constructor for a full equipped Tracking Volume with arbitrary layers
         -  mixed =======> 1 c) arbitrarily oriented layers */
@@ -163,14 +167,16 @@ namespace Trk {
                      VolumeBounds*   volbounds,
                      const Material& matprop,
                      const std::vector<const Layer*>* arbitraryLayers,
-                     const std::string& volumeName="undefined");                     
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with arbitrary layers
         -  mixed =======> 2 c) arbitrarily oriented layers */
       TrackingVolume(const Volume& volume,
                      const Material& matprop,
                      const std::vector<const Layer*>* arbitraryLayers,
-                     const std::string& volumeName="undefined");                     
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes - 
         -  mixed =======> 1 e) unordered layers AND unordered subvolumes */
@@ -179,7 +185,8 @@ namespace Trk {
                      const std::vector<const Layer*>* arbitraryLayers,
                      const std::vector<const TrackingVolume*>* unorderedSubVolumes,
                      const Material& matprop,
-                     const std::string& volumeName="undefined");                     
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes - 
         -  mixed =======> 2 e) unordered layers AND unordered subvolumes */
@@ -187,7 +194,8 @@ namespace Trk {
                      const std::vector<const Layer*>* arbitraryLayers,
                      const std::vector<const TrackingVolume*>* unorderedSubVolumes,
                      const Material& matprop,
-                     const std::string& volumeName="undefined");                     
+                     const std::string& volumeName="undefined")
+        ATLAS_CTORDTOR_NOT_THREAD_SAFE;
 
       /** copy constructor with shift */
       TrackingVolume(const TrackingVolume& trVol, Amg::Transform3D& transform);
@@ -372,7 +380,7 @@ namespace Trk {
       void propagateMaterialProperties ATLAS_NOT_THREAD_SAFE (const Material& mprop) const;
       
       /** Create Boundary Surface */
-      void createBoundarySurfaces();
+      void createBoundarySurfaces ATLAS_NOT_THREAD_SAFE ();
       
       /** Create Layer Attempts Caluclator */
       void createLayerAttemptsCalculator();
@@ -386,7 +394,7 @@ namespace Trk {
           - adapts the layer dimensions to the new volumebounds + envelope
           - adapts entry layer position where necessary to the new volumebounds 
       */
-      void synchronizeLayers(MsgStream& msgstream, double envelope = 1.) const;
+      void synchronizeLayers ATLAS_NOT_THREAD_SAFE (MsgStream& msgstream, double envelope = 1.) const;
 
       /** Register Next - Previous for Layers, set volumelink */
       void interlinkLayers ATLAS_NOT_THREAD_SAFE();
diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/TrackingGeometry.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/TrackingGeometry.cxx
index 5203d243159c..cf19f65d68ed 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/src/TrackingGeometry.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometry/src/TrackingGeometry.cxx
@@ -124,7 +124,7 @@ void Trk::TrackingGeometry::compactify ATLAS_NOT_THREAD_SAFE (MsgStream& msg, co
     msg << MSG::VERBOSE << endmsg;
 }
 
-void Trk::TrackingGeometry::synchronizeLayers(MsgStream& msg, const TrackingVolume* vol) const
+void Trk::TrackingGeometry::synchronizeLayers ATLAS_NOT_THREAD_SAFE (MsgStream& msg, const TrackingVolume* vol) const
 {
     const Trk::TrackingVolume* tVolume = vol ? vol : m_world;
     tVolume->synchronizeLayers(msg);    
diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/TrackingVolume.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/TrackingVolume.cxx
index f8e2f3533626..6c919b26d4ea 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/src/TrackingVolume.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometry/src/TrackingVolume.cxx
@@ -853,7 +853,7 @@ const Trk::BoundarySurface<Trk::TrackingVolume>* Trk::TrackingVolume::boundarySu
   return (m_boundarySurfaces->operator[](oa)).get();
 }
 
-void Trk::TrackingVolume::createBoundarySurfaces()
+void Trk::TrackingVolume::createBoundarySurfaces ATLAS_NOT_THREAD_SAFE ()
 {
   // prepare the BoundarySurfaces
   m_boundarySurfaces = new std::vector< Trk::SharedObject<const Trk::BoundarySurface<Trk::TrackingVolume> > >;
@@ -1219,7 +1219,7 @@ void  Trk::TrackingVolume::moveTV ATLAS_NOT_THREAD_SAFE (Amg::Transform3D& trans
 }
 
 
-void Trk::TrackingVolume::synchronizeLayers(MsgStream& msgstream, double envelope) const {
+void Trk::TrackingVolume::synchronizeLayers ATLAS_NOT_THREAD_SAFE (MsgStream& msgstream, double envelope) const {
 
   // case a : Layers exist
   const Trk::BinnedArray< Trk::Layer >* confLayers = confinedLayers();
-- 
GitLab


From 08e150553877bab46f2a1cda730017706e39510b Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:20:29 +0200
Subject: [PATCH 096/266] NSWCalibTools: cmake fixes

Don't build sources into more than one library.
Library dependency fix.
---
 .../MuonCalib/NSWCalib/NSWCalibTools/CMakeLists.txt          | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/MuonSpectrometer/MuonCalib/NSWCalib/NSWCalibTools/CMakeLists.txt b/MuonSpectrometer/MuonCalib/NSWCalib/NSWCalibTools/CMakeLists.txt
index 571b13feffd8..b828ce6e7fc4 100644
--- a/MuonSpectrometer/MuonCalib/NSWCalib/NSWCalibTools/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCalib/NSWCalib/NSWCalibTools/CMakeLists.txt
@@ -24,16 +24,15 @@ atlas_add_library( NSWCalibToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS NSWCalibTools
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES GaudiKernel MuonPrepRawData MagFieldElements MagFieldConditions
+                   LINK_LIBRARIES GaudiKernel MuonPrepRawData MagFieldElements MagFieldConditions MuonRDO
                    PRIVATE_LINK_LIBRARIES AthenaBaseComps MuonIdHelpersLib )
  
 
 atlas_add_component(NSWCalibTools
-                    src/*.cxx
                     src/components/*.cxx
                     PUBLIC_HEADERS NSWCalibTools
                     PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                    LINK_LIBRARIES GaudiKernel MuonPrepRawData MuonIdHelpersLib NSWCalibToolsLib MagFieldElements MagFieldConditions
+                    LINK_LIBRARIES NSWCalibToolsLib
                     PRIVATE_LINK_LIBRARIES AthenaBaseComps )
  
 atlas_install_python_modules( python/*.py )
-- 
GitLab


From 3a8708486b1a040d49a280119ccda71931accfbc Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:20:08 +0200
Subject: [PATCH 097/266] PhysicsElementLinksAthenaPool: cmake fixes

Library dependency fixes.
---
 PhysicsAnalysis/PhysicsElementLinksAthenaPool/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/PhysicsElementLinksAthenaPool/CMakeLists.txt b/PhysicsAnalysis/PhysicsElementLinksAthenaPool/CMakeLists.txt
index 491f64350fc2..6678e8414eb9 100644
--- a/PhysicsAnalysis/PhysicsElementLinksAthenaPool/CMakeLists.txt
+++ b/PhysicsAnalysis/PhysicsElementLinksAthenaPool/CMakeLists.txt
@@ -17,5 +17,5 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_poolcnv_library( PhysicsElementLinksAthenaPoolPoolCnv
                            src/*.cxx
                            FILES PhysicsElementLinks/JetLinks.h PhysicsElementLinks/TauJetLinks.h PhysicsElementLinks/MuonLinks.h PhysicsElementLinks/ElectronLinks.h PhysicsElementLinks/PhotonLinks.h PhysicsElementLinks/TruthParticleLinks.h PhysicsElementLinks/TrackLinks.h
-                           LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib PhysicsElementLinks )
+                           LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib PhysicsElementLinks ParticleEventAthenaPoolLib )
 
-- 
GitLab


From cda4e667b47d44a754b203ab2114329ad66596fc Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:21:13 +0200
Subject: [PATCH 098/266] MuonByteStreamCnvTest: cmake fixes

Library dependency fixes.
---
 .../MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt            | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt
index 16ee6f317dcb..76d83a689fe9 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt
@@ -37,12 +37,12 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( MuonByteStreamCnvTestLib
                    src/*.cxx
                    PUBLIC_HEADERS MuonByteStreamCnvTest
-                   LINK_LIBRARIES AthenaBaseComps GaudiKernel MuonReadoutGeometry MuonRDO StoreGateLib SGtests RPCcablingInterfaceLib TrigT1RPChardwareLib RPChardware TrigT1RPClogicLib MuonMDT_CablingLib TGCcablingInterfaceLib MuonIdHelpersLib RPC_CondCablingLib
-                   PRIVATE_LINK_LIBRARIES EventInfo MuonDigitContainer MuonPrepRawData MuonCablingData )
+                   LINK_LIBRARIES AthenaBaseComps GaudiKernel MuonReadoutGeometry MuonRDO StoreGateLib SGtests RPCcablingInterfaceLib TrigT1RPChardwareLib TrigT1RPClogicLib MuonMDT_CablingLib TGCcablingInterfaceLib MuonIdHelpersLib RPC_CondCablingLib MuonDigToolInterfacesLib CscCalibToolsLib MuonDigitContainer
+                   PRIVATE_LINK_LIBRARIES EventInfo MuonPrepRawData MuonCablingData MuonMDT_CnvToolsLib MuonMM_CnvToolsLib MuonCSC_CnvToolsLib MuonRPC_CnvToolsLib MuonTGC_CnvToolsLib MuonSTGC_CnvToolsLib EventInfoMgtLib )
 
 atlas_add_component( MuonByteStreamCnvTest
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel RPCcablingInterfaceLib MuonReadoutGeometry MuonRDO TrigT1RPChardwareLib RPChardware TrigT1RPClogicLib EventInfo MuonMDT_CablingLib TGCcablingInterfaceLib MuonDigitContainer MuonIdHelpersLib MuonPrepRawData MuonByteStreamCnvTestLib MuonCablingData RPC_CondCablingLib)
+                     LINK_LIBRARIES  MuonByteStreamCnvTestLib MuonCSC_CnvToolsLib MuonMDT_CnvToolsLib MuonRPC_CnvToolsLib MuonTGC_CnvToolsLib MuonSTGC_CnvToolsLib MuonMM_CnvToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
-- 
GitLab


From f1b504bb9a11033dadb593fdb6dbdddc0a82317e Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:16:46 +0200
Subject: [PATCH 099/266] InDetEventAthenaPool: Remove const_cast.

Converted TRT_RDO_colvector to a ConstDataVector, so can get rid
of the const_cast and associated NOT_THREAD_SAFE annotation.
---
 .../InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
index 922dd4c8133c..dc72a82d13b3 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Andrei Gaponenko <agaponenko@lbl.gov>, 2006 
@@ -58,7 +58,7 @@ namespace {
 }
 
 //================================================================
-void TRT_RDO_ContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_RDO_Container* trans, TRT_RDO_Container_p1* pers, MsgStream &log) {
+void TRT_RDO_ContainerCnv_p1::transToPers(const TRT_RDO_Container* trans, TRT_RDO_Container_p1* pers, MsgStream &log) {
   // Copy objects from InDetRawDataContainer collections to simple vector
 
   unsigned null_count(0);
@@ -69,7 +69,7 @@ void TRT_RDO_ContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_RDO_C
     MSG_DEBUG(log,"[p1] using container iterators");
     for(TRT_RDO_Container::const_iterator it=trans->begin(); it != trans->end(); it++) {
       if(*it) {
-	pers->push_back(const_cast<TRT_RDO_Container::IDENTIFIABLE*>(*it) );
+	pers->push_back( *it );
       }
       else {
 	null_count++;
@@ -92,7 +92,7 @@ void TRT_RDO_ContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_RDO_C
       MSG_DEBUG(log,"[p1] using collections found in the StoreGate");
 
       for (; it != last; ++it) {
-	TRT_RDO_Collection* RDO_Collection = const_cast<TRT_RDO_Collection*>(&*it);
+	const TRT_RDO_Collection* RDO_Collection = &*it;
 	pers->push_back(RDO_Collection);
       }
     }
-- 
GitLab


From 12d206685070a11d491d4c01724aa70ed1e03f41 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 9 Jun 2020 16:16:17 +0200
Subject: [PATCH 100/266] InDetRawData: Change TRT_RDO_colvector to
 ConstDataVector.

We're going to be pushing const pointers into TRT_RDO_colvector,
so change it to ConstDataVector to allow removing const_casts.
---
 .../InDetRawData/InDetRawData/TRT_RDO_Container.h              | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_RDO_Container.h b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_RDO_Container.h
index a63b5fc2f15a..919358820cde 100755
--- a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_RDO_Container.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_RDO_Container.h
@@ -14,6 +14,7 @@
 # define INDETRAWDATA_TRT_RDO_CONTAINER_H
 
 #include "AthenaKernel/CLASS_DEF.h"
+#include "AthContainers/ConstDataVector.h"
 #include "InDetRawData/InDetRawDataContainer.h"
 #include "InDetRawData/InDetRawDataCollection.h"
 #include "InDetRawData/TRT_RDORawData.h"
@@ -25,7 +26,7 @@ typedef InDetRawDataContainer<InDetRawDataCollection<TRT_RDORawData> >
 CLASS_DEF(TRT_RDO_Container,2542,1)
 
 // new persistent class
-typedef  DataVector<InDetRawDataCollection<TRT_RDORawData> > TRT_RDO_colvector;
+typedef  ConstDataVector<DataVector<InDetRawDataCollection<TRT_RDORawData> > > TRT_RDO_colvector;
 CLASS_DEF( TRT_RDO_colvector , 140807381 , 1 )
 
 #endif // INDETRAWDATA_TRT_RDO_CONTAINER_H
-- 
GitLab


From e20ea3fb7fead2b69cca9bd20885aeff7bafd953 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 9 Jun 2020 16:22:54 +0200
Subject: [PATCH 101/266] SCT_Monitoring: Fix clang warning.

Unused variable.
---
 .../InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx
index 4297bd07e8a8..ad5a0914e964 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx
@@ -823,7 +823,6 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex)
 // ====================================================================================================
 StatusCode
 SCTHitsNoiseMonTool::checkNoiseMaps() {
-  IdentifierHash next;
   std::vector<float> vectorOfOccupancies;
 
   if (m_doSpacePointBasedNoise) {
-- 
GitLab


From 820ae4b74983cea72021b7c1f02265e64aaaa306 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 9 Jun 2020 16:26:01 +0200
Subject: [PATCH 102/266] LArDigitization: Fix clang warning.

Unused variable.
---
 LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
index a5bc95bd138a..5a350a7f5cf3 100755
--- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // +==========================================================================+
@@ -623,7 +623,6 @@ StatusCode LArPileUpTool::mergeEvent(const EventContext& ctx)
    it =  0;
    it_end = m_hitmap->GetNbCells();
 
-   Identifier cellID;
    const std::vector<std::pair<float,float> >* TimeE;
    const std::vector<std::pair<float,float> >* TimeE_DigiHSTruth = nullptr;
 
-- 
GitLab


From 0b4200d0df9906a11933ff5066f774de377060c7 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 10 Jun 2020 04:05:53 +0200
Subject: [PATCH 103/266] Remove commented debug messages and unuseful comments
 in SCT_GeoModel.

---
 .../SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h    |   5 +-
 .../SCT_GeoModel/src/SCT_InnerSide.cxx        |   7 -
 .../SCT_GeoModel/src/SCT_Module.cxx           |   5 -
 .../SCT_GeoModel/src/SCT_Ski.cxx              | 129 +-----------------
 .../SCT_GeoModel/src/SCT_SkiAux.cxx           |  26 ----
 .../SCT_GeoModel/src/SCT_SkiPowerTape.cxx     |  17 +--
 6 files changed, 6 insertions(+), 183 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h
index 3985d43a1e14..d01b0935332e 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_GEOMODEL_SCT_SKIAUX_H
@@ -10,7 +10,6 @@
 #include <string>
 
 class SCT_Ski;
-// 14th Aug 2005 S.Mima modified.
 class SCT_Bracket;
 class SCT_Harness;
 class SCT_SkiPowerTape;
@@ -50,8 +49,6 @@ public:
 
   // Retrieve child elements
   const SCT_Ski *         ski()          const {return m_ski;}
-  // 14th Aug 2005 S.Mima modified.
-  //  const SCT_Bracket *     bracket()      const {return m_bracket;}
   const SCT_Bracket *     bracket()      const {return m_bracket;}
   const SCT_Harness *     harness()      const {return m_harness;}
   const SCT_SkiPowerTape* skiPowerTape() const {return m_skiPowerTape;}
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
index 7dcfc93d6b86..2d7d03a7269b 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx
@@ -103,8 +103,6 @@ SCT_InnerSide::preBuild()
   // ise : InnerSideEnvelope
   // Reference: sct_module_geometry.ps
   //
-  // 28th Mar S.Mima modified
-  // Wed 15th Jun 2005 D.Naito modified.
   const double w_ise1 = w_sensor + m_safety;
   const double t_ise1 = t_sensor + m_safety;
   const double l_ise1 = l_sensor + m_safety;
@@ -154,12 +152,7 @@ SCT_InnerSide::preBuild()
   const GeoLogVol * InnerSideEnvelopeLog = new GeoLogVol("InnerSideEnvelope",
                                                          &InnerSideEnvelopeShape,
                                                          m_materials->gasMaterial());
-  // 28th Mar S.Mima modified
-  // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (00)*********************************
-  //m_thickness = 0.5*t_sensor + hybridPosX + 0.5*t_ise2;
-  // *** -->>                                      (00)*********************************
   m_thickness = 0.5*t_ise1 + hybridPosX + 0.5*t_ise2;
-  // *** End of modified lines. ------------------ (00)*********************************
   m_width     = w_ise1;
   m_length    = l_ise1;
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
index d192435a5bbd..88f6a81e53f4 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx
@@ -34,7 +34,6 @@
 #include "GeoModelKernel/GeoAlignableTransform.h"
 #include "GeoModelKernel/GeoDefinitions.h"
 #include "GaudiKernel/SystemOfUnits.h"
-// 8th Aug 2005 S.Mima modified.
 #include "GeoModelKernel/GeoShapeSubtraction.h"
 
 #include <cmath>
@@ -231,7 +230,6 @@ SCT_Module::preBuild()
 
   m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2);
 
-  // 8th Aug 2005 S.Mima modified.
   // Calculate dimension of subbox 
   const double xmaxSubBox = - 0.5*m_baseBoard->thickness() - m_safety;
   const double xminSubBox = - 0.5*thicknessEnv2 - 2.0*m_safety;
@@ -274,11 +272,9 @@ SCT_Module::preBuild()
   //
   // Make an envelope for the whole module.
   //
-  // 6th Feb 2005 D.Naito modified.
   const GeoBox * envelope1 = new GeoBox(0.5*m_env1Thickness, 0.5*m_env1Width, 0.5*m_env1Length);
   const GeoBox * envelope2 = new GeoBox(0.5*m_env2Thickness, 0.5*m_env2Width, 0.5*m_env2Length);
 
-  // 8th Aug 2005 S.Mima modified.
   const GeoBox * subBox = new GeoBox(0.5*thicknessSubBox, 0.5*widthSubBox, 0.6*lengthSubBox);
 
   // In the following, envelope1 and envelope2 are added and SUBBOX is pulled. 
@@ -302,7 +298,6 @@ SCT_Module::preBuild()
 
   //
   // base board
-  // 6th Apr 2005 S.Mima modified.
   //
   const double baseBoardPosY = m_baseBoardOffsetY;
   const double baseBoardPosZ = m_baseBoardOffsetZ;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
index 3172db64fc68..aba3868c304d 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx
@@ -86,13 +86,12 @@ SCT_Ski::getParameters()
   m_coolingPipeRadialOffset = 0;
   m_coolingPipePhiOffset = 0;
 
-  // 10th Aug 2005 S.Mima modified.
   m_coolingBlockOffsetX = parameters->coolingBlockOffsetX();
   m_coolingBlockOffsetY = parameters->coolingBlockOffsetY();
   m_coolingBlockOffsetZ = parameters->coolingBlockOffsetZ();
   m_coolingPipeOffsetX = parameters->coolingPipeOffsetX();
   m_coolingPipeOffsetY = parameters->coolingPipeOffsetY();
-  // 15th Aug 2005 S.Mima modified.
+
   m_doglegOffsetX = parameters->doglegOffsetX();
   m_doglegOffsetY = parameters->doglegOffsetY();
 }
@@ -121,62 +120,7 @@ SCT_Ski::preBuild()
 
   double xModuleOffset = 0.5 * m_radialSep;
 
-  // *** 10:00 Mon 30th May 2005 D.Naito modified. (12)*********************************
-  // I get what "yModuleOffset" has role. "yModuleOffset" must be zero.
-  // I move the calculations of corners to lower area in this code(L336 ~ L367).
-  // "yModuleOffset = -0.5*(moduleYMax + moduleYMin)" is wrong.
-
-  // *** 18:00 Fri 27th May 2005 D.Naito added.    (09)*********************************
-
-  // *** 18:00 Fri 27th May 2005 D.Naito put some comments.
-  // I need to calculate moduleYMax and moduleYMin for yModuleOffset,
-  // because the modules is asyGaudi::Units::mmetry in y direction.
-
-  //
-  // These are coordinates of corners of module's envelopes.
-  //
-
-  //GeoTrf::Vector3D c0(0.0, 0.5*(m_module->env1Width()), 0.5*(m_module->env1Length()));
-  //GeoTrf::Vector3D c1(0.0, -0.5*(m_module->env1Width()), 0.5*(m_module->env1Length()));
-  //GeoTrf::Vector3D c2(0.0, -0.5*(m_module->env1Width()), -0.5*(m_module->env1Length()));
-  //GeoTrf::Vector3D c3(0.0, 0.5*(m_module->env1Width()), -0.5*(m_module->env1Length()));
-  //GeoTrf::Vector3D c4(0.0,
-  //  -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()),
-  //  -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length()));
-  //GeoTrf::Vector3D c5(0.0,
-  //  -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()),
-  //  -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length()));
-  //GeoTrf::Vector3D c6(0.0,
-  //  -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()),
-  //  -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length()));
-  //GeoTrf::Vector3D c7(0.0,
-  //  -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()),
-  //  -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length()));
-
-  //double moduleYMax = c4.y();
-  //double moduleYMin = c5.y();
-  //  c0.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c1.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c2.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c3.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c4.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c5.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c6.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-  //  c7.rotateX(0.5 * m_stereoSign * m_module->stereoAngle());
-
-  //  moduleYMax = std::max(std::max(c0.y(), c4.y()), std::max(c7.y(), c3.y()));
-  //  moduleYMin = std::min(std::min(c1.y(), c5.y()), std::min(c6.y(), c2.y()));
-  // *** End of added lines. --------------------- (09)*********************************
-
-
-  // *** 18:00 Fri 27th May 2005 D.Naito modified. (10)*********************************
-  //double yModuleOffset = 0;
-  // *** -->>                                      (10)*********************************
-  //double yModuleOffset = -0.5*(moduleYMax + moduleYMin);
-  // *** End of modified lines. ------------------ (10)*********************************
-  // *** -->>                                      (12)*********************************
   double yModuleOffset = 0.0;
-  // *** End of modified lines. ------------------ (12)*********************************
 
 
   //
@@ -184,65 +128,26 @@ SCT_Ski::preBuild()
   //
   // Position the cooling block m_coolingBlockPhiOffset from the lower egde 
   // of the module and m_coolingBlockRadialOffset from surface of the module.
-  // double  xCoolingBlockOffset = -(m_coolingBlockRadialOffset + 
-  //      0.5 * m_module->thickness() + 
-  //      0.5 * m_coolingBlock->thickness()) + epsilon();
-  // 10th Aug 2005 S.Mima modified.
+
   double xCoolingBlockOffset = - m_coolingBlockRadialOffset + coolingBlockOffsetX();
-  // Works for both tilts.
-  // *** 18:00 Wed 15th Jun 2005 D.Naito modified. (00)*********************************
-  // *** 14:00 Fri 27th May 2005 D.Naito modified. (03)*********************************
-  //double  yCoolingBlockOffset = -tiltSign *(0.5 * m_module->baseBoard()->width() 
-  //         - 0.5 *  m_coolingBlock->width()
-  //         - m_coolingBlockPhiOffset );
-  //double  zCoolingBlockOffset = m_module->baseBoardCenter();
-  // *** -->>                                      (03)*********************************
-  //double  yCoolingBlockOffset = tiltSign *(m_module->baseBoard()->bb1OffsetY() - 0.5*(m_module->baseBoard()->bb1()->width()) 
-  //                                         + 0.5*m_coolingBlock->width() - m_coolingBlockPhiOffset);
-  //double  zCoolingBlockOffset = m_module->baseBoard()->bb1OffsetZ() - 0.5*(m_module->baseBoard()->bb3()->length());
-  // *** End of modified lines. ------------------ (03)*********************************
-  // *** -->>                                      (00)*********************************
-  //double  yCoolingBlockOffset = tiltSign *(m_module->baseBoardOffsetY() - 0.5*(m_module->baseBoard()->width()) 
-  //                                         + 0.5*m_coolingBlock->width() - m_coolingBlockPhiOffset);
-  // 10th Aug 2005 S.Mima modified.
   double yCoolingBlockOffset = tiltSign *(coolingBlockOffsetY() - m_coolingBlockPhiOffset);
-  // double  zCoolingBlockOffset = m_module->baseBoardOffsetZ();
-  // 10th Aug 2005 S.Mima modified.
   double zCoolingBlockOffset = coolingBlockOffsetZ(); 
-  // *** End of modified lines. ------------------ (03)*********************************
 
   //
   // Calculate position of dogleg
   //
-  // *** 17:00 Fri 27th May 2005 D.Naito modified. (06)*********************************
-  //double xDoglegOffset = - (m_doglegRadialOffset + 0.5 *m_dogleg->thickness()
-  //       + 0.5 * m_module->thickness())
-  // *** -->>                                      (06)*********************************
-  // 15th Aug 2005 S.Mima modified.
-  //  double xDoglegOffset = - (m_doglegRadialOffset + 0.5 *m_dogleg->thickness()
-  //      + 0.5 * m_module->env2Thickness() + epsilon());
+
   double xDoglegOffset = doglegOffsetX() - m_doglegRadialOffset; 
-  // *** End of modified lines. ------------------ (06)*********************************
 
   // NB length of dogleg runs in phi direction.
   double yDoglegOffset =  tiltSign * (doglegOffsetY() + m_doglegPhiOffset);
 
-  // 15th Aug 2005 S.Mima modified.
-  //  double zDoglegOffset = m_module->baseBoardCenter();
   double zDoglegOffset = coolingBlockOffsetZ();
 
   //
   // Calculate position of cooling pipe.
   //
-  // First calculate minimum block position.
-  //double xCoolingBlockPosMin = -xModuleOffset + xCoolingBlockOffset;
-  //double yCoolingBlockPosMin = -yModuleOffset + yCoolingBlockOffset;
-  //double yCoolingBlockPosMin =  yCoolingBlockOffset;
-  // 10th Aug 2005 S.Mima modified. 
-  //  double xCoolingPipePos = xCoolingBlockPosMin - (m_coolingPipeRadialOffset + 
-  //        0.5 * m_coolingBlock->thickness() + m_coolingPipe->pipeRadius());
   double xCoolingPipePos = coolingPipeOffsetX() - m_coolingPipeRadialOffset;
-  //double yCoolingPipePos = yCoolingBlockPosMin + m_coolingPipePhiOffset;
   double yCoolingPipePos = coolingPipeOffsetY() + m_coolingPipePhiOffset; 
   m_coolingPipePos = new GeoTransform(GeoTrf::Translate3D(xCoolingPipePos, yCoolingPipePos, 0));
   m_coolingPipePos->ref();
@@ -259,11 +164,7 @@ SCT_Ski::preBuild()
 
     // Not sure if this needs to be alignable
     double xModulePos = stagger_sign * xModuleOffset;
-    // *** 20:00 Fri 27th May 2005 D.Naito modified. (11)*********************************
-    //double yModulePos = stagger_sign * yModuleOffset;
-    // *** -->>                                      (11)*********************************
     double yModulePos = yModuleOffset;
-    // *** End of modified lines. ------------------ (04)*********************************
     double zModulePos = m_zPos[iModule];
     
     // There is only one type of module and this is rotated one way or the other
@@ -343,13 +244,9 @@ SCT_Ski::preBuild()
   double skiWidth = moduleYMax - moduleYMin + 2*rphiClearance;
 
   //
-  // 17:00 Fri 27th May 2005 D.Naito put some comments.
-  // m_module->thickness() corresponds to the thickness of envelope2 of SCT_Module.
   // NB. The envelope is centered on x.
   //
   double skiThickness = m_module->thickness() + 2 * std::abs(xModuleOffset) + radialClearance;
-  //double skiLength =    2.0 * std::max(std::abs(m_zPos[0]), std::abs(m_zPos[m_modulesPerSki - 1])) 
-  //                         + m_module->length();
             
   // Due to the cooling block and dogleg being next to the module and
   // as the modules are staggered it is no longer possible to have a
@@ -366,16 +263,8 @@ SCT_Ski::preBuild()
 
   // Take into account possiblity that the dogleg extends past the module.
 
-  // *** 17:00 Fri 27th May 2005 D.Naito modified. (07)*********************************
-  //double maxWidth =  std::max(std::max(std::abs(-yModuleOffset + yDoglegOffset) +  0.5*m_dogleg->length(),
-  //           std::abs(+yModuleOffset + yDoglegOffset) +  0.5*m_dogleg->length()),
-  //         0.5*skiWidth);
-  //double ymax1 = maxWidth;
-  //double ymin1 = -maxWidth;
-  // *** -->>                                      (07)*********************************
   double ymax1 = moduleYMax + rphiClearance;
   double ymin1 = moduleYMin - rphiClearance;
-  // *** End of modified lines. ------------------ (07)*********************************
   double ymin2,ymax2;
   if (tiltSign > 0) {
     ymax2 = std::max(-yModuleOffset + yCoolingBlockOffset + 0.5*m_coolingBlock->width(),
@@ -403,21 +292,16 @@ SCT_Ski::preBuild()
   double yCenter = 0.5*(ymin1+ymax1);
   double xShift2 = 0.5*(xmin2+xmax2) - xCenter;
   double yShift2 = 0.5*(ymin2+ymax2) - yCenter;
-  //double xCoolingPipeShift = xCoolingPipePos - xCenter;
-  //double yCoolingPipeShift = yCoolingPipePos - yCenter;
 
   m_refPointTransform = new GeoTransform(GeoTrf::Translate3D(-xCenter, -yCenter, 0));
   m_refPointTransform->ref();
 
-  // *** 10:00 Tue 31st May 2005 D.Naito modified. (14)*********************************
-  // *** -->>                                      (14)*********************************
   m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenter, -yCenter, 0.0);
   m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xShift2, -yShift2, 0.0);
   m_env1Thickness      = xmax1-xmin1;
   m_env1Width          = ymax1-ymin1;
   m_env2Thickness      = xmax2-xmin2;
   m_env2Width          = ymax2-ymin2;
-  // *** End of modified lines. ------------------ (14)*********************************
 
   GeoBox * envelope1 = new GeoBox(0.5 * (xmax1-xmin1), 0.5 * (ymax1-ymin1), 0.5 * m_length);
   GeoBox * envelope2 = new GeoBox(0.5 * (xmax2-xmin2), 0.5 * (ymax2-ymin2), 0.5 * m_length);
@@ -430,8 +314,6 @@ SCT_Ski::preBuild()
   
   GeoLogVol * skiLog = new GeoLogVol(getName(), skiEnvelopeShape, m_materials->gasMaterial());
 
-  //GeoPhysVol * ski = new GeoPhysVol(skiLog);
-
   // Make names once only so we don't recreate them again again.
   for (int iModule = 0; iModule < m_modulesPerSki; iModule++) {
     // Add identifier to name.
@@ -444,12 +326,7 @@ SCT_Ski::preBuild()
   // Define thickness, width, and length. This is chosen as bounding box centered on the ski rotation axis
   // which contains the modules and dogleg (ie cooling blocks and cooling pipe is ignored.)
   m_thickness = 2 * std::abs(xmin1);
-  // *** 17:00 Fri 27th May 2005 D.Naito modified. (08)*********************************
-  //m_width = 2 * maxWidth;
-  // *** -->>                                      (08)*********************************
   m_width = skiWidth;
-  // *** End of modified lines. ------------------ (08)*********************************
-  // m_length defined in constructor.
 
 
   // Calculate the clearances. Module envelope1 is the thickness up to the sensors. This is used for the module to 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx
index 1c3d5213f88c..d95255ec71d6 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx
@@ -13,7 +13,6 @@
 
 #include "SCT_GeoModel/SCT_Ski.h"
 #include "SCT_GeoModel/SCT_Module.h"
-// 14th Aug 2005 S.Mima modified.
 #include "SCT_GeoModel/SCT_Bracket.h"
 #include "SCT_GeoModel/SCT_Harness.h"
 #include "SCT_GeoModel/SCT_SkiPowerTape.h"
@@ -81,17 +80,11 @@ SCT_SkiAux::build()
   // such that the lower edge of the bracket is lined up with the upper 
   // edge of the next module below it. 
 
-  //  std::cout << "m_bracketPhiOffset = " << m_bracketPhiOffset << std::endl;
-  //  std::cout << "m_powerTapePhiOffset = " << m_powerTapePhiOffset << std::endl;
-  //  std::cout << "m_sectorAngle = " << m_sectorAngle << std::endl;
-
   // Define small distance for avoiding overlaps.
   double radiusBracket = m_innerRadius + 0.5*m_bracket->thickness() + epsilon();
   double xBracketPos = radiusBracket * cos(m_bracketPhiOffset);
   double yBracketPos = radiusBracket * sin(m_bracketPhiOffset);
  
-  //  std::cout << "Bracket x,y = " << xBracketPos << "  " << yBracketPos << std::endl;
-
   // Calculate position of harness, if present. Phi offset is
   // same as power tapes, and we leave a gap equal to one tape
   // width
@@ -104,7 +97,6 @@ SCT_SkiAux::build()
     xHarnessPos = radiusHarness * cos(m_powerTapePhiOffset);
     yHarnessPos = radiusHarness * sin(m_powerTapePhiOffset);
   }
-  //  std::cout << "Harness x,y = " << xHarnessPos << "  " << yHarnessPos << std::endl;
     
   //
   // Calculate Position of PowerTapes
@@ -122,8 +114,6 @@ SCT_SkiAux::build()
   double xTapePos = radiusTape * cos(m_powerTapePhiOffset);
   double yTapePos = radiusTape * sin(m_powerTapePhiOffset);
 
-  //  std::cout << "Tape x,y = " << xTapePos << "  " << yTapePos << std::endl;
-
   //
   // Calculate envelope.
   //
@@ -175,14 +165,6 @@ SCT_SkiAux::build()
   const GeoLogVol *skiAuxLog = 
     new GeoLogVol(getName(), skiAuxShape, m_materials->gasMaterial());
   GeoPhysVol * skiAux = new GeoPhysVol(skiAuxLog);
-  //  std::cout << "SCT_SkiAux: m_sectorStartAngle = " <<  m_sectorStartAngle
-  //            << ", m_sectorAngle = " << m_sectorAngle << std::endl;
-  //
-  //  std::cout << "minangle, maxangle, m_sectorStartAngle, m_sectorAngle = " 
-  //         << std::endl;
-  //  std::cout << minAngle << ","  << maxAngle << ", " 
-  //          << m_sectorStartAngle << "," 
-  //         << m_sectorAngle << std::endl;
 
   //
   // Position brackets
@@ -192,8 +174,6 @@ SCT_SkiAux::build()
   for (int iModule = 0; iModule < m_ski->modulesPerSki(); iModule++) {
     
     // Z Position is position of the center of the baseBoard:
-    // 15th Aug 2005 S.Mima modified.
-    //    double baseBoardPosZ =  m_ski->zPos(iModule) + m_ski->module()->baseBoardCenter();
     double coolingCenterPosZ =  m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ();
     GeoTrf::Translation3D posBracket(xBracketPos, yBracketPos, coolingCenterPosZ);
     GeoTrf::RotateZ3D rotBracket(m_bracketPhiOffset);
@@ -242,12 +222,6 @@ calcMinMaxRatioS(double xCenter, double yCenter,
   r10 = (yCenter + y) / (xCenter - x);
   r01 = (yCenter - y) / (xCenter + x);
 
-  //std::cout << "r11,r00,r10,r02: " 
-  //        << r11 << " "
-  //       << r00 << " "
-  //       << r10 << " "
-  //       << r01 << " " << std::endl;
-    
   minRatio = std::min(r11 , std::min(r00, std::min(r10, r01)));
   maxRatio = std::max(r11 , std::max(r00, std::max(r10, r01)));
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx
index a80601666bf2..9d1f747a2eba 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -15,7 +15,7 @@
 
 #include "SCT_GeoModel/SCT_Ski.h"
 #include "SCT_GeoModel/SCT_PowerTape.h"
-#include "SCT_GeoModel/SCT_Module.h"  // 28th Mar 2005 S.Mima modified.
+#include "SCT_GeoModel/SCT_Module.h"
 
 #include "GeoModelKernel/GeoBox.h"
 #include "GeoModelKernel/GeoLogVol.h"
@@ -84,11 +84,6 @@ SCT_SkiPowerTape::build()
   double ltot = 0.;
   for (int iModule = 0; iModule < m_ski->modulesPerSki(); iModule++) {
     
-    // Position of center of hybrid:
-    // 15th Aug 2005 S.Mima modified.
-    //    double baseBoardPos =  m_ski->zPos(iModule) + m_ski->module()->baseBoardCenter();
-
-
     // Position PowerTapes
     // These run from the nearest interlink to the edge of the dogleg
     double tapeLength, tapeMid, tapeStart, tapeEnd;
@@ -104,9 +99,6 @@ SCT_SkiPowerTape::build()
     if (m_ski->zPos(iModule) > 0) {
 
       // Tape runs from high z end to edge of dogleg. NB width of dogleg is in z-direction
-      // 15th Aug 2005 S.Mima modified.
-      //      tapeStart  = baseBoardPos + 0.5 * m_ski->dogleg()->width();
-      //      tapeEnd    = 0.5 * m_length;
       tapeStart  = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() + m_powerTapeStartPointOffset;
       tapeEnd    = 0.5 * m_length;
       
@@ -116,9 +108,6 @@ SCT_SkiPowerTape::build()
     } else {
 
       // Tape runs from low z end to edge of dogleg. NB width of dogleg is in z-direction
-      // 15th Aug 2005 S.Mima modified.
-      //      tapeStart  =  baseBoardPos - 0.5 * m_ski->dogleg()->width();
-      //      tapeEnd    =  -0.5 * m_length;
       tapeStart  =  m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() - m_powerTapeStartPointOffset;
       tapeEnd    =  -0.5 * m_length;
    
@@ -129,7 +118,6 @@ SCT_SkiPowerTape::build()
 
     tapeLength = std::abs(tapeEnd - tapeStart);
     tapeMid = 0.5 * (tapeEnd + tapeStart);
-    //    std::cout << "Tape length = " << tapeLength << std::endl;
 
 
     // Make sure that first half are negative and secand half are positive.
@@ -143,7 +131,6 @@ SCT_SkiPowerTape::build()
     // Create the tape
 
     // Label tape with M# at end of string
-    //std::ostringstream label; label << "PowerTapeM" << iModule + 1; 
     SCT_PowerTape powerTape(getName()+"PowerTapeM"+intToString(iModule + 1), tapeLength,
                             m_detectorManager, m_geometryManager, m_materials);
     
-- 
GitLab


From 9eb208827695a8a0fa34366212a297bd2ff1d6c5 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 10 Jun 2020 04:50:59 +0200
Subject: [PATCH 104/266] Remove delete from SCT_Monitoring package using
 std::unique_ptr.

---
 .../SCT_Monitoring/src/SCTLorentzMonAlg.cxx   | 13 +++-------
 .../SCT_Monitoring/src/SCTTracksMonTool.cxx   | 26 +++++++------------
 2 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonAlg.cxx
index 30492cefe0ba..1ce79bdf52f7 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonAlg.cxx
@@ -12,6 +12,7 @@
 #include "TrkTrackSummary/TrackSummary.h"
 
 #include <cmath>
+#include <memory>
 #include <vector>
 
 SCTLorentzMonAlg::SCTLorentzMonAlg(const std::string& name, ISvcLocator* pSvcLocator)
@@ -78,14 +79,13 @@ StatusCode SCTLorentzMonAlg::fillHistograms(const EventContext& ctx) const {
     }
 
     const Trk::TrackSummary* summary{track->trackSummary()};
-    bool ownSummary{false};
+    std::unique_ptr<Trk::TrackSummary> mySummary;
     if (summary==nullptr) {
-      summary = m_trackSummaryTool->createSummary(*track);
+      mySummary = m_trackSummaryTool->summary(*track);
+      summary = mySummary.get();
       if (summary==nullptr) {
         ATH_MSG_WARNING("Trk::TrackSummary is null and cannot be created by " << m_trackSummaryTool.name());
         continue;
-      } else {
-        ownSummary = true;
       }
     }
 
@@ -187,11 +187,6 @@ StatusCode SCTLorentzMonAlg::fillHistograms(const EventContext& ctx) const {
         } // end if (clus)
       } // if (tsos->type(Trk::TrackStateOnSurface::Measurement)) {
     }// end of loop on TrackStatesonSurface (they can be SiClusters, TRTHits,..)
-
-    if (ownSummary) {
-      delete summary;
-      summary = nullptr;
-    }
   } // end of loop on tracks
 
     
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
index e6fabac28012..2f70b02c9b3c 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
@@ -222,34 +222,32 @@ SCTTracksMonTool::fillHistograms() {
             const unsigned int subsystemIndex{bec2Index(bec)};
             const bool doThisDetector{doThisSubsystem[subsystemIndex]};
             hasHits[subsystemIndex] = true;
-            const Trk::TrackParameters* trkParameters{nullptr};
+            std::unique_ptr<const Trk::TrackParameters> trkParameters(nullptr);
+            const Trk::TrackParameters* trkParam{tsos->trackParameters()};
             const Trk::RIO_OnTrack* rio{dynamic_cast<const Trk::RIO_OnTrack*>(tsos->measurementOnTrack())};
-            bool updateSucceeds{true};
             if (rio) {
 #ifndef NDEBUG
               ATH_MSG_DEBUG("if rio");
 #endif
               if (m_doUnbiasedCalc) {
-                const Trk::TrackParameters* trkParam{tsos->trackParameters()};
                 if (trkParam) {
-                  trkParameters = m_updator->removeFromState(*trkParam, rio->localParameters(), rio->localCovariance());
-                  updateSucceeds = (trkParameters);
+                  trkParameters.reset(m_updator->removeFromState(*trkParam, rio->localParameters(), rio->localCovariance())); //need to take ownership of the returned pointer
+                  if (trkParameters) {
+                    trkParam = trkParameters.get();
+                  }
                 }
               }
             } else {
               ATH_MSG_DEBUG("not rio");
             }
-            if (trkParameters==nullptr) {
-              trkParameters = tsos->trackParameters();
-            }
-            if (trkParameters) {
-              const AmgVector(5) LocalTrackParameters{trkParameters->parameters()};
+            if (trkParam) {
+              const AmgVector(5) LocalTrackParameters{trkParam->parameters()};
 #ifndef NDEBUG
               ATH_MSG_DEBUG("Track Position Phi= " << LocalTrackParameters[Trk::locX]);
               ATH_MSG_DEBUG("Cluster Position Phi= " << clus->localParameters()[Trk::locX]);
 #endif
               if (not m_residualPullCalculator.empty()) {
-                std::unique_ptr<const Trk::ResidualPull> residualPull{m_residualPullCalculator->residualPull(rio, trkParameters,
+                std::unique_ptr<const Trk::ResidualPull> residualPull{m_residualPullCalculator->residualPull(rio, trkParam,
                                                                       m_doUnbiasedCalc ? Trk::ResidualPull::Unbiased : Trk::ResidualPull::Biased)};
                 if (not residualPull) {
                   ATH_MSG_WARNING("Residual Pull Calculator did not succeed!");
@@ -267,12 +265,6 @@ SCTTracksMonTool::fillHistograms() {
               ATH_MSG_WARNING("No measured local parameters, pull won't be calculated");
             }
             ++local_scthits; // TODO This is not correct, change it
-            if (m_doUnbiasedCalc and rio and updateSucceeds) {
-              if (trkParameters) {
-                delete trkParameters;
-                trkParameters = nullptr;
-              }
-            }
           } // end if SCT..
         } // end if (clus)
       } // if (tsos->type(Trk::TrackStateOnSurface::Measurement))
-- 
GitLab


From daf3243570b07ae69f1482297839497cf5eb3bba Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 10:41:15 +0200
Subject: [PATCH 105/266] LArFlatConditionsAlg: Use
 WriteHandle.addDependency(), reduce boilerplate code

---
 .../LArRecUtils/src/LArFlatConditionsAlg.h    | 13 ++++---
 .../LArRecUtils/src/LArFlatConditionsAlg.icc  | 34 ++++---------------
 2 files changed, 12 insertions(+), 35 deletions(-)

diff --git a/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.h b/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.h
index fb38961b740d..dc017b2cd7e7 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.h
+++ b/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.h
@@ -1,7 +1,7 @@
 //Dear emacs, this is -*- C++ -*- 
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARFLATCONDITIONSALG_H
@@ -17,17 +17,16 @@
 template<class T>
 class LArFlatConditionsAlg: public AthAlgorithm {
  public:
-
-  LArFlatConditionsAlg(const std::string& name, ISvcLocator* pSvcLocator);
-  ~LArFlatConditionsAlg();
+  using AthAlgorithm::AthAlgorithm;
+  ~LArFlatConditionsAlg() = default;
 
   virtual StatusCode initialize() override;
   virtual StatusCode execute() override;
 
  private:
-  SG::ReadCondHandleKey<CondAttrListCollection> m_readKey;
-  SG::WriteCondHandleKey<T>  m_writeKey;
-  ServiceHandle<ICondSvc> m_condSvc;
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this,"ReadKey","","Key of the input CDO (AttrListCollection)"};
+  SG::WriteCondHandleKey<T>  m_writeKey{this,"WriteKey","","Key of the output LArXYZFlat CDO"};
+  ServiceHandle<ICondSvc> m_condSvc{this,"CondSvc","CondSvc"};
 
 };
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.icc b/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.icc
index 55c83809c331..edb60089af9a 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.icc
+++ b/LArCalorimeter/LArRecUtils/src/LArFlatConditionsAlg.icc
@@ -1,27 +1,11 @@
 //dear emacs, this is -*-c++-*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-template<class T>
-LArFlatConditionsAlg<T>::LArFlatConditionsAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_readKey("/LAr/ElecCalibFlat"),
-  m_writeKey("LArFlatCond","LArFlatCond"),
-  m_condSvc("CondSvc",name)
-{
-  declareProperty("ReadKey",m_readKey);
-  declareProperty("WriteKey",m_writeKey);
-}
-
-template<class T>
-LArFlatConditionsAlg<T>::~LArFlatConditionsAlg() {}
-
-
 template<class T>
 StatusCode LArFlatConditionsAlg<T>::initialize() {
-
   // CondSvc
   ATH_CHECK( m_condSvc.retrieve() );
   // Read Handles
@@ -48,29 +32,23 @@ StatusCode LArFlatConditionsAlg<T>::execute() {
 
   SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readKey};
   const CondAttrListCollection* attr{*readHandle};
-
   if (attr==nullptr) {
     msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_readKey.key() << endmsg;
     return StatusCode::FAILURE;
   }
+  writeHandle.addDependency(readHandle);
 
   std::unique_ptr<T> flat=std::make_unique<T>(attr);
   
-  // Define validity of the output cond object and record it
-  EventIDRange rangeW;
-  if(!readHandle.range(rangeW)) {
-    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
-    return StatusCode::FAILURE;
-  }
-
-  if(writeHandle.record(rangeW,flat.release()).isFailure()) {
+  if(writeHandle.record(std::move(flat)).isFailure()) {
     ATH_MSG_ERROR("Could not record LArFlatConditions object with " 
 		  << writeHandle.key() 
-		  << " with EventRange " << rangeW
+		  << " with EventRange " << writeHandle.getRange()
 		  << " into Conditions Store");
     return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " 
+	       << writeHandle.getRange() << " into Conditions Store");
 
  
   return StatusCode::SUCCESS;
-- 
GitLab


From 5ab82b3aaaeee6f034b8c8e8132801f5aed2b65b Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 10:41:42 +0200
Subject: [PATCH 106/266] LArSymConditionsAlg: Use WriteHandle.addDependency(),
 reduce boilerplate code

---
 .../LArRecUtils/src/LArSymConditionsAlg.h     | 20 +++++-----
 .../LArRecUtils/src/LArSymConditionsAlg.icc   | 39 ++++---------------
 2 files changed, 19 insertions(+), 40 deletions(-)

diff --git a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
index 2d8277547a85..8d5881192ed6 100644
--- a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
+++ b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
@@ -1,7 +1,7 @@
 //Dear emacs, this is -*- C++ -*- 
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARSYMCONDITIONSALG_H
@@ -17,19 +17,21 @@
 template<class MC_t, class SYM_t>
 class LArSymConditionsAlg: public AthAlgorithm {
  public:
+  
+  //delegate to base-class ctor
+  using AthAlgorithm::AthAlgorithm;
 
-  LArSymConditionsAlg(const std::string& name, ISvcLocator* pSvcLocator);
-  ~LArSymConditionsAlg();
+  ~LArSymConditionsAlg()=default;
 
-  StatusCode initialize();
-  StatusCode execute();
+  StatusCode initialize() override;
+  StatusCode execute() override;
   StatusCode finalize() {return StatusCode::SUCCESS;}
 
  private:
-  SG::ReadCondHandleKey<MC_t> m_readKey;
-  SG::ReadCondHandleKey<LArMCSym> m_mcSymKey;
-  SG::WriteCondHandleKey<SYM_t>  m_writeKey;
-  ServiceHandle<ICondSvc> m_condSvc;
+  SG::ReadCondHandleKey<LArMCSym> m_mcSymKey{this,"LArMCSym","LArMCSym","Key of the LArMCSym symmetry table CDO"};
+  SG::ReadCondHandleKey<MC_t> m_readKey{this,"ReadKey","LArRampMC","Key of LArXYZMC input CDO"}; 
+  SG::WriteCondHandleKey<SYM_t>  m_writeKey{this,"WriteKey","RampSym","Key of LArXYZSym output CDO"};
+  ServiceHandle<ICondSvc> m_condSvc{this,"CondSvc","CondSvc"};
 
 };
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.icc b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.icc
index f261be9df252..07fd0c65ff1d 100644
--- a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.icc
+++ b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.icc
@@ -1,26 +1,9 @@
 //dear emacs, this is -*-c++-*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-template<class MC_t, class SYM_t>
-LArSymConditionsAlg<MC_t,SYM_t>::LArSymConditionsAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_readKey("RampMC"),
-  m_mcSymKey("LArMCSym"),
-  m_writeKey("RampSym","RampSym"),
-  m_condSvc("CondSvc",name)
-{
-  declareProperty("ReadKey",m_readKey);
-  declareProperty("MCSymKey",m_mcSymKey);
-  declareProperty("WriteKey",m_writeKey);
-}
-
-template<class MC_t, class SYM_t>
-LArSymConditionsAlg<MC_t,SYM_t>::~LArSymConditionsAlg() {}
-
-
 template<class MC_t, class SYM_t>
 StatusCode LArSymConditionsAlg<MC_t,SYM_t>::initialize() {
 
@@ -51,39 +34,33 @@ StatusCode LArSymConditionsAlg<MC_t,SYM_t>::execute() {
 
   SG::ReadCondHandle<MC_t> readHandle{m_readKey};
   const MC_t* mcClass{*readHandle};
-
   if (mcClass==nullptr) {
     ATH_MSG_ERROR("Failed to retrieve input object with key " << m_readKey.key());
     return StatusCode::FAILURE;
   }
+  writeHandle.addDependency(readHandle);
+  
 
   SG::ReadCondHandle<LArMCSym> mcSymHdl{m_mcSymKey};
   const LArMCSym* mcSym={*mcSymHdl};
-
   if (mcSym==nullptr) {
     ATH_MSG_ERROR("Failed to retrieve LArMCSym object with key " << m_mcSymKey.key());
     return StatusCode::FAILURE;
   }
-
+  writeHandle.addDependency(mcSymHdl);
 
 
   std::unique_ptr<SYM_t> sym=std::make_unique<SYM_t>(mcSym,mcClass);
   
-  // Define validity of the output cond object and record it
-  EventIDRange rangeW;
-  if(!readHandle.range(rangeW)) {
-    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
-    return StatusCode::FAILURE;
-  }
-
-  if(writeHandle.record(rangeW,sym.release()).isFailure()) {
+  if(writeHandle.record(std::move(sym)).isFailure()) {
     ATH_MSG_ERROR("Could not record LArSymCond object with " 
 		  << writeHandle.key() 
-		  << " with EventRange " << rangeW
+		  << " with EventRange " << writeHandle.getRange()
 		  << " into Conditions Store");
     return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << 
+	        writeHandle.getRange() << " into Conditions Store");
 
  
   return StatusCode::SUCCESS;
-- 
GitLab


From 42daefb5dded5c0142f92ce47af65b259d593e5a Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Wed, 10 Jun 2020 09:48:46 +0000
Subject: [PATCH 107/266] Add/pass Event Context to the egamma extrapolation
 tools and then to the CaloExtension tool

---
 .../src/ConversionFinder.cxx                  |  16 +-
 .../src/EMGSFCaloExtensionBuilder.cxx         |   7 +-
 .../egamma/egammaAlgs/src/EMVertexBuilder.cxx |  44 +--
 .../egammaInterfaces/IEMConversionBuilder.h   |   2 -
 .../egammaInterfaces/IEMExtrapolationTools.h  |  44 +--
 .../egammaTools/src/EMConversionBuilder.cxx   |  75 ++--
 .../egammaTools/src/EMConversionBuilder.h     | 216 +++++++-----
 .../src/EMExtrapolationTools.cxx              | 321 +++++++++++-------
 .../src/EMExtrapolationTools.h                | 197 ++++++-----
 9 files changed, 545 insertions(+), 377 deletions(-)

diff --git a/InnerDetector/InDetRecAlgs/InDetConversionFinder/src/ConversionFinder.cxx b/InnerDetector/InDetRecAlgs/InDetConversionFinder/src/ConversionFinder.cxx
index c42963662296..9eec3234d964 100755
--- a/InnerDetector/InDetRecAlgs/InDetConversionFinder/src/ConversionFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetConversionFinder/src/ConversionFinder.cxx
@@ -16,7 +16,7 @@
 #include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include "GaudiKernel/MsgStream.h"
-
+#include "GaudiKernel/EventContext.h"
 
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
@@ -102,7 +102,10 @@ namespace InDet
   class cleanup_pair : public std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   {
   public:
-    cleanup_pair(const std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> &a_pair) : std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>(a_pair) {}
+    cleanup_pair(const std::pair<xAOD::VertexContainer*,
+                                 xAOD::VertexAuxContainer*>& a_pair)
+      : std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>(a_pair)
+    {}
     ~cleanup_pair() {
       delete this->first;
       delete this->second;
@@ -123,9 +126,10 @@ namespace InDet
   StatusCode ConversionFinder::execute()
   {
 
+    const EventContext& ctx =Algorithm::getContext();
     m_events_processed++;
 
-    SG::ReadHandle<xAOD::TrackParticleContainer> trackParticleCollection(m_tracksName);
+    SG::ReadHandle<xAOD::TrackParticleContainer> trackParticleCollection(m_tracksName,ctx);
     if ( !trackParticleCollection.isValid())
     {
       ATH_MSG_WARNING( "Could not find xAOD::TrackParticleContainer " << m_tracksName << " in StoreGate.");
@@ -154,14 +158,14 @@ namespace InDet
 
         Amg::Vector3D momentum(0., 0., 0.);
         for (unsigned int i = 0; i < vertex->nTrackParticles(); ++i){
-          momentum += m_EMExtrapolationTool->getMomentumAtVertex(*vertex, i);
+          momentum += m_EMExtrapolationTool->getMomentumAtVertex(ctx,*vertex, i);
         }
 
         vertex->auxdata<float>("px") = momentum.x();
         vertex->auxdata<float>("py") = momentum.y();
         vertex->auxdata<float>("pz") = momentum.z();
 
-        if (!m_EMExtrapolationTool->getEtaPhiAtCalo(vertex, &etaAtCalo, &phiAtCalo))
+        if (!m_EMExtrapolationTool->getEtaPhiAtCalo(ctx,vertex, &etaAtCalo, &phiAtCalo))
         {
           ATH_MSG_DEBUG("getEtaPhiAtCalo failed!");
         }
@@ -174,7 +178,7 @@ namespace InDet
 
     analyzeResults(conversions.first);
 
-    SG::WriteHandle<xAOD::VertexContainer> output(m_InDetConversionOutputName );
+    SG::WriteHandle<xAOD::VertexContainer> output(m_InDetConversionOutputName,ctx);
     if (output.record( std::unique_ptr<xAOD::VertexContainer>(conversions.releaseFirst()) ,
                        std::unique_ptr<xAOD::VertexAuxContainer>(conversions.releaseSecond())).isFailure()) {
       ATH_MSG_ERROR("Failed to record conversion vertices " << m_InDetConversionOutputName.key());
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx
index dc8706d2c5d3..ac8170d3284f 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx
@@ -77,9 +77,10 @@ EMGSFCaloExtensionBuilder::execute_r(const EventContext& ctx) const
       mask[trkIt->index()] = false;
     }
   }
-  ATH_CHECK(
-    m_perigeeParticleCaloExtensionTool->caloExtensionCollection(*ptrTracks, mask, *ptrPerigee));
-  ATH_CHECK(m_lastParticleCaloExtensionTool->caloExtensionCollection(*ptrTracks, mask, *ptrLast));
+  ATH_CHECK(m_perigeeParticleCaloExtensionTool->caloExtensionCollection(
+    ctx, *ptrTracks, mask, *ptrPerigee));
+  ATH_CHECK(m_lastParticleCaloExtensionTool->caloExtensionCollection(
+    ctx, *ptrTracks, mask, *ptrLast));
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
index 13a693671b99..f74886327968 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
@@ -12,11 +12,12 @@ email   : kerstin.tackmann@cern.ch, Bruno.Lenzi@cern.ch
 changes :
           Nov 2011 (KT) Initial version
           Mar 2014 (BL) xAOD migration, creates both double and single track vertices
-
+         
 ***************************************************************************/
 
 #include "EMVertexBuilder.h"
 
+#include "GaudiKernel/EventContext.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/VertexContainer.h"
 #include "xAODTracking/VertexAuxContainer.h"
@@ -24,13 +25,12 @@ changes :
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
 
-EMVertexBuilder::EMVertexBuilder(const std::string& name, 
-				 ISvcLocator* pSvcLocator):
-  AthAlgorithm(name, pSvcLocator)
+EMVertexBuilder::EMVertexBuilder(const std::string& name,
+                                 ISvcLocator* pSvcLocator)
+  : AthAlgorithm(name, pSvcLocator)
 {
 }
 
-// ============================================================
 StatusCode EMVertexBuilder::initialize() {
 
   ATH_MSG_DEBUG( "Initializing " << name() << "...");
@@ -60,16 +60,16 @@ StatusCode EMVertexBuilder::initialize() {
   return StatusCode::SUCCESS;
 }
 
-// ============================================================
 StatusCode EMVertexBuilder::finalize() {
   return StatusCode::SUCCESS;
 }
 
-// ============================================================
 StatusCode EMVertexBuilder::execute()
-{  	
+{   
+  
+  const EventContext& ctx =Algorithm::getContext();
   //retrieve TrackParticleContainer
-  SG::ReadHandle<xAOD::TrackParticleContainer> TPCol(m_inputTrackParticleContainerKey);
+  SG::ReadHandle<xAOD::TrackParticleContainer> TPCol(m_inputTrackParticleContainerKey,ctx);
 
   // check for serial running only, remove in MT
   if(!TPCol.isValid()){
@@ -77,13 +77,16 @@ StatusCode EMVertexBuilder::execute()
     return StatusCode::FAILURE;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> verticesPair = m_vertexFinderTool->findVertex(TPCol.cptr());
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> verticesPair =
+    m_vertexFinderTool->findVertex(TPCol.cptr());
+
   if (!verticesPair.first || !verticesPair.second){
     ATH_MSG_ERROR("Null pointer to conversion container");
     return StatusCode::SUCCESS;
   }
 
-  SG::WriteHandle<xAOD::VertexContainer>vertices(m_outputConversionContainerKey);
+  SG::WriteHandle<xAOD::VertexContainer>vertices(m_outputConversionContainerKey,ctx);
+
   ATH_CHECK(vertices.record(std::unique_ptr<xAOD::VertexContainer>(verticesPair.first),
 			    std::unique_ptr<xAOD::VertexAuxContainer>(verticesPair.second)));
 
@@ -98,7 +101,7 @@ StatusCode EMVertexBuilder::execute()
     
     Amg::Vector3D momentum(0., 0., 0.);
     for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i){
-      momentum += m_EMExtrapolationTool->getMomentumAtVertex(vertex, i);
+      momentum += m_EMExtrapolationTool->getMomentumAtVertex(ctx,vertex, i);
     }
 
     static const SG::AuxElement::Accessor<float> accPx("px");
@@ -113,13 +116,12 @@ StatusCode EMVertexBuilder::execute()
     bool vxSingleTRT = (convType == xAOD::EgammaParameters::singleTRT);
 
     if ((vxDoubleTRT && momentum.perp() < m_minPtCut_DoubleTrack) ||
-	(vxSingleTRT &&  momentum.perp()< m_minPtCut_SingleTrack) || 
-	((*itVtx)->position().perp() > m_maxRadius)){
-      
+        (vxSingleTRT && momentum.perp() < m_minPtCut_SingleTrack) ||
+        ((*itVtx)->position().perp() > m_maxRadius)) {
+
       itVtx = vertices->erase(itVtx);
       itVtxEnd = vertices->end();
-    }
-    else{
+    } else {
       ++itVtx;
     }
   }
@@ -130,12 +132,12 @@ StatusCode EMVertexBuilder::execute()
   float phiAtCalo = -9999.;
   for (itVtx = vertices->begin(); itVtx != vertices->end(); ++itVtx ){
     xAOD::Vertex *vertex = *itVtx;
-    
-    
-    if (!m_EMExtrapolationTool->getEtaPhiAtCalo(vertex, &etaAtCalo, &phiAtCalo)){
+
+    if (!m_EMExtrapolationTool->getEtaPhiAtCalo(
+          ctx, vertex, &etaAtCalo, &phiAtCalo)) {
       ATH_MSG_DEBUG("getEtaPhiAtCalo failed!");
     }
-    
+
     // Decorate vertex with etaAtCalo, phiAtCalo
     static const SG::AuxElement::Accessor<float> accetaAtCalo("etaAtCalo");
     static const SG::AuxElement::Accessor<float> accphiAtCalo("phiAtCalo");
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
index 62773192a1d3..1c8929f7cb86 100755
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
@@ -44,8 +44,6 @@ class IEMConversionBuilder : virtual public IAlgTool
   virtual StatusCode executeRec(const EventContext& ctx,egammaRec* egRec) const =  0;
   /** @brief execute method*/
   virtual StatusCode hltExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const =0;
-  /** @brief execute method*/
-  virtual StatusCode vertexExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const =0;
   /** @brief finalize method*/
   virtual StatusCode finalize() = 0;
   
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
index d44cd5cb3d99..f35d5f4fe9e0 100644
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
@@ -55,17 +55,16 @@ public:
    *    layers given the Trk::ParametersBase.  
    *    whether or not to extrapolate to each calo sample
    */
-  virtual StatusCode getMatchAtCalo (const EventContext&           ctx,
-                                     const xAOD::CaloCluster&      cluster, 
-                                     const xAOD::TrackParticle&    trkPB,
-                                     Trk::PropDirection            direction,
-                                     std::array<double,4>&         eta,
-                                     std::array<double,4>&         phi,
-                                     std::array<double,4>&         deltaEta,
-                                     std::array<double,4>&         deltaPhi,
-                                     unsigned int                  extrapFrom = fromPerigee,
-                                     Cache* cache=nullptr) const = 0;
-
+  virtual StatusCode getMatchAtCalo(const EventContext& ctx,
+                                    const xAOD::CaloCluster& cluster,
+                                    const xAOD::TrackParticle& trkPB,
+                                    Trk::PropDirection direction,
+                                    std::array<double, 4>& eta,
+                                    std::array<double, 4>& phi,
+                                    std::array<double, 4>& deltaEta,
+                                    std::array<double, 4>& deltaPhi,
+                                    unsigned int extrapFrom = fromPerigee,
+                                    Cache* cache = nullptr) const = 0;
 
   /** test for vertex-to-cluster match given also the positions 
    * at the calorimeter from the vertex extrapolation  **/
@@ -77,23 +76,28 @@ public:
 
   /** get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
     Return false if the extrapolation fails **/
-  virtual bool getEtaPhiAtCalo (const xAOD::Vertex* vertex, 
-                                float *etaAtCalo,
-                                float *phiAtCalo) const = 0;
+  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
+                               const xAOD::Vertex* vertex,
+                               float* etaAtCalo,
+                               float* phiAtCalo) const = 0;
 
   /** get eta, phi at EM2 given NeutralParameters.
     Return false if the extrapolation fails **/
-  virtual bool getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-                                float *etaAtCalo,
-                                float *phiAtCalo) const =0;
+  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
+                               const Trk::TrackParameters* trkPar,
+                               float* etaAtCalo,
+                               float* phiAtCalo) const = 0;
 
   /** get the momentum of the i-th trackParticle attached to the vertex 
    * at the vertex (designed for conversions) **/
-  virtual Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, unsigned int) const = 0;
+  virtual Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
+                                            const xAOD::Vertex&,
+                                            unsigned int) const = 0;
 
   /** get sum of the momenta at the vertex (designed for conversions). Retrieve from auxdata if available and \<reuse\> is true **/
-  virtual Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, bool reuse = true) const = 0;
-
+  virtual Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
+                                            const xAOD::Vertex&,
+                                            bool reuse = true) const = 0;
 };
 
 inline const InterfaceID& IEMExtrapolationTools::interfaceID()
diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
index cb34165b9b73..89bd5dc02b6b 100644
--- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
@@ -3,13 +3,13 @@
 */
 
 /********************************************************************
-
 NAME:     EMConversionBuilder.cxx
 PACKAGE:  offline/Reconstruction/egamma/egammaRec
 
-AUTHORS:  D. Zerwas, B. Lenzi
+AUTHORS:  D. Zerwas, B. Lenzi , C. Anastopoulos
 CREATED:  Jul, 2005
 CHANGES:  Mar, 2014 (BL) xAOD migration
+CHANGES:  2020 (CA) Athena MT migration
 
 PURPOSE:  subAlgorithm which creates an EMConversion object. 
 
@@ -73,8 +73,8 @@ namespace {
 using namespace xAOD::EgammaParameters;
 
 EMConversionBuilder::EMConversionBuilder(const std::string& type,
-					 const std::string& name,
-					 const IInterface* parent)
+                                         const std::string& name,
+                                         const IInterface* parent)
   : AthAlgTool(type, name, parent)
 {
   
@@ -85,13 +85,10 @@ EMConversionBuilder::EMConversionBuilder(const std::string& type,
 
 // =================================================================
 // DESTRUCTOR:
-EMConversionBuilder::~EMConversionBuilder()
-{  
-}
+EMConversionBuilder::~EMConversionBuilder() {}
 
-// ==================================================================
-// INITIALIZE METHOD:  
-StatusCode EMConversionBuilder::initialize()
+StatusCode
+EMConversionBuilder::initialize()
 {
 
   ATH_MSG_DEBUG("Initializing EMConversionBuilder");
@@ -109,31 +106,42 @@ StatusCode EMConversionBuilder::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode EMConversionBuilder::executeRec(const EventContext& ctx, egammaRec* egRec) const {
+StatusCode
+EMConversionBuilder::executeRec(const EventContext& ctx, egammaRec* egRec) const
+{
   // retrieve Conversion Container
   
   SG::ReadHandle<xAOD::VertexContainer> conversions(m_conversionContainerKey, ctx); 
 
   // only for serial running; remove for MT
   if(!conversions.isValid()){
-    ATH_MSG_ERROR("Could not retrieve Conversion container with key: " << m_conversionContainerKey.key());
+    ATH_MSG_ERROR(
+      "Could not retrieve Conversion container with key: "
+      << m_conversionContainerKey.key());
     return StatusCode::FAILURE;
   }
   //reset the vertices
   std::vector< ElementLink< xAOD::VertexContainer > >  vertices;
   egRec->setVertices(vertices);
-  ATH_CHECK(vertexExecute(egRec,conversions.cptr()));
+  ATH_CHECK(vertexExecute(ctx,egRec,conversions.cptr()));
   return StatusCode::SUCCESS;
 }
 
-// =============================================================
-StatusCode EMConversionBuilder::hltExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const {
-  ATH_CHECK(vertexExecute(egRec,conversions));
+StatusCode
+EMConversionBuilder::hltExecute(egammaRec* egRec,
+                                const xAOD::VertexContainer* conversions) const
+{
+  ATH_CHECK(vertexExecute(Gaudi::Hive::currentContext(), egRec, conversions));
   return StatusCode::SUCCESS;
 }
 
-StatusCode EMConversionBuilder::vertexExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const {
-  
+StatusCode
+EMConversionBuilder::vertexExecute(
+  const EventContext& ctx,
+  egammaRec* egRec,
+  const xAOD::VertexContainer* conversions) const
+{
+
   if (!egRec || !conversions){
     ATH_MSG_WARNING("trackExecute: NULL pointer to egammaRec or VertexContainer");
     return StatusCode::SUCCESS;
@@ -154,40 +162,43 @@ StatusCode EMConversionBuilder::vertexExecute(egammaRec* egRec, const xAOD::Vert
       phiAtCalo = accphiAtCalo(*vertex);
     }
     // check extrapolation, skip vertex in case of failure
-    else if (!m_extrapolationTool->getEtaPhiAtCalo(vertex, &etaAtCalo, &phiAtCalo)){
+    else if (!m_extrapolationTool->getEtaPhiAtCalo(
+               ctx, vertex, &etaAtCalo, &phiAtCalo)) {
       continue;
     }
     const xAOD::CaloCluster *cluster = egRec->caloCluster();
-    if (!passPtAndEoverP(*vertex, *cluster)){
+    if (!passPtAndEoverP(ctx, *vertex, *cluster)) {
       continue;
     }
-    if (!m_extrapolationTool->matchesAtCalo(cluster, vertex, etaAtCalo, phiAtCalo)){
+    if (!m_extrapolationTool->matchesAtCalo(
+          cluster, vertex, etaAtCalo, phiAtCalo)) {
       continue;
     }
     const ElementLink< xAOD::VertexContainer > vertexLink( *conversions, iVtx );
     
     // If this is the best (or the first) vertex, push front and keep deltaEta, deltaPhi
-    if (!egRec->getNumberOfVertices() || ConvVxSorter(*vertex, *egRec->vertex())){
+    if (!egRec->getNumberOfVertices() ||
+        ConvVxSorter(*vertex, *egRec->vertex())) {
       egRec->pushFrontVertex( vertexLink );
       egRec->setDeltaEtaVtx( cluster->etaBE(2) - etaAtCalo );
       egRec->setDeltaPhiVtx( P4Helpers::deltaPhi(cluster->phiBE(2), phiAtCalo) );
-    }
-    else {// Not the best vertex, push back
-      egRec->pushBackVertex( vertexLink );       
+    } else { // Not the best vertex, push back
+      egRec->pushBackVertex( vertexLink );
     }
   }
   return StatusCode::SUCCESS;
 }
 
-// ==================================================================
-// FINALIZE METHOD:  
 StatusCode EMConversionBuilder::finalize(){
   return StatusCode::SUCCESS;
 }
-// ==================================================================
-bool EMConversionBuilder::passPtAndEoverP(const xAOD::Vertex& vertex, const xAOD::CaloCluster& cluster) const
+
+bool
+EMConversionBuilder::passPtAndEoverP(const EventContext& ctx,
+                                     const xAOD::Vertex& vertex,
+                                     const xAOD::CaloCluster& cluster) const
 {
-  Amg::Vector3D momentum = m_extrapolationTool->getMomentumAtVertex(vertex);
+  Amg::Vector3D momentum = m_extrapolationTool->getMomentumAtVertex(ctx,vertex);
   float pt = momentum.perp();
   float EoverP = cluster.e() / momentum.mag();
   
@@ -218,7 +229,9 @@ bool EMConversionBuilder::passPtAndEoverP(const xAOD::Vertex& vertex, const xAOD
   return !reject;
 }
 
-float EMConversionBuilder::getMaxTRTTubeHitFraction(const xAOD::Vertex& vertex) const{
+float
+EMConversionBuilder::getMaxTRTTubeHitFraction(const xAOD::Vertex& vertex) const
+{
   auto getTRTTubeHitFraction = [](const xAOD::TrackParticle *trk){
     uint8_t nTRT;
     uint8_t nTRTTube;
diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
index 3f6a5cc5ba45..92d24d67751b 100644
--- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
+++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
@@ -7,40 +7,42 @@
 /**
   @class EMConversionBuilder
           EMConversion data object builder. This is an Algorithm class.
-	  Selects conversion vertices reconstructed by the ID software
-	  after matching them to an EM calorimeter cluster.
-	  For normal two-track conversions the original photon track parameters
-	  at the conversion vertex are reconstructed. It is then extrapolated
-	  to the calorimeter and checked whether it matches the cluster.
-	  For single-track conversions, the reconstructed electron track is
-	  extrapolated to the calorimeter.
-	  A TrackToCalo extrapolation tool that can handle both neutral and charged
-	  track parameters (using a Trk::ParametersBase interface) is used throughout.
-	  The extrapolation starts at the last track measurement.
-	  Matching is done in both eta and phi. The eta matching WAS disabled for TRT-only
-	  tracks due to lack of accurate eta prediction BEFORE 12/2011.
+          Selects conversion vertices reconstructed by the ID software
+          after matching them to an EM calorimeter cluster.
+          For normal two-track conversions the original photon track parameters
+          at the conversion vertex are reconstructed. It is then extrapolated
+          to the calorimeter and checked whether it matches the cluster.
+          For single-track conversions, the reconstructed electron track is
+          extrapolated to the calorimeter.
+          A TrackToCalo extrapolation tool that can handle both neutral and
+  charged track parameters (using a Trk::ParametersBase interface) is used
+  throughout. The extrapolation starts at the last track measurement. Matching
+  is done in both eta and phi. The eta matching WAS disabled for TRT-only tracks
+  due to lack of accurate eta prediction BEFORE 12/2011.
   @author D. Zerwas
 
   changes: June 16, 2010 (JM) bring some stuff from PhotonRecoveryTool here
            Mar, 2014 (BL) xAOD migration and new logic
+           2020 Athena Mt migration.
 */
 
-// INCLUDE HEADER FILES: 
-#include "GaudiKernel/ToolHandle.h"
+// INCLUDE HEADER FILES:
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/SystemOfUnits.h"
-#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
 #include "egammaInterfaces/IEMConversionBuilder.h"
 #include "egammaInterfaces/IEMExtrapolationTools.h"
-#include "xAODTracking/VertexContainerFwd.h"
 #include "xAODCaloEvent/CaloClusterFwd.h"
-#include "StoreGate/ReadHandleKey.h"
+#include "xAODTracking/VertexContainerFwd.h"
 
-class EMConversionBuilder : public AthAlgTool, virtual public IEMConversionBuilder
+class EMConversionBuilder
+  : public AthAlgTool
+  , virtual public IEMConversionBuilder
 {
 
- public:
-
+public:
   /** @brief Default constructor*/
   EMConversionBuilder(const std::string& type,
                       const std::string& name,
@@ -48,95 +50,139 @@ class EMConversionBuilder : public AthAlgTool, virtual public IEMConversionBuild
 
   /** @brief Destructor*/
   ~EMConversionBuilder();
-	
+
   /** @brief initialize method*/
   StatusCode initialize() override;
   /** @brief execute method*/
-  virtual StatusCode executeRec(const EventContext& ctx, egammaRec* egRec) const override final;
+  virtual StatusCode executeRec(const EventContext& ctx,
+                                egammaRec* egRec) const override final;
   /** @brief execute method*/
-  virtual StatusCode hltExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const override final;
-  /** @brief execute method*/
-  virtual StatusCode vertexExecute(egammaRec* egRec, const xAOD::VertexContainer* conversions) const override final;
-  /** @brief finalize method*/
+  virtual StatusCode hltExecute(
+    egammaRec* egRec,
+    const xAOD::VertexContainer* conversions) const override final;
+ /** @brief finalize method*/
   StatusCode finalize() override;
 
 private:
-  
+  /** @brief actual  implementation method*/
+  StatusCode vertexExecute(
+    const EventContext& ctx,
+    egammaRec* egRec,
+    const xAOD::VertexContainer* conversions) const;
+ 
+
   /** @brief Return true if vertex and cluster pass Pt and E/p cuts **/
-  bool passPtAndEoverP(const xAOD::Vertex&, const xAOD::CaloCluster&) const;
-  
+  bool passPtAndEoverP(const EventContext& ctx,
+                       const xAOD::Vertex&,
+                       const xAOD::CaloCluster&) const;
+
   /** @brief Return the maximum fraction of TRT tube hits among the tracks **/
   float getMaxTRTTubeHitFraction(const xAOD::Vertex& vertex) const;
-  
+
   // configuration:
   /** @brief Name of conversion container*/
-  SG::ReadHandleKey<xAOD::VertexContainer> m_conversionContainerKey {this,
-      "ConversionContainerName", "PhotonConversionVertices",
-      "Name of the input conversion container"}; 
-  
+  SG::ReadHandleKey<xAOD::VertexContainer> m_conversionContainerKey{
+    this,
+    "ConversionContainerName",
+    "PhotonConversionVertices",
+    "Name of the input conversion container"
+  };
+
   /** @brief EMExtrapolationTools */
-  ToolHandle<IEMExtrapolationTools>  m_extrapolationTool {this,
-      "ExtrapolationTool", "EMExtrapolationTools", 
-      "Handle of the extrapolation tool"};
-  
-  /** @brief Ignore all conversion vertices that contain exclusively TRT-only tracks */
-  Gaudi::Property<bool> m_rejectAllTRT {this, "RejectAllTRTConversions", false,
-      "Ignore all conversion vertices containing exclusively TRT-only tracks"};
-  
-  /** @brief minimum number of TRT hits for TRT-only tracks (both single and double track conversion vertices) */
-  Gaudi::Property<int> m_minTRTHits {this, "minTRTHits", 0,
-      "minimum number of TRT hits for TRT-only tracks (both single and double track conversion vertices)"};
+  ToolHandle<IEMExtrapolationTools> m_extrapolationTool{
+    this,
+    "ExtrapolationTool",
+    "EMExtrapolationTools",
+    "Handle of the extrapolation tool"
+  };
+
+  /** @brief Ignore all conversion vertices that contain exclusively TRT-only
+   * tracks */
+  Gaudi::Property<bool> m_rejectAllTRT{
+    this,
+    "RejectAllTRTConversions",
+    false,
+    "Ignore all conversion vertices containing exclusively TRT-only tracks"
+  };
+
+  /** @brief minimum number of TRT hits for TRT-only tracks (both single and
+   * double track conversion vertices) */
+  Gaudi::Property<int> m_minTRTHits{
+    this,
+    "minTRTHits",
+    0,
+    "minimum number of TRT hits for TRT-only tracks (both single and double "
+    "track conversion vertices)"
+  };
 
   /** @brief minimum pT for single-track conversion vertices */
-  Gaudi::Property<float> m_minPt_singleTrack {this, 
-      "minPt_singleTrack", 0*Gaudi::Units::GeV,
-      "minimum pT for single-track conversion vertices"};
+  Gaudi::Property<float> m_minPt_singleTrack{
+    this,
+    "minPt_singleTrack",
+    0 * Gaudi::Units::GeV,
+    "minimum pT for single-track conversion vertices"
+  };
 
   /** @brief minimum pT for TRT-only single-track conversion vertices */
-  Gaudi::Property<float> m_minPt_singleTRT {this,
-      "minPt_singleTRT", 2*Gaudi::Units::GeV,
-      "minimum pT for TRT-only single-track conversion vertices"};
-
-  /** @brief minimum pT for each track in TRT-only double-track conversion vertices */  
-  Gaudi::Property<float> m_minTRTonlyTrackPt {this,
-      "minTRTonlyTrackPt", 0*Gaudi::Units::GeV,
-      "minimum pT for each track in TRT-only double-track conversion vertices"};
+  Gaudi::Property<float> m_minPt_singleTRT{
+    this,
+    "minPt_singleTRT",
+    2 * Gaudi::Units::GeV,
+    "minimum pT for TRT-only single-track conversion vertices"
+  };
+
+  /** @brief minimum pT for each track in TRT-only double-track conversion
+   * vertices */
+  Gaudi::Property<float> m_minTRTonlyTrackPt{
+    this,
+    "minTRTonlyTrackPt",
+    0 * Gaudi::Units::GeV,
+    "minimum pT for each track in TRT-only double-track conversion vertices"
+  };
 
   /** @brief minimum sum pT for double track conversion vertices */
-  Gaudi::Property<float> m_minSumPt_double {this,
-      "minSumPt_double", 0*Gaudi::Units::GeV,
-      "minimum sum pT for double track conversion vertices"};
+  Gaudi::Property<float> m_minSumPt_double{
+    this,
+    "minSumPt_double",
+    0 * Gaudi::Units::GeV,
+    "minimum sum pT for double track conversion vertices"
+  };
 
   /** @brief minimum sum pT for double TRT track conversion vertices */
-  Gaudi::Property<float> m_minSumPt_doubleTRT {this,
-      "minSumPt_doubleTRT", 2*Gaudi::Units::GeV,
-      "minimum sum pT for double TRT track conversion vertices"}; 
-
-  /** @brief maximum E/p for single track conversion vertices (E is not calibrated) */
-  Gaudi::Property<float> m_maxEoverP_singleTrack {this,
-      "maxEoverP_singleTrack", 10.,
-      "Maximum E/p for single track conversion vertices"};
+  Gaudi::Property<float> m_minSumPt_doubleTRT{
+    this,
+    "minSumPt_doubleTRT",
+    2 * Gaudi::Units::GeV,
+    "minimum sum pT for double TRT track conversion vertices"
+  };
+
+  /** @brief maximum E/p for single track conversion vertices (E is not
+   * calibrated) */
+  Gaudi::Property<float> m_maxEoverP_singleTrack{
+    this,
+    "maxEoverP_singleTrack",
+    10.,
+    "Maximum E/p for single track conversion vertices"
+  };
 
   /** @brief Scale maxEoverP_singleTrack by 1+sf*Et(cluster)/GeV  **/
-  Gaudi::Property<float> m_maxEoverP_singleTrack_EtSf {this,
-      "maxEoverP_singleTrack_EtSf", 0.01,  
-      "Scale maxEoverP_singleTrack by ( 1+sf*Et(cluster)/GeV )"};
-
-  /** @brief "Maximum fraction of tube hits for vertices with TRT tracks  **/ 
-  Gaudi::Property<float> m_maxTRTTubeHitFraction {this,
-      "maxTRTTubeHitFraction", 999.,
-      "Maximum fraction of tube hits for vertices with TRT tracks"}; 
-  // for 21.0.X: minTRTPrecisionFraction cut applied InDetTRT_StandaloneScoringTool
-  
+  Gaudi::Property<float> m_maxEoverP_singleTrack_EtSf{
+    this,
+    "maxEoverP_singleTrack_EtSf",
+    0.01,
+    "Scale maxEoverP_singleTrack by ( 1+sf*Et(cluster)/GeV )"
+  };
+
+  /** @brief "Maximum fraction of tube hits for vertices with TRT tracks  **/
+  Gaudi::Property<float> m_maxTRTTubeHitFraction{
+    this,
+    "maxTRTTubeHitFraction",
+    999.,
+    "Maximum fraction of tube hits for vertices with TRT tracks"
+  };
+  // for 21.0.X: minTRTPrecisionFraction cut applied
+  // InDetTRT_StandaloneScoringTool
 };
 
 #endif
 
-
-
-
-
-
-
-
-
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
index f5c50f4e237b..c8f2e1260bd4 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
@@ -28,18 +28,24 @@
 #include <tuple>
 
 namespace {
-const CaloExtensionHelpers::LayersToSelect barrelLayers = { CaloSampling::PreSamplerB,
-                                                            CaloSampling::EMB1,
-                                                            CaloSampling::EMB2,
-                                                            CaloSampling::EMB3 };
+const CaloExtensionHelpers::LayersToSelect barrelLayers = {
+  CaloSampling::PreSamplerB,
+  CaloSampling::EMB1,
+  CaloSampling::EMB2,
+  CaloSampling::EMB3
+};
 
-const CaloExtensionHelpers::LayersToSelect endCapLayers = { CaloSampling::PreSamplerE,
-                                                            CaloSampling::EME1,
-                                                            CaloSampling::EME2,
-                                                            CaloSampling::EME3 };
+const CaloExtensionHelpers::LayersToSelect endCapLayers = {
+  CaloSampling::PreSamplerE,
+  CaloSampling::EME1,
+  CaloSampling::EME2,
+  CaloSampling::EME3
+};
 }
 
-EMExtrapolationTools::EMExtrapolationTools(const std::string& type, const std::string& name, const IInterface* parent)
+EMExtrapolationTools::EMExtrapolationTools(const std::string& type,
+                                           const std::string& name,
+                                           const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_trtId(nullptr)
 {
@@ -96,7 +102,7 @@ EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx,
                                      std::array<double, 4>& eta,
                                      std::array<double, 4>& phi,
                                      std::array<double, 4>& deltaEta,
-                                     std::array<double, 4>& deltaPhi, 
+                                     std::array<double, 4>& deltaPhi,
                                      unsigned int extrapFrom,
                                      Cache* cache) const
 {
@@ -104,101 +110,116 @@ EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx,
    * the extrapolated eta/phi and
    * the deta/dphi between cluster and track
    * We allow different ways to extrapolate:
-   * 1) from the last measurement  track parameters (this is always the case for TRT standalone)
-   * 2) from the perigee track parameters
-   * 3) from the perigee with the track momentum rescaled by the cluster energy
+   * 1) from the last measurement  track parameters (this is always the case for
+   * TRT standalone) 2) from the perigee track parameters 3) from the perigee
+   * with the track momentum rescaled by the cluster energy
    */
-  if (cluster.e()<10 && trkPB.pt()<10) {//This is 10 MeV 
-    ATH_MSG_WARNING("Too small cluster E :" <<  cluster.e() << " , or too small track pt" << trkPB.pt());
+  if (cluster.e() < 10 && trkPB.pt() < 10) { // This is 10 MeV
+    ATH_MSG_WARNING("Too small cluster E :"
+                    << cluster.e() << " , or too small track pt" << trkPB.pt());
     return StatusCode::FAILURE;
   }
 
   bool didExtension = false;
   CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
   switch (extrapFrom) {
-  /*
-   * Rescaled Perigee does not have a cache
-   */
-  case fromPerigeeRescaled: {
-    Trk::Perigee trkPar = getRescaledPerigee(trkPB, cluster);
-    std::unique_ptr<Trk::CaloExtension> extension =
-      m_perigeeParticleCaloExtensionTool->caloExtension(trkPar, direction, Trk::muon);
-    didExtension = extension != nullptr;
-    if (didExtension) {
-      intersections = getIntersections(*extension, cluster);
-    }
-  } break;
-    /* For the other cases
-     * See if there is a collection cache
-     * else if there is an in algorithm cache passed to us
-     * else do it without a caching
+    /*
+     * Rescaled Perigee does not have a cache
      */
-  case fromPerigee: {
-    if (m_usePerigeeCaching) {
-      SG::ReadHandle<CaloExtensionCollection> PerigeeCache(m_PerigeeCacheKey, ctx);
-      if (!PerigeeCache.isValid()) {
-        ATH_MSG_ERROR("Could not retrieve Perigee Cache " << PerigeeCache.key());
-        return StatusCode::FAILURE;
-      }
-      const Trk::CaloExtension* extension = m_perigeeParticleCaloExtensionTool->caloExtension(trkPB, *PerigeeCache);
+    case fromPerigeeRescaled: {
+      Trk::Perigee trkPar = getRescaledPerigee(trkPB, cluster);
+      std::unique_ptr<Trk::CaloExtension> extension =
+        m_perigeeParticleCaloExtensionTool->caloExtension(
+          ctx, trkPar, direction, Trk::muon);
       didExtension = extension != nullptr;
       if (didExtension) {
         intersections = getIntersections(*extension, cluster);
       }
-    } else if (cache) {
-      const Trk::CaloExtension* extension = m_perigeeParticleCaloExtensionTool->caloExtension(trkPB, *cache);
-      didExtension = extension != nullptr;
-      if (didExtension) {
-        intersections = getIntersections(*extension, cluster);
-      }
-    } else {
-      std::unique_ptr<Trk::CaloExtension> extension = m_perigeeParticleCaloExtensionTool->caloExtension(trkPB);
-      didExtension = extension != nullptr;
-      if (didExtension) {
-        intersections = getIntersections(*extension, cluster);
-      }
-    }
-  } break;
+    } break;
+      /* For the other cases
+       * See if there is a collection cache
+       * else if there is an in algorithm cache passed to us
+       * else do it without a caching
+       */
+    case fromPerigee: {
+      if (m_usePerigeeCaching) {
+        SG::ReadHandle<CaloExtensionCollection> PerigeeCache(m_PerigeeCacheKey,
+                                                             ctx);
 
-  case fromLastMeasurement: {
-    if (m_useLastCaching) {
-      SG::ReadHandle<CaloExtensionCollection> LastCache(m_LastCacheKey, ctx);
-      if (!LastCache.isValid()) {
-        ATH_MSG_ERROR("Could not retrieve Last Cache " << LastCache.key());
-        return StatusCode::FAILURE;
-      }
-      const Trk::CaloExtension* extension = m_lastParticleCaloExtensionTool->caloExtension(trkPB, *LastCache);
-      didExtension = extension != nullptr;
-      if (didExtension) {
-        intersections = getIntersections(*extension, cluster);
-      }
-    } else if (cache) {
-      const Trk::CaloExtension* extension = m_lastParticleCaloExtensionTool->caloExtension(trkPB, *cache);
-      didExtension = extension != nullptr;
-      if (didExtension) {
-        intersections = getIntersections(*extension, cluster);
+        if (!PerigeeCache.isValid()) {
+          ATH_MSG_ERROR("Could not retrieve Perigee Cache "
+                        << PerigeeCache.key());
+          return StatusCode::FAILURE;
+        }
+
+        const Trk::CaloExtension* extension =
+          m_perigeeParticleCaloExtensionTool->caloExtension(trkPB,
+                                                            *PerigeeCache);
+
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
+      } else if (cache) {
+        const Trk::CaloExtension* extension =
+          m_perigeeParticleCaloExtensionTool->caloExtension(ctx, trkPB, *cache);
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
+      } else {
+        std::unique_ptr<Trk::CaloExtension> extension =
+          m_perigeeParticleCaloExtensionTool->caloExtension(ctx, trkPB);
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
       }
-    } else {
-      std::unique_ptr<Trk::CaloExtension> extension = m_lastParticleCaloExtensionTool->caloExtension(trkPB);
-      didExtension = extension != nullptr;
-      if (didExtension) {
-        intersections = getIntersections(*extension, cluster);
+    } break;
+
+    case fromLastMeasurement: {
+      if (m_useLastCaching) {
+        SG::ReadHandle<CaloExtensionCollection> LastCache(m_LastCacheKey, ctx);
+        if (!LastCache.isValid()) {
+          ATH_MSG_ERROR("Could not retrieve Last Cache " << LastCache.key());
+          return StatusCode::FAILURE;
+        }
+        const Trk::CaloExtension* extension =
+          m_lastParticleCaloExtensionTool->caloExtension(trkPB, *LastCache);
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
+      } else if (cache) {
+        const Trk::CaloExtension* extension =
+          m_lastParticleCaloExtensionTool->caloExtension(ctx, trkPB, *cache);
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
+      } else {
+        std::unique_ptr<Trk::CaloExtension> extension =
+          m_lastParticleCaloExtensionTool->caloExtension(ctx, trkPB);
+        didExtension = extension != nullptr;
+        if (didExtension) {
+          intersections = getIntersections(*extension, cluster);
+        }
       }
-    }
-  } break;
+    } break;
 
-  default: {
-    ATH_MSG_ERROR("Invalid ExtrapolateFrom " << extrapFrom);
-  }
+    default: {
+      ATH_MSG_ERROR("Invalid ExtrapolateFrom " << extrapFrom);
+    }
   }
   /*
    * Given the extension calculate the deta/dphi for the layers
    */
   if (!didExtension) {
-    ATH_MSG_DEBUG("Could not create an extension from " << extrapFrom << " for a track with : "
-                                                        << " Track Pt " << trkPB.pt() << " Track Eta " << trkPB.eta()
-                                                        << " Track Phi " << trkPB.phi() << " Track Fitter "
-                                                        << trkPB.trackFitter());
+    ATH_MSG_DEBUG("Could not create an extension from "
+                  << extrapFrom << " for a track with : "
+                  << " Track Pt " << trkPB.pt() << " Track Eta " << trkPB.eta()
+                  << " Track Phi " << trkPB.phi() << " Track Fitter "
+                  << trkPB.trackFitter());
     return StatusCode::FAILURE;
   }
   // Negative tracks bend to the positive direction.
@@ -208,7 +229,8 @@ EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx,
   for (const auto& p : intersections) {
     int i(0);
     CaloSampling::CaloSample sample = std::get<0>(p);
-    if (sample == CaloSampling::PreSamplerE || sample == CaloSampling::PreSamplerB) {
+    if (sample == CaloSampling::PreSamplerE ||
+        sample == CaloSampling::PreSamplerB) {
       i = 0;
     } else if (sample == CaloSampling::EME1 || sample == CaloSampling::EMB1) {
       i = 1;
@@ -222,13 +244,15 @@ EMExtrapolationTools::getMatchAtCalo(const EventContext& ctx,
     eta[i] = std::get<1>(p);
     phi[i] = std::get<2>(p);
     deltaEta[i] = cluster.etaSample(sample) - std::get<1>(p);
-    deltaPhi[i] = P4Helpers::deltaPhi(cluster.phiSample(sample), std::get<2>(p));
+    deltaPhi[i] =
+      P4Helpers::deltaPhi(cluster.phiSample(sample), std::get<2>(p));
     // Should we flip the sign for deltaPhi?
     if (flipSign) {
       deltaPhi[i] = -deltaPhi[i];
     }
-    ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi, deta, dphi: " << i << " " << eta[i] << " " << phi[i] << " "
-                                                              << deltaEta[i] << " " << deltaPhi[i]);
+    ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi, deta, dphi: "
+                  << i << " " << eta[i] << " " << phi[i] << " " << deltaEta[i]
+                  << " " << deltaPhi[i]);
   }
   return StatusCode::SUCCESS;
 }
@@ -244,7 +268,7 @@ EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster* cluster,
                                     float etaAtCalo,
                                     float phiAtCalo) const
 {
-  if (!cluster || !vertex){
+  if (!cluster || !vertex) {
     return false;
   }
   float deltaEta = fabs(etaAtCalo - cluster->etaBE(2));
@@ -254,19 +278,26 @@ EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster* cluster,
   if (xAOD::EgammaHelpers::numberOfSiTracks(vertex) == 0)
     TRTsection = getTRTsection(vertex->trackParticle(0));
 
-  // First pass on TRT tracks, skip barrel tracks matching endcap clusters and vice-versa
+  // First pass on TRT tracks, skip barrel tracks matching endcap clusters and
+  // vice-versa
   if ((TRTsection == 2 && (cluster->eta() <= 0.6 || cluster->eta() >= 2.4)) ||
-      (TRTsection == -2 && (cluster->eta() >= -0.6 || cluster->eta() <= -2.4)) ||
+      (TRTsection == -2 &&
+       (cluster->eta() >= -0.6 || cluster->eta() <= -2.4)) ||
       (TRTsection == 1 && (cluster->eta() <= -0.1 || cluster->eta() >= 1.3)) ||
       (TRTsection == -1 && (cluster->eta() >= 0.1 || cluster->eta() <= -1.3))) {
     return false;
   }
 
   // The maximum deltaEta/deltaPhi for Si, TRT barrel, TRT endcap
-  static const std::vector<double> dEtaV{ m_narrowDeltaEta, m_TRTbarrelDeltaEta, m_TRTendcapDeltaEta };
-  static const std::vector<double> dPhiV{ m_narrowDeltaPhi, m_narrowDeltaPhiTRTbarrel, m_narrowDeltaPhiTRTendcap };
+  static const std::vector<double> dEtaV{ m_narrowDeltaEta,
+                                          m_TRTbarrelDeltaEta,
+                                          m_TRTendcapDeltaEta };
+  static const std::vector<double> dPhiV{ m_narrowDeltaPhi,
+                                          m_narrowDeltaPhiTRTbarrel,
+                                          m_narrowDeltaPhiTRTendcap };
 
-  return (deltaEta < dEtaV[abs(TRTsection)] && deltaPhi < dPhiV[abs(TRTsection)]);
+  return (deltaEta < dEtaV[abs(TRTsection)] &&
+          deltaPhi < dPhiV[abs(TRTsection)]);
 }
 /*
  * The following two are the heavy lifting methods.
@@ -274,12 +305,15 @@ EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster* cluster,
  * and then calculate the eta/phi at calo
  */
 bool
-EMExtrapolationTools::getEtaPhiAtCalo(const xAOD::Vertex* vertex, float* etaAtCalo, float* phiAtCalo) const
+EMExtrapolationTools::getEtaPhiAtCalo(const EventContext& ctx,
+                                      const xAOD::Vertex* vertex,
+                                      float* etaAtCalo,
+                                      float* phiAtCalo) const
 {
-  if (!vertex){
+  if (!vertex) {
     return false;
   }
-  Amg::Vector3D momentum = getMomentumAtVertex(*vertex);
+  Amg::Vector3D momentum = getMomentumAtVertex(ctx,*vertex);
   if (momentum.mag() < 1e-5) {
     ATH_MSG_DEBUG("Intersection failed");
     return false;
@@ -289,15 +323,18 @@ EMExtrapolationTools::getEtaPhiAtCalo(const xAOD::Vertex* vertex, float* etaAtCa
    * Create high pt track parameters to mimic a neutral particle.
    * This in principle is an approximation
    */
-  const Trk::TrackParameters* trkPar =
-    surface.createTrackParameters(vertex->position(), momentum.unit() * 1.e10, +1, nullptr);
-  bool success = getEtaPhiAtCalo(trkPar, etaAtCalo, phiAtCalo);
+  const Trk::TrackParameters* trkPar = surface.createTrackParameters(
+    vertex->position(), momentum.unit() * 1.e10, +1, nullptr);
+  bool success = getEtaPhiAtCalo(ctx,trkPar, etaAtCalo, phiAtCalo);
   delete trkPar;
   return success;
 }
 /*  The actual calculation happens here*/
 bool
-EMExtrapolationTools::getEtaPhiAtCalo(const Trk::TrackParameters* trkPar, float* etaAtCalo, float* phiAtCalo) const
+EMExtrapolationTools::getEtaPhiAtCalo(const EventContext& ctx,
+                                      const Trk::TrackParameters* trkPar,
+                                      float* etaAtCalo,
+                                      float* phiAtCalo) const
 {
   if (!trkPar)
     return false;
@@ -311,13 +348,15 @@ EMExtrapolationTools::getEtaPhiAtCalo(const Trk::TrackParameters* trkPar, float*
   }
 
   std::unique_ptr<Trk::CaloExtension> extension = nullptr;
-  extension = m_perigeeParticleCaloExtensionTool->caloExtension(*trkPar, Trk::alongMomentum, Trk::muon);
+  extension = m_perigeeParticleCaloExtensionTool->caloExtension(
+    ctx, *trkPar, Trk::alongMomentum, Trk::muon);
   if (!extension) {
     ATH_MSG_WARNING("Could not create an extension from geEtaPhiAtCalo ");
     return false;
   }
   CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
-  CaloExtensionHelpers::midPointEtaPhiPerLayerVector(*extension, intersections, &layersToSelect);
+  CaloExtensionHelpers::midPointEtaPhiPerLayerVector(
+    *extension, intersections, &layersToSelect);
   bool hitEM2(false);
   for (const auto& p : intersections) {
     int i(0);
@@ -327,7 +366,8 @@ EMExtrapolationTools::getEtaPhiAtCalo(const Trk::TrackParameters* trkPar, float*
       *phiAtCalo = std::get<2>(p);
       hitEM2 = true;
       ++i;
-      ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi : " << i << " " << std::get<1>(p) << " " << std::get<2>(p));
+      ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi : "
+                    << i << " " << std::get<1>(p) << " " << std::get<2>(p));
     }
   }
   return hitEM2;
@@ -335,12 +375,15 @@ EMExtrapolationTools::getEtaPhiAtCalo(const Trk::TrackParameters* trkPar, float*
 
 /* Methods to get the momemtum at the conversion vertex*/
 Amg::Vector3D
-EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, unsigned int index) const
+EMExtrapolationTools::getMomentumAtVertex(const EventContext& ctx,
+                                          const xAOD::Vertex& vertex,
+                                          unsigned int index) const
 {
   Amg::Vector3D momentum(0., 0., 0.);
   if (vertex.nTrackParticles() <= index) {
     ATH_MSG_WARNING("Invalid track index");
-  } else if (vertex.vxTrackAtVertexAvailable() && !vertex.vxTrackAtVertex().empty()) {
+  } else if (vertex.vxTrackAtVertexAvailable() &&
+             !vertex.vxTrackAtVertex().empty()) {
     // Use the parameters at the vertex
     // (the tracks should be parallel but we will do the sum anyway)
     ATH_MSG_DEBUG("getMomentumAtVertex : getting from vxTrackAtVertex");
@@ -353,10 +396,12 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, unsigned i
     }
   } else if (vertex.nTrackParticles() == 1) {
     // Use the first measurement
-    ATH_MSG_DEBUG("getMomentumAtVertex : 1 track only, getting from first measurement");
+    ATH_MSG_DEBUG(
+      "getMomentumAtVertex : 1 track only, getting from first measurement");
     const xAOD::TrackParticle* tp = vertex.trackParticle(0);
     unsigned int paramindex(0);
-    if (!tp || !tp->indexOfParameterAtPosition(paramindex, xAOD::FirstMeasurement)) {
+    if (!tp ||
+        !tp->indexOfParameterAtPosition(paramindex, xAOD::FirstMeasurement)) {
       ATH_MSG_WARNING("No TrackParticle or no have first measurement");
     } else {
       momentum += tp->curvilinearParameters(paramindex).momentum();
@@ -368,13 +413,16 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, unsigned i
     if (!tp) {
       ATH_MSG_WARNING("NULL pointer to TrackParticle in vertex");
     } else {
-      const Trk::PerigeeSurface* surface = new Trk::PerigeeSurface(vertex.position());
-      const Trk::TrackParameters* params = m_extrapolator->extrapolate(*tp, *surface, Trk::alongMomentum);
+      const Trk::PerigeeSurface* surface =
+        new Trk::PerigeeSurface(vertex.position());
+      const Trk::TrackParameters* params =
+        m_extrapolator->extrapolate(ctx, *tp, *surface, Trk::alongMomentum);
       delete surface;
-      if (!params)
+      if (!params) {
         ATH_MSG_DEBUG("Extrapolation to vertex (perigee) failed");
-      else
+      } else {
         momentum += params->momentum();
+      }
       delete params;
     }
   }
@@ -382,7 +430,9 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, unsigned i
 }
 
 Amg::Vector3D
-EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, bool reuse /* = true */) const
+EMExtrapolationTools::getMomentumAtVertex(const EventContext& ctx,
+                                          const xAOD::Vertex& vertex,
+                                          bool reuse /* = true */) const
 {
   Amg::Vector3D momentum(0., 0., 0.);
   const static SG::AuxElement::Accessor<float> accPx("px");
@@ -392,13 +442,14 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, bool reuse
     ATH_MSG_WARNING("getMomentumAtVertex : vertex has no track particles!");
     return momentum;
   }
-  if (reuse && accPx.isAvailable(vertex) && accPy.isAvailable(vertex) && accPz.isAvailable(vertex)) {
+  if (reuse && accPx.isAvailable(vertex) && accPy.isAvailable(vertex) &&
+      accPz.isAvailable(vertex)) {
     // Already decorated with parameters at vertex
     ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata");
     return Amg::Vector3D(accPx(vertex), accPy(vertex), accPz(vertex));
   } else {
     for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) {
-      momentum += getMomentumAtVertex(vertex, i);
+      momentum += getMomentumAtVertex(ctx, vertex, i);
     }
   }
   return momentum;
@@ -407,7 +458,8 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, bool reuse
  * Create Rescaled Perigee Parametrs
  */
 Trk::Perigee
-EMExtrapolationTools::getRescaledPerigee(const xAOD::TrackParticle& trkPB, const xAOD::CaloCluster& cluster) const
+EMExtrapolationTools::getRescaledPerigee(const xAOD::TrackParticle& trkPB,
+                                         const xAOD::CaloCluster& cluster) const
 {
 
   /*
@@ -417,25 +469,29 @@ EMExtrapolationTools::getRescaledPerigee(const xAOD::TrackParticle& trkPB, const
    * Then replace the q/p with q/cluster->e()
    * e.g create a new Perigee with q/cluster->e() rather than track->p()
    */
-  return Trk::Perigee(trkPB.d0(),
-                      trkPB.z0(),
-                      trkPB.phi0(),
-                      trkPB.theta(),
-                      trkPB.charge() / cluster.e(),
-                      Trk::PerigeeSurface(Amg::Vector3D(trkPB.vx(), trkPB.vy(), trkPB.vz())));
+  return Trk::Perigee(
+    trkPB.d0(),
+    trkPB.z0(),
+    trkPB.phi0(),
+    trkPB.theta(),
+    trkPB.charge() / cluster.e(),
+    Trk::PerigeeSurface(Amg::Vector3D(trkPB.vx(), trkPB.vy(), trkPB.vz())));
 }
 /*
  * Helper to get the Eta/Phi intersections per Layer
  */
 CaloExtensionHelpers::EtaPhiPerLayerVector
-EMExtrapolationTools::getIntersections(const Trk::CaloExtension& extension, const xAOD::CaloCluster& cluster) const
+EMExtrapolationTools::getIntersections(const Trk::CaloExtension& extension,
+                                       const xAOD::CaloCluster& cluster) const
 {
   // Layers to calculate intersections
   CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
   if (xAOD::EgammaHelpers::isBarrel(&cluster)) {
-    CaloExtensionHelpers::midPointEtaPhiPerLayerVector(extension, intersections, &barrelLayers);
+    CaloExtensionHelpers::midPointEtaPhiPerLayerVector(
+      extension, intersections, &barrelLayers);
   } else {
-    CaloExtensionHelpers::midPointEtaPhiPerLayerVector(extension, intersections, &endCapLayers);
+    CaloExtensionHelpers::midPointEtaPhiPerLayerVector(
+      extension, intersections, &endCapLayers);
   }
   return intersections;
 }
@@ -450,24 +506,29 @@ EMExtrapolationTools::getTRTsection(const xAOD::TrackParticle* trkPB) const
     return 0;
   }
   if (!m_trtId) {
-    ATH_MSG_DEBUG("No trt ID guessing TRT section based on eta: " << trkPB->eta());
+    ATH_MSG_DEBUG(
+      "No trt ID guessing TRT section based on eta: " << trkPB->eta());
     return (trkPB->eta() > 0 ? 1 : -1) * (fabs(trkPB->eta()) < 0.6 ? 1 : 2);
   }
   const Trk::MeasurementBase* trkPar = nullptr;
   if (trkPB->trackLink().isValid() && trkPB->track() != nullptr) {
     ATH_MSG_DEBUG("Will get TrackParameters from Trk::Track");
-    const DataVector<const Trk::TrackStateOnSurface>* trackStates = trkPB->track()->trackStateOnSurfaces();
+    const DataVector<const Trk::TrackStateOnSurface>* trackStates =
+      trkPB->track()->trackStateOnSurfaces();
     if (!trackStates) {
       ATH_MSG_WARNING("NULL pointer to trackStateOnSurfaces");
       return 0;
     }
     // Loop over the TrkStateOnSurfaces search last valid TSOS first
-    for (DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator rItTSoS = trackStates->rbegin();
+    for (DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator
+           rItTSoS = trackStates->rbegin();
          rItTSoS != trackStates->rend();
          ++rItTSoS) {
       if ((*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) &&
-          !((*rItTSoS)->type(Trk::TrackStateOnSurface::Outlier)) && (*rItTSoS)->measurementOnTrack() != nullptr &&
-          !((*rItTSoS)->measurementOnTrack()->type(Trk::MeasurementBaseType::PseudoMeasurementOnTrack))) {
+          !((*rItTSoS)->type(Trk::TrackStateOnSurface::Outlier)) &&
+          (*rItTSoS)->measurementOnTrack() != nullptr &&
+          !((*rItTSoS)->measurementOnTrack()->type(
+            Trk::MeasurementBaseType::PseudoMeasurementOnTrack))) {
         trkPar = (*rItTSoS)->measurementOnTrack();
         break;
       }
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
index 4438b1918f5e..5cd63e0601c4 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
@@ -1,10 +1,10 @@
 /*
-   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 #ifndef EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
 #define EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
-/** 
+/**
   @class EMExtrapolationTools
   Tools for track extrapolation to the calorimeter
   @author Thomas Koffas, Christos Anastopoulos
@@ -17,8 +17,8 @@ PURPOSE:  Tool which propagate track and vertices to the calorimeter cluster
 ********************************************************************/
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/ReadHandleKey.h"
 
 #include "egammaInterfaces/IEMExtrapolationTools.h"
@@ -29,26 +29,28 @@ PURPOSE:  Tool which propagate track and vertices to the calorimeter cluster
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexFwd.h"
 
-#include "TrkCaloExtension/CaloExtensionHelpers.h"
-#include "TrkCaloExtension/CaloExtensionCollection.h"
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
+#include "TrkCaloExtension/CaloExtensionCollection.h"
+#include "TrkCaloExtension/CaloExtensionHelpers.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 
 class TRT_ID;
 class CaloDepthTool;
 
-namespace Trk
-{
+namespace Trk {
 class INeutralParticleParameterCalculator;
 }
 
-
-class EMExtrapolationTools final : virtual public IEMExtrapolationTools, public AthAlgTool {
+class EMExtrapolationTools final
+  : virtual public IEMExtrapolationTools
+  , public AthAlgTool
+{
 
 public:
-
   /** @brief Constructor with parameters */
-  EMExtrapolationTools (const std::string& type,const std::string& name, const IInterface* parent);
+  EMExtrapolationTools(const std::string& type,
+                       const std::string& name,
+                       const IInterface* parent);
   /** @brief Destructor */
   virtual ~EMExtrapolationTools();
 
@@ -57,96 +59,133 @@ public:
   /** @brief finalize method */
   virtual StatusCode finalize() override final;
 
-  typedef  std::unordered_map<size_t,std::unique_ptr<Trk::CaloExtension>> Cache;
+  typedef std::unordered_map<size_t, std::unique_ptr<Trk::CaloExtension>> Cache;
 
   /**   get eta, phi, deltaEta, and deltaPhi at the four calorimeter
    *    layers given the Trk::ParametersBase.  */
-  virtual StatusCode getMatchAtCalo (const EventContext&           ctx,
-                                     const xAOD::CaloCluster&      cluster, 
-                                     const xAOD::TrackParticle&    trkPB,
-                                     Trk::PropDirection            direction,
-                                     std::array<double,4>&         eta,
-                                     std::array<double,4>&         phi,
-                                     std::array<double,4>&         deltaEta,
-                                     std::array<double,4>&         deltaPhi, 
-                                     unsigned int                  extrapFrom = fromPerigee,
-                                     Cache* cache=nullptr) const override final;
-
-  /** test for vertex-to-cluster match given also the positions 
+  virtual StatusCode getMatchAtCalo(
+    const EventContext& ctx,
+    const xAOD::CaloCluster& cluster,
+    const xAOD::TrackParticle& trkPB,
+    Trk::PropDirection direction,
+    std::array<double, 4>& eta,
+    std::array<double, 4>& phi,
+    std::array<double, 4>& deltaEta,
+    std::array<double, 4>& deltaPhi,
+    unsigned int extrapFrom = fromPerigee,
+    Cache* cache = nullptr) const override final;
+
+  /** test for vertex-to-cluster match given also the positions
     at the calorimeter from the vertex extrapolation  **/
   virtual bool matchesAtCalo(const xAOD::CaloCluster* cluster,
-                             const xAOD::Vertex *vertex,
+                             const xAOD::Vertex* vertex,
                              float etaAtCalo,
-                             float phiAtCalo)  const override final;
+                             float phiAtCalo) const override final;
 
-
-  /** get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
-    Return false if the extrapolation fails **/
-  virtual bool getEtaPhiAtCalo (const xAOD::Vertex* vertex, 
-                                float *etaAtCalo,
-                                float *phiAtCalo) const override final;
+  /** get eta, phi at EM2 given a vertex which is converted to
+    NeutralParameters. Return false if the extrapolation fails **/
+  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
+                               const xAOD::Vertex* vertex,
+                               float* etaAtCalo,
+                               float* phiAtCalo) const override final;
 
   /** get eta, phi at EM2 given NeutralParameters.
     Return false if the extrapolation fails **/
-  virtual bool getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-                                float *etaAtCalo,
-                                float *phiAtCalo) const override final;
+  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
+                               const Trk::TrackParameters* trkPar,
+                               float* etaAtCalo,
+                               float* phiAtCalo) const override final;
 
-  /** get the momentum of the i-th trackParticle assiciated to the vertex 
+  /** get the momentum of the i-th trackParticle assiciated to the vertex
    * at vertex (designed for conversions) **/
-  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, unsigned int) const override final;
+  Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
+                                    const xAOD::Vertex&,
+                                    unsigned int) const override final;
 
-  /** get sum of the momenta at the vertex (designed for conversions). 
+  /** get sum of the momenta at the vertex (designed for conversions).
    * Retrieve from auxdata if available and \<reuse\> is true **/
-  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, bool reuse = true) const override final;
-
+  Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
+                                    const xAOD::Vertex&,
+                                    bool reuse = true) const override final;
 
 private:
-
-  /** @Helper to get the per Layer Intersections **/ 
-  CaloExtensionHelpers::EtaPhiPerLayerVector getIntersections (const Trk::CaloExtension& extension,
-                                                               const xAOD::CaloCluster& cluster) const;
-
-  /** @Perform the Rescaling of the perigee parameters with the cluster energy **/
-  Trk::Perigee getRescaledPerigee(const xAOD::TrackParticle& trkPB, const xAOD::CaloCluster& cluster) const;
-
-  /** @brief Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap) **/
+  /** @Helper to get the per Layer Intersections **/
+  CaloExtensionHelpers::EtaPhiPerLayerVector getIntersections(
+    const Trk::CaloExtension& extension,
+    const xAOD::CaloCluster& cluster) const;
+
+  /** @Perform the Rescaling of the perigee parameters with the cluster energy
+   * **/
+  Trk::Perigee getRescaledPerigee(const xAOD::TrackParticle& trkPB,
+                                  const xAOD::CaloCluster& cluster) const;
+
+  /** @brief Return +/- 1 (2) if track is in positive/negative TRT barrel
+   * (endcap) **/
   int getTRTsection(const xAOD::TrackParticle* trkPB) const;
 
-  ToolHandle<Trk::IParticleCaloExtensionTool> m_lastParticleCaloExtensionTool {this,
-    "LastCaloExtensionTool", "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"};
-
-  ToolHandle<Trk::IParticleCaloExtensionTool> m_perigeeParticleCaloExtensionTool {this,
-    "PerigeeCaloExtensionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
-
-  ToolHandle<Trk::IExtrapolator> m_extrapolator {this, 
-    "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+  ToolHandle<Trk::IParticleCaloExtensionTool> m_lastParticleCaloExtensionTool{
+    this,
+    "LastCaloExtensionTool",
+    "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"
+  };
+
+  ToolHandle<Trk::IParticleCaloExtensionTool>
+    m_perigeeParticleCaloExtensionTool{
+      this,
+      "PerigeeCaloExtensionTool",
+      "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"
+    };
+
+  ToolHandle<Trk::IExtrapolator> m_extrapolator{
+    this,
+    "Extrapolator",
+    "Trk::Extrapolator/AtlasExtrapolator"
+  };
 
   // vertex-to-cluster match cuts used in matchesAtCalo
-  Gaudi::Property<double> m_narrowDeltaPhi{this, "NarrowDeltaPhi", 0.05};
-  Gaudi::Property<double> m_narrowDeltaPhiTRTbarrel{this,
-    "NarrowDeltaPhiTRTbarrel", 0.02};
-  Gaudi::Property<double> m_narrowDeltaPhiTRTendcap{this,
-    "NarrowDeltaPhiTRTendcap", 0.02};
-  Gaudi::Property<double> m_narrowDeltaEta{this, "NarrowDeltaEta", 0.05};
-  Gaudi::Property<double> m_TRTbarrelDeltaEta{this, "TRTbarrelDeltaEta", 0.35};
-  Gaudi::Property<double> m_TRTendcapDeltaEta{this, "TRTendcapDeltaEta", 0.2};
+  Gaudi::Property<double> m_narrowDeltaPhi{ this, "NarrowDeltaPhi", 0.05 };
+  Gaudi::Property<double> m_narrowDeltaPhiTRTbarrel{ this,
+                                                     "NarrowDeltaPhiTRTbarrel",
+                                                     0.02 };
+  Gaudi::Property<double> m_narrowDeltaPhiTRTendcap{ this,
+                                                     "NarrowDeltaPhiTRTendcap",
+                                                     0.02 };
+  Gaudi::Property<double> m_narrowDeltaEta{ this, "NarrowDeltaEta", 0.05 };
+  Gaudi::Property<double> m_TRTbarrelDeltaEta{ this,
+                                               "TRTbarrelDeltaEta",
+                                               0.35 };
+  Gaudi::Property<double> m_TRTendcapDeltaEta{ this, "TRTendcapDeltaEta", 0.2 };
 
   // ID TRT helper
-  const TRT_ID*                         m_trtId;
-
-  //Cache collections for GSF Track Particle extrapolation Perigee
-  SG::ReadHandleKey<CaloExtensionCollection>  m_PerigeeCacheKey{this,
-  "PerigeeCache", "PerigeeCaloExtension", "Name of GSF Perigee extrapolation cache"};
-  SG::ReadHandleKey<CaloExtensionCollection>  m_LastCacheKey{this,
-  "LastCache", "LastCaloExtension", "Name of Last measurement extrapolation cache"};
-
- //Use a cache for Track Particle extrapolation
-  Gaudi::Property<bool>  m_usePerigeeCaching {this,
-    "useCaching", false, "Use a CaloExtension Collection as cache from Perigee"};
-  Gaudi::Property<bool>  m_useLastCaching {this,
-    "useLastCaching", false, "Use a CaloExtension Collection as cache"};
+  const TRT_ID* m_trtId;
+
+  // Cache collections for GSF Track Particle extrapolation Perigee
+  SG::ReadHandleKey<CaloExtensionCollection> m_PerigeeCacheKey{
+    this,
+    "PerigeeCache",
+    "PerigeeCaloExtension",
+    "Name of GSF Perigee extrapolation cache"
+  };
+  SG::ReadHandleKey<CaloExtensionCollection> m_LastCacheKey{
+    this,
+    "LastCache",
+    "LastCaloExtension",
+    "Name of Last measurement extrapolation cache"
+  };
+
+  // Use a cache for Track Particle extrapolation
+  Gaudi::Property<bool> m_usePerigeeCaching{
+    this,
+    "useCaching",
+    false,
+    "Use a CaloExtension Collection as cache from Perigee"
+  };
+  Gaudi::Property<bool> m_useLastCaching{
+    this,
+    "useLastCaching",
+    false,
+    "Use a CaloExtension Collection as cache"
+  };
 };
 
-
 #endif
-- 
GitLab


From dcf2393556332a08dcbb13180325d2c5b02d52f4 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Wed, 10 Jun 2020 09:49:52 +0000
Subject: [PATCH 108/266] Cleanup of MuonCombined packages

---
 .../src/MuonCombinedMuonCandidateAlg.cxx      | 14 +---------
 .../src/MuonCombinedMuonCandidateAlg.h        | 10 +++----
 .../src/MuonCandidateTool.cxx                 | 26 ++++++-------------
 .../src/MuonCandidateTool.h                   | 25 ++++++------------
 4 files changed, 20 insertions(+), 55 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx
index 81879daf0935..060d710d458b 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonCombinedMuonCandidateAlg.h"
@@ -11,9 +11,6 @@ MuonCombinedMuonCandidateAlg::MuonCombinedMuonCandidateAlg(const std::string& na
   declareProperty("MuonCandidateTool", m_muonCandidateTool);
 }
 
-MuonCombinedMuonCandidateAlg::~MuonCombinedMuonCandidateAlg()
-{}
-
 StatusCode MuonCombinedMuonCandidateAlg::initialize()
 {
   ATH_CHECK(m_muonCandidateTool.retrieve());
@@ -25,7 +22,6 @@ StatusCode MuonCombinedMuonCandidateAlg::initialize()
 
 StatusCode MuonCombinedMuonCandidateAlg::execute()
 {
-
   // retrieve MuonSpectrometer tracks
   SG::ReadHandle<xAOD::TrackParticleContainer> muonTrackParticles(m_muonTrackParticleLocation);
   if(!muonTrackParticles.isValid()){
@@ -36,18 +32,10 @@ StatusCode MuonCombinedMuonCandidateAlg::execute()
     ATH_MSG_WARNING(m_muonTrackParticleLocation<<" not present");
     return StatusCode::SUCCESS;
   }
-
   SG::WriteHandle<MuonCandidateCollection> muonCandidates(m_candidateCollectionName);
   ATH_CHECK(muonCandidates.record(std::make_unique<MuonCandidateCollection>()));
   SG::WriteHandle<TrackCollection> msOnlyTracks(m_msOnlyTracks);
   ATH_CHECK(msOnlyTracks.record(std::make_unique<TrackCollection>()));
   m_muonCandidateTool->create(*muonTrackParticles,*muonCandidates,*msOnlyTracks);
-
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode MuonCombinedMuonCandidateAlg::finalize()
-{
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.h
index 2399c9559583..9b87317b46b1 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONCOMBINEDALGS_MUONCOMBINEDMUONCANDIDATEALG_H
@@ -13,22 +13,18 @@
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 #include "MuonCombinedToolInterfaces/IMuonCandidateTool.h"
 #include "TrkTrack/TrackCollection.h"
-#include <string>
 
-namespace MuonCombined {
-  class IMuonCandidateTool;
-}
+#include <string>
 
 class MuonCombinedMuonCandidateAlg : public AthAlgorithm
 {
  public:
   MuonCombinedMuonCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator);
 
-  ~MuonCombinedMuonCandidateAlg();
+  ~MuonCombinedMuonCandidateAlg()=default;
 
   StatusCode initialize();
   StatusCode execute();
-  StatusCode finalize();
 
  private:
   ToolHandle<MuonCombined::IMuonCandidateTool> m_muonCandidateTool;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
index 9317c22cf425..2e36749dbaff 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////////////////
@@ -11,11 +11,6 @@
 //////////////////////////////////////////////////////////////////////////////
 
 #include "MuonCandidateTool.h"
-#include "MuidInterfaces/ICombinedMuonTrackBuilder.h"
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-#include "TrkToolInterfaces/ITrackAmbiguityProcessorTool.h"
-#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
-
 
 namespace MuonCombined {
  
@@ -36,14 +31,11 @@ namespace MuonCombined {
     declareProperty("AmbiguityProcessor",m_ambiguityProcessor );
   }
 
-  MuonCandidateTool::~MuonCandidateTool()
-  {}
-
   //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
 
   StatusCode MuonCandidateTool::initialize() {
     ATH_CHECK(m_printer.retrieve());
-    if( !m_trackBuilder.empty() )           ATH_CHECK(m_trackBuilder.retrieve());
+    if( !m_trackBuilder.empty()) ATH_CHECK(m_trackBuilder.retrieve());
     else m_trackBuilder.disable();
     if( !m_trackExtrapolationTool.empty() ) ATH_CHECK(m_trackExtrapolationTool.retrieve());
     else m_trackExtrapolationTool.disable();
@@ -52,10 +44,6 @@ namespace MuonCombined {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode MuonCandidateTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
-
   void MuonCandidateTool::create( const xAOD::TrackParticleContainer& tracks, MuonCandidateCollection& outputCollection, TrackCollection& outputTracks ) {
     ATH_MSG_DEBUG("Producing MuonCandidates for " << tracks.size() );
     unsigned int ntracks = 0;
@@ -65,7 +53,7 @@ namespace MuonCombined {
     float beamSpotY = beamSpotHandle->beamPos()[Amg::y];
     float beamSpotZ = beamSpotHandle->beamPos()[Amg::z];
 
-    ATH_MSG_DEBUG( " Beamspot position  bs_x " << beamSpotX << " bs_y " << beamSpotY << " bs_z " << beamSpotZ);  
+    ATH_MSG_DEBUG("Beamspot position bs_x=" << beamSpotX << ", bs_y=" << beamSpotY << ", bs_z=" << beamSpotZ);
       
     // Temporary collection for extrapolated tracks and links with correspondent MS tracks
     std::map<const Trk::Track*, std::pair<ElementLink<xAOD::TrackParticleContainer>, Trk::Track*> > trackLinks;
@@ -81,15 +69,17 @@ namespace MuonCombined {
         continue;
       }
       ElementLink<xAOD::TrackParticleContainer> trackLink(tracks,index++);
-      //trackLink.toPersistent();
 
       const Trk::Track& msTrack = *track->track();
 
       ATH_MSG_VERBOSE("Re-Fitting track " << std::endl << m_printer->print(msTrack) << std::endl << m_printer->printStations(msTrack));
       Trk::Track* standaloneTrack = 0;
       const Trk::Vertex* vertex = 0;
-      if( m_extrapolationStrategy == 0 ) standaloneTrack = m_trackBuilder->standaloneFit(msTrack, vertex, beamSpotX, beamSpotY, beamSpotZ);
-      else                               standaloneTrack = m_trackExtrapolationTool->extrapolate(msTrack);
+      if( m_extrapolationStrategy == 0 ) {
+        standaloneTrack = m_trackBuilder->standaloneFit(msTrack, vertex, beamSpotX, beamSpotY, beamSpotZ);
+      } else {
+         standaloneTrack = m_trackExtrapolationTool->extrapolate(msTrack);
+      }
       if (standaloneTrack) {
 	standaloneTrack->info().setParticleHypothesis(Trk::muon);
 	standaloneTrack->info().setPatternRecognitionInfo(Trk::TrackInfo::MuidStandAlone);
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h
index 065a0fa3ab76..29a84b2b5b4e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h
@@ -5,25 +5,17 @@
 #ifndef MUONCOMBINEDBASETOOLS_MUONCANDIDATETOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCANDIDATETOOL_H
 
+#include "MuonCombinedToolInterfaces/IMuonCandidateTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonCombinedToolInterfaces/IMuonCandidateTool.h"
+
 #include "xAODTracking/TrackParticleContainer.h"
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
-#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "BeamSpotConditionsData/BeamSpotData.h"
-
-namespace Trk {
-  class ITrackAmbiguityProcessorTool;
-}
-
-namespace Rec {
-  class ICombinedMuonTrackBuilder;
-}
-namespace Muon {
-  class MuonEDMPrinterTool;
-  class IMuonTrackExtrapolationTool;
-}
+#include "TrkToolInterfaces/ITrackAmbiguityProcessorTool.h"
+#include "MuidInterfaces/ICombinedMuonTrackBuilder.h"
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
+#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
 
 namespace MuonCombined {
 
@@ -32,10 +24,9 @@ namespace MuonCombined {
 
   public:
     MuonCandidateTool(const std::string& type, const std::string& name, const IInterface* parent);
-    virtual ~MuonCandidateTool(void); // destructor
+    virtual ~MuonCandidateTool()=default;
   
     virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
 
     /**IMuonCandidateTool interface: build a MuonCandidateCollection from a TrackCollection of spectrometer tracks */
     virtual
-- 
GitLab


From bc685811407c0b71fed7cd890e7233a79516b7c6 Mon Sep 17 00:00:00 2001
From: Tim Martin <tim.martin@cern.ch>
Date: Wed, 10 Jun 2020 09:50:43 +0000
Subject: [PATCH 109/266] [ATR-19256] Make CostMon service execution dependent
 on CostMon chain

---
 .../TrigCostMonitorMT/share/TrigCostMonitorMT_jobOptions.py   | 2 +-
 .../TrigCostMonitorMT/src/TrigCostDataStore.icc               | 4 ++--
 .../TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigCostMonitorMT/share/TrigCostMonitorMT_jobOptions.py b/Trigger/TrigMonitoring/TrigCostMonitorMT/share/TrigCostMonitorMT_jobOptions.py
index 176ac51520ae..d50981472fac 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitorMT/share/TrigCostMonitorMT_jobOptions.py
+++ b/Trigger/TrigMonitoring/TrigCostMonitorMT/share/TrigCostMonitorMT_jobOptions.py
@@ -15,7 +15,7 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
 
 if ConfigFlags.Trigger.CostMonitoring.doCostMonitoring:
   trigCostService = TrigCostMTSvc()
-  trigCostService.MonitorAllEvents = True
+  trigCostService.MonitorAllEvents = ConfigFlags.Trigger.CostMonitoring.monitorAllEvents
   trigCostService.SaveHashes = True # This option will go away once the TrigConfigSvc is fully up & running
   ServiceMgr += trigCostService
   
diff --git a/Trigger/TrigMonitoring/TrigCostMonitorMT/src/TrigCostDataStore.icc b/Trigger/TrigMonitoring/TrigCostMonitorMT/src/TrigCostDataStore.icc
index 69077edb0213..615552518e99 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitorMT/src/TrigCostDataStore.icc
+++ b/Trigger/TrigMonitoring/TrigCostMonitorMT/src/TrigCostDataStore.icc
@@ -23,8 +23,8 @@ StatusCode TrigCostDataStore<PAYLOAD>::insert(const AlgorithmIdentifier& ai, con
   if (mapReference.insert(acc, ai)) {
     // Obtains lock on the key value 'name' until 'acc' goes out of scope or calls release()
     acc->second = payload;
-  } else if (msg.level() <= MSG::WARNING) {
-    msg << MSG::WARNING << "Key caller:'" << ai.m_caller << "' store:'" << ai.m_store 
+  } else if (msg.level() <= MSG::DEBUG) {
+    msg << MSG::DEBUG << "Key caller:'" << ai.m_caller << "' store:'" << ai.m_store 
       << "' slot:" << ai.m_realSlot <<" already in the TrigCostDataStore" << endmsg; 
   }
   return StatusCode::SUCCESS;
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
index c744bd8e0061..424342251df8 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
@@ -105,9 +105,9 @@ def createTriggerFlags():
 
     # Enables collection and export of detailed monitoring data of the HLT execution
     flags.addFlag('Trigger.CostMonitoring.doCostMonitoring', False)
-    flags.addFlag('Trigger.CostMonitoring.chain', 'HLT_costmonitor')
+    flags.addFlag('Trigger.CostMonitoring.chain', 'HLT_costmonitor_CostMonDS_L1All')
     flags.addFlag('Trigger.CostMonitoring.outputCollection', 'HLT_TrigCostContainer')
-    flags.addFlag('Trigger.CostMonitoring.monitorAllEvents', True) # Defaulting to "True" is temporary
+    flags.addFlag('Trigger.CostMonitoring.monitorAllEvents', False)
 
 
     # enable Bcm inputs simulation
-- 
GitLab


From d29c44c53a0df42018d65b275219823a5c08e35b Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 12:33:16 +0200
Subject: [PATCH 110/266] LArFEBConfigCondAlg: DEBUG -> VERBOSE

---
 LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
index 8f33c6e145b3..8b27345be762 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx
@@ -88,7 +88,7 @@ StatusCode LArFEBConfigCondAlg::execute(const EventContext& ctx) const {
       }  
       const HWIdentifier fid(chanit->first); //COOL channel number == FEB identifier
       //const coral::AttributeList& attr = chanit->second;
-      ATH_MSG_DEBUG("Working on FEB 0x" << std::hex << fid.get_compact() << std::dec << "  " << m_onlineID->channel_name(fid));
+      ATH_MSG_VERBOSE("Working on FEB 0x" << std::hex << fid.get_compact() << std::dec << "  " << m_onlineID->channel_name(fid));
       p_febConfig->add (fid, &chanit->second);
       ++nFebs;
     }//End loop over COOL channels
-- 
GitLab


From da53c46b56ac928f8ab87979dbe0f9f56b1a6f78 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 13:07:43 +0200
Subject: [PATCH 111/266] RecoUtils: Add event & slot to Message format when
 running with threads

---
 .../RecExample/RecExCommon/share/RecoUtils.py          | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
index dc60170b62bf..00e3311402af 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
@@ -183,8 +183,14 @@ if rec.doPersistencyOptimization() and hasattr(svcMgr, 'AthenaPoolCnvSvc'):
 #  - don't overwrite blindly with the default
 if not rec.OutputLevel.isDefault():
     ServiceMgr.MessageSvc.OutputLevel = rec.OutputLevel()
-#increase the number of letter reserved to the alg/tool name from 18 to 30
-ServiceMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" 
+
+#Adjust the message format for threaded vs serial jobs
+if jobproperties.ConcurrencyFlags.NumThreads() > 0:
+    ServiceMgr.MessageSvc.Format = "% F%50W%S%4W%R%e%s%8W%R%T %0W%M"
+else:
+    ServiceMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" 
+
+
 #ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
 ServiceMgr.MessageSvc.useColors = False
 ServiceMgr.MessageSvc.defaultLimit=500
-- 
GitLab


From bcc2e780d5af60df260ecbce06608694a224b641 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Wed, 10 Jun 2020 11:38:12 +0000
Subject: [PATCH 112/266] Make IVertexFinder() and findVertex() const

---
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../ConversionFinderUtils.h                   |  31 +-
 .../ConversionPostSelector.h                  |  35 +-
 .../InDetConversionFinderTools.h              | 222 +++++---
 .../SingleTrackConversionTool.h               |  16 +-
 .../TrackPairsSelector.h                      |  38 +-
 .../src/ConversionFinderUtils.cxx             | 118 ++--
 .../src/ConversionPostSelector.cxx            |  43 +-
 .../src/InDetConversionFinderTools.cxx        | 445 ++++++++-------
 .../src/SingleTrackConversionTool.cxx         | 271 +++++----
 .../src/TrackPairsSelector.cxx                |  86 +--
 .../src/VertexPointEstimator.cxx              |  12 +-
 .../InDetPriVxFinderTool/CMakeLists.txt       |  10 +-
 .../InDetAdaptiveMultiPriVxFinderTool.h       | 515 +++++++++---------
 .../InDetAdaptivePriVxFinderTool.h            | 167 +++---
 .../InDetIterativePriVxFinderTool.h           | 190 ++++---
 .../InDetMultiPriVxFinderTool.h               |  36 +-
 .../InDetPriVxFinderTool.h                    | 164 +++---
 .../src/InDetAdaptiveMultiPriVxFinderTool.cxx | 132 ++---
 .../src/InDetAdaptivePriVxFinderTool.cxx      |  57 +-
 .../src/InDetIterativePriVxFinderTool.cxx     | 143 ++---
 .../src/InDetMultiPriVxFinderTool.cxx         |  38 +-
 .../src/InDetPriVxFinderTool.cxx              |  60 +-
 .../InDetRecToolInterfaces/IVertexFinder.h    | 117 ++--
 .../InDetVKalPriVxFinderTool/CMakeLists.txt   |   5 +-
 .../InDetVKalPriVxFinderTool.h                | 458 +++++++++-------
 .../InDetVKalPriVxFinderTool/src/CutTrk.cxx   |  44 +-
 .../src/InDetVKalPriVxFinder.cxx              | 296 +++++-----
 .../InDetVKalPriVxFinderTool/src/PVrtFind.cxx | 314 ++++++-----
 .../InDetVKalPriVxFinderTool/src/PVrtFit.cxx  | 430 +++++++++------
 .../src/Utilities.cxx                         | 198 ++++---
 .../InDetZVTOPVxFinder/ZVTOP_Tool.h           |  20 +-
 .../src/ZVTOP_SecVtxTool.cxx                  |  64 +--
 .../src/ZVTOP_SlowSpatialPointFinder.cxx      |  56 +-
 .../src/ZVTOP_SpatialPointFinder.cxx          |  52 +-
 .../InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx     |  94 ++--
 .../src/ZVTOP_TrkProbTubeCalc.cxx             |   6 +-
 37 files changed, 2811 insertions(+), 2173 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ATLAS_CHECK_THREAD_SAFETY

diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..8ee23b54bd0a
--- /dev/null
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetRecTools/InDetConversionFinderTools
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionFinderUtils.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionFinderUtils.h
index ed30e903d429..c72c38172d9a 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionFinderUtils.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionFinderUtils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETCONVERSIONFINDERTOOLS_CONVERSIONFINDERUTILS_H
@@ -33,29 +33,34 @@ namespace InDet {
     
     static const InterfaceID& interfaceID();
     
-    virtual StatusCode initialize();
+    virtual StatusCode initialize() override;
     
-    virtual StatusCode finalize();
+    virtual StatusCode finalize() override;
     
     /** helper functions */
     /** Hit counter. */
-    void countHits(const DataVector<const Trk::MeasurementBase>* mb, int& ntrt, int& nclus);
+    void countHits(const DataVector<const Trk::MeasurementBase>* mb,
+                   int& ntrt,
+                   int& nclus) const;
     /** Estimate ratio of high-to-low level TRT hits. */
-    double trRatio(const DataVector<const Trk::MeasurementBase>* mb);
+    double trRatio(const DataVector<const Trk::MeasurementBase>* mb) const;
     /** Momentum fraction of tracks in pair. */
-    double momFraction(const Trk::TrackParameters* per1, const Trk::TrackParameters* per2);
+    double momFraction(const Trk::TrackParameters* per1,
+                       const Trk::TrackParameters* per2) const;
     /** Approximate distance of minimum approach between tracks in pair. */
-    double distBetweenTracks(const Trk::Track *trk_pos, const Trk::Track *trk_neg);
+    double distBetweenTracks(const Trk::Track* trk_pos,
+                             const Trk::Track* trk_neg) const;
     /** Get measured track parameters at first hit. Trk::Track interface. */
-    const Trk::TrackParameters* getTrkParameters(const Trk::Track* track);
+    const Trk::TrackParameters* getTrkParameters(const Trk::Track* track) const;
     /** Add new perigee to track. */
-    const Trk::Track* addNewPerigeeToTrack(const Trk::Track* track, const Trk::Perigee* mp);
+    const Trk::Track* addNewPerigeeToTrack(const Trk::Track* track,
+                                           const Trk::Perigee* mp) const;
     /** Correct VxCandidate with respect to a user defined vertex.  */
-    xAOD::Vertex* correctVxCandidate(xAOD::Vertex*,Amg::Vector3D);
+    xAOD::Vertex* correctVxCandidate(xAOD::Vertex*, Amg::Vector3D) const;
     /** Get measured track parameters at first hit. Trk::TrackParticleBase interface. */
-    const Trk::TrackParameters* getTrkParticleParameters(const Trk::TrackParticleBase*);
-  private:
-		
+    const Trk::TrackParameters* getTrkParticleParameters(
+      const Trk::TrackParticleBase*) const;
+
   };
   
 }
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
index 44c223cc4f96..c6fb26564841 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETCONVERSIONFINDERTOOLS_CONVERSIONPOSTSELECTOR_H
@@ -33,16 +33,27 @@ namespace InDet {
     virtual ~ConversionPostSelector();
     
     static const InterfaceID& interfaceID();
-    virtual StatusCode initialize();
-    virtual StatusCode finalize();
-    
-    /** Conversion candidate post-fit selectors. Return true if the argument track fulfills the selection*/
-    bool selectConversionCandidate(xAOD::Vertex * myCandidate, int flag, std::vector<Amg::Vector3D>& trkL); 
-    bool selectSecVtxCandidate(xAOD::Vertex * myCandidate, int flag, std::vector<Amg::Vector3D>& trkL, int&);
-    
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
+
+    /** Conversion candidate post-fit selectors. Return true if the argument
+     * track fulfills the selection*/
+    bool selectConversionCandidate(xAOD::Vertex* myCandidate,
+                                   int flag,
+                                   std::vector<Amg::Vector3D>& trkL) const;
+    bool selectSecVtxCandidate(xAOD::Vertex* myCandidate,
+                               int flag,
+                               std::vector<Amg::Vector3D>& trkL,
+                               int&) const;
+
     /** Decorate vertices with values used in post selector **/
-    void decorateVertex(xAOD::Vertex &vertex, float inv_mass, float pt1, float pt2, float fR, float deltaPhiVtxTrk);
-    
+    void decorateVertex(xAOD::Vertex& vertex,
+                        float inv_mass,
+                        float pt1,
+                        float pt2,
+                        float fR,
+                        float deltaPhiVtxTrk) const;
+
   private:
     /** Properties for track selection: 
 	all cuts are ANDed */
@@ -64,10 +75,10 @@ namespace InDet {
     int    m_nsig        ;
     
     /** struct of Particle Masses */
-    static Trk::ParticleMasses s_particleMasses;
+    static const Trk::ParticleMasses s_particleMasses;
     
     /** Compute the four-momentum of a particle according to a mass hypothesis.  */
-    CLHEP::HepLorentzVector fourP(const Trk::TrackParameters&, const Trk::TrackParameters&, double, bool);
+    CLHEP::HepLorentzVector fourP(const Trk::TrackParameters&, const Trk::TrackParameters&, double, bool) const;
   };
   
 }
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
index 65b8c77ff889..94f175383f34 100755
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
@@ -1,100 +1,166 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
-	InDetConversionFinderTools.h  -  Description
-	-------------------
-	begin   : 28-08-2006
-	authors : Tatjana Lenz
-	email   : tatjana.lenz@cern.ch
-	changes :
+        InDetConversionFinderTools.h  -  Description
+        -------------------
+        begin   : 28-08-2006
+        authors : Tatjana Lenz
+        email   : tatjana.lenz@cern.ch
+        changes :
 ***************************************************************************/
 #ifndef INDETCONVERSIONFINDERTOOLS_INDETCONVERSIONFINDERTOOLS_H
 #define INDETCONVERSIONFINDERTOOLS_INDETCONVERSIONFINDERTOOLS_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-
 #include "InDetRecToolInterfaces/IVertexFinder.h"
-#include "TrkTrack/TrackCollection.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
 
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
 
-#include <vector>
+/* Tools*/
+#include "TrkVertexFitterInterfaces/IVertexFitter.h"
+#include "InDetConversionFinderTools/TrackPairsSelector.h"
+#include "TrkExInterfaces/IExtrapolator.h"
+#include "InDetConversionFinderTools/ConversionPostSelector.h"
+#include "InDetConversionFinderTools/SingleTrackConversionTool.h"
+#include "InDetConversionFinderTools/ConversionFinderUtils.h"
+#include "InDetConversionFinderTools/VertexPointEstimator.h"
+#include "InDetConversionFinderTools/ConversionPostSelector.h"
+#include "InDetConversionFinderTools/SingleTrackConversionTool.h"
+#include "TrkToolInterfaces/ITrackSelectorTool.h"
 
-/* Forward declarations */
+#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkTrack/TrackCollection.h"
+/*xAOD collections */
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/VertexContainer.h"
 
-namespace Trk
+#include <vector>
+
+/**
+   @class InDetConversionFinderTools
+
+   InDet::InDetConversionFinderTools is a tool which reconstructs conversion
+   vertex candidates in the form of xAOD::Vertex using Trk::Track (no longer
+   available) or Trk::TrackParticleBase (default) as an input
+*/
+
+namespace InDet {
+
+class InDetConversionFinderTools
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
-  class IVertexFitter;
-  class IExtrapolator;
-  class ITrackSelectorTool;
-}
+public:
+  InDetConversionFinderTools(const std::string& t,
+                             const std::string& n,
+                             const IInterface* p);
+  ~InDetConversionFinderTools();
+
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize() override;
+
+  //!< Remove standalone TRT tracks
+  bool m_removeTrt;
+  //!< Conversions or V0s
+  bool m_isConversion;
+  //!< Decorate vertices with values used for vertex selection
+  bool m_decorateVertices;
+
+  using IVertexFinder::findVertex;
+  //!< Conversion candidate reconstruction for Trk::Tracks.
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const TrackCollection* trk_coll) const override;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const Trk::TrackParticleBaseCollection* trk_coll) const override;
+
+  /** Conversion candidate reconstruction for Trk::TrackParticle (default)  */
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const xAOD::TrackParticleContainer* trk_coll) const override;
+
+protected:
+ 
+  /** Vertex fitter interface.   */
+  /** Track pair selection tool. */
+  ToolHandle<Trk::IVertexFitter> m_iVertexFitter{ this,
+                                                  "VertexFitterTool",
+                                                  "Trk::TrkVKalVrtFitter",
+                                                  "Vertex fitter Tool" };
+  /** Initial conversion vertex estimator tool. */
+  ToolHandle<InDet::TrackPairsSelector> m_trackPairsSelector{
+    this,
+    "TrackPairsSelector",
+    "InDet::TrackPairsSelector",
+    "Track Pair Selector Tool"
+  };
+  /** Initial conversion vertex estimator tool. */
+  ToolHandle<InDet::VertexPointEstimator> m_vertexEstimator{
+    this,
+    "VertexPointEstimator",
+    "InDet::VertexPointEstimator",
+    "Vertex point estimator"
+  };
+  /** Conversion post-fit selector tool. */
+  ToolHandle<InDet::ConversionPostSelector> m_postSelector{
+    this,
+    "PostSelector",
+    "InDet::ConversionPostSelector",
+    "Tool for post selection of conversion candidates"
+  };
+  /** Single track conversion tool. */
+  ToolHandle<InDet::SingleTrackConversionTool> m_singleTrkConvTool{
+    this,
+    "SingleTrackConversionTool",
+    "InDet::SingleTrackConversionTool",
+    "Tool for single track conversions"
+  };
+
+  /** Track extrapolator tool. */
+  ToolHandle<Trk::IExtrapolator> m_extrapolator{ this,
+                                                 "Extrapolator",
+                                                 "",
+                                                 "Extrapolation Tool" };
+  /** Track Selector Tool. */
+  ToolHandle<Trk::ITrackSelectorTool> m_trkSelector{
+    this,
+    "TrackSelectorTool",
+    "InDet::TrackSelectorTool",
+    "Tool for track Selection"
+  };
 
-namespace InDet{
-  class ConversionFinderUtils;
-  class VertexPointEstimator;
-  class ConversionPostSelector;
-  class SingleTrackConversionTool;
-  class TrackPairsSelector;
-  
-  /**
-     @class InDetConversionFinderTools
-     
-     InDet::InDetConversionFinderTools is a tool which reconstructs conversion
-     vertex candidates in the form of xAOD::Vertex using Trk::Track (no longer available) or
-     Trk::TrackParticleBase (default) as an input
-  */
-  
-  class InDetConversionFinderTools : public AthAlgTool, virtual public IVertexFinder
-  {	
-  public: 
-    InDetConversionFinderTools(const std::string& t, const std::string& n, const IInterface* p);
-    ~InDetConversionFinderTools();
-    
-    StatusCode initialize();
-    StatusCode finalize();
-    
-    std::string                       m_TrkParticleCollection ;  //!< Name of input track particle collection
-    bool                              m_removeTrt             ;  //!< Remove standalone TRT tracks
-    bool                              m_isConversion          ;  //!< Conversions or V0s
-    bool                              m_decorateVertices      ;  //!< Decorate vertices with values used for vertex selection
-    
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trk_coll);    //!< Conversion candidate reconstruction for Trk::Tracks.
-  
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trk_coll);
-  
-    /** Conversion candidate reconstruction for Trk::TrackParticle (default)  */
-    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trk_coll); 
-
-    
-  protected:
-    ToolHandle < Trk::IVertexFitter > m_iVertexFitter;                  /** Vertex fitter interface.   */
-    ToolHandle <InDet::TrackPairsSelector> m_trackPairsSelector;        /** Track pair selection tool. */
-    ToolHandle <InDet::VertexPointEstimator> m_vertexEstimator;         /** Initial conversion vertex estimator tool. */
-    ToolHandle <InDet::ConversionPostSelector> m_postSelector;          /** Conversion post-fit selector tool. */
-    ToolHandle <InDet::SingleTrackConversionTool> m_singleTrkConvTool;  /** Single track conversion tool. */		
-    ToolHandle<Trk::IExtrapolator> m_extrapolator;  /** Track extrapolator tool. */
-    ToolHandle<Trk::ITrackSelectorTool> m_trkSelector; /** Track Selector Tool. */
-    
-    
-    bool passPreSelection(const xAOD::TrackParticle* track_pos, const xAOD::TrackParticle* track_neg, std::vector<Amg::Vector3D>&  trackList, Amg::Vector3D& initPos, int& flag,
-                          std::map<std::string, float>& intersectionDecors);
-
-    
-    static double s_innerDetectorR;
-    
-    /** Cuts.  */
-    double m_mindR; //!< Minimum allwoed radial distance beteeen guess vertex and closest 1st hit of participating track.
-    double m_maxdR; //!< Maximum allowed radial distance beteeen guess vertex and closest 1st hit of participating track.
-    double m_MinInitVtxR; //!< Minimum allowed radial position for initial guess vertex. Used only in V0 reconstruction.
-    double m_MinFlightAngle; //!< Minimum allowed angular difference between V0 and children direction. Used only in V0 reconstruction.
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_TrkParticleCollectionKey{
+    this,
+    "TrackParticleCollection",
+    "",
+    "Name of the input track particle container"
   };
-  
+
+  bool passPreSelection(TrackPairsSelector::Cache& cache,
+                        const xAOD::TrackParticle* track_pos,
+                        const xAOD::TrackParticle* track_neg,
+                        std::vector<Amg::Vector3D>& trackList,
+                        Amg::Vector3D& initPos,
+                        int& flag,
+                        std::map<std::string, float>& intersectionDecors) const;
+
+  /** Cuts.  */
+  //!< Minimum allwoed radial distance beteeen guess vertex and closest 1st hit
+  //!< of participating track.
+  double m_mindR;
+  //!< Maximum allowed radial distance beteeen guess vertex and closest 1st hit
+  //!< of participating track.
+  double m_maxdR;
+  //!< Minimum allowed radial position for initial guess vertex. Used only in V0
+  //!< reconstruction.
+  double m_MinInitVtxR;
+  //!< Minimum allowed angular difference between V0 and children direction.
+  //!< Used only in V0 reconstruction.
+  double m_MinFlightAngle;
+};
+
 }
 
 #endif // INDETCONVERSIONFINDERTOOLS_INDETCONVERSIONFINDERTOOL_H
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
index 9ddee4e56b45..89adfbb309fc 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETCONVERSIONFINDERTOOLS_SINGLETRACKCONVERSION_H
@@ -35,17 +35,19 @@ namespace InDet {
     virtual ~SingleTrackConversionTool();
     
     static const InterfaceID& interfaceID();
-    virtual StatusCode initialize();
-    virtual StatusCode finalize();
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
     
     /** Build single track conversion candidate. Trk::Track interface.  */
-    xAOD::Vertex* buildSingleTrackConversion(const Trk::Track* track);
+    xAOD::Vertex* buildSingleTrackConversion(const Trk::Track* track) const;
     /** Select single track conversion candidates.  Trk::Track interface. */
-    bool selectSingleTrackConversion(const Trk::Track* track);
+    bool selectSingleTrackConversion(const Trk::Track* track) const;
     /** Build single track conversion candidate. xAOD::TrackParticle interface.  */
-    xAOD::Vertex* buildSingleTrackParticleConversion(const xAOD::TrackParticle*, xAOD::VertexContainer* container );
+    xAOD::Vertex* buildSingleTrackParticleConversion(
+      const xAOD::TrackParticle*,
+      xAOD::VertexContainer* container) const;
     /** Select single track conversion candidates.  xAOD::TrackParticle. */
-    bool selectSingleTrackParticleConversion(const xAOD::TrackParticle*);
+    bool selectSingleTrackParticleConversion(const xAOD::TrackParticle*) const;
     
   protected:
     ToolHandle <InDet::ConversionFinderUtils> m_helpertool; /** Conversion helper tool. */
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
index bf3155de8618..4be35614b202 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
@@ -32,26 +32,40 @@ namespace InDet {
   class TrackPairsSelector : public AthAlgTool {
     
   public:
-    TrackPairsSelector (const std::string& type,
-			const std::string& name, const IInterface* parent);
+
+    struct Cache{
+      float m_distance = 9999. ; /** Distance of closest approach between the tracks **/
+      float m_deltaCotTheta= 9999.; /** Delta cot theta between the tracks **/
+      float m_deltaInit = 9999.; /** Distance difference between initial hits of tracks */
+    };
+
+    TrackPairsSelector(const std::string& type,
+                       const std::string& name,
+                       const IInterface* parent);
+   
     virtual ~TrackPairsSelector();
     
     static const InterfaceID& interfaceID();
-    virtual StatusCode initialize();
-    virtual StatusCode finalize();
+ 
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
     
     /** Track pair selectors.Return true if the argument track fulfills the selection */
-    bool selectTrackParticlePair(const xAOD::TrackParticle* trkPpos, const xAOD::TrackParticle* trkPneg);
-    bool selectTrackPair(const Trk::Track* trkpos, const Trk::Track* trkneg);
-    
+    bool selectTrackParticlePair(const xAOD::TrackParticle* trkPpos,
+                                 const xAOD::TrackParticle* trkPneg,
+                                 Cache& cache) const;
+
+    bool selectTrackPair(const Trk::Track* trkpos,
+                         const Trk::Track* trkneg) const;
+
     /** Return a map with the values calculated for the last pair
       * to decorate the vertex once it is created **/
-    std::map<std::string, float> getLastValues();
+    std::map<std::string, float> getLastValues(const Cache& cache) const;
     
   private:
+
     ToolHandle <InDet::ConversionFinderUtils> m_helpertool; /**Conversion helper tool.  */
     ToolHandle<Trk::ITrkDistanceFinder> m_distanceTool;  /** Distance of minimum approach tool   */
-    
     /** Properties for track selection: all cuts are ANDed */
     double m_maxR;                 /** Maximum initial hit radius in order to apply the impact point cut*/
     double m_MinTrkAngle;          /** Minimum allowed angle between decay tracks. Used only in V0 reconstruction. */
@@ -59,10 +73,6 @@ namespace InDet {
     std::vector<double> m_etaCut;  /** Maximum eta difference between tracks in pair. */
     std::vector<double> m_initCut; /** Maximum distance difference between initial hits of tracks in pair. */
 
-    /** Values we cut on, to be returned later **/
-    float m_distance;              /** Distance of closest approach between the tracks **/
-    float m_deltaCotTheta;         /** Delta cot theta between the tracks **/
-    float m_deltaInit;             /** Distance difference between initial hits of tracks */
 
   };
   
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionFinderUtils.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionFinderUtils.cxx
index 2695bb96e53e..7ee56527de41 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionFinderUtils.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionFinderUtils.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -24,8 +24,10 @@ using HepGeom::Point3D;
 namespace InDet {
   
   static const InterfaceID IID_IConversionFinderUtils("InDet::ConversionFinderUtils", 1, 0);
-  
-  ConversionFinderUtils::ConversionFinderUtils(const std::string& type, const std::string& name, const IInterface* parent) 
+
+  ConversionFinderUtils::ConversionFinderUtils(const std::string& type,
+                                               const std::string& name,
+                                               const IInterface* parent)
     : AthAlgTool(type, name, parent)
   {
     declareInterface<ConversionFinderUtils>(this);        	
@@ -49,7 +51,12 @@ namespace InDet {
   /** 
    * hits counter 
    */
-  void ConversionFinderUtils::countHits(const DataVector<const Trk::MeasurementBase>* mb, int& ntrt, int& nclus) {
+  void
+  ConversionFinderUtils::countHits(
+    const DataVector<const Trk::MeasurementBase>* mb,
+    int& ntrt,
+    int& nclus) const
+  {
 
     DataVector<const Trk::MeasurementBase>::const_iterator its, itse=mb->end();
 	  
@@ -68,12 +75,15 @@ namespace InDet {
       if(dc) { ++ntrt; continue;}							       
       
     }//end of loop over meas.bases
-  }//end of count hits method
-  
+  }  // end of count hits method
+
   /** 
    * hl trt hits / trt hits ratio calculater
    */
-  double ConversionFinderUtils::trRatio(const DataVector<const Trk::MeasurementBase>* mb) {
+  double
+  ConversionFinderUtils::trRatio(
+    const DataVector<const Trk::MeasurementBase>* mb) const
+  {
 
     DataVector<const Trk::MeasurementBase>::const_iterator itp=mb->begin(), itpe=mb->end();
     int ntrth = 0; 
@@ -93,23 +103,29 @@ namespace InDet {
     
     if(ntrth>0) return double(nHL)/double(ntrth);
     return 1000.;
-  }//end of trRatio method
-  
+  } // end of trRatio method
+
   /** 
    * mom fraction 
    */
-  double ConversionFinderUtils::momFraction(const Trk::TrackParameters* per1, const Trk::TrackParameters* per2) {
+  double
+  ConversionFinderUtils::momFraction(const Trk::TrackParameters* per1,
+                                     const Trk::TrackParameters* per2) const
+  {
 
-    Amg::Vector3D mom_pos = per1->momentum();
-    Amg::Vector3D mom_neg = per2->momentum();
+    const Amg::Vector3D& mom_pos = per1->momentum();
+    const Amg::Vector3D& mom_neg = per2->momentum();
     double momFraction = mom_pos.mag()/(mom_pos.mag() + mom_neg.mag());
     return momFraction;
   }
-  
+
   /** 
    * distance between two tracks
    */
-  double ConversionFinderUtils::distBetweenTracks(const Trk::Track *trk_pos, const Trk::Track *trk_neg) {
+  double
+  ConversionFinderUtils::distBetweenTracks(const Trk::Track* trk_pos,
+                                           const Trk::Track* trk_neg) const
+  {
 
     //position of the first measurement on the positive track
     const Trk::MeasurementBase* first_pos_meas = trk_pos->measurementsOnTrack()->front();
@@ -147,15 +163,16 @@ namespace InDet {
       const Trk::Perigee* perigee;							       
       
       if (first_pos_meas->globalPosition().mag() < first_neg_meas->globalPosition().mag()) {
-	ref_point = first_pos_meas->globalPosition(); 				        
-	perigee = trk_neg->perigeeParameters();					        
-      } else { 									        
-	ref_point = first_neg_meas->globalPosition(); 				        
-	perigee = trk_pos->perigeeParameters();					        
-      }										        
-      
-      //when the helix can be approximated as a straight line, when the distance of closest approach can be calculated as
-      //distance^2 = [momentum x (ref_point-position)]^2/momentum^2 
+        ref_point = first_pos_meas->globalPosition();
+        perigee = trk_neg->perigeeParameters();					        
+      } else {
+        ref_point = first_neg_meas->globalPosition();
+        perigee = trk_pos->perigeeParameters();					        
+      }
+
+      // when the helix can be approximated as a straight line, when the
+      // distance of closest approach can be calculated as distance^2 = [momentum
+      // x (ref_point-position)]^2/momentum^2
       Amg::Vector3D momentum = perigee->momentum();			  
       Amg::Vector3D position = perigee->position();			  
       double p = momentum.mag();					  
@@ -165,59 +182,67 @@ namespace InDet {
     
     ATH_MSG_DEBUG("Distance between two tracks = "<<distance);
     return distance;
-  }//end of distBetweenTracks method
-  
+  } // end of distBetweenTracks method
+
   /** 
    * return first track parameters
    */
-  const Trk::TrackParameters* ConversionFinderUtils::getTrkParameters(const Trk::Track* track)
+  const Trk::TrackParameters*
+  ConversionFinderUtils::getTrkParameters(const Trk::Track* track) const
   {
     const DataVector<const Trk::TrackStateOnSurface>* tsos = track->trackStateOnSurfaces();
-    if(!tsos) return 0;
+    if(!tsos) return nullptr;
     
     DataVector<const Trk::TrackStateOnSurface>::const_iterator itse = tsos->end(); 
     DataVector<const Trk::TrackStateOnSurface>::const_iterator itsb = tsos->begin(); 
     
     for(;itsb!=itse;++itsb) {
       if((*itsb)->measurementOnTrack()) {
-	const Trk::TrackParameters* trkP = (*itsb)->trackParameters();
-	if(trkP->associatedSurface().center().perp()>=10.) return trkP;
+        const Trk::TrackParameters* trkP = (*itsb)->trackParameters();
+        if(trkP->associatedSurface().center().perp()>=10.) return trkP;
       }//end of meas on track check
     }//end of loop over all track states on surface
     
-    return 0;   
+    return nullptr;   
   }
   
   /**
    * return first track particle parameters
    */
-  const Trk::TrackParameters* ConversionFinderUtils::getTrkParticleParameters(const Trk::TrackParticleBase* track) {
-    
+  const Trk::TrackParameters*
+  ConversionFinderUtils::getTrkParticleParameters(
+    const Trk::TrackParticleBase* track) const
+  {
+
     std::vector<const Trk::TrackParameters*>::const_iterator vpb = track->trackParameters().begin(); 	
     std::vector<const Trk::TrackParameters*>::const_iterator vpe = track->trackParameters().end(); 	
     for(;vpb != vpe; ++vpb) if((*vpb)->position().perp()>=10.) return (*vpb);	
-    return 0;	
+    return nullptr;
   }
-  
+
   /* add recalculated perigees to the track*/
-  const Trk::Track* ConversionFinderUtils::addNewPerigeeToTrack(const Trk::Track* track, const Trk::Perigee* mp)
+  const Trk::Track*
+  ConversionFinderUtils::addNewPerigeeToTrack(const Trk::Track* track,
+                                              const Trk::Perigee* mp) const
   {
     
     // fitQuality from track
     const Trk::FitQuality* fq = track->fitQuality()->clone(); 
-    if(!fq) return 0;
+    if(!fq) return nullptr;
     
     // output datavector of TSOS
     DataVector<const Trk::TrackStateOnSurface>*	    ntsos = new DataVector<const Trk::TrackStateOnSurface>;
     const DataVector<const Trk::TrackStateOnSurface>* tsos = track->trackStateOnSurfaces();
-    if(!tsos) {delete ntsos; return 0;}
+    if(!tsos) {delete ntsos; return nullptr;}
     DataVector<const Trk::TrackStateOnSurface>::const_iterator its,itse = tsos->end();
     for(its=tsos->begin();its!=itse;++its) {
       
       std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
       typePattern.set(Trk::TrackStateOnSurface::Perigee);
-      const Trk::TrackStateOnSurface * per_tsos = ((*its)->type(Trk::TrackStateOnSurface::Perigee)) ?  
-	new Trk::TrackStateOnSurface(0,mp->clone(),0,0,typePattern) : (*its)->clone();
+      const Trk::TrackStateOnSurface* per_tsos =
+        ((*its)->type(Trk::TrackStateOnSurface::Perigee))
+          ? new Trk::TrackStateOnSurface(nullptr, mp->clone(), nullptr, nullptr, typePattern)
+          : (*its)->clone();
       ntsos->push_back(per_tsos);	  
     }
     
@@ -226,8 +251,10 @@ namespace InDet {
     Trk::Track* newTrk = new Trk::Track(info, ntsos, fq);
     return newTrk;
   }
-  
-  xAOD::Vertex* ConversionFinderUtils::correctVxCandidate(xAOD::Vertex* initVxCandidate, Amg::Vector3D guessVertex)
+
+  xAOD::Vertex*
+  ConversionFinderUtils::correctVxCandidate(xAOD::Vertex* initVxCandidate,
+                                            Amg::Vector3D guessVertex) const
   {
     Amg::Vector3D correctVertex(initVxCandidate->position().x()+guessVertex.x(),
 			     initVxCandidate->position().y()+guessVertex.y(),
@@ -245,13 +272,14 @@ namespace InDet {
       AmgSymMatrix(5) em(*(vtxPer->covariance()));
       Trk::PerigeeSurface surface (globalVertexPosition); 
 
-      const Trk::TrackParameters* tmpMeasPer = surface.createParameters<5,Trk::Charged>(0.,0.,iv[2],iv[3],iv[4],&em);
-      
-      Trk::VxTrackAtVertex trkV(vtxTrack.trackQuality().chiSquared(), const_cast<Trk::TrackParameters*>(tmpMeasPer));
+      Trk::TrackParameters* tmpMeasPer = surface.createParameters<5,Trk::Charged>(0.,0.,iv[2],iv[3],iv[4],&em);
+
+      Trk::VxTrackAtVertex trkV(vtxTrack.trackQuality().chiSquared(),
+                                tmpMeasPer);
       tmpVTAV.push_back(trkV);
     }//end of loop over VxTracksAtVertex				    
     
-    if(tmpVTAV.size()!=2) return 0;
+    if(tmpVTAV.size()!=2) return nullptr;
     
     //Create the xAOD::Vertex and set the position and VxTrackAtVertex properly
     xAOD::Vertex *vx = new xAOD::Vertex(*initVxCandidate);
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionPostSelector.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionPostSelector.cxx
index b5c87d88fc1e..2660598de0a8 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionPostSelector.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/ConversionPostSelector.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -22,12 +22,14 @@ namespace{
 
 namespace InDet {
   
-  Trk::ParticleMasses ConversionPostSelector::s_particleMasses;
+  Trk::ParticleMasses const ConversionPostSelector::s_particleMasses;
   
   static const InterfaceID IID_IConversionPostSelector("InDet::ConversionPostSelector", 1, 0);
-  
-  ConversionPostSelector::ConversionPostSelector(const std::string& type, const std::string& name, const IInterface* parent) :
-    AthAlgTool(type, name, parent)
+
+  ConversionPostSelector::ConversionPostSelector(const std::string& type,
+                                                 const std::string& name,
+                                                 const IInterface* parent)
+    : AthAlgTool(type, name, parent)
   {
     m_massK0      = 497.672;
     m_sigmaK0     = 8.5;
@@ -81,7 +83,7 @@ namespace InDet {
   }
   
   bool ConversionPostSelector::selectConversionCandidate(xAOD::Vertex * vertex, int flag, 
-               std::vector<Amg::Vector3D>& trkL){
+               std::vector<Amg::Vector3D>& trkL) const{
     bool pass = true;
     
     //Determine the cuts
@@ -172,9 +174,14 @@ namespace InDet {
     }
     return pass;
   }
-  
-  bool ConversionPostSelector::selectSecVtxCandidate(xAOD::Vertex * vertex, int flag,
-                                                     std::vector<Amg::Vector3D>& trkL, int& type){
+
+  bool
+  ConversionPostSelector::selectSecVtxCandidate(
+    xAOD::Vertex* vertex,
+    int flag,
+    std::vector<Amg::Vector3D>& trkL,
+    int& type) const
+  {
     bool pass = true;
     bool isK0 = false;
     bool isLambda = false;
@@ -263,9 +270,13 @@ namespace InDet {
     type = kind;
     return pass;
   }
-  
-  CLHEP::HepLorentzVector 
-  ConversionPostSelector::fourP(const Trk::TrackParameters& per1,const Trk::TrackParameters& per2,double mass, bool isBar){
+
+  CLHEP::HepLorentzVector
+  ConversionPostSelector::fourP(const Trk::TrackParameters& per1,
+                                const Trk::TrackParameters& per2,
+                                double mass,
+                                bool isBar) const
+  {
     CLHEP::HepLorentzVector momentum;
     Amg::Vector3D sum_mom = per1.momentum() + per2.momentum();
     double mp1 = 0.; double mp2 = 0.;
@@ -296,7 +307,13 @@ namespace InDet {
     return momentum;
   }
 
-void ConversionPostSelector::decorateVertex(xAOD::Vertex &vertex, float inv_mass, float pt1, float pt2, float fR, float deltaPhiVtxTrk)
+  void
+  ConversionPostSelector::decorateVertex(xAOD::Vertex& vertex,
+                                         float inv_mass,
+                                         float pt1,
+                                         float pt2,
+                                         float fR,
+                                         float deltaPhiVtxTrk) const
   {
     vertex.auxdata<float>("mass") = inv_mass;
     vertex.auxdata<float>("pt1") = pt1;
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
index 23b932c14e82..251880cb9b55 100755
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -17,66 +17,38 @@
 #include "AthLinks/ElementLink.h"
 #include "TrkTrack/LinkToTrack.h"
 #include "TrkParticleBase/LinkToTrackParticleBase.h"
-#include "TrkVertexFitterInterfaces/IVertexFitter.h"
-#include "TrkExInterfaces/IExtrapolator.h"
-#include "InDetConversionFinderTools/ConversionPostSelector.h"
-#include "InDetConversionFinderTools/SingleTrackConversionTool.h"
-#include "TrkToolInterfaces/ITrackSelectorTool.h"
-#include "InDetConversionFinderTools/ConversionFinderUtils.h"
-#include "InDetConversionFinderTools/VertexPointEstimator.h"
-#include "InDetConversionFinderTools/ConversionPostSelector.h"
-#include "InDetConversionFinderTools/SingleTrackConversionTool.h"
-#include "InDetConversionFinderTools/TrackPairsSelector.h"
-#include <vector>
-#include <utility> 
-
 
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/VertexContainer.h"
 
-//using CLHEP::Hep3Vector;
-
-//Necessary for the TrackParticleContainer
-#include "Particle/TrackParticleContainer.h"
+#include <vector>
+#include <utility> 
 
 namespace InDet
 {
-  double InDetConversionFinderTools::s_innerDetectorR = 500.;
-  
-  InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t, const std::string& n, const IInterface* p) 
-    :  AthAlgTool(t,n,p),
-       m_TrkParticleCollection("TrackParticleCandidate"),
-       m_iVertexFitter("Trk::FullVertexFitter"),
-       m_trackPairsSelector("InDet::TrackPairsSelector"),
-       m_vertexEstimator("InDet::VertexPointEstimator"),
-       m_postSelector("InDet::ConversionPostSelector"),
-       m_singleTrkConvTool("InDet::SingleTrackConversionTool"),
-       m_extrapolator ("Trk::Extrapolator/InDetExtrapolator"),
-       m_trkSelector("InDet::TrackSelectorTool")
-  {
-    m_mindR          = -350.;
-    m_maxdR          = 250.;
-    m_MinInitVtxR    = 0.;
-    m_MinFlightAngle = 0.;
-
-    declareInterface<IVertexFinder>(this);
-    declareProperty("VertexFitterTool",           m_iVertexFitter);
-    declareProperty("TrackPairsSelector",         m_trackPairsSelector);
-    declareProperty("VertexPointEstimator",       m_vertexEstimator);
-    declareProperty("PostSelector",               m_postSelector);
-    declareProperty("SingleTrackConversionTool",  m_singleTrkConvTool);
-    declareProperty("Extrapolator",               m_extrapolator );
-    declareProperty("TrackParticleCollection",    m_TrkParticleCollection); //Input track particle collection
-    declareProperty("RemoveTrtTracks",            m_removeTrt); //Remove standalone TRT tracks
-    declareProperty("IsConversion",               m_isConversion); //Conversion or V0s
-    declareProperty("DecorateVertices",           m_decorateVertices=true); //Decorate vertices with values used for vertex selection  
-    declareProperty("TrackSelectorTool",          m_trkSelector);
-    declareProperty("MinDistVtxHit",              m_mindR);
-    declareProperty("MaxDistVtxHit",              m_maxdR);
-    declareProperty("MinInitVtxR",                m_MinInitVtxR);
-    declareProperty("MinFlightAngle",             m_MinFlightAngle);
+
+InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t,
+                                                       const std::string& n,
+                                                       const IInterface* p)
+  : AthAlgTool(t, n, p)
+  , m_mindR{ -350. }
+  , m_maxdR{ 250. }
+  , m_MinInitVtxR{ 0 }
+  , m_MinFlightAngle{ 0 }
+{
+  declareInterface<IVertexFinder>(this);
+  // Remove standalone TRT tracks
+  declareProperty("RemoveTrtTracks", m_removeTrt);
+  // Conversion or V0s
+  declareProperty("IsConversion", m_isConversion); 
+   // Decorate vertices with values used for vertex selection
+  declareProperty("DecorateVertices", m_decorateVertices = true);
+  declareProperty("MinDistVtxHit", m_mindR);
+  declareProperty("MaxDistVtxHit", m_maxdR);
+  declareProperty("MinInitVtxR", m_MinInitVtxR);
+  declareProperty("MinFlightAngle", m_MinFlightAngle);
   }
   
   InDetConversionFinderTools::~InDetConversionFinderTools(){}
@@ -84,62 +56,63 @@ namespace InDet
   StatusCode InDetConversionFinderTools::initialize()
   {
     StatusCode sc = AthAlgTool::initialize();
-    if ( sc.isFailure() ) {
-      msg(MSG::FATAL) << "Unable to initialize InDetConversionFinderTools" << endmsg;
+    if (sc.isFailure()) {
+      ATH_MSG_FATAL("Unable to initialize InDetConversionFinderTools");
       return StatusCode::FAILURE;
-    } 
+    }
     /* Get the right vertex fitting tool from ToolSvc */
-    if ( m_iVertexFitter.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg;
+    if (m_iVertexFitter.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_iVertexFitter);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg;
     }
+    ATH_MSG_INFO("Retrieved tool " << m_iVertexFitter);
+
     /* Get the track pairs selector tool from ToolSvc */
-    if ( m_trackPairsSelector.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_trackPairsSelector << endmsg;
+    if (m_trackPairsSelector.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_trackPairsSelector);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_trackPairsSelector << endmsg;
     }
-    
+    ATH_MSG_INFO("Retrieved tool " << m_trackPairsSelector);
+
     /* Get the vertex point estimator tool from ToolSvc */
-    if ( m_vertexEstimator.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_vertexEstimator << endmsg;
+    if (m_vertexEstimator.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_vertexEstimator);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_vertexEstimator << endmsg;
     }
+    ATH_MSG_INFO("Retrieved tool " << m_vertexEstimator);
+
     /* Get the postselector tool from ToolSvc */
-    if ( m_postSelector.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_postSelector << endmsg;
+    if (m_postSelector.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_postSelector);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_postSelector << endmsg;
     }
+    ATH_MSG_INFO("Retrieved tool " << m_postSelector);
+
     /* Get the single track conversion tool from ToolSvc */
-    if ( m_singleTrkConvTool.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_singleTrkConvTool << endmsg;
+    if (m_singleTrkConvTool.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_singleTrkConvTool);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_singleTrkConvTool << endmsg;
     }
+    ATH_MSG_INFO("Retrieved tool " << m_singleTrkConvTool);
+
     /* Get the extrapolator tool from ToolSvc */
-    if ( m_extrapolator.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg;
+    if (m_extrapolator.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg;
     }
+    ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
+
     /* Get the track selector tool from ToolSvc */
-    if ( m_trkSelector.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_trkSelector << endmsg;
+    if (m_trkSelector.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_trkSelector);
       return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_trkSelector << endmsg;
     }
-    
-    msg(MSG::INFO) << "Initialization successful" << endmsg;
+    ATH_MSG_INFO("Retrieved tool " << m_trkSelector);
+
+    ATH_CHECK(m_TrkParticleCollectionKey.initialize(
+      !m_TrkParticleCollectionKey.key().empty()));
+
+    ATH_MSG_INFO("Initialization successful");
     return StatusCode::SUCCESS;
   }
   
@@ -148,8 +121,11 @@ namespace InDet
     return StatusCode::SUCCESS;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetConversionFinderTools::findVertex(const Trk::TrackParticleBaseCollection* /*trk_coll*/){
-    
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  InDetConversionFinderTools::findVertex(
+    const Trk::TrackParticleBaseCollection* /*trk_coll*/) const
+  {
+
     ATH_MSG_ERROR("Using old TrackParticle Container no longer supported returning an empty conatiner");
 
     // Make collection for conversions.
@@ -157,12 +133,12 @@ namespace InDet
     xAOD::VertexAuxContainer* InDetConversionContainerAux = new xAOD::VertexAuxContainer();
     InDetConversionContainer->setStore( InDetConversionContainerAux ); 
 
-    return std::make_pair(InDetConversionContainer,InDetConversionContainerAux); 
-   } 
-
+    return std::make_pair(InDetConversionContainer,InDetConversionContainerAux);
+  }
 
   //TrackCollection
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetConversionFinderTools::findVertex(const TrackCollection* /*trk_coll*/)
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  InDetConversionFinderTools::findVertex(const TrackCollection* /*trk_coll*/) const
   {
     
     ATH_MSG_ERROR("Using Track Container not currently supported returning an empty conatiner");
@@ -175,185 +151,232 @@ namespace InDet
     return std::make_pair(InDetConversionContainer,InDetConversionContainerAux); 
   }
 
-  //TrackParticleBaseCollection
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetConversionFinderTools::findVertex ( const xAOD::TrackParticleContainer* trk_coll )
+  // TrackParticleBaseCollection
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  InDetConversionFinderTools::findVertex(
+    const xAOD::TrackParticleContainer* trk_coll) const
   {
     // Make collection for conversions.
-    xAOD::VertexContainer* InDetConversionContainer = new xAOD::VertexContainer();
-    xAOD::VertexAuxContainer* InDetConversionContainerAux = new xAOD::VertexAuxContainer();
-    InDetConversionContainer->setStore( InDetConversionContainerAux ); 
+    xAOD::VertexContainer* InDetConversionContainer =
+      new xAOD::VertexContainer();
+    xAOD::VertexAuxContainer* InDetConversionContainerAux =
+      new xAOD::VertexAuxContainer();
+    InDetConversionContainer->setStore(InDetConversionContainerAux);
     // Count for number of successful conversions
     int numConversions = 0;
-    
-    //have to be used for the vertex fit
-    Amg::Vector3D pos(0.,0.,0.); Amg::Vector3D initPos(0.,0.,0.);
-    
-    // Make seperate lists of positive and negative tracks (after presection cuts)
-    std::vector<const xAOD::TrackParticle*> negSelectedTracks; negSelectedTracks.clear();
-    std::vector<const xAOD::TrackParticle*> posSelectedTracks; posSelectedTracks.clear();
-    std::vector<int> negIndx; std::vector<int> posIndx;
-    
-    //track preselection -->pt-cut
+
+    // have to be used for the vertex fit
+    Amg::Vector3D pos(0., 0., 0.);
+    Amg::Vector3D initPos(0., 0., 0.);
+
+    // Make seperate lists of positive and negative tracks (after presection
+    // cuts)
+    std::vector<const xAOD::TrackParticle*> negSelectedTracks;
+    negSelectedTracks.clear();
+    std::vector<const xAOD::TrackParticle*> posSelectedTracks;
+    posSelectedTracks.clear();
+    std::vector<int> negIndx;
+    std::vector<int> posIndx;
+
+    TrackPairsSelector::Cache cache{};
+    // track preselection -->pt-cut
     xAOD::TrackParticleContainer::const_iterator iter;
-    for ( iter =(*trk_coll).begin(); iter !=(*trk_coll).end(); ++iter ) {    
-      if (m_trkSelector->decision(**iter, 0)){ // Only save if track passes the pt, d0, z0 and TRT PID cuts
+    for (iter = (*trk_coll).begin(); iter != (*trk_coll).end(); ++iter) {
+      if (m_trkSelector->decision(
+            **iter,
+            nullptr)) { // Only save if track passes the pt, d0, z0 and TRT PID cuts
         ATH_MSG_DEBUG("Track passed preselection");
-        if ( (*iter)->charge() < 0) {negSelectedTracks.push_back(*iter); negIndx.push_back(0);}
-        else {posSelectedTracks.push_back(*iter); posIndx.push_back(0);}
-      }
-      else         ATH_MSG_DEBUG("Track failed preselection");
-    }// end pt,d0.z0-cuts
-  
+        if ((*iter)->charge() < 0) {
+          negSelectedTracks.push_back(*iter);
+          negIndx.push_back(0);
+        } else {
+          posSelectedTracks.push_back(*iter);
+          posIndx.push_back(0);
+        }
+      } else
+        ATH_MSG_DEBUG("Track failed preselection");
+    } // end pt,d0.z0-cuts
+
     // Make track pairs.
     std::vector<const xAOD::TrackParticle*>::const_iterator iter_pos;
     std::vector<const xAOD::TrackParticle*>::const_iterator iter_neg;
-    std::vector<Amg::Vector3D> positionList; positionList.clear();
-    std::vector<const xAOD::TrackParticle*> trackParticleList; trackParticleList.clear();
-    std::vector<const xAOD::TrackParticle*> singleTrackConvList; singleTrackConvList.clear();
-    int ipos = -1; int ineg = -1;
-    // Outer loop: Loop over positive tracks 
-    for (iter_pos = posSelectedTracks.begin(); iter_pos != posSelectedTracks.end(); ++iter_pos) {
+    std::vector<Amg::Vector3D> positionList;
+    positionList.clear();
+    std::vector<const xAOD::TrackParticle*> trackParticleList;
+    trackParticleList.clear();
+    std::vector<const xAOD::TrackParticle*> singleTrackConvList;
+    singleTrackConvList.clear();
+    int ipos = -1;
+    int ineg = -1;
+    // Outer loop: Loop over positive tracks
+    for (iter_pos = posSelectedTracks.begin();
+         iter_pos != posSelectedTracks.end();
+         ++iter_pos) {
       ineg = -1;
       ipos++;
-      // Inner loop: Loop over negative tracks 
-      for (iter_neg = negSelectedTracks.begin(); iter_neg != negSelectedTracks.end(); ++iter_neg) {
+      // Inner loop: Loop over negative tracks
+      for (iter_neg = negSelectedTracks.begin();
+           iter_neg != negSelectedTracks.end();
+           ++iter_neg) {
         ineg++;
         int flag = 0;
 
+       
         std::map<std::string, float> intersectionDecors;
-        if (!passPreSelection( *iter_pos , *iter_neg, positionList, initPos, flag,
-                               intersectionDecors))
-        { 
-          positionList.clear(); 
+        if (!passPreSelection(cache,
+                              *iter_pos,
+                              *iter_neg,
+                              positionList,
+                              initPos,
+                              flag,
+                              intersectionDecors)) {
+          positionList.clear();
           continue;
         }
-  
+
         // Do the fit
         if (positionList.size() < 2) {
           ATH_MSG_DEBUG("No tracks to fit ");
-          positionList.clear(); 
+          positionList.clear();
           continue;
-        } 
-        
-        trackParticleList.push_back( *iter_pos );
-        trackParticleList.push_back( *iter_neg );
-        
-        xAOD::Vertex* myVertex =0;
-	myVertex = m_iVertexFitter->fit(trackParticleList, initPos);
+        }
+
+        trackParticleList.push_back(*iter_pos);
+        trackParticleList.push_back(*iter_neg);
+
+        xAOD::Vertex* myVertex = nullptr;
+        myVertex = m_iVertexFitter->fit(trackParticleList, initPos);
         trackParticleList.clear();
-        if(myVertex) {
-          ATH_MSG_DEBUG("VertexFit successful!"); 
+        if (myVertex) {
+          ATH_MSG_DEBUG("VertexFit successful!");
           int type = -1;
-          if (( m_isConversion && m_postSelector->selectConversionCandidate(myVertex,flag,positionList)) ||
-              (!m_isConversion && m_postSelector->selectSecVtxCandidate(myVertex, flag, positionList, type))){
+          if ((m_isConversion && m_postSelector->selectConversionCandidate(
+                                   myVertex, flag, positionList)) ||
+              (!m_isConversion && m_postSelector->selectSecVtxCandidate(
+                                    myVertex, flag, positionList, type))) {
 
             ATH_MSG_DEBUG(" Conversion passed postselection cuts");
-                        
-            //Really need to check that this correct.
-            //Remove old element links
+
+            // Really need to check that this correct.
+            // Remove old element links
             myVertex->clearTracks();
-                        
-            if (m_isConversion){
+
+            if (m_isConversion) {
               myVertex->setVertexType(xAOD::VxType::ConvVtx);
               InDetConversionContainer->push_back(myVertex);
-            }
-            else if (type==101 || type==110 || type==11) {// V0
+            } else if (type == 101 || type == 110 || type == 11) { // V0
               myVertex->setVertexType(xAOD::VxType::V0Vtx);
               InDetConversionContainer->push_back(myVertex);
+            } else {
+              ATH_MSG_WARNING("Unknown type of vertex");
+              delete myVertex;
+              myVertex = nullptr;
+            }
+
+            if (myVertex) {
+              if (m_decorateVertices) {
+                ATH_MSG_DEBUG(
+                  "Decorating vertex with values used in track pair selector");
+                for (const auto& kv : m_trackPairsSelector->getLastValues(cache)) {
+                  myVertex->auxdata<float>(kv.first) = kv.second;
+                }
+                ATH_MSG_DEBUG("Decorating vertex with values used in vertex "
+                              "point estimator");
+                for (const auto& kv : intersectionDecors) {
+                  myVertex->auxdata<float>(kv.first) = kv.second;
+                }
+              }
+              ElementLink<xAOD::TrackParticleContainer> newLinkPos(*iter_pos,
+                                                                   *trk_coll);
+              ElementLink<xAOD::TrackParticleContainer> newLinkNeg(*iter_neg,
+                                                                   *trk_coll);
+              myVertex->addTrackAtVertex(newLinkPos);
+              myVertex->addTrackAtVertex(newLinkNeg);
             }
-	    else{
-	      ATH_MSG_WARNING("Unknown type of vertex");
-	      delete myVertex;
-	      myVertex = 0;
-	    }
-
-	    if(myVertex){
-	      if (m_decorateVertices){
-		  ATH_MSG_DEBUG("Decorating vertex with values used in track pair selector");
-		  for (const auto& kv : m_trackPairsSelector->getLastValues()){
-		    myVertex->auxdata<float>(kv.first) = kv.second;
-		  }
-		  ATH_MSG_DEBUG("Decorating vertex with values used in vertex point estimator");
-		  for (const auto& kv : intersectionDecors){
-		    myVertex->auxdata<float>(kv.first) = kv.second;
-		  }
-	      }	      
-	      ElementLink<xAOD::TrackParticleContainer> newLinkPos(*iter_pos, *trk_coll);
-	      ElementLink<xAOD::TrackParticleContainer> newLinkNeg(*iter_neg, *trk_coll);
-	      myVertex->addTrackAtVertex(newLinkPos);
-	      myVertex->addTrackAtVertex(newLinkNeg);
-	    }
 
             negIndx[ineg] = 1;
             posIndx[ipos] = 1;
             numConversions++;
-          
-	  }else {
+
+          } else {
             ATH_MSG_DEBUG("VxCandidate failed the post selection cuts!");
             delete myVertex;
-	    myVertex = 0;
+            myVertex = nullptr;
           }
         } else {
           ATH_MSG_DEBUG("VertexFit was NOT successful!");
-        }      
+        }
         positionList.clear();
       } // neg loop
-    } // pos loop
-    ATH_MSG_DEBUG("Number of conversions found passing post selection cuts: "<<numConversions);
-    
-    if(m_isConversion) {
-      //single track conversions
-      for(int ip=0;ip<int(posIndx.size());++ip) {
-        if(posIndx[ip]==0) singleTrackConvList.push_back(posSelectedTracks[ip]);
+    }   // pos loop
+    ATH_MSG_DEBUG("Number of conversions found passing post selection cuts: "
+                  << numConversions);
+
+    if (m_isConversion) {
+      // single track conversions
+      for (int ip = 0; ip < int(posIndx.size()); ++ip) {
+        if (posIndx[ip] == 0)
+          singleTrackConvList.push_back(posSelectedTracks[ip]);
       }
-      for(int in=0;in<int(negIndx.size());++in) {
-        if(negIndx[in]==0) singleTrackConvList.push_back(negSelectedTracks[in]);
+      for (int in = 0; in < int(negIndx.size()); ++in) {
+        if (negIndx[in] == 0)
+          singleTrackConvList.push_back(negSelectedTracks[in]);
       }
-      
-      std::vector<const xAOD::TrackParticle*>::iterator itk, itke=singleTrackConvList.end();
+
+      std::vector<const xAOD::TrackParticle*>::iterator itk,
+        itke = singleTrackConvList.end();
       int numSingle = 0;
-      for(itk=singleTrackConvList.begin();itk!=itke;++itk){
-        if(!m_singleTrkConvTool->selectSingleTrackParticleConversion((*itk)))
+      for (itk = singleTrackConvList.begin(); itk != itke; ++itk) {
+        if (!m_singleTrkConvTool->selectSingleTrackParticleConversion((*itk)))
           ATH_MSG_DEBUG("Track failed single track conversion selection");
-        else
-        {
-          xAOD::Vertex * sConver(0);
-          sConver = m_singleTrkConvTool->buildSingleTrackParticleConversion((*itk), InDetConversionContainer);
-          if(sConver) {
+        else {
+          xAOD::Vertex* sConver(nullptr);
+          sConver = m_singleTrkConvTool->buildSingleTrackParticleConversion(
+            (*itk), InDetConversionContainer);
+          if (sConver) {
             sConver->clearTracks();
 
             ElementLink<xAOD::TrackParticleContainer> newLink;
-            newLink.toContainedElement( *trk_coll, *itk );
+            newLink.toContainedElement(*trk_coll, *itk);
             sConver->addTrackAtVertex(newLink);
             sConver->setVertexType(xAOD::VxType::ConvVtx);
             numSingle++;
-            
-            if (m_decorateVertices)
-            {
-              ATH_MSG_DEBUG("Decorating single track vertex with dummy values used in track pair selector");
-              for (const auto& kv : m_trackPairsSelector->getLastValues())
+
+            if (m_decorateVertices) {
+              ATH_MSG_DEBUG("Decorating single track vertex with dummy values "
+                            "used in track pair selector");
+              for (const auto& kv : m_trackPairsSelector->getLastValues(cache))
                 sConver->auxdata<float>(kv.first) = 0.;
 
-              ATH_MSG_DEBUG("Decorating single track vertex with dummy values used in vertex point estimator");
+              ATH_MSG_DEBUG("Decorating single track vertex with dummy values "
+                            "used in vertex point estimator");
               for (const std::string& k : m_vertexEstimator->decorKeys())
                 sConver->auxdata<float>(k) = 0.;
-              
-              ATH_MSG_DEBUG("Decorating single track vertex with dummy values used in post selector");
+
+              ATH_MSG_DEBUG("Decorating single track vertex with dummy values "
+                            "used in post selector");
               m_postSelector->decorateVertex(*sConver, 0., 0., 0., 0., 0.);
             }
-
-            
           }
         }
       }
-      ATH_MSG_DEBUG("Number successful reconstructed single track conversion: "<<numSingle);
+      ATH_MSG_DEBUG("Number successful reconstructed single track conversion: "
+                    << numSingle);
     }
-        
-    return std::make_pair(InDetConversionContainer,InDetConversionContainerAux); 
-  } 
 
-  bool InDetConversionFinderTools::passPreSelection(const xAOD::TrackParticle* track_pos, const xAOD::TrackParticle* track_neg, std::vector<Amg::Vector3D>&  trackList, Amg::Vector3D& initPos,  int& flag,
-                                                    std::map<std::string, float>& intersectionDecors)
+    return std::make_pair(InDetConversionContainer,
+                          InDetConversionContainerAux);
+  }
+
+  bool
+  InDetConversionFinderTools::passPreSelection(
+    TrackPairsSelector::Cache& cache,
+    const xAOD::TrackParticle* track_pos,
+    const xAOD::TrackParticle* track_neg,
+    std::vector<Amg::Vector3D>& trackList,
+    Amg::Vector3D& initPos,
+    int& flag,
+    std::map<std::string, float>& intersectionDecors) const
   {
     //Track summary information
   
@@ -380,12 +403,14 @@ namespace InDet
     if(nclusNeg==0 && nclusPos==0) flag = 2;
     if(m_removeTrt && (flag==1 || flag==2)) return false;
 
-    if (m_trackPairsSelector->selectTrackParticlePair( track_pos,track_neg)){
+    if (m_trackPairsSelector->selectTrackParticlePair( track_pos,track_neg,cache)){
   
       const Trk::Perigee& perPos = track_pos->perigeeParameters();
       const Trk::Perigee& perNeg = track_neg->perigeeParameters();
       int errorcode = 0;
-      Amg::Vector3D startingPoint(m_vertexEstimator->getCirclesIntersectionPoint(&perPos,&perNeg,flag,errorcode,intersectionDecors));
+      Amg::Vector3D startingPoint(
+        m_vertexEstimator->getCirclesIntersectionPoint(
+          &perPos, &perNeg, flag, errorcode, intersectionDecors));
       if(m_isConversion && errorcode != 0) return false;
       if(!m_isConversion){ 
         Amg::Vector3D v_direction = perPos.momentum() + perNeg.momentum();
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
index 7fad19481998..53c3b1d946cb 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -44,16 +44,18 @@ namespace InDet {
   // -------------------------------------------------------
   // constructor
   // -------------------------------------------------------
-  SingleTrackConversionTool::SingleTrackConversionTool(const std::string& type, const std::string& name, const IInterface* parent) :
-    AthAlgTool(type, name, parent),
-    m_helpertool("InDet::ConversionFinderUtils"),
-    m_trkSumTool("Trk::TrackSummaryTool"),
-    m_extrapolator ("Trk::Extrapolator/InDetExtrapolator"),
-    m_minInitR(70.),
-    m_minInitR_noBLay(120.),
-    m_singleThreshold(0.1),
-    m_maxBLhits(0)
-    //m_maxPhiVtxTrk(0.2)
+  SingleTrackConversionTool::SingleTrackConversionTool(const std::string& type,
+                                                       const std::string& name,
+                                                       const IInterface* parent)
+    : AthAlgTool(type, name, parent)
+    , m_helpertool("InDet::ConversionFinderUtils")
+    , m_trkSumTool("Trk::TrackSummaryTool")
+    , m_extrapolator("Trk::Extrapolator/InDetExtrapolator")
+    , m_minInitR(70.)
+    , m_minInitR_noBLay(120.)
+    , m_singleThreshold(0.1)
+    , m_maxBLhits(0)
+  // m_maxPhiVtxTrk(0.2)
   {
     declareInterface<SingleTrackConversionTool>(this);
     declareProperty("ConversionFinderHelperTool" , m_helpertool);
@@ -89,25 +91,25 @@ namespace InDet {
     if ( m_helpertool.retrieve().isFailure() ) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_helpertool);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tool " << m_helpertool);
-    }
+    
     
     /* Get the track summary tool from ToolSvc */
     if ( m_trkSumTool.retrieve().isFailure() ) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_trkSumTool);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tool " << m_trkSumTool);
-    }
+    
 
     /* Get the extrapolator */
     if (m_extrapolator.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
       return StatusCode::FAILURE;
-    }else{
-      ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
     }
+      ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
+    
     
     return StatusCode::SUCCESS;
   }
@@ -122,11 +124,13 @@ namespace InDet {
   // -------------------------------------------------------
   // Create a RecVertex at the first measurement of the track
   // -------------------------------------------------------
-  xAOD::Vertex* SingleTrackConversionTool::buildSingleTrackConversion(const Trk::Track* track)
+  xAOD::Vertex*
+  SingleTrackConversionTool::buildSingleTrackConversion(
+    const Trk::Track* track) const
   {
     
     // some local variables
-    const Trk::TrackParameters* tp = 0;
+    const Trk::TrackParameters* tp = nullptr;
     AmgSymMatrix(5)  em ;
     em.setZero();
     Amg::Vector3D  gp ; 
@@ -135,7 +139,7 @@ namespace InDet {
     
     // get track states on surface
     const DataVector<const Trk::TrackStateOnSurface>* tsos = track->trackStateOnSurfaces();
-    if(!tsos) return 0;
+    if(!tsos) return nullptr;
     
     // iterate over them
     DataVector<const Trk::TrackStateOnSurface>::const_iterator its,itse = tsos->end();
@@ -148,7 +152,7 @@ namespace InDet {
         tp = (*its)->trackParameters();
         if(!tp) {
           ATH_MSG_WARNING ("Require parameters at first measurement, conversion finder logic broken");
-          return 0;
+          return nullptr;
         }
     
         em = *(tp->covariance());
@@ -157,7 +161,9 @@ namespace InDet {
       }
     }
 
-    if(!tp) return 0;
+    if(!tp) {
+      return nullptr;
+    }
     
     //
     // --- Need to compute a global position covariance matrix as J.C.JT
@@ -243,35 +249,23 @@ namespace InDet {
     } 
     else {
       ATH_MSG_ERROR ("Wrong type of surface, not supported !");
-      return 0; 
+      return nullptr; 
     }
-    
-    //Create the corresponding vector of tracks at that RecVertex. Contains one track with a new redefined measured perigee.
-    //
+
+    // Create the corresponding vector of tracks at that RecVertex. Contains one
+    // track with a new redefined measured perigee.
     std::vector<Trk::VxTrackAtVertex> tmpVTAV;
 
     // get the perigee
     Trk::PerigeeSurface perigeeSurface(gp);
-    const Trk::TrackParameters *perpar=m_extrapolator->extrapolate(*tp,perigeeSurface,Trk::anyDirection,false,Trk::pion);
+    const Trk::TrackParameters* perpar = m_extrapolator->extrapolate(
+      *tp, perigeeSurface, Trk::anyDirection, false, Trk::pion);
     if(!perpar || !perpar->covariance() ){
       ATH_MSG_WARNING ("Perigee creation for single track at its first measurement failed, should never happen !");
-      return 0;
+      return nullptr;
     }
 
 
-    /*    // --- final cut on pointing
-    double PhiVtxTrk = fabs(gp->phi() - parm->parameters()[Trk::phi0]);
-    if (PhiVtxTrk < -pi) PhiVtxTrk += twopi;
-    if (PhiVtxTrk >  pi) PhiVtxTrk -= twopi;
-    ATH_MSG_VERBOSE ("candidate with position = " << *gp << " , phi(vtx) = " << gp->phi() << " phi(trk) = " << parm->parameters()[Trk::phi0] << " dphi = " << PhiVtxTrk);
-    if(PhiVtxTrk > m_maxPhiVtxTrk) {
-      ATH_MSG_VERBOSE ("==> reject candidate");
-      delete tmpRecV; delete tmpVTAV;
-      return 0;
-    }    
-    // --- 
-    */
-
     Trk::TrackParameters* pp = perpar->clone();
     delete perpar;
     Trk::VxTrackAtVertex trkV(1., pp);
@@ -295,120 +289,156 @@ namespace InDet {
 
     return vertex;    
   }
-  
+
   // -------------------------------------------------------
   // preselection cuts on tracks
   // -------------------------------------------------------
-  bool SingleTrackConversionTool::selectSingleTrackConversion(const Trk::Track* track){
+  bool
+  SingleTrackConversionTool::selectSingleTrackConversion(
+    const Trk::Track* track) const
+  {
 
     const Trk::TrackParameters* trkPar = m_helpertool->getTrkParameters(track);
 
-    if(!trkPar)
+    if (!trkPar) {
       return false;
+    }
 
-    else {
-      const Trk::TrackSummary* tSum = m_trkSumTool->createSummaryNoHoleSearch(*track);
-      if(!tSum) return false;
-      
-      bool pass = true;
-
-      const bool expectedHitInBLayer = tSum->get(Trk::expectInnermostPixelLayerHit);
-      if (expectedHitInBLayer) {
-        // ME: cut on minInitR if blayer is ok
-        if(trkPar->position().perp() < m_minInitR ) pass = false;
-      } else {
-        // ME: cut on minInitR_NBLay if blayer is off
-        if(trkPar->position().perp() < m_minInitR_noBLay ) pass = false;
-      }
-
-      int nTrtHits       = tSum->get(Trk::numberOfTRTHits);
-      int nTrtOutliers   = tSum->get(Trk::numberOfTRTOutliers);
-      int ntrt           = nTrtHits + nTrtOutliers;
-      int nTrtXenonHits  = tSum->get(Trk::numberOfTRTXenonHits);
+    /*
+     * This should be already present from previous
+     * steps
+     */
+    const Trk::TrackSummary* tSum =track->trackSummary();
+    if (!tSum) {
+      return false;
+    }
+    bool pass = true;
 
-      if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) { // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits
-	      double prob = tSum->getPID(Trk::eProbabilityHT);
-	      if(prob < m_singleThreshold) pass = false;
-      }
+    const bool expectedHitInBLayer =
+      tSum->get(Trk::expectInnermostPixelLayerHit);
+    if (expectedHitInBLayer) {
+      // ME: cut on minInitR if blayer is ok
+      if (trkPar->position().perp() < m_minInitR)
+        pass = false;
+    } else {
+      // ME: cut on minInitR_NBLay if blayer is off
+      if (trkPar->position().perp() < m_minInitR_noBLay)
+        pass = false;
+    }
 
-      // do we reject tracks with blayer ?
-      int nBLHits = tSum->get(Trk::numberOfInnermostPixelLayerHits) + tSum->get(Trk::numberOfInnermostPixelLayerOutliers);
-      if(nBLHits > m_maxBLhits) pass = false;
+    int nTrtHits = tSum->get(Trk::numberOfTRTHits);
+    int nTrtOutliers = tSum->get(Trk::numberOfTRTOutliers);
+    int ntrt = nTrtHits + nTrtOutliers;
+    int nTrtXenonHits = tSum->get(Trk::numberOfTRTXenonHits);
 
-      delete tSum;
-      return pass;
+    if (ntrt > 0 &&
+        (!m_PIDonlyForXe ||
+         nTrtXenonHits == ntrt)) { // only check TRT PID if m_PIDonlyForXe is
+                                   // false or all TRT hits are Xenon hits
+      double prob = tSum->getPID(Trk::eProbabilityHT);
+      if (prob < m_singleThreshold)
+        pass = false;
     }
+
+    // do we reject tracks with blayer ?
+    int nBLHits = tSum->get(Trk::numberOfInnermostPixelLayerHits) +
+                  tSum->get(Trk::numberOfInnermostPixelLayerOutliers);
+    if (nBLHits > m_maxBLhits)
+      pass = false;
+
+    delete tSum;
+    return pass;
   }
-  
+
   // -------------------------------------------------------
   // building single track conversions from a particle
   // -------------------------------------------------------
-  xAOD::Vertex* SingleTrackConversionTool::buildSingleTrackParticleConversion(const xAOD::TrackParticle* track, xAOD::VertexContainer* container)
-  {	
-    ///Create a RecVertex at the first measurement of the track.
+  xAOD::Vertex*
+  SingleTrackConversionTool::buildSingleTrackParticleConversion(
+    const xAOD::TrackParticle* track,
+    xAOD::VertexContainer* container) const
+  {
+    /// Create a RecVertex at the first measurement of the track.
 
     unsigned int index(0);
-    if (!track->indexOfParameterAtPosition(index, xAOD::FirstMeasurement))
-      {
-	ATH_MSG_WARNING("TrackParticle has no first measurement");
-	return NULL;
-      }
+    if (!track->indexOfParameterAtPosition(index, xAOD::FirstMeasurement)) {
+      ATH_MSG_WARNING("TrackParticle has no first measurement");
+      return nullptr;
+    }
 
-    const Trk::CurvilinearParameters trkPar = track->curvilinearParameters(index);
+    const Trk::CurvilinearParameters trkPar =
+      track->curvilinearParameters(index);
 
-  
-    const Amg::Vector3D    gp = trkPar.position();
-    const AmgSymMatrix(5)  em = *(trkPar.covariance());
+    const Amg::Vector3D& gp = trkPar.position();
+    const AmgSymMatrix(5) em = *(trkPar.covariance());
 
     // ME: this is nuts, those values are 0, 0
     //    double chi2 = track->fitQuality()->chiSquared();
     //    int Ndf     = track->fitQuality()->numberDoF();
 
-    ///Need to compute a global position covariance matrix as J.C.JT
-    const Amg::Transform3D&  T = trkPar.associatedSurface().transform();
+    /// Need to compute a global position covariance matrix as J.C.JT
+    const Amg::Transform3D& T = trkPar.associatedSurface().transform();
     AmgSymMatrix(3) nCovVtx;
 
     // Should use eigen to do all of this
-    
+
     // ME: use the surface to find out what we do, do not hardcode the geoemtry
-    if ( Trk::Surface::Plane == trkPar.associatedSurface().type() ){
+    if (Trk::Surface::Plane == trkPar.associatedSurface().type()) {
 
-      ///The local position parameters covariance matrix C (2x2)
+      /// The local position parameters covariance matrix C (2x2)
       double p11 = em(Trk::locX, Trk::locX);
       double p12 = em(Trk::locX, Trk::locY);
       double p21 = em(Trk::locY, Trk::locX);
       double p22 = em(Trk::locY, Trk::locY);
-      
-      ///The Jacobian matrix J (3x2)
-      double Ax[3] = {T(0,0),T(1,0),T(2,0)};
-      double Ay[3] = {T(0,1),T(1,1),T(2,1)};
-      double a11 = Ax[0]; double a12 = Ay[0];
-      double a21 = Ax[1]; double a22 = Ay[1];
-      double a31 = Ax[2]; double a32 = Ay[2];
-			
-      ///The A = J.C (3x2)
-      double A11 = a11*p11 + a12*p21; double A12 = a11*p12 + a12*p22;
-      double A21 = a21*p11 + a22*p21; double A22 = a21*p12 + a22*p22;
-      double A31 = a31*p11 + a32*p21; double A32 = a31*p12 + a32*p22;
-      
-      ///The A.JT = J.C.JT (3x3)
-      double P11 = a11*A11 + A12*a12; double P12 = A11*a21 + A12*a22; double P13 = A11*a31 + A12*a32;
-      double P21 = A21*a11 + A22*a12; double P22 = A21*a21 + A22*a22; double P23 = A21*a31 + A22*a32;
-      double P31 = A31*a11 + A32*a12; double P32 = A31*a21 + A32*a22; double P33 = A31*a31 + A32*a32;
-
-      ///Construct the new covariance matrix (3x3)
-      nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
-      nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
-      nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
-
-    } else if ( Trk::Surface::Line == trkPar.associatedSurface().type() ){
 
-      ///The local position parameters covariance matrix C (2x2)
+      /// The Jacobian matrix J (3x2)
+      double Ax[3] = { T(0, 0), T(1, 0), T(2, 0) };
+      double Ay[3] = { T(0, 1), T(1, 1), T(2, 1) };
+      double a11 = Ax[0];
+      double a12 = Ay[0];
+      double a21 = Ax[1];
+      double a22 = Ay[1];
+      double a31 = Ax[2];
+      double a32 = Ay[2];
+
+      /// The A = J.C (3x2)
+      double A11 = a11 * p11 + a12 * p21;
+      double A12 = a11 * p12 + a12 * p22;
+      double A21 = a21 * p11 + a22 * p21;
+      double A22 = a21 * p12 + a22 * p22;
+      double A31 = a31 * p11 + a32 * p21;
+      double A32 = a31 * p12 + a32 * p22;
+
+      /// The A.JT = J.C.JT (3x3)
+      double P11 = a11 * A11 + A12 * a12;
+      double P12 = A11 * a21 + A12 * a22;
+      double P13 = A11 * a31 + A12 * a32;
+      double P21 = A21 * a11 + A22 * a12;
+      double P22 = A21 * a21 + A22 * a22;
+      double P23 = A21 * a31 + A22 * a32;
+      double P31 = A31 * a11 + A32 * a12;
+      double P32 = A31 * a21 + A32 * a22;
+      double P33 = A31 * a31 + A32 * a32;
+
+      /// Construct the new covariance matrix (3x3)
+      nCovVtx(0, 0) = P11;
+      nCovVtx(0, 1) = P12;
+      nCovVtx(0, 2) = P13;
+      nCovVtx(1, 0) = P21;
+      nCovVtx(1, 1) = P22;
+      nCovVtx(1, 2) = P23;
+      nCovVtx(2, 0) = P31;
+      nCovVtx(2, 1) = P32;
+      nCovVtx(2, 2) = P33;
+
+    } else if (Trk::Surface::Line == trkPar.associatedSurface().type()) {
+
+      /// The local position parameters covariance matrix C (2x2)
       double p11 = em(Trk::locR, Trk::locR);
       double p12 = em(Trk::locR, Trk::locZ);
       double p21 = em(Trk::locZ, Trk::locR);
       double p22 = em(Trk::locZ, Trk::locZ);
-      
+
       ///The straight line surface (wire) global directions
       double A[3] = {T(0,2),T(1,2),T(2,2)};
       
@@ -440,7 +470,6 @@ namespace InDet {
       nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
       nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
       nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
-
     }
 
     // now construct the vertex from the global position, cov. put NdF and chi2 to zero (Markus)
@@ -454,14 +483,13 @@ namespace InDet {
     vertex->setVertexType(xAOD::VxType::ConvVtx);
     vertex->setFitQuality( 0, 0);
     
-    return vertex;    
-    
+    return vertex;
   }
 
   // -------------------------------------------------------
   // preselection cuts on track particles
   // -------------------------------------------------------
-  bool SingleTrackConversionTool::selectSingleTrackParticleConversion(const xAOD::TrackParticle* track){
+  bool SingleTrackConversionTool::selectSingleTrackParticleConversion(const xAOD::TrackParticle* track) const{
    
      //Position of first hit in track particle
     
@@ -524,7 +552,8 @@ namespace InDet {
     
     
 
-    if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) { // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits
+    if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) { 
+      // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits
       float prob = 1.0;
       if( !track->summaryValue(prob,xAOD::eProbabilityHT) )
       {
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
index 00ff0a4c31f4..db3f86987b38 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -37,17 +37,17 @@ namespace InDet {
 
   // -------------------------------------------------------------
   static const InterfaceID IID_ITrackPairsSelector("InDet::TrackPairsSelector", 1, 0);
-  
+
   // -------------------------------------------------------------
-  TrackPairsSelector::TrackPairsSelector(const std::string& type, const std::string& name, const IInterface* parent) :
-    AthAlgTool(type, name, parent),
-    m_helpertool("InDet::ConversionFinderUtils"),
-    m_distanceTool("Trk::SeedNewtonDistanceFinder/InDetConversionTrkDistanceFinder"),
-    m_maxR(500.),
-    m_MinTrkAngle(0.),
-    m_distance(9999.),
-    m_deltaCotTheta(9999.),
-    m_deltaInit(9999.)
+  TrackPairsSelector::TrackPairsSelector(const std::string& type,
+                                         const std::string& name,
+                                         const IInterface* parent)
+    : AthAlgTool(type, name, parent)
+    , m_helpertool("InDet::ConversionFinderUtils")
+    , m_distanceTool(
+        "Trk::SeedNewtonDistanceFinder/InDetConversionTrkDistanceFinder")
+    , m_maxR(500.)
+    , m_MinTrkAngle(0.)
   {
     m_etaCut.push_back(0.8);
     m_etaCut.push_back(1.2);
@@ -86,16 +86,16 @@ namespace InDet {
     if ( m_helpertool.retrieve().isFailure() ) {
       msg(MSG::ERROR) << "Failed to retrieve tool " << m_helpertool << endmsg;
       return StatusCode::FAILURE;
-    } else {
+    } 
       msg(MSG::INFO) << "Retrieved tool " << m_helpertool << endmsg;
-    }
+    
 
     /* Get the distance tool from ToolsSvc */
     if(m_distanceTool.retrieve().isFailure()) {
       msg(MSG::ERROR) << "Could not get " << m_distanceTool << endmsg; return StatusCode::FAILURE;
-    }else{
-      msg(MSG::INFO) << "Got the distance tool " << m_distanceTool << endmsg;
     }
+      msg(MSG::INFO) << "Got the distance tool " << m_distanceTool << endmsg;
+    
     msg(MSG::INFO) << "Initialization successful" << endmsg;
     return StatusCode::SUCCESS;
   }
@@ -106,7 +106,12 @@ namespace InDet {
   }
 
   // -------------------------------------------------------------
-  bool TrackPairsSelector::selectTrackParticlePair(const xAOD::TrackParticle* trkPpos, const xAOD::TrackParticle* trkPneg) {
+  bool
+  TrackPairsSelector::selectTrackParticlePair(
+    const xAOD::TrackParticle* trkPpos,
+    const xAOD::TrackParticle* trkPneg,
+    TrackPairsSelector::Cache& cache) const
+  {
 
     bool pass = true;
     //Getting the track perigee parameters
@@ -172,10 +177,6 @@ namespace InDet {
       return false;
     }
 
-    
-    
-//  Need to work out a way to do this elegently
-//    if(!parPos || !parNeg) {pass = false; return pass;}
     double firstRpos = parPos.position().perp();
     double firstRneg = parNeg.position().perp();
 
@@ -190,9 +191,11 @@ namespace InDet {
       else                                                   detaCut = m_etaCut[2];
     }
 
-    m_deltaCotTheta = fabs(1./tan(perPos->parameters()[Trk::theta]) - 1./tan(perNeg->parameters()[Trk::theta]));
-    if (m_deltaCotTheta > detaCut) return false;
-    
+    cache.m_deltaCotTheta = fabs(1. / tan(perPos->parameters()[Trk::theta]) -
+                                 1. / tan(perNeg->parameters()[Trk::theta]));
+    if (cache.m_deltaCotTheta > detaCut)
+      return false;
+
     //Cut on distance between the initial hit position of the two tracks.
     double dinit = 1000.;
     if(sCase == 0) {
@@ -203,8 +206,8 @@ namespace InDet {
       dinit = m_initCut[2];
     }
     
-    m_deltaInit = fabs(firstRpos - firstRneg);
-    if (m_deltaInit > dinit) return false;
+    cache.m_deltaInit = fabs(firstRpos - firstRneg);
+    if (cache.m_deltaInit > dinit) return false;
     
     //Cut on distance of minimum approach between the two tracks.
     double maxDist = 1000.;
@@ -216,23 +219,27 @@ namespace InDet {
       maxDist = m_maxDist[2];
     }
 
-    m_distance = 1000000.;
+    cache.m_distance = 1000000.;
     std::optional<Trk::ITrkDistanceFinder::TwoPoints> result
       = m_distanceTool->CalculateMinimumDistance(trkPneg->perigeeParameters(),
                                                  trkPpos->perigeeParameters() );
     if (!result) return false;
-    m_distance = dist (result.value());
-    if (m_distance>maxDist) return false;
+    cache.m_distance = dist (result.value());
+    if (cache.m_distance>maxDist) return false;
     
     //3D angle cut in the case of V0s, not used in the case of conversions
-    double d_beta = (perPos->momentum().dot(perNeg->momentum()))/(perPos->momentum().mag()*perNeg->momentum().mag());
+    double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
+                    (perPos->momentum().mag() * perNeg->momentum().mag());
     if(d_beta <m_MinTrkAngle) pass = false;
     
     return pass;
   }
-  
+
   // -------------------------------------------------------------
-  bool TrackPairsSelector::selectTrackPair(const Trk::Track* trkpos, const Trk::Track* trkneg) {
+  bool
+  TrackPairsSelector::selectTrackPair(const Trk::Track* trkpos,
+                                      const Trk::Track* trkneg) const
+  {
 
     bool pass = true;
     ///Getting the track perigee parameters
@@ -264,7 +271,9 @@ namespace InDet {
       detaCut = m_etaCut[2];
     }
 
-    if(fabs(1./tan(perPos->parameters()[Trk::theta]) - 1./tan(perNeg->parameters()[Trk::theta])) > detaCut) pass = false;
+    if (fabs(1. / tan(perPos->parameters()[Trk::theta]) -
+             1. / tan(perNeg->parameters()[Trk::theta])) > detaCut)
+      pass = false;
 
     //Cut on distance between the initial hit position of the two tracks.
     double dinit = 1000.;
@@ -299,18 +308,21 @@ namespace InDet {
     }
     
     //3D angle cut in the case of V0s, not used in the case of conversions
-    double  d_beta = (perPos->momentum().dot(perNeg->momentum()))/(perPos->momentum().mag()*perNeg->momentum().mag());
+    double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
+                    (perPos->momentum().mag() * perNeg->momentum().mag());
     if(d_beta <m_MinTrkAngle) pass = false;
     
     return pass;
   }
 
   // -------------------------------------------------------------
-  std::map<std::string, float> TrackPairsSelector::getLastValues()
+  std::map<std::string, float>
+  TrackPairsSelector::getLastValues(
+    const TrackPairsSelector::Cache& cache) const
   {
-    return {{"minimumDistanceTrk", m_distance},
-            {"deltaCotThetaTrk", m_deltaCotTheta},
-            {"deltaInitRadius", m_deltaInit} };
+    return {{"minimumDistanceTrk", cache.m_distance},
+            {"deltaCotThetaTrk", cache.m_deltaCotTheta},
+            {"deltaInitRadius", cache.m_deltaInit} };
   }
 
 } // namespace InDet
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx
index 6b565d8d91ba..4394c4b4c4cd 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -475,9 +475,9 @@ namespace InDet {
         yi2 = A*xi2 + B;
         return true;
       }    
-      else return false;
+      return false;
     }
-    else if (xc1 != xc2){
+    if (xc1 != xc2){
       double A = (yc1 - yc2) / (xc2- xc1);
       double B = (r1*r1 - r2*r2 - xc1*xc1 + xc2*xc2 - yc1*yc1 + yc2*yc2) / 2. / ( xc2 -xc1);
       double a  = 1 + A*A;
@@ -488,12 +488,12 @@ namespace InDet {
         xi2 = A*yi2 + B;
         return true;
       }    
-      else return false;
+      return false;
     }
-    else {
+    
       // circles are concentric and we don't care
       return false;
-    }
+    
     return false;
   }
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/CMakeLists.txt
index bc34afcd9900..ef916000b2a2 100644
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/CMakeLists.txt
@@ -8,7 +8,7 @@ atlas_subdir( InDetPriVxFinderTool )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
-			  Control/StoreGate
+                          Control/StoreGate
                           Event/xAOD/xAODTracking
                           GaudiKernel
                           InnerDetector/InDetRecTools/InDetRecToolInterfaces
@@ -16,7 +16,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/TrkParameters
                           Tracking/TrkEvent/TrkParticleBase
                           Tracking/TrkEvent/TrkTrack
-			  InnerDetector/InDetConditions/BeamSpotConditionsData
+                          InnerDetector/InDetConditions/BeamSpotConditionsData
+                          Control/CxxUtils
                           PRIVATE
                           Control/AthContainers
                           DetectorDescription/GeoPrimitives
@@ -42,7 +43,10 @@ atlas_add_component( InDetPriVxFinderTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces PATCoreLib TrkParameters TrkParticleBase TrkTrack AthContainers GeoPrimitives EventPrimitives TrkSurfaces TrkEventPrimitives TrkLinks TrkTrackSummary VxMultiVertex VxVertex TrkVertexFitterInterfaces TrkVertexFittersLib BeamSpotConditionsData StoreGateLib)
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps xAODTracking 
+                     GaudiKernel InDetRecToolInterfaces PATCoreLib TrkParameters TrkParticleBase TrkTrack CxxUtils AthContainers GeoPrimitives 
+                     EventPrimitives TrkSurfaces TrkEventPrimitives TrkLinks TrkTrackSummary VxMultiVertex VxVertex 
+                     TrkVertexFitterInterfaces TrkVertexFittersLib BeamSpotConditionsData StoreGateLib)
 
 # Install files from the package:
 atlas_install_headers( InDetPriVxFinderTool )
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
index dc8abc172035..f604fcd6c174 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
@@ -6,45 +6,45 @@
  * @class InDet::InDetAdaptiveMultiPriVxFinderTool
  *
  * @author Giacinto Piacquadio (Freiburg University)
- * 
+ *
  * (giacinto.piacquadio@physik.uni-freiburg.de)
- * 
- * This class provides an implementation for a primary 
- * vertex finding tool, which uses the \<i\>Adaptive MultiVertex\</i\> 
- * Fitter to solve the problem of finding the multiple 
- * interaction vertices and to find out the best possible 
+ *
+ * This class provides an implementation for a primary
+ * vertex finding tool, which uses the \<i\>Adaptive MultiVertex\</i\>
+ * Fitter to solve the problem of finding the multiple
+ * interaction vertices and to find out the best possible
  * assignment of the track to the vertices.
  *
  * The steps done are the following:
  * - the selection cuts are applied
- * 
+ *
  * then iteratively:
  * - a new vertex is seeded with the remaining tracks
  *    (the seed finder is used)
- * - all the tracks whose Z at PCA is closer to the seeded 
- *    vertex by more than TracksMaxZinterval (by JobOption), 
+ * - all the tracks whose Z at PCA is closer to the seeded
+ *    vertex by more than TracksMaxZinterval (by JobOption),
  *    are added to the new vertex candidate
- * -  the new vertex candidate is added on top of the previous fit and 
- *    the AdaptiveMultiVertexFitter is used to fit all them 
+ * -  the new vertex candidate is added on top of the previous fit and
+ *    the AdaptiveMultiVertexFitter is used to fit all them
  *    together (more information in the \<br\>\<i\>TrkVertexFitters\</br\>\</i\>
  *    package).
- * -  the tracks already used are removed from the tracks 
- *    from which the next seed would be obtained and if there 
+ * -  the tracks already used are removed from the tracks
+ *    from which the next seed would be obtained and if there
  *    are more than 2 left, a new iteration is started.
  *
  * when no more than 2 seeding tracks are left:
- * - a vector of MVFVxCandidate is provided as result and 
- *   according to the selection type, the order in which it is 
- *   provided represents how high the probability of that 
- *   particular vertex to come from the primary vertex is. 
+ * - a vector of MVFVxCandidate is provided as result and
+ *   according to the selection type, the order in which it is
+ *   provided represents how high the probability of that
+ *   particular vertex to come from the primary vertex is.
  *
- * In general the first VxCandidate* in the collection is 
- * the one with highest sqrt(N_tracks)*Sum Pt_track^2. This 
- * is the case if the selectiontype in the jobOptions is set 
+ * In general the first VxCandidate* in the collection is
+ * the one with highest sqrt(N_tracks)*Sum Pt_track^2. This
+ * is the case if the selectiontype in the jobOptions is set
  * to 0 (default).
  *
  *
- * This finder is particularly suited for the high luminosities 
+ * This finder is particularly suited for the high luminosities
  * scenarios which will came up at LHC.
  *
  * ------------------------------------------------------------
@@ -52,13 +52,13 @@
  *
  * David Shope <david.richard.shope@cern.ch> (2016-04-19)
  *
- * EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex, 
+ * EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex,
  *                         from Trk::RecVertex   to xAOD::Vertex,
  *                         from Trk::Vertex      to Amg::Vector3D
  *
  * Also, VxMultiVertex EDM has been migrated to the following:
  *
- *   Trk::MvfFitInfo  
+ *   Trk::MvfFitInfo
  *     constraintVertex     now uses xAOD::Vertex
  *     seedVertex           now uses Amg::Vector3D
  *     linearizationVertex  now uses Amg::Vector3D
@@ -66,263 +66,276 @@
  *   Trk::TrackToVtxLink
  *     Vertex objects stored using this class are now xAOD::Vertex
  *
- * Instead of using the MVFVxCandidate class, xAOD::Vertex is employed by decorating it
- * with the multi-vertex information:
+ * Instead of using the MVFVxCandidate class, xAOD::Vertex is employed by
+ * decorating it with the multi-vertex information:
  *
  *   bool                              isInitialized
  *   MvfFitInfo*                       MvfFitInfo
  *   std::Vector\<VxTrackAtVertex*\>     VTAV
  *
- *   This last decoration is needed in order to be able to use MVFVxTrackAtVertex objects
- *   which have the additional information of xAOD::Vertices associated to the track
- *   and (through polymorphism) to still be able to pass them to the KalmanVertexUpdator as
- *   VxTracksAtVertex objects.
+ *   This last decoration is needed in order to be able to use
+ * MVFVxTrackAtVertex objects which have the additional information of
+ * xAOD::Vertices associated to the track and (through polymorphism) to still be
+ * able to pass them to the KalmanVertexUpdator as VxTracksAtVertex objects.
  */
 
 #ifndef INDETPRIVXFINDERTOOL_INDETADAPTIVEMULTIPRIVXFINDERTOOL_H
 #define INDETPRIVXFINDERTOOL_INDETADAPTIVEMULTIPRIVXFINDERTOOL_H
 
-#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
+#include "CxxUtils/checker_macros.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "TrkTrack/TrackCollection.h" // type def ...
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "TrkParameters/TrackParameters.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkTrack/TrackCollection.h" // type def ...
 #include <utility>
 /**
- * Forward declarations 
+ * Forward declarations
  */
-#include "xAODTracking/VertexFwd.h"
-#include "xAODTracking/TrackParticleFwd.h"
-#include "xAODTracking/VertexContainerFwd.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
 #include "BeamSpotConditionsData/BeamSpotData.h"
 #include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
+#include "xAODTracking/TrackParticleContainerFwd.h"
+#include "xAODTracking/TrackParticleFwd.h"
+#include "xAODTracking/VertexContainerFwd.h"
+#include "xAODTracking/VertexFwd.h"
 class TrackToVtxLinkContainer;
-class NN;
-
 
-namespace Trk
-{
-  class IVertexAnalyticSeedFinder;
-  class AdaptiveMultiVertexFitter;
-  class Track;
-  class ITrackLink;
-  class TrkQuality;
-  class IVxCandidateXAODVertex;
+namespace Trk {
+class IVertexAnalyticSeedFinder;
+class AdaptiveMultiVertexFitter;
+class Track;
+class ITrackLink;
+class TrkQuality;
+class IVxCandidateXAODVertex;
 }
 
+namespace InDet {
+class IInDetTrackSelectionTool;
 
-namespace InDet
+class InDetAdaptiveMultiPriVxFinderTool
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
-  class IInDetTrackSelectionTool;
-
- class InDetAdaptiveMultiPriVxFinderTool : public AthAlgTool, virtual public IVertexFinder
- {
- 
-  public:
-    
-    InDetAdaptiveMultiPriVxFinderTool(const std::string& t, const std::string& n, const IInterface*  p);
-    virtual ~InDetAdaptiveMultiPriVxFinderTool();
-   
-    StatusCode initialize();
-
-    /**
-     * The MultiVertexFinding is performed.
-     *
-     * Input is the Track Collection. Output is the VertexContainer 
-     * with a list of fitted vertices, according to the probability 
-     * of being the primary interaction point.
-     * 
-     * Description of the finder is provided as doxygen info on the class.
-     *
-     */
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
-
-    StatusCode finalize();
-    
-  private:
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const std::vector<const Trk::ITrackLink*> & trackVector);
-  
-    void SGError(std::string errService);
-    virtual void printParameterSettings();
-
-    ToolHandle< Trk::AdaptiveMultiVertexFitter > m_MultiVertexFitter;
-    ToolHandle< Trk::IVertexAnalyticSeedFinder > m_analyticSeedFinder;
-    ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter;
-
-    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-
-    /** Define a beam constraint for the fit */
-    bool m_useBeamConstraint; //!<  Use a vertex/beam constraint
-    
-
-    /**
-     * When adding a new vertex to the multi vertex fit,
-     * only the tracks whose Z at PCA is closer 
-     * to the seeded by more than this TracksMaxZinterval 
-     * value are added to this new vertex.
-     *
-     * Default is 4 mm. If you cut too hard, you cut out 
-     * the good cases where the seed finder is not 
-     * reliable, but the fit would be still able to converge 
-     * towards the right vertex. If you cut too soft, you 
-     * consider a lot of tracks which just slow down the fit.
-     */
-
-    double m_TracksMaxZinterval;
-
-    /**
-     * After having added one vertex to the fit and having 
-     * performed the MultiVertex fit again, all the tracks 
-     * which are compatible to the new vertex by more than 
-     * this maxVertexChi2 (in units of chi2) value are eliminated from the 
-     * tracks from which still to seed the next vertex.
-     *
-     */
-
-    double m_maxVertexChi2;
-
-    /**
-     * As a default the realMultiVertex should stay to false (because this is very well tested).
-     *
-     * If switched to true, all the tracks are considered to be added to the new vertex 
-     * after this new one is seeded, and not only the ones which are considered as outliers 
-     * of previous fitted vertices.
-     *
-     * The presence of a core of tracks the previous vertices are as attached to stabilizes 
-     * the fit quite drastically. In case of luminosities higher than the low lumi scenario,
-     * one should probably to try to switch this on, or, if this doesn't work, decrease the 
-     * maxVertexChi2 and the cleaningZinterval to lower values.
-     */
-    
-    bool m_realMultiVertex;
-
-
-    /*
-     * Decides if you want to use the vtxCompatibility() of the track (set to true) or 
-     * the chi2() (set to false) as an estimate for a track being an outlier or not.
-     * The vtxCompatibility() is the default. In case the track refitting 
-     * is switched on in the AdaptiveMultiVertex fitter, you may want to 
-     * use the refutted chi2().
-     *
-     */
-
-    bool m_useFastCompatibility;
-
-    /*
-     * Selection of the most probable primary interaction vertex is done accordingly to:
-     * - selectiontype is 0:  just sqrt(N_tracks)*Sum_track p_t_track^2
-     * - selectiontype is 1:  Neural Network is used, trained on WH(120)
-     */
-
-    int m_selectiontype;
-
-    /*
-     * During the estimation of probability of vertex candidate to be the primary interaction 
-     * vertex, only all the tracks which have chi2 in the vertex fit higher than this value 
-     * are used for the sum of p_t^2 or as input for the Neural Network.
-     */
-
-    double m_finalCutMaxVertexChi2;
-
- 
-    /*
-     * Maximum significance on the distance between two vertices 
-     * to allow merging of two vertices.
-     *
-     */
-
-    double m_cutVertexDependence;
-    
-
-    /*
-     * Has to be setup equal to the minimum weight set in the fitter.
-     *
-     * In the fitting, when a track has a weight lower than this value,
-     * the track is not updated during that iteration.
-     */
-
-    double m_minweight;
-
-
-    /*
-    * Impact parameter estimator used to calculate significance
-    */
-    ToolHandle< Trk::ITrackToVertexIPEstimator > m_ipEstimator { "Trk::TrackToVertexIPEstimator" };
-    
-    /*
-     * Maximum amount of iterations allowed for vertex finding.
-     * 
-     * The more vertices you have in the event, the more iterations you have to 
-     * allow (safe factor: number of expected vertices * 10)
-     *
-     */
-
-    double m_maxIterations;
-
-    NN* m_testingclass;
-
-   /*
-    * Fit also single track vertices
-    * (could be usefull for example for H-> gamma gamma)\
-    *
-    */
-
-   bool m_addSingleTrackVertices;
-
-   bool m_do3dSplitting;
-   
-   double m_zBfieldApprox;
-
-   double m_maximumVertexContamination;
-
-    /*
-    * Maximum allowed significance of track position to vertex seed
-    */
-    double m_tracksMaxSignificance ;
-
-    /*
-    * Toggle vertex seed constraint on/off
-    */
-    bool m_useSeedConstraint ;
-
-
-   struct CompareTheTwoVertices {
-     bool operator()( xAOD::Vertex* const & first, xAOD::Vertex* const & second);
-   };
-
-   /**												     
-    * Internal method to estimate the probability to be signal vertex of a certain vertex candidate. 
-    */												     
 
-   double estimateSignalCompatibility(xAOD::Vertex *myxAODVertex);				     
+public:
+  InDetAdaptiveMultiPriVxFinderTool(const std::string& t,
+                                    const std::string& n,
+                                    const IInterface* p);
+  virtual ~InDetAdaptiveMultiPriVxFinderTool();
+
+  virtual StatusCode initialize() override;
+
+  /**
+   * The MultiVertexFinding is performed.
+   *
+   * Input is the Track Collection. Output is the VertexContainer
+   * with a list of fitted vertices, according to the probability
+   * of being the primary interaction point.
+   *
+   * Description of the finder is provided as doxygen info on the class.
+   *
+   */
+  using IVertexFinder::findVertex;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const TrackCollection* trackTES) const override;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const override;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const xAOD::TrackParticleContainer* trackParticles) const override;
+
+  virtual StatusCode finalize() override;
+
+private:
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const std::vector<const Trk::ITrackLink*>& trackVector) const;
+
+  void SGError(const std::string& errService);
+  virtual void printParameterSettings();
+
+  ToolHandle<Trk::AdaptiveMultiVertexFitter> m_MultiVertexFitter;
+  ToolHandle<Trk::IVertexAnalyticSeedFinder> m_analyticSeedFinder;
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
+
+  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
+    this,
+    "BeamSpotKey",
+    "BeamSpotData",
+    "SG key for beam spot"
+  };
+
+  /** Define a beam constraint for the fit */
+  bool m_useBeamConstraint; //!<  Use a vertex/beam constraint
+
+  /**
+   * When adding a new vertex to the multi vertex fit,
+   * only the tracks whose Z at PCA is closer
+   * to the seeded by more than this TracksMaxZinterval
+   * value are added to this new vertex.
+   *
+   * Default is 4 mm. If you cut too hard, you cut out
+   * the good cases where the seed finder is not
+   * reliable, but the fit would be still able to converge
+   * towards the right vertex. If you cut too soft, you
+   * consider a lot of tracks which just slow down the fit.
+   */
+
+  double m_TracksMaxZinterval;
+
+  /**
+   * After having added one vertex to the fit and having
+   * performed the MultiVertex fit again, all the tracks
+   * which are compatible to the new vertex by more than
+   * this maxVertexChi2 (in units of chi2) value are eliminated from the
+   * tracks from which still to seed the next vertex.
+   *
+   */
+
+  double m_maxVertexChi2;
+
+  /**
+   * As a default the realMultiVertex should stay to false (because this is very
+   * well tested).
+   *
+   * If switched to true, all the tracks are considered to be added to the new
+   * vertex after this new one is seeded, and not only the ones which are
+   * considered as outliers of previous fitted vertices.
+   *
+   * The presence of a core of tracks the previous vertices are as attached to
+   * stabilizes the fit quite drastically. In case of luminosities higher than
+   * the low lumi scenario, one should probably to try to switch this on, or, if
+   * this doesn't work, decrease the maxVertexChi2 and the cleaningZinterval to
+   * lower values.
+   */
+
+  bool m_realMultiVertex;
+
+  /*
+   * Decides if you want to use the vtxCompatibility() of the track (set to
+   * true) or the chi2() (set to false) as an estimate for a track being an
+   * outlier or not. The vtxCompatibility() is the default. In case the track
+   * refitting is switched on in the AdaptiveMultiVertex fitter, you may want to
+   * use the refutted chi2().
+   *
+   */
+
+  bool m_useFastCompatibility;
+
+  /*
+   * Selection of the most probable primary interaction vertex is done
+   * accordingly to:
+   * - selectiontype is 0:  just sqrt(N_tracks)*Sum_track p_t_track^2
+   * - selectiontype is 1:  Neural Network is used, trained on WH(120)
+   */
 
-   /**
-    * Estimate DeltaZ given a certain track parameters and beam spot center position
-    * ONLY TEMPORARY 15-08-2009: common tool needed to collect this method
-    */
-   
-   double estimateDeltaZ(const Trk::TrackParameters& myPerigee, const Amg::Vector3D& myTransvVertex);
+  int m_selectiontype;
 
-   /** 
+  /*
+   * During the estimation of probability of vertex candidate to be the primary
+   * interaction vertex, only all the tracks which have chi2 in the vertex fit
+   * higher than this value are used for the sum of p_t^2 or as input for the
+   * Neural Network.
+   */
+
+  double m_finalCutMaxVertexChi2;
+
+  /*
+   * Maximum significance on the distance between two vertices
+   * to allow merging of two vertices.
+   *
+   */
+
+  double m_cutVertexDependence;
+
+  /*
+   * Has to be setup equal to the minimum weight set in the fitter.
+   *
+   * In the fitting, when a track has a weight lower than this value,
+   * the track is not updated during that iteration.
+   */
+
+  double m_minweight;
+
+  /*
+   * Impact parameter estimator used to calculate significance
+   */
+  ToolHandle<Trk::ITrackToVertexIPEstimator> m_ipEstimator{
+    "Trk::TrackToVertexIPEstimator"
+  };
+
+  /*
+   * Maximum amount of iterations allowed for vertex finding.
+   *
+   * The more vertices you have in the event, the more iterations you have to
+   * allow (safe factor: number of expected vertices * 10)
+   *
+   */
+
+  double m_maxIterations;
+
+  /*
+   * Fit also single track vertices
+   * (could be usefull for example for H-> gamma gamma)\
+   *
+   */
+
+  bool m_addSingleTrackVertices;
+
+  bool m_do3dSplitting;
+
+  double m_zBfieldApprox;
+
+  double m_maximumVertexContamination;
+
+  /*
+   * Maximum allowed significance of track position to vertex seed
+   */
+  double m_tracksMaxSignificance;
+
+  /*
+   * Toggle vertex seed constraint on/off
+   */
+  bool m_useSeedConstraint;
+
+  struct CompareTheTwoVertices
+  {
+    bool operator()(xAOD::Vertex* const& first, xAOD::Vertex* const& second);
+  };
+
+  /**
+   * Internal method to estimate the probability to be signal vertex of a
+   * certain vertex candidate.
+   */
+
+  double estimateSignalCompatibility(xAOD::Vertex* myxAODVertex) const;
+
+  /**
+   * Estimate DeltaZ given a certain track parameters and beam spot center
+   * position ONLY TEMPORARY 15-08-2009: common tool needed to collect this
+   * method
+   */
+
+  double estimateDeltaZ(const Trk::TrackParameters& myPerigee,
+                        const Amg::Vector3D& myTransvVertex) const;
+
+  /**
    * copying from the guassian density alg
    */
-   double ipSignificance(const Trk::TrackParameters* params, const Amg::Vector3D * vertex) const;
+  double ipSignificance(const Trk::TrackParameters* params,
+                        const Amg::Vector3D* vertex) const;
+
+  /**
+   * Clean decorator data from a vertex candidate (to avoid memory leaks) and
+   * then delete it and set to zero
+   */
 
-   /**
-    * Clean decorator data from a vertex candidate (to avoid memory leaks) and then delete it and set to zero
-    */
-   
-   void releaseCandidate(xAOD::Vertex*& candidate);
-   
+  void releaseCandidate(xAOD::Vertex*& candidate) const;
 
- };//end of class
-}//end of namespace definitions
+}; // end of class
+} // end of namespace definitions
 #endif
-                                                                                                             
+
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
index f1974942d563..7d707e52eb79 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -9,27 +9,26 @@
  * @author Giacinto Piacquadio (Freiburg University)
  *
  *
- * This class provides an implementation for a primary 
- * vertex finding tool, which uses the Adaptive Vertex 
- * Fitter to reject outliers not belonging to the primary 
+ * This class provides an implementation for a primary
+ * vertex finding tool, which uses the Adaptive Vertex
+ * Fitter to reject outliers not belonging to the primary
  * vertex interaction.
  *
  * The steps done are simply;
  * - Tracks are selected according to the specified cuts
  * - The Adaptive Vertex Finder is used to fit them
  *
- * Contrary to the InDetPriVxFinderTool, the outlier 
+ * Contrary to the InDetPriVxFinderTool, the outlier
  * rejection is done by the fitter and not by the finder.
  *
- * One only vertex can be fit, so it is not suited (as a 
+ * One only vertex can be fit, so it is not suited (as a
  * finder) when many minimum bias vertices can be expected.
  * In this case please use the <i>InDetPriVxFinderTool</i>.
  *
  *
- * (this is a modified verson of InDetPriVxFinderTool.h of A. Wildauer & F. Akesson)
- *  changes :
- *      06/12/2006   Kirill.Prokofiev@cern.ch 
- *      EDM cleanup and switching to the FitQuality use 
+ * (this is a modified verson of InDetPriVxFinderTool.h of A. Wildauer & F.
+ *Akesson) changes : 06/12/2006   Kirill.Prokofiev@cern.ch EDM cleanup and
+ *switching to the FitQuality use
  *
  *      2016-04-26   David Shope <david.richard.shope@cern.ch>
  *      EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
@@ -40,91 +39,105 @@
  *
  ***************************************************************************/
 
-//implemented using as template the InDetPriVxFinderTool class of A. Wildauer and F. Akesson
+// implemented using as template the InDetPriVxFinderTool class of A. Wildauer
+// and F. Akesson
 
 #ifndef INDETPRIVXFINDERTOOL_INDETADAPTIVEPRIVXFINDERTOOL_H
 #define INDETPRIVXFINDERTOOL_INDETADAPTIVEPRIVXFINDERTOOL_H
 
-#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "TrkTrack/TrackCollection.h" // type def ...
-#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
+#include "GaudiKernel/ToolHandle.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "TrkParameters/TrackParameters.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
+#include "TrkTrack/TrackCollection.h"                    // type def ...
 /**
- * Forward declarations 
+ * Forward declarations
  */
- 
+
 #include "BeamSpotConditionsData/BeamSpotData.h"
-#include "xAODTracking/VertexFwd.h"
+#include "xAODTracking/TrackParticleContainerFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexContainerFwd.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
+#include "xAODTracking/VertexFwd.h"
 
-namespace Trk
-{
- class IVertexFitter;
- class Track;
- class TrackParticleBase;
- class IVxCandidateXAODVertex;
+namespace Trk {
+class IVertexFitter;
+class Track;
+class TrackParticleBase;
+class IVxCandidateXAODVertex;
 }
 
-namespace InDet
+namespace InDet {
+class IInDetTrackSelectionTool;
+
+class InDetAdaptivePriVxFinderTool
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
-  class IInDetTrackSelectionTool;
-  
- class InDetAdaptivePriVxFinderTool : public AthAlgTool, virtual public IVertexFinder
- {
 
 public:
+  /**
+   * Constructor
+   */
+
+  InDetAdaptivePriVxFinderTool(const std::string& t,
+                               const std::string& n,
+                               const IInterface* p);
 
-   /**
-    * Constructor
-    */
-   
-   InDetAdaptivePriVxFinderTool(const std::string& t, const std::string& n, const IInterface*  p);
-   
-   /**
-    * Destructor
-    */
-   
-   virtual ~InDetAdaptivePriVxFinderTool();
-    
-   StatusCode initialize();
-
-   /** 
-    * Finding method.
-    * Has as input a track collection and as output 
-    * a VxContainer.
-    */
-
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
-   
-   StatusCode finalize();
-   
- private:
-   
-   /** the common finding code (regardless of Track or TrackParticle(Base) is here */
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(std::vector<const Trk::TrackParameters*>& origParameters);
-
-   ToolHandle< Trk::IVertexFitter > m_iVertexFitter;
-   ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter;
-   
-    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-   
-
-   void SGError(std::string errService);
-
-   /**
-    * Internal method to print the parameters setting
-    */
-
-   virtual void printParameterSettings();
+  /**
+   * Destructor
+   */
+
+  virtual ~InDetAdaptivePriVxFinderTool();
+
+  virtual StatusCode initialize() override;
+
+  /**
+   * Finding method.
+   * Has as input a track collection and as output
+   * a VxContainer.
+   */
+
+  using IVertexFinder::findVertex;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const TrackCollection* trackTES) const override;
+ 
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const Trk::TrackParticleBaseCollection* trackTES) const override;
  
- };//end of class definitions
-}//end of namespace definitions
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const override;
+
+  virtual StatusCode finalize() override;
+
+private:
+  /** the common finding code (regardless of Track or TrackParticle(Base) is
+   * here */
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    std::vector<const Trk::TrackParameters*>& origParameters) const;
+
+  ToolHandle<Trk::IVertexFitter> m_iVertexFitter;
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
+
+  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
+    this,
+    "BeamSpotKey",
+    "BeamSpotData",
+    "SG key for beam spot"
+  };
+
+  void SGError(const std::string& errService);
+
+  /**
+   * Internal method to print the parameters setting
+   */
+
+  virtual void printParameterSettings();
+
+}; // end of class definitions
+} // end of namespace definitions
 #endif
-                                                                                                             
+
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
index 8c9b8898e9a7..612729553818 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -9,11 +9,11 @@
  * @author Giacinto Piacquadio (Freiburg University)
  *
  *
- * This class provides an implementation for a primary 
- * vertex finding tool, which uses the Adaptive Vertex 
- * Fitter to reject outliers not belonging to the primary 
+ * This class provides an implementation for a primary
+ * vertex finding tool, which uses the Adaptive Vertex
+ * Fitter to reject outliers not belonging to the primary
  * vertex interaction.
- * 
+ *
  * ------------------------------------------------------
  * Changes:
  *
@@ -30,129 +30,139 @@
  *
  ***************************************************************************/
 
-//implemented using as template the InDetPriVxFinderTool class of A. Wildauer and F. Akesson
+// implemented using as template the InDetPriVxFinderTool class of A. Wildauer
+// and F. Akesson
 
 #ifndef INDETPRIVXFINDERTOOL_INDETITERATIVEPRIVXFINDERTOOL_H
 #define INDETPRIVXFINDERTOOL_INDETITERATIVEPRIVXFINDERTOOL_H
 
-#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "TrkTrack/TrackCollection.h" // type def ...
-#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
-#include "TrkParameters/TrackParameters.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "StoreGate/ReadCondHandleKey.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
+#include "TrkParameters/TrackParameters.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
+#include "TrkTrack/TrackCollection.h"                    // type def ...
 /**
- * Forward declarations 
+ * Forward declarations
  */
- 
-#include "xAODTracking/VertexFwd.h"
+
+#include "xAODTracking/TrackParticleContainerFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexContainerFwd.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
+#include "xAODTracking/VertexFwd.h"
 
-namespace Trk
-{
- class IVertexFitter;
- class Track;
- class TrackParticleBase;
- class ITrackLink;
- class IVertexSeedFinder;
- class IImpactPoint3dEstimator;
+namespace Trk {
+class IVertexFitter;
+class Track;
+class TrackParticleBase;
+class ITrackLink;
+class IVertexSeedFinder;
+class IImpactPoint3dEstimator;
 // class IVertexTrackCompatibilityEstimator;
 // class ImpactPoint3dAtaPlaneFactory;
- class IVertexLinearizedTrackFactory;
+class IVertexLinearizedTrackFactory;
 //  class ITrkDistanceFinder;
-  
- class IVxCandidateXAODVertex;
+
+class IVxCandidateXAODVertex;
 }
 
-namespace InDet
+namespace InDet {
+class IInDetTrackSelectionTool;
+
+class InDetIterativePriVxFinderTool
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
-  class IInDetTrackSelectionTool;
-  
- class InDetIterativePriVxFinderTool : public AthAlgTool, virtual public IVertexFinder
- {
 
 public:
+  /**
+   * Constructor
+   */
 
-   /**
-    * Constructor
-    */
-   
-   InDetIterativePriVxFinderTool(const std::string& t, const std::string& n, const IInterface*  p);
-   
-   /**
-    * Destructor
-    */
-   
-   virtual ~InDetIterativePriVxFinderTool();
-    
-   StatusCode initialize();
+  InDetIterativePriVxFinderTool(const std::string& t,
+                                const std::string& n,
+                                const IInterface* p);
 
-   /** 
-    * Finding method.
-    * Has as input a track collection and as output 
-    * a VxContainer.
-    */
+  /**
+   * Destructor
+   */
 
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
+  virtual ~InDetIterativePriVxFinderTool();
 
-   StatusCode finalize();
-   
- private:
+  virtual StatusCode initialize() override;
 
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const std::vector<Trk::ITrackLink*> & trackVector) const;
+  /**
+   * Finding method.
+   * Has as input a track collection and as output
+   * a VxContainer.
+   */
+  using IVertexFinder::findVertex;
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const TrackCollection* trackTES) const override;
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const Trk::TrackParticleBaseCollection* trackTES) const override;
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const override;
 
-   void removeCompatibleTracks(xAOD::Vertex * myxAODVertex,
-                               std::vector<const Trk::TrackParameters*> & perigeesToFit,
-                               std::vector<Trk::ITrackLink*> & seedTracks) const;
+  virtual StatusCode finalize() override;
 
-   void removeAllFrom(std::vector<const Trk::TrackParameters*> & perigeesToFit,
-                      std::vector<Trk::ITrackLink*> & seedTracks) const;
+private:
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const std::vector<Trk::ITrackLink*>& trackVector) const;
 
-   double compatibility(const Trk::TrackParameters& measPerigee,
-                        const xAOD::Vertex & vertex) const;
+  void removeCompatibleTracks(
+    xAOD::Vertex* myxAODVertex,
+    std::vector<const Trk::TrackParameters*>& perigeesToFit,
+    std::vector<Trk::ITrackLink*>& seedTracks) const;
 
-   void countTracksAndNdf(xAOD::Vertex * myxAODVertex,
-                          double & ndf, int & ntracks) const;
+  void removeAllFrom(std::vector<const Trk::TrackParameters*>& perigeesToFit,
+                     std::vector<Trk::ITrackLink*>& seedTracks) const;
 
-   ToolHandle< Trk::IVertexFitter > m_iVertexFitter;
-   ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter;
-   ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder;
-   ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator;
-   ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory;
-   
-   SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+  double compatibility(const Trk::TrackParameters& measPerigee,
+                       const xAOD::Vertex& vertex) const;
 
-   bool m_useBeamConstraint;
-   double m_significanceCutSeeding;
-   double m_maximumChi2cutForSeeding;
-   double m_maxVertices;
+  void countTracksAndNdf(xAOD::Vertex* myxAODVertex,
+                         double& ndf,
+                         int& ntracks) const;
 
-   bool m_createSplitVertices;
-   int m_splitVerticesTrkInvFraction; ///< Integer: 1./fraction of tracks to be assigned to the tag split vertex 
+  ToolHandle<Trk::IVertexFitter> m_iVertexFitter;
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
+  ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder;
+  ToolHandle<Trk::IImpactPoint3dEstimator> m_ImpactPoint3dEstimator;
+  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_LinearizedTrackFactory;
 
-   bool m_reassignTracksAfterFirstFit;
+  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
+    this,
+    "BeamSpotKey",
+    "BeamSpotData",
+    "SG key for beam spot"
+  };
 
-   bool m_doMaxTracksCut; 
-   unsigned int m_maxTracks;
+  bool m_useBeamConstraint;
+  double m_significanceCutSeeding;
+  double m_maximumChi2cutForSeeding;
+  double m_maxVertices;
 
-   void SGError(std::string errService);
+  bool m_createSplitVertices;
+  int m_splitVerticesTrkInvFraction; ///< Integer: 1./fraction of tracks to be
+                                     ///< assigned to the tag split vertex
 
-   /**
-    * Internal method to print the parameters setting
-    */
+  bool m_reassignTracksAfterFirstFit;
 
-   virtual void printParameterSettings();
- 
+  bool m_doMaxTracksCut;
+  unsigned int m_maxTracks;
 
+  void SGError(const std::string& errService);
 
+  /**
+   * Internal method to print the parameters setting
+   */
 
- };//end of class definitions
-}//end of namespace definitions
+  virtual void printParameterSettings();
+
+}; // end of class definitions
+} // end of namespace definitions
 #endif
-                                                                                                             
+
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
index b8b102852114..f1f64c06e2f4 100644
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -79,23 +79,29 @@ public:
    
    virtual ~InDetMultiPriVxFinderTool();
     
-   StatusCode initialize();
+   virtual StatusCode initialize() override;
 
    /** 
     * Finding method.
     * Has as input a track collection and as output 
     * a VxContainer.
     */
+   using IVertexFinder::findVertex;
 
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
+   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+     const TrackCollection* trackTES) const override;
 
-   StatusCode finalize();
+   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+     const Trk::TrackParticleBaseCollection* trackTES) const override;
    
- private:
+   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+     const xAOD::TrackParticleContainer* trackParticles) const override;
+
+   virtual StatusCode finalize() override;
    
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const std::vector<Trk::ITrackLink*> & trackVector) const;
+ private:
+   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+     const std::vector<Trk::ITrackLink*>& trackVector) const;
 
    void removeCompatibleTracks(xAOD::Vertex * myxAODVertex,
                                std::vector<const Trk::TrackParameters*> & perigeesToFit,
@@ -110,15 +116,21 @@ public:
    void countTracksAndNdf(xAOD::Vertex * myxAODVertex,
                           double & ndf, int & ntracks) const;
 
-   double distanceAndError(const Trk::TrackParameters* params, const Amg::Vector3D * vertex, double & err) const;
-
+   double distanceAndError(const Trk::TrackParameters* params,
+                           const Amg::Vector3D* vertex,
+                           double& err) const;
 
    ToolHandle< Trk::IVertexFitter > m_iVertexFitter;
    ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter;
    ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder;
    ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator;
 
-   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"
+   };
 
    bool m_useBeamConstraint;
    double m_significanceCutSeeding;
@@ -133,7 +145,7 @@ public:
    /// enable merging of vertices after finding
    //   bool m_doRemerging;
    
-   void SGError(std::string errService);
+   void SGError(const std::string& errService);
 
    /**
     * Internal method to print the parameters setting
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
index befc34946fa3..fcf56dc401e5 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -13,58 +13,59 @@
                           (necessary to compile with gcc starting from 3.3.x)
                           by GP (Freiburg University)
 
-    changes: 18-11-2010  Kirill Prokofiev   
-             Development never stops ;). 
-	     Now adding the split vertices for the HI run
+    changes: 18-11-2010  Kirill Prokofiev
+             Development never stops ;).
+             Now adding the split vertices for the HI run
 
              2016-04-26  David Shope <david.richard.shope@cern.ch>
 
              EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
-   
+
                findVertex will now always return an xAOD::VertexContainer,
-               even when using a TrackCollection or a TrackParticleBaseCollection
-               as input.
+               even when using a TrackCollection or a
+ TrackParticleBaseCollection as input.
  ***************************************************************************/
 
 #ifndef INDETPRIVXFINDERTOOL_INDETPRIVXFINDERTOOL_H
 #define INDETPRIVXFINDERTOOL_INDETPRIVXFINDERTOOL_H
 
-#include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-//cannot be forward declared because of typedef
-#include "TrkTrack/TrackCollection.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
+// cannot be forward declared because of typedef
 #include "TrkParameters/TrackParameters.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkTrack/TrackCollection.h"
 
 #include <vector>
 
 /** Primary Vertex Finder Tool.
-  InDetPriVxFinderTool uses the Billoir method to fit a primary vertex in the event. The
-  method includes taking all tracks passing the preselection and to fit them.
-  In a second iteration tracks with a 'too big' chi-squared contribution are
-  left out and the remaining tracks are refitted. The 'too big' contribution
-  (maximum chi-square) can be set by jobOptions. Preselection cuts can be
-  given via jobOptions for d0, z0 and minimum Pt. It is also possible to set
-  a beam constraint to be considered in the fit. this is also done in the
+  InDetPriVxFinderTool uses the Billoir method to fit a primary vertex in the
+  event. The method includes taking all tracks passing the preselection and to
+  fit them. In a second iteration tracks with a 'too big' chi-squared
+  contribution are left out and the remaining tracks are refitted. The 'too big'
+  contribution (maximum chi-square) can be set by jobOptions. Preselection cuts
+  can be given via jobOptions for d0, z0 and minimum Pt. It is also possible to
+  set a beam constraint to be considered in the fit. this is also done in the
   jobOptions.
 
     - \c TracksName: The name of the StoreGate input container from
       which the tracks are read. The default is "TrkTracks", the container
       from the legacy converters/ambiguity processor.
-    - \c VxCandidatesOutputName: The name of the StoreGate container where the fit
-      results are put. default is "VxPrimaryCandidate".
+    - \c VxCandidatesOutputName: The name of the StoreGate container where the
+  fit results are put. default is "VxPrimaryCandidate".
     - \c FitRoutine: The routine which should be used for the fitting. The
       default is "FastVertexFitter".
 
-    - \c chi2 cut method: Specifies how to chi2 cut on tracks. There are two possibilities:
-      Version 1: (chi2CutMethod = 1)
+    - \c chi2 cut method: Specifies how to chi2 cut on tracks. There are two
+  possibilities: Version 1: (chi2CutMethod = 1)
           - get rid of all tracks with chi2 > m_maxChi2PerTrack in one go
           - no refit after removing one track
           - refit after all tracks with too high chi2 were removed
       Version 2: (chi2CutMethod = 2)
-          - get rid of tracks one by one starting with the one with highest chi2 > m_maxChi2PerTrack
+          - get rid of tracks one by one starting with the one with highest chi2
+  > m_maxChi2PerTrack
           - refit after this track has been removed
             and do a chi2 cut again until all chi2 < m_maxChi2PerTrack
     - \c maxChi2PerTrack: The maximum chi-squared of a track to be considered
@@ -76,7 +77,8 @@
     - \c BeamConstraint_x: Constrained z-position of beam spot. default is 0.
     - \c BeamConstraint_err_x: Error on constrained x-position. default is 0.
     - \c BeamConstraint_err_y: Error on constrained y-position. default is 0.
-    - \c BeamConstraint_err_z: Error on constrained z-position. default is 5.6 cm.
+    - \c BeamConstraint_err_z: Error on constrained z-position. default is 5.6
+  cm.
 
     - \c Track selection cuts:
           minPt = 1000. CLHEP::MeV: the minimum pt(CLHEP::MeV) of a track.
@@ -87,61 +89,83 @@
 
 /* Forward declarations */
 
-#include "xAODTracking/Vertex.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "xAODTracking/TrackParticle.h"
-#include "xAODTracking/VertexContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
-namespace Trk
-{
+#include "xAODTracking/Vertex.h"
+#include "xAODTracking/VertexContainer.h"
+namespace Trk {
 class IVertexFitter;
 class Track;
 class TrackParticleBase;
 class IVxCandidateXAODVertex;
 }
 
-namespace InDet
-{
-  class IMultiPVSeedFinder;
-  class IInDetTrackSelectionTool;
-  
-  class InDetPriVxFinderTool : public AthAlgTool, virtual public IVertexFinder
+namespace InDet {
+class IMultiPVSeedFinder;
+class IInDetTrackSelectionTool;
+
+class InDetPriVxFinderTool
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
 public:
-    InDetPriVxFinderTool(const std::string& t, const std::string& n, const IInterface*  p);
-    virtual ~InDetPriVxFinderTool();
-    StatusCode initialize();
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
-    StatusCode finalize();
+  InDetPriVxFinderTool(const std::string& t,
+                       const std::string& n,
+                       const IInterface* p);
+  virtual ~InDetPriVxFinderTool();
+  StatusCode initialize() override;
+
+  using IVertexFinder::findVertex;
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const TrackCollection* trackTES) const override;
+
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const Trk::TrackParticleBaseCollection* trackTES) const override;
+
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const override;
+
+  virtual StatusCode finalize() override;
+
 private:
-    ToolHandle < InDet::IMultiPVSeedFinder > m_iPriVxSeedFinder;
-    ToolHandle < Trk::IVertexFitter > m_iVertexFitter;
-    ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter;
-
-    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; //!< pointer to the beam condition service
-    
-    /** Define a beam constraint for the fit */
-    bool m_useBeamConstraint; //!<  Use a vertex/beam constraint
-
-    /** choose the chi2 cut method */
-    int    m_chi2CutMethod;
-    bool   m_enableMultipleVertices;
-    double m_clusterLength;
-    /** The maximum chi-squared per track which is allowed in the fit. */
-    double m_maxChi2PerTrack;
-
-    /** the common finding code (regardless of Track or TrackParticle(Base) is here */
-    //VxContainer* m_findVertex(std::vector< std::vector<const Trk::TrackParameters*> >& origParameters);
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(std::vector< std::vector<const Trk::TrackParameters*> >& origParameters);
-
-    virtual void sortTracksInChi2(std::vector<int> &indexOfSortedChi2, xAOD::Vertex * myxAODVertex);
-    virtual void sortTracksInZ0(std::vector<const Trk::TrackParameters*> tv,std::vector<int>& indexOfSortedZ0);
-    
-    
-    bool m_createSplitVertices;
-    int m_splitVerticesTrkInvFraction; ///< Integer: 1./fraction of tracks to be assigned to the tag split vertex 
- };
+  ToolHandle<InDet::IMultiPVSeedFinder> m_iPriVxSeedFinder;
+  ToolHandle<Trk::IVertexFitter> m_iVertexFitter;
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
+
+  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
+    this,
+    "BeamSpotKey",
+    "BeamSpotData",
+    "SG key for beam spot"
+  }; //!< pointer to the beam condition service
+
+  /** Define a beam constraint for the fit */
+  bool m_useBeamConstraint; //!<  Use a vertex/beam constraint
+
+  /** choose the chi2 cut method */
+  int m_chi2CutMethod;
+  bool m_enableMultipleVertices;
+  double m_clusterLength;
+  /** The maximum chi-squared per track which is allowed in the fit. */
+  double m_maxChi2PerTrack;
+
+  /** the common finding code (regardless of Track or TrackParticle(Base) is
+   * here */
+  // VxContainer* m_findVertex(std::vector< std::vector<const
+  // Trk::TrackParameters*> >& origParameters);
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    std::vector<std::vector<const Trk::TrackParameters*>>& origParameters)
+    const;
+
+  virtual void sortTracksInChi2(std::vector<int>& indexOfSortedChi2,
+                                xAOD::Vertex* myxAODVertex) const;
+  virtual void sortTracksInZ0(std::vector<const Trk::TrackParameters*> tv,
+                              std::vector<int>& indexOfSortedZ0) const;
+
+  bool m_createSplitVertices;
+  int m_splitVerticesTrkInvFraction; ///< Integer: 1./fraction of tracks to be
+                                     ///< assigned to the tag split vertex
+};
 }
 #endif
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
index 783a5bc14923..06c7aba5aeae 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
@@ -33,10 +33,8 @@
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
-#include "NN.h"
 #include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
 
-
 #include "VxMultiVertex/MvfFitInfo.h"
 #include "VxMultiVertex/MVFVxTrackAtVertex.h"
 #include "VxMultiVertex/TrackToVtxLink.h"
@@ -57,8 +55,6 @@
 
 #include <cmath>
 
-
-
 namespace InDet
 {
   InDetAdaptiveMultiPriVxFinderTool::InDetAdaptiveMultiPriVxFinderTool(const std::string& t, const std::string& n,
@@ -77,7 +73,6 @@ namespace InDet
     m_cutVertexDependence(3.),
     m_minweight(0.0001),
     m_maxIterations(100),
-    m_testingclass(0),
     m_addSingleTrackVertices(false),
     m_do3dSplitting(false),
     m_zBfieldApprox(0.60407),
@@ -152,7 +147,7 @@ namespace InDet
   } //anonymous namespace
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const TrackCollection* trackTES) {
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(const TrackCollection* trackTES) const{
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
     const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
 
@@ -196,7 +191,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) {
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) const{
     std::vector<const Trk::ITrackLink*> selectedTracks;
 
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
@@ -241,7 +236,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) {
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) const {
     std::vector<const Trk::ITrackLink*> selectedTracks;
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
     xAOD::Vertex beamposition;
@@ -294,7 +289,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const std::vector<const Trk::ITrackLink*>& trackVector) {
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(const std::vector<const Trk::ITrackLink*>& trackVector) const {
     // TODO: put this in a better place
     // Prepare objects holding the decoration of xAOD::Vertex with MVF auxdata
     // For optimization of access speed
@@ -302,8 +297,8 @@ namespace InDet
     xAOD::Vertex::Decorator< bool > isInitialized("isInitialized");
     xAOD::Vertex::Decorator< std::vector< Trk::VxTrackAtVertex* > > VTAV("VTAV");
 
-    if (m_selectiontype == 1) {//if you have to use NN, load the class
-      m_testingclass = new NN();//check later for MEMORY LEAK
+    if (m_selectiontype == 1) {
+      ATH_MSG_WARNING("Only Selection Type 0 supported for MT");
     }
 
     //---- Start of preselection of tracks according to perigee parameters ---------------//
@@ -358,7 +353,7 @@ namespace InDet
       iteration += 1;
       ATH_MSG_DEBUG("Starting iteration number " << iteration << " with " << seedtracknumber << " seed tracks.");
       //now use all the perigee parameters you have so far
-      if (m_realMultiVertex == true) {
+      if (m_realMultiVertex) {
         trkbegin = origTracks.begin();
         trkend = origTracks.end();
       } else {
@@ -370,7 +365,7 @@ namespace InDet
            seedtrkAtVtxIter != seedtrkend; ++seedtrkAtVtxIter) {
         perigeeList.push_back((*seedtrkAtVtxIter)->parameters());
       }
-      xAOD::Vertex* constraintVertex = 0;
+      xAOD::Vertex* constraintVertex = nullptr;
       
       if (m_useBeamConstraint) {
         constraintVertex = new xAOD::Vertex();
@@ -402,7 +397,7 @@ namespace InDet
         ATH_MSG_DEBUG(perigeeList.size() << " tracks passed to seed finder, but no seed returned.");
         // TODO: Do I need this?
         delete constraintVertex;
-        constraintVertex = 0;
+        constraintVertex = nullptr;
         break;
       }
       //new xAOD::Vertex with this
@@ -437,12 +432,16 @@ namespace InDet
           }
         }
       }
-      ATH_MSG_DEBUG(VTAV(*actualcandidate).size() << " tracks added to vertex candidate for IP significance less than " << m_tracksMaxSignificance << " within " << m_TracksMaxZinterval << " mm of seed position.");
+      ATH_MSG_DEBUG(
+        VTAV(*actualcandidate).size()
+        << " tracks added to vertex candidate for IP significance less than "
+        << m_tracksMaxSignificance << " within " << m_TracksMaxZinterval
+        << " mm of seed position.");
       //now consider to recovery from the case where no tracks were added to the vertex
       if (VTAV(*actualcandidate).empty()) {
         //you need to define a new seed (because the old one is probably in between two ones...)
         double zdistance = 1e8;
-        const Trk::ITrackLink* nearestTrack = 0;
+        const Trk::ITrackLink* nearestTrack = nullptr;
         for (std::vector<const Trk::ITrackLink*>::const_iterator seedtrkiter = seedtrkbegin;
              seedtrkiter != seedtrkend; ++seedtrkiter) {
           if (std::fabs((*seedtrkiter)->parameters()->position()[Trk::z] - actualVertex.z()) < zdistance) {
@@ -520,7 +519,7 @@ namespace InDet
             ((*trkAtVtxIter)->weight() > m_minweight
              && (*trkAtVtxIter)->trackQuality().chiSquared() < m_maxVertexChi2
              && !m_useFastCompatibility)) {
-          const Trk::ITrackLink* foundTrack = 0;
+          const Trk::ITrackLink* foundTrack = nullptr;
           for (std::vector<const Trk::ITrackLink*>::const_iterator seedtrkiter =
                  seedtrkbegin; seedtrkiter != seedtrkend;
                ++seedtrkiter) {
@@ -528,7 +527,7 @@ namespace InDet
               foundTrack = *seedtrkiter;
             }
           }
-          if (foundTrack != 0) {
+          if (foundTrack != nullptr) {
             atleastonecompatibletrack = true;
             numberOfCompatibleTracks += 1;
             ATH_MSG_VERBOSE("Found compatible track");
@@ -598,14 +597,14 @@ namespace InDet
       } else {//no compatible track found...
         //in this case put out the highest seeding track which didn't give any good result...
         double highestcompatibility = 0;
-        Trk::VxTrackAtVertex* trackHighestCompatibility = 0;
+        Trk::VxTrackAtVertex* trackHighestCompatibility = nullptr;
 
         ATH_MSG_VERBOSE("Analyzing new vertex");
 
         for (std::vector<Trk::VxTrackAtVertex*>::iterator trkAtVtxIter = trkAtVtxbegin;
              trkAtVtxIter != trkAtVtxend; ++trkAtVtxIter) {
           ATH_MSG_VERBOSE("Checking new track for compatibility");
-          const Trk::ITrackLink* foundTrack = 0;
+          const Trk::ITrackLink* foundTrack = nullptr;
           for (std::vector<const Trk::ITrackLink*>::const_iterator seedtrkiter =
                  seedtrkbegin; seedtrkiter != seedtrkend;
                ++seedtrkiter) {
@@ -613,7 +612,7 @@ namespace InDet
               foundTrack = *seedtrkiter;
             }
           }
-          if (foundTrack != 0) {
+          if (foundTrack != nullptr) {
             double compatibility = (*trkAtVtxIter)->vtxCompatibility();
             ATH_MSG_VERBOSE("New track has compatibility: " << compatibility);
             if (compatibility > highestcompatibility) {
@@ -624,7 +623,7 @@ namespace InDet
         }
         ATH_MSG_VERBOSE("Highest compatibility track:" << trackHighestCompatibility <<
                         "with compatibility: " << highestcompatibility);
-        if (trackHighestCompatibility != 0) {
+        if (trackHighestCompatibility != nullptr) {
           std::vector<const Trk::ITrackLink*>::iterator foundTrack = seedtrkend;
           for (std::vector<const Trk::ITrackLink*>::iterator seedtrkiter = seedtrkbegin; seedtrkiter != seedtrkend;
                ++seedtrkiter) {
@@ -643,7 +642,7 @@ namespace InDet
         } else {
           //alternative method: delete seed track nearest in z to the seed
           double zdistance = 1e8;
-          const Trk::ITrackLink* nearestTrack = 0;
+          const Trk::ITrackLink* nearestTrack = nullptr;
           for (std::vector<const Trk::ITrackLink*>::const_iterator seedtrkiter = seedtrkbegin;
                seedtrkiter != seedtrkend; ++seedtrkiter) {
             if (std::fabs((*seedtrkiter)->parameters()->position()[Trk::z] - actualVertex.z()) < zdistance) {
@@ -651,7 +650,7 @@ namespace InDet
               nearestTrack = *seedtrkiter;
             }
           }
-          if (nearestTrack != 0) {
+          if (nearestTrack != nullptr) {
             std::vector<const Trk::ITrackLink*>::iterator foundTrackToDelete =
               std::find(seedtrkbegin, seedtrkend, nearestTrack);
             if (foundTrackToDelete != seedtrkend) {
@@ -762,10 +761,10 @@ namespace InDet
       } else {
         seedtracknumber = seedTracks.size();
         ATH_MSG_VERBOSE("Storing new vertex with " << actualcandidate->vxTrackAtVertex().size() << " tracks");
-        myxAODVertices.push_back(xAODVertex_pair(0,actualcandidate));
+        myxAODVertices.emplace_back(0,actualcandidate);
       }
     } while ((
-               (m_addSingleTrackVertices && seedTracks.size() > 0) ||
+               (m_addSingleTrackVertices && !seedTracks.empty()) ||
                ((!m_addSingleTrackVertices) && seedTracks.size() > 1))
              && iteration < m_maxIterations);
     if (iteration >= m_maxIterations) {
@@ -810,7 +809,7 @@ namespace InDet
         ATH_MSG_VERBOSE("z position: " << (*vtxIter).second->position().z());
       }
     }
-    if (myxAODVertices.size() == 0) {
+    if (myxAODVertices.empty()) {
       ATH_MSG_WARNING("No vertices found: returning a place-holder at the beam spot center.");
       xAOD::Vertex* beamspotCandidate = new xAOD::Vertex;
       beamspotCandidate->makePrivateStore();
@@ -818,7 +817,7 @@ namespace InDet
       beamspotCandidate->setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
       beamspotCandidate->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
       // TODO: I don't need to set fitQuality too do I?
-      myxAODVertices.push_back(xAODVertex_pair(0, beamspotCandidate));
+      myxAODVertices.emplace_back(0, beamspotCandidate);
     }
     vtxBegin = myxAODVertices.begin();
     vtxEnd = myxAODVertices.end();
@@ -830,7 +829,7 @@ namespace InDet
       for (std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkIter = MVFtrkBegin; MVFtrkIter != MVFtrkEnd;
            ++MVFtrkIter) {
         //setting link to TrackToVtxLink to 0 (all TrackToVtxLink will be deleted some lines later)
-        (static_cast<Trk::MVFVxTrackAtVertex*>(*MVFtrkIter))->setLinkToVertices(0);
+        (static_cast<Trk::MVFVxTrackAtVertex*>(*MVFtrkIter))->setLinkToVertices(nullptr);
         delete *MVFtrkIter;
         *MVFtrkIter = 0;
       }
@@ -873,7 +872,6 @@ namespace InDet
           // there to be xAOD::TrackParticleLinks!
       }
     }
-    if (m_selectiontype == 1 && m_testingclass != 0) delete m_testingclass;
     std::vector<Trk::TrackToVtxLink*>::iterator begin = myTrackToVtxLinks.begin();
     std::vector<Trk::TrackToVtxLink*>::iterator end = myTrackToVtxLinks.end();
     //delete all TrackToVtxLink objects
@@ -882,9 +880,9 @@ namespace InDet
     }
     //---- add dummy vertex at the end ------------------------------------------------------//
     //---- if one or more vertices are already there: let dummy have same position as primary vertex
-    if (theVertexContainer->size() >= 1) {
+    if (!theVertexContainer->empty()) {
       xAOD::Vertex* primaryVtx = theVertexContainer->front();
-      if (primaryVtx->vxTrackAtVertex().size() > 0) {
+      if (!primaryVtx->vxTrackAtVertex().empty()) {
         primaryVtx->setVertexType(xAOD::VxType::PriVtx);
         xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
         theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
@@ -898,7 +896,7 @@ namespace InDet
       }
     }
     //---- if no vertex is there let dummy be at beam spot
-    else if (theVertexContainer->size() == 0) {
+    else if (theVertexContainer->empty()) {
       xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
       theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
                                                       // aux store
@@ -919,7 +917,7 @@ namespace InDet
   }
 
   double
-  InDetAdaptiveMultiPriVxFinderTool::estimateSignalCompatibility(xAOD::Vertex* mycand) {
+  InDetAdaptiveMultiPriVxFinderTool::estimateSignalCompatibility(xAOD::Vertex* mycand) const{
     // TODO: put this in a better place
     // Prepare objects holding the decoration of xAOD::Vertex with MVF auxdata
     // For optimization of access speed
@@ -943,73 +941,27 @@ namespace InDet
             ((*i)->weight() > m_minweight
              && (*i)->trackQuality().chiSquared() < m_finalCutMaxVertexChi2
              && !m_useFastCompatibility)) {
-          const Trk::TrackParameters* perigee(0);
-          if ((*i)->perigeeAtVertex() != 0) {
+          const Trk::TrackParameters* perigee(nullptr);
+          if ((*i)->perigeeAtVertex() != nullptr) {
             perigee = (*i)->perigeeAtVertex();
           } else {
             ATH_MSG_VERBOSE("Only initialPerigee is available");
             perigee = (*i)->initialPerigee();
           }
-          if (perigee == 0) {
+          if (perigee == nullptr) {
             ATH_MSG_ERROR("Neutrals are not supported. Skipping track in pT calculation...");
             continue;
           }
           total_pt_squared +=
-            std::pow(std::fabs(1. / perigee->parameters()[Trk::qOverP]) * sin(perigee->parameters()[Trk::theta]), 2);
+            std::pow(std::fabs(1. / perigee->parameters()[Trk::qOverP]) *
+                       sin(perigee->parameters()[Trk::theta]),2);
           total_num_tracks += 1;
         }
       }//finishing iterating on VxTrackAtVertex associated to **vtxIter xAOD::Vertex
 
       return total_pt_squared * std::sqrt((double) total_num_tracks);
-    } else if (m_selectiontype == 1) {//use NN
-      double pt_track1 = 0.;
-      double pt_track2 = 0.;
-      double pt_track3 = 0.;
-      double pt_sum_linear = 0.;
-      double pt_sum_quadratic = 0.;
-
-      int total_num_tracks = 0;
-      int prognumber = 0;
-
-      for (std::vector<Trk::VxTrackAtVertex*>::iterator i = begintracks; i != endtracks; i++) {
-        if (((*i)->vtxCompatibility() < m_finalCutMaxVertexChi2 && m_useFastCompatibility) ||
-            ((*i)->weight() > m_minweight
-             && (*i)->trackQuality().chiSquared() < m_finalCutMaxVertexChi2
-             && !m_useFastCompatibility)) {
-          const Trk::TrackParameters* perigee(0);
-          if ((*i)->perigeeAtVertex() != 0) {
-            perigee = (*i)->perigeeAtVertex();
-          } else {
-            ATH_MSG_VERBOSE("Only initialPerigee is available");
-            perigee = (*i)->initialPerigee();
-          }
-          if (perigee == 0) {
-            ATH_MSG_ERROR("Neutrals not supported. Skipping track in pT calculation...");
-            continue;
-          }
-          double actualpt(std::fabs(1. / perigee->parameters()[Trk::qOverP]) * sin(perigee->parameters()[Trk::theta]));
-          pt_sum_quadratic += std::pow(actualpt, 2);
-          pt_sum_linear += actualpt;
-          if (prognumber == 0) {
-            pt_track1 = actualpt;
-            prognumber += 1;
-          } else if (prognumber == 1) {
-            pt_track2 = actualpt;
-            prognumber += 1;
-          } else if (prognumber == 2) {
-            pt_track3 = actualpt;
-            prognumber += 1;
-          }
-          total_num_tracks += 1;
-        }
-      }
-      if (total_num_tracks == 0 || pt_track2 == 0 || pt_track3 == 0) {
-        return 0.;
-      } else {
-        return m_testingclass->value(0, pt_track1, pt_track2, pt_track3,
-                                     pt_sum_linear, pt_sum_quadratic,
-                                     total_num_tracks);
-      }
+    } if (m_selectiontype == 1) {//use NN
+      ATH_MSG_WARNING("Only Selection Type 0 supported for MT");
     }
     return 0;
   }
@@ -1041,13 +993,13 @@ namespace InDet
   }
 
   void
-  InDetAdaptiveMultiPriVxFinderTool::SGError(std::string errService) {
+  InDetAdaptiveMultiPriVxFinderTool::SGError(const std::string& errService) {
     ATH_MSG_FATAL(errService << " not found. Exiting !");
   }
 
   double
   InDetAdaptiveMultiPriVxFinderTool::estimateDeltaZ(const Trk::TrackParameters& myPerigee,
-                                                    const Amg::Vector3D& myTransvVertex) {
+                                                    const Amg::Vector3D& myTransvVertex) const {
     Amg::Vector3D lp = myTransvVertex;
 
     Amg::Vector3D expPoint;
@@ -1099,7 +1051,7 @@ namespace InDet
   }
 
   void
-  InDetAdaptiveMultiPriVxFinderTool::releaseCandidate(xAOD::Vertex*& candidate) {
+  InDetAdaptiveMultiPriVxFinderTool::releaseCandidate(xAOD::Vertex*& candidate) const {
     if (candidate == nullptr) return;
 
     // decorators
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
index e213911d5bed..a9bc696a97f5 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 /***************************************************************************
@@ -112,7 +112,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(const TrackCollection* trackTES) {
+  InDetAdaptivePriVxFinderTool::findVertex(
+    const TrackCollection* trackTES) const
+  {
     // TODO: change trkFilter to allow for this replacement
     /*
        xAOD::Vertex beamposition;
@@ -127,7 +129,7 @@ namespace InDet
     std::vector<const Trk::TrackParameters*> origParameters;
     origParameters.clear();
     for (TrackCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (static_cast<bool>(m_trkFilter->accept(**itr, &beamposition)) == false) continue;
+      if (!static_cast<bool>(m_trkFilter->accept(**itr, &beamposition))) continue;
       origParameters.push_back((*itr)->perigeeParameters());
     }
     if (msgLvl(MSG::DEBUG)) msg() << "Of " << trackTES->size() << " tracks " << origParameters.size() <<
@@ -142,7 +144,7 @@ namespace InDet
       std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::Track* correspondingTrack(0);
+        const Trk::Track* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (TrackCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end(); itr1++) {
           if (initialPerigee == (*itr1)->perigeeParameters()) {
@@ -152,7 +154,7 @@ namespace InDet
         }
 
         // validate the track link
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToTrack* link = new Trk::LinkToTrack;
           link->setStorableObject(*trackTES);
           link->setElement(correspondingTrack);
@@ -168,7 +170,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) {
+  InDetAdaptivePriVxFinderTool::findVertex(
+    const Trk::TrackParticleBaseCollection* trackTES) const
+  {
     // TODO: change trkFilter to allow for this replacement
     /*
        xAOD::Vertex beamposition;
@@ -188,7 +192,7 @@ namespace InDet
     // if (msgLvl(MSG::VERBOSE)) msg() << "TrackParticleBaseContainer @ " << trackTES << endmsg;
     // if (msgLvl(MSG::VERBOSE)) msg() << "Size of the container: " << size << endmsg;
     for (Trk::TrackParticleBaseCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (static_cast<bool> (m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition)) == false) continue;
+      if (!static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition))) continue;
       origParameters.push_back(&(*itr)->definingParameters());
       // std::cout << "originalPerigee at " << & ( *itr )->definingParameters() << std::endl;
     }
@@ -206,7 +210,7 @@ namespace InDet
       std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::TrackParticleBase* correspondingTrack(0);
+        const Trk::TrackParticleBase* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (Trk::TrackParticleBaseCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end();
              itr1++) {
@@ -218,7 +222,7 @@ namespace InDet
           }
         }
 
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToTrackParticleBase* link = new Trk::LinkToTrackParticleBase;
           link->setStorableObject(*trackTES);
           link->setElement(correspondingTrack);
@@ -235,7 +239,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) {
+  InDetAdaptivePriVxFinderTool::findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const
+  {
     ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackParticles->size());
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
 
@@ -251,7 +257,7 @@ namespace InDet
 
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
     for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
-      if (static_cast<bool>(m_trkFilter->accept(**itr, &beamposition)) == false) continue;
+      if (!static_cast<bool>(m_trkFilter->accept(**itr, &beamposition))) continue;
       origParameters.push_back(&(*itr)->perigeeParameters());
       ATH_MSG_DEBUG("originalPerigee at " << &(*itr)->perigeeParameters());
     }
@@ -270,7 +276,7 @@ namespace InDet
       //assigning the input tracks to the fitted vertices through VxTrackAtVertices
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const xAOD::TrackParticle* correspondingTrack(0);
+        const xAOD::TrackParticle* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (TrackParticleDataVecIter itr1 = trackParticles->begin(); itr1 != trackParticles->end(); ++itr1) {
           if (initialPerigee == &((*itr1)->perigeeParameters())) {
@@ -278,7 +284,7 @@ namespace InDet
             continue;
           }
         }
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToXAODTrackParticle* link = new Trk::LinkToXAODTrackParticle;
           link->setStorableObject(*trackParticles);
           link->setElement(correspondingTrack);
@@ -313,7 +319,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(std::vector<const Trk::TrackParameters*>& origParameters) {
+  InDetAdaptivePriVxFinderTool::findVertex(std::vector<const Trk::TrackParameters*>& origParameters) const{
     std::vector<Trk::VxTrackAtVertex>* trkAtVtx;
 
     double vertexPt = 0.;
@@ -321,10 +327,10 @@ namespace InDet
     xAOD::VertexAuxContainer* theVertexAuxContainer = new xAOD::VertexAuxContainer;
     theVertexContainer->setStore(theVertexAuxContainer);
 
-    xAOD::Vertex* myxAODVertex = 0;
+    xAOD::Vertex* myxAODVertex = nullptr;
 
     //---- Start of fitting section ------------------------------------------------------//
-    if (origParameters.size() >= 1) {
+    if (!origParameters.empty()) {
       SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
       xAOD::Vertex beamposition;
       beamposition.makePrivateStore();
@@ -337,7 +343,7 @@ namespace InDet
     } else if (msgLvl(MSG::DEBUG)) msg() << "Less than two tracks or fitting without constraint - drop candidate vertex." << endmsg;
     // end if preselection for first iteration
 
-    if (origParameters.size() >= 1) {
+    if (!origParameters.empty()) {
       /* Store the primary vertex */
       trkAtVtx = &(myxAODVertex->vxTrackAtVertex());
       // do a loop through the element links to tracks in myVxCandidate.vxTrackAtVertex[]
@@ -349,14 +355,14 @@ namespace InDet
         if (tmpTP) vertexPt += tmpTP->pT();
       }
     } else {
-      if (myxAODVertex != 0) {
+      if (myxAODVertex != nullptr) {
         delete myxAODVertex;
-        myxAODVertex = 0;
+        myxAODVertex = nullptr;
       }
     }
 
 
-    if (myxAODVertex != 0) {
+    if (myxAODVertex != nullptr) {
       theVertexContainer->push_back(myxAODVertex);
       if (msgLvl(MSG::DEBUG)) { /* Print info only if requested */
         double xVtxError = Amg::error(myxAODVertex->covariancePosition(), 0);
@@ -373,9 +379,9 @@ namespace InDet
 
     //---- add dummy vertex at the end ------------------------------------------------------//
     //---- if one or more vertices are already there: let dummy have same position as primary vertex
-    if (theVertexContainer->size() >= 1) {
+    if (!theVertexContainer->empty()) {
       xAOD::Vertex* primaryVtx = theVertexContainer->front();
-      if (primaryVtx->vxTrackAtVertex().size() > 0) {
+      if (!primaryVtx->vxTrackAtVertex().empty()) {
         primaryVtx->setVertexType(xAOD::VxType::PriVtx);
         xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
         theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
@@ -389,7 +395,7 @@ namespace InDet
       }
     }
     //---- if no vertex is there let dummy be at beam spot
-    else if (theVertexContainer->size() == 0) {
+    else if (theVertexContainer->empty()) {
       SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
       xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
       theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
@@ -421,8 +427,7 @@ namespace InDet
   }
 
   void
-  InDetAdaptivePriVxFinderTool::SGError(std::string errService) {
+  InDetAdaptivePriVxFinderTool::SGError(const std::string& errService) {
     msg(MSG::FATAL) << errService << " not found. Exiting !" << endmsg;
-    return;
-  }
+ }
 } // end namespace InDet
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index 3bc515a2bfde..c43e3a7b9387 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -100,7 +100,7 @@ InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool()
 
 StatusCode InDetIterativePriVxFinderTool::initialize()
 {
-    if (m_createSplitVertices==true && m_useBeamConstraint==true)
+    if (m_createSplitVertices && m_useBeamConstraint)
     {
       ATH_MSG_FATAL(" Split vertices cannot be obtained if beam spot constraint is true! Change settings...");
       return StatusCode::FAILURE;
@@ -158,7 +158,7 @@ StatusCode InDetIterativePriVxFinderTool::initialize()
 
 
 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> 
-InDetIterativePriVxFinderTool::findVertex(const TrackCollection* trackTES) 
+InDetIterativePriVxFinderTool::findVertex(const TrackCollection* trackTES) const
 {
 
   ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackTES->size());
@@ -202,10 +202,11 @@ InDetIterativePriVxFinderTool::findVertex(const TrackCollection* trackTES)
   return returnContainers;
 }
 
+std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+InDetIterativePriVxFinderTool::findVertex(
+  const Trk::TrackParticleBaseCollection* trackTES) const
+{
 
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> 
-InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) {
- 
   ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackTES->size());
 
   SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
@@ -243,57 +244,64 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
     return returnContainers;
 }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetIterativePriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) {
-    ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackParticles->size());
-
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const InDet::BeamSpotData* beamSpot = *beamSpotHandle;
-
-    std::vector<Trk::ITrackLink*> selectedTracks;
+std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+InDetIterativePriVxFinderTool::findVertex(
+  const xAOD::TrackParticleContainer* trackParticles) const
+{
+  ATH_MSG_DEBUG(" Number of input tracks before track selection: "
+                << trackParticles->size());
 
-    typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
+  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey };
+  const InDet::BeamSpotData* beamSpot = *beamSpotHandle;
 
-    bool selectionPassed;
-    for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
+  std::vector<Trk::ITrackLink*> selectedTracks;
 
-      if (m_useBeamConstraint && beamSpot != nullptr) 
-      {
-        xAOD::Vertex beamPosition;
-        beamPosition.makePrivateStore();
-        beamPosition.setPosition( beamSpot->beamVtx().position());
-        beamPosition.setCovariancePosition( beamSpot->beamVtx().covariancePosition() );
-        selectionPassed=static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
-      }
-      else
-      {
+  typedef DataVector<xAOD::TrackParticle>::const_iterator
+    TrackParticleDataVecIter;
 
-        xAOD::Vertex null;
-        null.makePrivateStore();
-        null.setPosition(Amg::Vector3D(0, 0, 0));
-        AmgSymMatrix(3) vertexError;
-        vertexError.setZero();
-        null.setCovariancePosition(vertexError);
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
-      }
-
-      if (selectionPassed) {
-        ElementLink<xAOD::TrackParticleContainer> link;
-        link.setElement(*itr);
-        Trk::LinkToXAODTrackParticle* linkTT = new Trk::LinkToXAODTrackParticle(link);
-        linkTT->setStorableObject(*trackParticles);
-        selectedTracks.push_back(linkTT);
-      }
+  bool selectionPassed;
+  for (TrackParticleDataVecIter itr = trackParticles->begin();
+       itr != trackParticles->end();
+       ++itr) {
+
+    if (m_useBeamConstraint && beamSpot != nullptr) {
+      xAOD::Vertex beamPosition;
+      beamPosition.makePrivateStore();
+      beamPosition.setPosition(beamSpot->beamVtx().position());
+      beamPosition.setCovariancePosition(
+        beamSpot->beamVtx().covariancePosition());
+      selectionPassed =
+        static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
+    } else {
+
+      xAOD::Vertex null;
+      null.makePrivateStore();
+      null.setPosition(Amg::Vector3D(0, 0, 0));
+      AmgSymMatrix(3) vertexError;
+      vertexError.setZero();
+      null.setCovariancePosition(vertexError);
+      selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
     }
 
-    ATH_MSG_DEBUG(
-      "Of " << trackParticles->size() << " tracks " << selectedTracks.size() << " survived the preselection.");
+    if (selectionPassed) {
+      ElementLink<xAOD::TrackParticleContainer> link;
+      link.setElement(*itr);
+      Trk::LinkToXAODTrackParticle* linkTT =
+        new Trk::LinkToXAODTrackParticle(link);
+      linkTT->setStorableObject(*trackParticles);
+      selectedTracks.push_back(linkTT);
+    }
+  }
 
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers=findVertex(selectedTracks);
+  ATH_MSG_DEBUG("Of " << trackParticles->size() << " tracks "
+                      << selectedTracks.size()
+                      << " survived the preselection.");
 
-    return returnContainers;
-  }
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+    returnContainers = findVertex(selectedTracks);
 
+  return returnContainers;
+}
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> 
   InDetIterativePriVxFinderTool::findVertex(const std::vector<Trk::ITrackLink*> & trackVector) const
@@ -485,7 +493,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         }
       }
 
-      if (perigeesToFit.size() == 0) {
+      if (perigeesToFit.empty()) {
         if (msgLvl(MSG::DEBUG)) {
           msg(MSG::DEBUG) << " No good seed found. Exiting search for vertices..." << endmsg;
         }
@@ -499,10 +507,10 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
       //to reassign vertices you look ino what is already in myVxCandidate
       //you do it only ONCE!
 
-      xAOD::Vertex* myxAODVertex = 0;
-      xAOD::Vertex* myxAODSplitVertex = 0;
+      xAOD::Vertex* myxAODVertex = nullptr;
+      xAOD::Vertex* myxAODSplitVertex = nullptr;
 
-      if (m_useBeamConstraint && perigeesToFit.size() > 0) {
+      if (m_useBeamConstraint && !perigeesToFit.empty()) {
         myxAODVertex = m_iVertexFitter->fit(perigeesToFit, theconstraint);
       } else if (!m_useBeamConstraint && perigeesToFit.size() > 1) {
         myxAODVertex = m_iVertexFitter->fit(perigeesToFit);
@@ -520,7 +528,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
       countTracksAndNdf(myxAODSplitVertex, ndfSplitVertex, ntracksSplitVertex);
 
       bool goodVertex =
-        myxAODVertex != 0 &&
+        myxAODVertex != nullptr &&
         ((!m_useBeamConstraint && ndf > 0 && ntracks >= 2) ||
          (m_useBeamConstraint && ndf > 3 && ntracks >= 2));
 
@@ -576,7 +584,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
               const Trk::TrackParameters* trackPerigee = (*tracksIter).initialPerigee();
 
-              if (trackPerigee == 0) {
+              if (trackPerigee == nullptr) {
                 msg(MSG::ERROR) << " Cast to perigee gives 0 pointer " << endmsg;
               }
 
@@ -653,9 +661,9 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
           if (numberOfAddedTracks > 0) {
             delete myxAODVertex;
-            myxAODVertex = 0;
+            myxAODVertex = nullptr;
 
-            if (m_useBeamConstraint && perigeesToFit.size() > 0) {
+            if (m_useBeamConstraint && !perigeesToFit.empty()) {
               myxAODVertex = m_iVertexFitter->fit(perigeesToFit, theconstraint);
             } else if (!m_useBeamConstraint && perigeesToFit.size() > 1) {
               myxAODVertex = m_iVertexFitter->fit(perigeesToFit);
@@ -666,7 +674,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
             countTracksAndNdf(myxAODVertex, ndf, ntracks);
 
             goodVertex =
-              myxAODVertex != 0 &&
+              myxAODVertex != nullptr &&
               ((!m_useBeamConstraint && ndf > 0 && ntracks >= 2) ||
                (m_useBeamConstraint && ndf > 3 && ntracks >= 2));
 
@@ -714,7 +722,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
       if (m_createSplitVertices) {
         goodSplitVertex =
-          myxAODSplitVertex != 0 &&
+          myxAODSplitVertex != nullptr &&
           ndfSplitVertex > 0 && ntracksSplitVertex >= 2;
 
 
@@ -753,7 +761,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         } else {
           if (myxAODVertex) {
             delete myxAODVertex;
-            myxAODVertex = 0;
+            myxAODVertex = nullptr;
           }
         }
       } else {
@@ -764,7 +772,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         } else {
           if (myxAODVertex) {
             delete myxAODVertex;
-            myxAODVertex = 0;
+            myxAODVertex = nullptr;
           }
 
           xAOD::Vertex * dummyxAODVertex = new xAOD::Vertex;
@@ -781,7 +789,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         } else {
           if (myxAODSplitVertex) {
             delete myxAODSplitVertex;
-            myxAODSplitVertex = 0;
+            myxAODSplitVertex = nullptr;
           }
 
           xAOD::Vertex * dummyxAODVertex = new xAOD::Vertex;
@@ -803,9 +811,9 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
     //---- add dummy vertex at the end ------------------------------------------------------//
     //---- if one or more vertices are already there: let dummy have same position as primary vertex
     if (!m_createSplitVertices) {
-      if (theVertexContainer->size() >= 1) {
+      if (!theVertexContainer->empty()) {
         xAOD::Vertex* primaryVtx = theVertexContainer->front();
-        if (primaryVtx->vxTrackAtVertex().size() > 0) {
+        if (!primaryVtx->vxTrackAtVertex().empty()) {
           primaryVtx->setVertexType((xAOD::VxType::VertexType) Trk::PriVtx);
           xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
           theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use
@@ -820,7 +828,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
       }
       //---- if no vertex is there let dummy be at beam spot
 
-      else if ( theVertexContainer->size() == 0 )
+      else if ( theVertexContainer->empty() )
       {
         xAOD::Vertex * dummyxAODVertex = new xAOD::Vertex;
         theVertexContainer->push_back( dummyxAODVertex ); // have to add vertex to container here first so it can use its aux store
@@ -927,10 +935,9 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
   }
 
   void
-  InDetIterativePriVxFinderTool::SGError(std::string errService) {
+  InDetIterativePriVxFinderTool::SGError(const std::string& errService) {
     msg(MSG::FATAL) << errService << " not found. Exiting !" << endmsg;
-    return;
-  }
+ }
 
   double
   InDetIterativePriVxFinderTool::compatibility(const Trk::TrackParameters& measPerigee,
@@ -951,7 +958,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
     double returnValue = trackParameters2D.dot(weightReduced * trackParameters2D);
 
     delete myLinearizedTrack;
-    myLinearizedTrack = 0;
+    myLinearizedTrack = nullptr;
 
     return returnValue;
   }
@@ -1104,7 +1111,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
       const Trk::TrackParameters* myPerigee = (*perigeesToFitIter);
 
-      if (myPerigee == 0) {
+      if (myPerigee == nullptr) {
         msg(MSG::ERROR) << " Cast to perigee gives 0 pointer " << endmsg;
       }
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
index 9c7b1272ae2c..33a251497ded 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 /***************************************************************************
@@ -97,7 +97,7 @@ namespace InDet
   StatusCode
   InDetMultiPriVxFinderTool::initialize() {
     
-    if (m_createSplitVertices == true && m_useBeamConstraint == true) {
+    if (m_createSplitVertices && m_useBeamConstraint) {
       msg(MSG::FATAL) << " Split vertices cannot be obtained if beam spot constraint is true! Change settings..." <<
       endmsg;
       return StatusCode::FAILURE;
@@ -137,7 +137,8 @@ namespace InDet
 
 //Find vertex from TrackCollection
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetMultiPriVxFinderTool::findVertex(const TrackCollection* trackTES) {
+  InDetMultiPriVxFinderTool::findVertex(const TrackCollection* trackTES) const
+  {
     if (msgLvl(MSG::DEBUG)) msg() << " Number of input tracks before track selection: " << trackTES->size() << endmsg;
 
     std::vector<Trk::ITrackLink*> selectedTracks;
@@ -182,7 +183,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetMultiPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) {
+  InDetMultiPriVxFinderTool::findVertex(
+    const Trk::TrackParticleBaseCollection* trackTES) const
+  {
     if (msgLvl(MSG::DEBUG)) msg() << " Number of input tracks before track selection: " << trackTES->size() << endmsg;
 
     std::vector<Trk::ITrackLink*> selectedTracks;
@@ -228,7 +231,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetMultiPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) {
+  InDetMultiPriVxFinderTool::findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const
+  {
     ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackParticles->size());
 
     std::vector<Trk::ITrackLink*> selectedTracks;
@@ -274,7 +279,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetMultiPriVxFinderTool::findVertex(const std::vector<Trk::ITrackLink*>& trackVector) const {
+  InDetMultiPriVxFinderTool::findVertex(
+    const std::vector<Trk::ITrackLink*>& trackVector) const
+  {
     //copy the input vector.  will drop used tracks from here as they are added to vertices
     // then what is left is used to then delete all unused ITrackLink objects at the end.
     std::vector<Trk::ITrackLink*> seedTracks = trackVector;
@@ -380,7 +387,7 @@ namespace InDet
           //add to list of tracks for new vertex if the new vertex already has a track.
           //then erase from this collection in case another track gets moved here we don't want to have the same track
           // in 2 places
-          if (closestSeedIndex != seedVertices.size() && tracksToFitCollection[closestSeedIndex].size() > 0) {
+          if (closestSeedIndex != seedVertices.size() && !tracksToFitCollection[closestSeedIndex].empty()) {
             tracksToFitCollection[closestSeedIndex].push_back(tracksToFitCollection[i][0]);
             tracksToFitCollection[i].clear();
           } //if didn't find another one to attach to, just leave it there.  if nothing else gets added here will be
@@ -413,7 +420,7 @@ namespace InDet
       }
 
 
-      xAOD::Vertex* myxAODVertex = 0;
+      xAOD::Vertex* myxAODVertex = nullptr;
       if (m_useBeamConstraint) {
         myxAODVertex = m_iVertexFitter->fit(perigeesToFit, theconstraint);
       } else {
@@ -426,7 +433,7 @@ namespace InDet
       countTracksAndNdf(myxAODVertex, ndf, ntracks);
 
       bool goodVertex =
-        myxAODVertex != 0 &&
+        myxAODVertex != nullptr &&
         ((!m_useBeamConstraint && ndf > 0 && ntracks >= 2) ||
          (m_useBeamConstraint && ndf > 3 && ntracks >= 2));
 
@@ -477,7 +484,7 @@ namespace InDet
       } else {
         if (myxAODVertex) {
           delete myxAODVertex;
-          myxAODVertex = 0;
+          myxAODVertex = nullptr;
         }
       }
 
@@ -505,9 +512,9 @@ namespace InDet
     }
 
     //This bit was done in iterative finder -- not sure why but will copy it here too
-    if (theVertexContainer->size() >= 1) {
+    if (!theVertexContainer->empty()) {
       xAOD::Vertex* primaryVtx = theVertexContainer->front();
-      if (primaryVtx->vxTrackAtVertex().size() > 0) {
+      if (!primaryVtx->vxTrackAtVertex().empty()) {
         primaryVtx->setVertexType((xAOD::VxType::VertexType) Trk::PriVtx);
         xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
         theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
@@ -519,7 +526,7 @@ namespace InDet
       } else {
         primaryVtx->setVertexType(xAOD::VxType::NoVtx);
       }
-    } else if (theVertexContainer->size() == 0) {  //---- if no vertex is there let dummy be at beam spot
+    } else if (theVertexContainer->empty()) {  //---- if no vertex is there let dummy be at beam spot
       xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
       theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
                                                       // aux store
@@ -585,10 +592,9 @@ namespace InDet
   }
 
   void
-  InDetMultiPriVxFinderTool::SGError(std::string errService) {
+  InDetMultiPriVxFinderTool::SGError(const std::string& errService) {
     msg(MSG::FATAL) << errService << " not found. Exiting !" << endmsg;
-    return;
-  }
+ }
 
   void
   InDetMultiPriVxFinderTool::countTracksAndNdf(xAOD::Vertex* myxAODVertex,
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
index 09f3cec9fe90..96c0e469c988 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
@@ -99,7 +99,7 @@ namespace InDet
   StatusCode
   InDetPriVxFinderTool::initialize() {
     //check if the split was requested and it is still possible to make it
-    if (m_createSplitVertices == true && m_useBeamConstraint == true) {
+    if (m_createSplitVertices && m_useBeamConstraint) {
       ATH_MSG_FATAL(" Split vertices cannot be obtained if beam spot constraint is true! Change settings..." );
       return StatusCode::FAILURE;
     }
@@ -118,7 +118,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetPriVxFinderTool::findVertex(const TrackCollection* trackTES) {
+  InDetPriVxFinderTool::findVertex(const TrackCollection* trackTES) const {
     //    std::cout<<" find vertex called "<<std::endl;
 
     // TODO: change trkFilter to allow for this replacement
@@ -209,7 +209,7 @@ namespace InDet
       std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::Track* correspondingTrack(0);
+        const Trk::Track* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (TrackCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end(); itr1++) {
           if (initialPerigee == (*itr1)->perigeeParameters()) {
@@ -219,7 +219,7 @@ namespace InDet
         }
 
         // validate the track link
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToTrack* link = new Trk::LinkToTrack;
           link->setStorableObject(*trackTES);
           link->setElement(correspondingTrack);
@@ -235,7 +235,7 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) {
+  InDetPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) const {
     //    std::cout<<"Calling find vertex from trackparticles "<<std::endl;
 
     // TODO: change trkFilter to allow for this replacement
@@ -285,7 +285,7 @@ namespace InDet
           --rem_size;
         }//end of loop over all the pre-selected tracks
 
-        if (right_seed.size() && left_seed.size()) {
+        if (!right_seed.empty() && !left_seed.empty()) {
           seedsVector.push_back(right_seed);
           seedsVector.push_back(left_seed);
 
@@ -330,7 +330,7 @@ namespace InDet
       std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::TrackParticleBase* correspondingTrack(0);
+        const Trk::TrackParticleBase* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (Trk::TrackParticleBaseCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end();
         itr1++) {
@@ -342,12 +342,15 @@ namespace InDet
           }
         }
 
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToTrackParticleBase* link = new Trk::LinkToTrackParticleBase;
           link->setStorableObject(*trackTES);
           link->setElement(correspondingTrack);
           (*itr).setOrigTrack(link);
-        } else if (msgLvl(MSG::WARNING)) msg() << "No corresponding track found for this initial perigee! Vertex will have no link to the track." << endmsg;
+        } else if (msgLvl(MSG::WARNING))
+          msg() << "No corresponding track found for this initial perigee! "
+                   "Vertex will have no link to the track."
+                << endmsg;
         // TODO: also mention that links stored directly in xAOD::Vertices are not set because a
         // TrackParticleBaseCollection was given as input
       }
@@ -358,7 +361,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) {
+  InDetPriVxFinderTool::findVertex(
+    const xAOD::TrackParticleContainer* trackParticles) const
+  {
     ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackParticles->size());
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
     
@@ -425,7 +430,7 @@ namespace InDet
       //assigning the input tracks to the fitted vertices through VxTrackAtVertices
       for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
         const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const xAOD::TrackParticle* correspondingTrack(0);
+        const xAOD::TrackParticle* correspondingTrack(nullptr);
         // find the track to that perigee ...
         for (TrackParticleDataVecIter itr1 = trackParticles->begin(); itr1 != trackParticles->end(); ++itr1) {
           if (initialPerigee == &(*itr1)->perigeeParameters()) {
@@ -434,7 +439,7 @@ namespace InDet
           }
         }
         // validate the track link
-        if (correspondingTrack != 0) {
+        if (correspondingTrack != nullptr) {
           Trk::LinkToXAODTrackParticle* link = new Trk::LinkToXAODTrackParticle;
           link->setStorableObject(*trackParticles);
           link->setElement(correspondingTrack);
@@ -469,7 +474,9 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetPriVxFinderTool::findVertex(std::vector< std::vector<const Trk::TrackParameters*> >& zTrackColl) {
+  InDetPriVxFinderTool::findVertex(
+    std::vector<std::vector<const Trk::TrackParameters*>>& zTrackColl) const
+  {
     //---- Constraint vertex section: if enabled in jobOptions a constraint is assigned --//
     Amg::Vector3D vertex = Amg::Vector3D(0., 0., 0.); //for fit() we need Amg::Vector3D or Trk::RecVertex
     std::vector<Trk::VxTrackAtVertex>* trkAtVtx = nullptr;
@@ -483,12 +490,12 @@ namespace InDet
     std::map<double, xAOD::Vertex*> vertexMap;
     std::vector<xAOD::Vertex*> splitVtxVector;
     double vertexPt;
-    xAOD::Vertex* myxAODVertex = 0;
+    xAOD::Vertex* myxAODVertex = nullptr;
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
     for (unsigned int i = 0; i < zTrackColl.size(); i++) {
       // std::cout<<"Inside the loop"<<std::endl;
       if (msgLvl(MSG::DEBUG)) msg() << "Fitting vertex of Z-Cluster " << i << " with " << zTrackColl[i].size() << " Tracks" << endmsg;
-      myxAODVertex = 0;
+      myxAODVertex = nullptr;
       std::vector<const Trk::TrackParameters*> origParameters;
       origParameters.clear();
       origParameters = zTrackColl[i];
@@ -553,7 +560,7 @@ namespace InDet
             // delete old xAOD::Vertex first
             if (myxAODVertex) {
               delete myxAODVertex;
-              myxAODVertex = 0;
+              myxAODVertex = nullptr;
             }
             if (msgLvl(MSG::VERBOSE)) msg() << "Second call of fitting tool!" << endmsg;
             if (m_useBeamConstraint) {
@@ -586,7 +593,7 @@ namespace InDet
 
               // delete old xAOD::Vertex first
               delete myxAODVertex;
-              myxAODVertex = 0;
+              myxAODVertex = nullptr;
 
 
               if (msgLvl(MSG::VERBOSE)) msg() << "Second call of fitting tool!" << endmsg;
@@ -644,7 +651,7 @@ namespace InDet
         }//end of successful reconstruction check
       } else if (myxAODVertex) {
         delete myxAODVertex;
-        myxAODVertex = 0;
+        myxAODVertex = nullptr;
       }
     }//end of loop over the pre-defined seeds
     //no sorting for the split vertices  -otherwise, why splitting at all?
@@ -668,7 +675,7 @@ namespace InDet
         theVertexContainer->push_back(*l_vt);
     //---- add dummy vertex at the end ------------------------------------------------------//
     //---- if one or more vertices are already there: let dummy have same position as primary vertex
-    if (theVertexContainer->size() >= 1 && !m_createSplitVertices) {
+    if (!theVertexContainer->empty() && !m_createSplitVertices) {
       xAOD::Vertex* primaryVtx = theVertexContainer->front();
       primaryVtx->setVertexType(xAOD::VxType::PriVtx);
       xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
@@ -689,7 +696,7 @@ namespace InDet
       dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
     }
     //---- if no vertex is there let dummy be at beam spot
-    else if (theVertexContainer->size() == 0) {
+    else if (theVertexContainer->empty()) {
       // std::cout<<"Zero size vx container! "<<std::endl;
       xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
       theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
@@ -716,7 +723,7 @@ namespace InDet
       }
     }
     return std::make_pair(theVertexContainer, theVertexAuxContainer);
-  }//end m_find vertex ethod
+  } // end m_find vertex ethod
 
   StatusCode
   InDetPriVxFinderTool::finalize() {
@@ -724,7 +731,9 @@ namespace InDet
   }
 
   void
-  InDetPriVxFinderTool::sortTracksInChi2(std::vector<int>& indexOfSortedChi2, xAOD::Vertex* myxAODVertex) {
+  InDetPriVxFinderTool::sortTracksInChi2(std::vector<int>& indexOfSortedChi2,
+                                         xAOD::Vertex* myxAODVertex) const
+  {
     // we need an index vector here which tells us the right order from smallest to
     // largest of the chi2PerTrack vector
     // then loop over the index vector and replace all iRP with iRP = index[i]
@@ -753,10 +762,13 @@ namespace InDet
       indexOfSortedChi2.push_back((*mItr).second);
     }
     // std::cout<<"Sorting performed "<<std::endl;
-  }//end of sort method
+  } // end of sort method
 
   void
-  InDetPriVxFinderTool::sortTracksInZ0(std::vector<const Trk::TrackParameters*> tv, std::vector<int>& indexOfSortedZ0) {
+  InDetPriVxFinderTool::sortTracksInZ0(
+    std::vector<const Trk::TrackParameters*> tv,
+    std::vector<int>& indexOfSortedZ0) const
+  {
     // we need an index vector here which tells us the right order from smallest to
     // largest of the z0 vector
     // then loop over the index vector and replace all iRP with iRP = index[i]
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
index 1749d2fb603c..c24ab18d84d7 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,66 +7,105 @@
                              -------------------
     begin   : 14-02-2006
     authors : Andreas Wildauer (CERN PH-ATC)
-            : Giacinto Piacquadio (Freiburg University), Kirill Prokofiev (Sheffield University)
-    email   : andreas.wildauer@cern.ch
+            : Giacinto Piacquadio (Freiburg University), Kirill Prokofiev
+ (Sheffield University) email   : andreas.wildauer@cern.ch
               giacinto.piacquadio@physik.uni-freiburg.de
     changes : David Shope <david.richard.shope@cern.ch> (2016-04-26)
 
                 EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
 
                 findVertex will now always return an xAOD::VertexContainer,
-                even when using a TrackCollection or a TrackParticleBaseCollection
-                as input.
+                even when using a TrackCollection or a
+ TrackParticleBaseCollection as input.
 
+            : Christos Anastopoulos Athena MT
  ***************************************************************************/
 
-
-#ifndef InDetRecToolInterfaces_IVertexFinder_H
-#define InDetRecToolInterfaces_IVertexFinder_H
-#include "GaudiKernel/AlgTool.h"
-#include "TrkTrack/TrackCollection.h" // it is a typedef
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
-
 /** Vertex Finder Tool.
 
-    Abstract class which provides the possibility to implement more than one 
+    Abstract class which provides the possibility to implement more than one
     vertex finder tool (every vertex finder tool inherits from this class).
 
-    It was implemented to create a new primary vertex finding algorithm, 
+    It was implemented to create a new primary vertex finding algorithm,
     different from the one already used by InDetPriVxFinderTool (by AW and FK),
     the InDetAdaptivePriVxFinderTool...
-
 */
 
-//xAOD includes
-#include "xAODTracking/VertexFwd.h"
+#ifndef InDetRecToolInterfaces_IVertexFinder_H
+#define InDetRecToolInterfaces_IVertexFinder_H
+#include "GaudiKernel/AlgTool.h"
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkTrack/TrackCollection.h"
+
+// xAOD includes
+#include "xAODTracking/TrackParticleAuxContainer.h"
+#include "xAODTracking/TrackParticleContainerFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
-#include "xAODTracking/VertexContainerFwd.h"
 #include "xAODTracking/VertexAuxContainer.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
-#include "xAODTracking/TrackParticleAuxContainer.h"
+#include "xAODTracking/VertexContainerFwd.h"
+#include "xAODTracking/VertexFwd.h"
 
-namespace InDet
-{
+namespace InDet {
 static const InterfaceID IID_IVertexFinder("IVertexFinder", 1, 0);
 class IVertexFinder : virtual public IAlgTool
-  {
+{
 public:
-    virtual ~IVertexFinder() {};
-    static const InterfaceID& interfaceID()
-    {
-        return IID_IVertexFinder;
-    }
-    
-    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES)=0;
-
-    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES)=0;
-
-    /** Find vertex from xAOD::TrackParticleContainer.
-     * @param trackParticles input track container
-     * @return a pair of newly created container and auxiliary store
-     */
-    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles) = 0;
-  };
+  virtual ~IVertexFinder(){};
+  static const InterfaceID& interfaceID() { return IID_IVertexFinder; }
+
+  /*
+   * For MT we have 2 sets , one with EventContext and one without
+   * Implementation really need to overload only one
+   * The clients can call either
+   */
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const EventContext& ctx, const TrackCollection* trackTES) const
+  {
+
+    (void)(ctx); // We do not use ctx
+    return findVertex(trackTES);
+  }
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const EventContext& ctx,
+             const Trk::TrackParticleBaseCollection* trackTES) const
+  {
+    (void)(ctx); // We do not use ctx
+    return findVertex(trackTES);
+  }
+
+  /** Find vertex from xAOD::TrackParticleContainer.
+   * @param EventContext
+   * @param trackParticles input track container
+   * @return a pair of newly created container and auxiliary store
+   */
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const EventContext& ctx,
+             const xAOD::TrackParticleContainer* trackParticles) const
+  {
+    (void)(ctx); // We do not use ctx
+    return findVertex(trackParticles);
+  }
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const TrackCollection* trackTES) const
+  {
+    return findVertex(Gaudi::Hive::currentContext(), trackTES);
+  }
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const
+  {
+    return findVertex(Gaudi::Hive::currentContext(), trackTES);
+  }
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const xAOD::TrackParticleContainer* trackParticles) const
+  {
+    return findVertex(Gaudi::Hive::currentContext(), trackParticles);
+  }
+};
 }
 #endif
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt
index 2eacc5281dd8..9e7a0112d127 100644
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt
@@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/TrkParticleBase
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkVertexFitter/TrkVKalVrtFitter
+                          Control/CxxUtils
                           PRIVATE
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkTrackLink
@@ -31,7 +32,9 @@ atlas_add_component( InDetVKalPriVxFinderTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces TrkParameters TrkParticleBase TrkTrack TrkVKalVrtFitterLib TrkEventPrimitives TrkTrackSummary VxVertex TrkToolInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces 
+                     TrkParameters TrkParticleBase TrkTrack TrkVKalVrtFitterLib CxxUtils TrkEventPrimitives TrkTrackSummary 
+                     VxVertex TrkToolInterfaces )
 
 # Install files from the package:
 atlas_install_headers( InDetVKalPriVxFinderTool )
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
index 8dc9f90b4579..5447fee83ac7 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
@@ -1,28 +1,23 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /*******************************************************
    InDetVKalPriVxFinderTool.h - description
 
- A tool to find primary vertex with or without pileup, with or without beam constraint.
- It works with TrackCollection of TrackParticleBaseCollection.
- Beam position if needed is provided via BeamCond service or
- jobOptions. 
- 
-   Tool used VKalVrt vertex fitter (TrkVKalVrtFitter tool).
- 
-   By default primary vertex finder user robust functional Rob=5 (see VKalVrt 
- descrption for details) which provides optimal pulls.
+  A tool to find primary vertex with or without pileup, with or without beam
+  constraint. It works with TrackCollection of TrackParticleBaseCollection. Beam
+  position if needed is provided via BeamCond service or jobOptions.
 
-  Author: Vadim Kostyukhin
-  e-mail: vadim.kostyukhin@cern.ch
+  Tool used VKalVrt vertex fitter (TrkVKalVrtFitter tool).
 
+  By default primary vertex finder user robust functional Rob=5 (see VKalVrt
+  descrption for details) which provides optimal pulls.
 
+  Author: Vadim Kostyukhin
+  e-mail: vadim.kostyukhin@cern.ch
 ********************************************************/
 
-
-
 #ifndef _VKalVrt_InDetVKalPriVxFinderTool_H
 #define _VKalVrt_InDetVKalPriVxFinderTool_H
 // Normal STL and physical vectors
@@ -30,205 +25,272 @@
 #include "TrkToolInterfaces/ITrackSummaryTool.h"
 
 // Gaudi includes
-#include  "TrkTrack/TrackCollection.h"
-#include  "TrkParameters/TrackParameters.h"
-#include  "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkParameters/TrackParameters.h"
+#include "TrkParticleBase/TrackParticleBaseCollection.h"
+#include "TrkTrack/TrackCollection.h"
 
 // Gaudi includes
-#include  "AthenaBaseComps/AthAlgTool.h"
-#include  "GaudiKernel/ToolHandle.h"
-#include  "GaudiKernel/ServiceHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
 //
-#include  "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
-#include  "InDetRecToolInterfaces/IVertexFinder.h"
-#include  "xAODTracking/VertexContainerFwd.h"
-#include  "xAODTracking/VertexAuxContainer.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
+#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
+#include "xAODTracking/VertexAuxContainer.h"
+#include "xAODTracking/VertexContainerFwd.h"
 //
+#include <utility> //for std::pair
 #include <vector>
-#include <utility>//for std::pair
 
 #include "BeamSpotConditionsData/BeamSpotData.h"
 
+#include "CxxUtils/checker_macros.h"
 
 namespace Trk {
-  class TrackParticle;
+class TrackParticle;
 }
 
 namespace InDet {
 
-        
-  class InDetVKalPriVxFinderTool : public AthAlgTool, virtual public IVertexFinder
+class InDetVKalPriVxFinderTool
+  : public AthAlgTool
+  , virtual public IVertexFinder
 {
-  public:
-
-   InDetVKalPriVxFinderTool(const std::string& t, const std::string& n, const IInterface*  p);
-   virtual ~InDetVKalPriVxFinderTool();
-   StatusCode initialize();
-   StatusCode finalize();
-//
-//    Tool interface
-//
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackTES);  
-//
-				
-
-  private:
-
-
-/*  JobOption tunable parameters */
-
-// Beam position
-      double   m_BeamPositionX;
-      double   m_BeamPositionY;
-      long int m_BeamConstraint;
-      long int m_TypeRobust;
-      double m_RobustScale;
-
-// Track selection
-      long int m_CutSctHits;
-      long int m_CutPixelHits;
-      long int m_CutSiHits;
-      long int m_CutBLayHits;
-      long int m_CutSharedHits;
-      double m_CutPt;
-      double m_CutZVrt;
-      double m_CutA0;
-      double m_CutChi2;
-      double m_A0TrkErrorCut;
-      double m_ZTrkErrorCut;
-// Cuts for track - initial vertex association 
-      double m_RImpSelCut;
-      double m_ZImpSelCut;
-      double m_RDistSelCut;
-      double m_ZDistSelCut;
-      double m_SignifSelCut;
-// Stop point for the common fit
-      double m_SecTrkChi2Cut;
-      double m_WeightCut;
-// Maximal number of vertices
-      long int m_NPVertexMax;
-
-
-   PublicToolHandle< Trk::ITrkVKalVrtFitter > m_fitSvc
-      {this,"TrkVKalVrtFitter","Trk::TrkVKalVrtFitter",""};
-   PublicToolHandle< Trk::ITrackSummaryTool > m_sumSvc
-      {this,"TrackSummaryTool","Trk::TrackSummaryTool/AtlasTrackSummaryTool",""}; //!< Pointer to the track summary tool
-   SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-   PublicToolHandle<Trk::ITrackSelectorTool>  m_trkSelector
-      {this,"DefaultTrackSelection","DefaultTrackSelection",""};
-
-   Amg::Vector3D m_BeamCnst;
-   std::vector<double> m_BeamCnstWid;
-//
-   int m_SummaryToolExist;
-   int m_trkSelectorExist;
-//
-// To simplify life....
-   StatusCode         m_sc;
-   TLorentzVector   m_Momentum;
-   long int           m_Charge;
-//----------------------------------------------------------------------------------------------
-//  Private functions
-//
-   void   CleanTrkSet(std::vector<const Trk::TrackParticleBase*>& ,std::vector<const Trk::Track*>&,
-                      Amg::Vector3D &FitVertex, std::vector<double> &Chi2PerTrk,
-                      std::vector<const Trk::TrackParticleBase*>& ,std::vector<const Trk::Track*>&);
-   int    FindMax( std::vector<double>& );
-   int    FindMin( std::vector<double>& );
-   int    FindMaxSecond( std::vector<double>& );
-   const Trk::Perigee* GetPerigee( const Trk::TrackParticleBase* List); 
-   const Trk::Perigee* GetPerigee( const Trk::Track* List); 
-   void   RemoveEntryInList(std::vector<const Trk::Track*>& ListTracks, int );
-   void   RemoveEntryInList(std::vector<const Trk::TrackParticleBase*>& ListTracks, int );
-   void   RemoveEntryInList(std::vector<double>& List, int Outlier);
-   double GetLimitAngle(double);
-   void UniqList(std::vector<const Trk::Track*> & List);
-   void UniqList(std::vector<const Trk::TrackParticleBase*> & List);
-   void RemoveUsedEntry(std::vector<const Trk::Track*>& ,std::vector<const Trk::Track*>& , std::vector<double> &); 
-   void RemoveUsedEntry(std::vector<const Trk::TrackParticleBase*>& ,
-                         std::vector<const Trk::TrackParticleBase*>&, std::vector<double> & );
-
-   void inpSelector(std::vector<const Trk::TrackParticleBase*>   & ListParticles,
-                    std::vector<const Trk::Track*>               & ListTracks,
-	            Amg::Vector3D                                   & IniVertex,
-                    std::vector<const Trk::TrackParticleBase*>   & SelectedParticles,
-                    std::vector<const Trk::Track*>               & SelectedTracks);
-
-   double FitCommonVrt(std::vector<const Trk::TrackParticleBase*>& ListP,
-                       std::vector<const Trk::Track*>& ListT,
-		       double ZEstimation,
-	               Amg::Vector3D           & FitVertex,
-                       std::vector<double>  & ErrorMatrix,
-		       std::vector<double>  & TrkWeights);
-
-   double  FindZPosTrk(std::vector<const Trk::Track*>& ListTracks,double & ControlVariable);
-   double  FindZPosTrk(std::vector<const Trk::TrackParticleBase*>& ListTracks,double & ControlVariable);
-
-   double FindZPos( std::vector<double>   &ZTrk,
-                    std::vector<double>   &PtTrk,
-                    std::vector<double>   &PxTrk,
-                    std::vector<double>   &PyTrk,
-                    std::vector<double>   &PhiTrk,
-		    double & ControlVar);
-
-   void SetTrkParamVectors(std::vector<const Trk::TrackParticleBase*>& ListTracks,
-                           std::vector<double>   &ZTrk,
-                           std::vector<double>   &PtTrk,
-                           std::vector<double>   &PxTrk,
-                           std::vector<double>   &PyTrk,
-			   std::vector<double>   &PhiTrk);
-
-   void SetTrkParamVectors(std::vector<const Trk::Track*>& ListTracks,
-                           std::vector<double>   &ZTrk,
-                           std::vector<double>   &PtTrk,
-                           std::vector<double>   &PxTrk,
-                           std::vector<double>   &PyTrk,
-			   std::vector<double>   &PhiTrk);
-
-   int PVrtListFind(std::vector<const Trk::TrackParticleBase*>  & ListParticles,
-                    std::vector<const Trk::Track*>              & ListTracks,
-	            std::vector< Amg::Vector3D >                & PVrtList,
-                    std::vector< AmgSymMatrix(3) >              & ErrorMatrixPerVrt,
-		    std::vector<double>                         & Chi2PerVrt,
-		    std::vector<double>                         & ControlVariablePerVrt,
-		    std::vector< std::vector<const Trk::TrackParticleBase*> > & PrtPerVrt,
-		    std::vector< std::vector<const Trk::Track*> >         & TrkPerVrt,
-		    std::vector< std::vector<double> >          & TrkWgtPerVrt);
-
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> SaveResults( int NVrt,
-	            std::vector< Amg::Vector3D >                & PVrtList,
-                    std::vector< AmgSymMatrix(3) >              & ErrorMatrixPerVrt,
-		    std::vector<double>                         & Chi2PerVrt,
-                    std::vector<int>                            & NTrkPerVrt,
-		    std::vector< std::vector<const Trk::TrackParticleBase*> > & PrtPerVrt,
-		    std::vector< std::vector<const Trk::Track*> >         & TrkPerVrt,
-		    std::vector< std::vector<double> >          & TrkWgtPerVrt,
-                    const TrackCollection* trackTES = 0,
-                    const Trk::TrackParticleBaseCollection* partTES = 0);
-
-
-
-   StatusCode CutTrk(double PInvVert, double ThetaVert, double A0Vert, double Chi2, 
-           long int PixelHits,long int SctHits,long int SharedHits, long int BLayHits);
-
-
-     double**    getWorkArr2(long int dim1,long int dim2);
-     void removeWorkArr2(double  **Arr,long int dim1,long int dim2);
-     double***   getWorkArr3(long int dim1,long int dim2,long int dim3);
-     void removeWorkArr3(double ***Arr,long int dim1,long int dim2,long int dim3);
-     AmgSymMatrix(5)  FillCovMatrix(int iTrk, std::vector<double> & Matrix);
-     Amg::Vector3D findIniXY(const Trk::TrackParticleBaseCollection* newPrtCol);
-     Amg::Vector3D findIniXY(const TrackCollection* newPrtCol);
-//---------------------------------------------------------------------------
-//  Arrays for propagation of fit results to steering procedure
-//   
-     std::vector<double **> m_savedTrkFittedPerigees;   
-     std::vector< std::vector< AmgSymMatrix(5) > > m_fittedTrkCov; 
-
-
-   };
+public:
+  InDetVKalPriVxFinderTool(const std::string& t,
+                           const std::string& n,
+                           const IInterface* p);
+  virtual ~InDetVKalPriVxFinderTool();
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize() override;
+  //
+  //    Tool interface
+  //
+  using IVertexFinder::findVertex;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const TrackCollection* trackTES) const override;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const override;
+
+  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const xAOD::TrackParticleContainer* trackTES) const override;
+  //
+
+private:
+  /*  JobOption tunable parameters */
+
+  // Beam position
+  double m_BeamPositionX;
+  double m_BeamPositionY;
+  long int m_BeamConstraint;
+  long int m_TypeRobust;
+  double m_RobustScale;
+
+  // Track selection
+  long int m_CutSctHits;
+  long int m_CutPixelHits;
+  long int m_CutSiHits;
+  long int m_CutBLayHits;
+  long int m_CutSharedHits;
+  double m_CutPt;
+  double m_CutZVrt;
+  double m_CutA0;
+  double m_CutChi2;
+  double m_A0TrkErrorCut;
+  double m_ZTrkErrorCut;
+  // Cuts for track - initial vertex association
+  double m_RImpSelCut;
+  double m_ZImpSelCut;
+  double m_RDistSelCut;
+  double m_ZDistSelCut;
+  double m_SignifSelCut;
+  // Stop point for the common fit
+  double m_SecTrkChi2Cut;
+  double m_WeightCut;
+  // Maximal number of vertices
+  long int m_NPVertexMax;
+
+  PublicToolHandle<Trk::ITrkVKalVrtFitter> m_fitSvc{ this,
+                                                     "TrkVKalVrtFitter",
+                                                     "Trk::TrkVKalVrtFitter",
+                                                     "" };
+  PublicToolHandle<Trk::ITrackSummaryTool> m_sumSvc{
+    this,
+    "TrackSummaryTool",
+    "Trk::TrackSummaryTool/AtlasTrackSummaryTool",
+    ""
+  }; //!< Pointer to the track summary tool
+  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
+    this,
+    "BeamSpotKey",
+    "BeamSpotData",
+    "SG key for beam spot"
+  };
+  PublicToolHandle<Trk::ITrackSelectorTool>
+    m_trkSelector{ this, "DefaultTrackSelection", "DefaultTrackSelection", "" };
+
+ //
+  int m_SummaryToolExist;
+  int m_trkSelectorExist;
+  
+  /*
+   * C.A
+   * Cache for passing arguements between methods
+   * Added for the MT migration to avoid state
+   */
+  struct Cache {
+  Amg::Vector3D m_BeamCnst;
+  std::vector<double> m_BeamCnstWid;
+  StatusCode m_sc;
+  TLorentzVector m_Momentum;
+  long int m_Charge;
+  std::vector<double**> m_savedTrkFittedPerigees;
+  std::vector<std::vector<AmgSymMatrix(5)>> m_fittedTrkCov;
+  };
+  //----------------------------------------------------------------------------------------------
+  //  Private functions
+  //
+  void CleanTrkSet(Cache& cache,
+                   std::vector<const Trk::TrackParticleBase*>&,
+                   std::vector<const Trk::Track*>&,
+                   Amg::Vector3D& FitVertex,
+                   std::vector<double>& Chi2PerTrk,
+                   std::vector<const Trk::TrackParticleBase*>&,
+                   std::vector<const Trk::Track*>&) const;
+
+  int FindMax(std::vector<double>&) const;
+
+  int FindMin(std::vector<double>&) const;
+
+  int FindMaxSecond(std::vector<double>&) const;
+
+  const Trk::Perigee* GetPerigee(const Trk::TrackParticleBase* List) const;
+
+  const Trk::Perigee* GetPerigee(const Trk::Track* List) const;
+
+  void RemoveEntryInList(std::vector<const Trk::Track*>& ListTracks, int) const;
+
+  void RemoveEntryInList(std::vector<const Trk::TrackParticleBase*>& ListTracks,
+                         int) const;
+
+  void RemoveEntryInList(std::vector<double>& List, int Outlier) const;
+
+  double GetLimitAngle(double) const;
+
+  void UniqList(std::vector<const Trk::Track*>& List) const;
+
+  void UniqList(std::vector<const Trk::TrackParticleBase*>& List) const;
+
+  void RemoveUsedEntry(std::vector<const Trk::Track*>&,
+                       std::vector<const Trk::Track*>&,
+                       std::vector<double>&) const;
+
+  void RemoveUsedEntry(std::vector<const Trk::TrackParticleBase*>&,
+                       std::vector<const Trk::TrackParticleBase*>&,
+                       std::vector<double>&) const;
+
+  void inpSelector(
+    std::vector<const Trk::TrackParticleBase*>& ListParticles,
+    std::vector<const Trk::Track*>& ListTracks,
+    Amg::Vector3D& IniVertex,
+    std::vector<const Trk::TrackParticleBase*>& SelectedParticles,
+    std::vector<const Trk::Track*>& SelectedTracks) const;
+
+  double FitCommonVrt(Cache& cache,
+                      std::vector<const Trk::TrackParticleBase*>& ListP,
+                      std::vector<const Trk::Track*>& ListT,
+                      double ZEstimation,
+                      Amg::Vector3D& FitVertex,
+                      std::vector<double>& ErrorMatrix,
+                      std::vector<double>& TrkWeights) const;
+
+  double FindZPosTrk(Cache& cache,
+    std::vector<const Trk::Track*>& ListTracks,
+                     double& ControlVariable) const;
+
+  double FindZPosTrk(Cache& cache,
+                     std::vector<const Trk::TrackParticleBase*>& ListTracks,
+                     double& ControlVariable) const;
+
+  double FindZPos(std::vector<double>& ZTrk,
+                  std::vector<double>& PtTrk,
+                  std::vector<double>& PxTrk,
+                  std::vector<double>& PyTrk,
+                  std::vector<double>& PhiTrk,
+                  double& ControlVar) const;
+
+  void SetTrkParamVectors(
+    Cache& cache,
+    std::vector<const Trk::TrackParticleBase*>& ListTracks,
+    std::vector<double>& ZTrk,
+    std::vector<double>& PtTrk,
+    std::vector<double>& PxTrk,
+    std::vector<double>& PyTrk,
+    std::vector<double>& PhiTrk) const;
+
+  void SetTrkParamVectors(Cache& cache,
+                          std::vector<const Trk::Track*>& ListTracks,
+                          std::vector<double>& ZTrk,
+                          std::vector<double>& PtTrk,
+                          std::vector<double>& PxTrk,
+                          std::vector<double>& PyTrk,
+                          std::vector<double>& PhiTrk) const;
+
+  int PVrtListFind(
+    Cache& cache,
+    std::vector<const Trk::TrackParticleBase*>& ListParticles,
+    std::vector<const Trk::Track*>& ListTracks,
+    std::vector<Amg::Vector3D>& PVrtList,
+    std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt,
+    std::vector<double>& Chi2PerVrt,
+    std::vector<double>& ControlVariablePerVrt,
+    std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt,
+    std::vector<std::vector<const Trk::Track*>>& TrkPerVrt,
+    std::vector<std::vector<double>>& TrkWgtPerVrt) const;
+
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> SaveResults(
+    Cache& cache,
+    int NVrt,
+    std::vector<Amg::Vector3D>& PVrtList,
+    std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt,
+    std::vector<double>& Chi2PerVrt,
+    std::vector<int>& NTrkPerVrt,
+    std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt,
+    std::vector<std::vector<const Trk::Track*>>& TrkPerVrt,
+    std::vector<std::vector<double>>& TrkWgtPerVrt,
+    const TrackCollection* trackTES = 0,
+    const Trk::TrackParticleBaseCollection* partTES = 0) const;
+
+  StatusCode CutTrk(double PInvVert,
+                    double ThetaVert,
+                    double A0Vert,
+                    double Chi2,
+                    long int PixelHits,
+                    long int SctHits,
+                    long int SharedHits,
+                    long int BLayHits) const;
+
+  double** getWorkArr2(long int dim1, long int dim2) const;
+  void removeWorkArr2(double** Arr, long int dim1, long int dim2) const;
+  double*** getWorkArr3(long int dim1, long int dim2, long int dim3) const;
+  void removeWorkArr3(double*** Arr,
+                      long int dim1,
+                      long int dim2,
+                      long int dim3) const;
+  AmgSymMatrix(5) FillCovMatrix(int iTrk, std::vector<double>& Matrix) const;
+  Amg::Vector3D findIniXY(
+    const Trk::TrackParticleBaseCollection* newPrtCol) const;
+  Amg::Vector3D findIniXY(const TrackCollection* newPrtCol) const;
+  //---------------------------------------------------------------------------
+  //  Arrays for propagation of fit results to steering procedure
+  //
+  /*
+   * Consider having an internal stuct Cache {.... };
+   * and then pass it to methods to keep track
+   */
+};
 
 } // end of namespace bracket
 
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx
index f8977d078550..227103698ad8 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx
@@ -7,23 +7,37 @@
 //-------------------------------------------------
 namespace InDet {
 
-  StatusCode InDetVKalPriVxFinderTool::CutTrk(double PInvVert, double ThetaVert, double A0Vert, double Chi2, 
-         long int PixelHits,long int SctHits,long int SharedHits, long int BLayHits)
-  {
-     double Pt = sin(ThetaVert)/fabs(PInvVert);
-//- Track quality
-     if(Pt               < m_CutPt) 			return StatusCode::FAILURE;
-     if(Chi2 	         > m_CutChi2) 			return StatusCode::FAILURE;
-     if(fabs(A0Vert)     > m_CutA0) 			return StatusCode::FAILURE;
+StatusCode
+InDetVKalPriVxFinderTool::CutTrk(double PInvVert,
+                                 double ThetaVert,
+                                 double A0Vert,
+                                 double Chi2,
+                                 long int PixelHits,
+                                 long int SctHits,
+                                 long int SharedHits,
+                                 long int BLayHits) const
+{
+  double Pt = sin(ThetaVert) / fabs(PInvVert);
+  //- Track quality
+  if (Pt < m_CutPt)
+    return StatusCode::FAILURE;
+  if (Chi2 > m_CutChi2)
+    return StatusCode::FAILURE;
+  if (fabs(A0Vert) > m_CutA0)
+    return StatusCode::FAILURE;
 
+  if (PixelHits < m_CutPixelHits)
+    return StatusCode::FAILURE;
+  if (SctHits < m_CutSctHits)
+    return StatusCode::FAILURE;
+  if ((PixelHits + SctHits) < m_CutSiHits)
+    return StatusCode::FAILURE;
+  if (BLayHits < m_CutBLayHits)
+    return StatusCode::FAILURE;
+  if (SharedHits > m_CutSharedHits)
+    return StatusCode::FAILURE;
 
-     if(PixelHits	    < m_CutPixelHits) 		return StatusCode::FAILURE;
-     if(SctHits		    < m_CutSctHits) 		return StatusCode::FAILURE;
-     if((PixelHits+SctHits) < m_CutSiHits) 		return StatusCode::FAILURE;
-     if(BLayHits	    < m_CutBLayHits) 		return StatusCode::FAILURE;
-     if(SharedHits	    > m_CutSharedHits) 		return StatusCode::FAILURE;
-
-     return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
   }
  
 }
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
index 2b35589ce93f..e4eeaf337014 100644
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
@@ -110,14 +110,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
   { 
     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"InDetVKalVrtPriVxTool initialize()" << endmsg;
     m_SummaryToolExist = 0;
-//       ---------------
-/* Tool Service initialisation.  NOT NEEDED now*/
-//    IToolSvc* toolSvc;
-//    StatusCode sc = service("ToolSvc", toolSvc);
-//    if (sc.isFailure()) {
-//      if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "Could not find ToolSvc" << endmsg;
-//      return StatusCode::SUCCESS; 
-//    }
 
 
     if (m_fitSvc.retrieve().isFailure()) {
@@ -134,14 +126,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 //
 //  Data for beam spot constraint
 //
-    m_BeamCnst[0]=m_BeamPositionX;
-    m_BeamCnst[1]=m_BeamPositionY;
-    m_BeamCnst[2]=0.;
-    m_BeamCnstWid.resize(3);
-    m_BeamCnstWid[0]=0.015;
-    m_BeamCnstWid[1]=0.015;
-    m_BeamCnstWid[2]=56.;
-
 
     ATH_CHECK(m_beamSpotKey.initialize(m_BeamConstraint));
 
@@ -175,80 +159,97 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"InDetVKalPriVxFinderTool finalize()" << endmsg;
     return StatusCode::SUCCESS; 
   }
-  
-
-
 
-   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackTES) 
-   {  
-        if(msgLvl(MSG::DEBUG)){
-        msg(MSG::DEBUG) << "N="<<trackTES->size()<<" xAOD::TrackParticles found" << endmsg;
-        msg(MSG::DEBUG) << "No InDetVKalPriVxFinderTool implementation for xAOD::TrackParticle" << endmsg;
-     }
-     return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> (0,0);
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  InDetVKalPriVxFinderTool::findVertex (
+    const xAOD::TrackParticleContainer* trackTES) const
+  {
+    if (msgLvl(MSG::DEBUG)) {
+      msg(MSG::DEBUG) << "N=" << trackTES->size()
+                      << " xAOD::TrackParticles found" << endmsg;
+      msg(MSG::DEBUG)
+        << "No InDetVKalPriVxFinderTool implementation for xAOD::TrackParticle"
+        << endmsg;
+    }
+    return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>(0, 0);
    }
 
 
 //__________________________________________________________________________
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::findVertex(const TrackCollection* trackTES)
-  {
-    //.............................................
-    
-    if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Primary vertex with InDetVKalPriVxFinderTool starts" << endmsg;
-//
-//
-    m_savedTrkFittedPerigees.clear();
-    m_fittedTrkCov.clear();
-//------------------------------------------------------------------------------------------
-//  Creating the necessary vectors
-
-    std::vector<const Trk::Track*>              SelectedTrkTracks;
-    std::vector<const Trk::TrackParticleBase*>  SelectedTrackParticles;
-    std::vector<Amg::Vector3D>                  PrimVrtList;
-    std::vector< AmgSymMatrix(3) >              ErrorMatrixPerVrt;
-    std::vector<double>                         Chi2PerVrt;
-    std::vector<double>                         ControlVariablePerVrt;
-    std::vector< std::vector<const Trk::Track*> >              TrkPerVrt;
-    std::vector< std::vector<const Trk::TrackParticleBase*> >  PrtPerVrt;
-    std::vector< std::vector<double> >                         TrkWgtPerVrt;
-    std::vector<int> NTrkPerVrt;
-//
-    int  NFoundVrt=0;
-    SelectedTrkTracks.clear(); SelectedTrackParticles.clear(); NTrkPerVrt.clear();
-    TrkPerVrt.clear(); PrtPerVrt.clear();
-
-    const Trk::Perigee* mPer=NULL;
-    AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.;
-    const Trk::FitQuality*  TrkQual=0;
-    std::vector<double> Impact,ImpactError;
-
-//
-//   Now we start a work.
-//
-    const DataVector<Trk::Track>*    newTrkCol = trackTES;
-
-    if(m_BeamConstraint){
-      SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-      if(beamSpotHandle.isValid()){
+   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+   InDetVKalPriVxFinderTool::findVertex(const TrackCollection* trackTES) const
+   {
+     //.............................................
+
+     if (msgLvl(MSG::DEBUG))
+       msg(MSG::DEBUG) << "Primary vertex with InDetVKalPriVxFinderTool starts"
+                       << endmsg;
+     //
+     //
+     Cache cache{};
+     cache.m_BeamCnst[0] = m_BeamPositionX;
+     cache.m_BeamCnst[1] = m_BeamPositionY;
+     cache.m_BeamCnst[2] = 0.;
+     cache.m_BeamCnstWid.resize(3);
+     cache.m_BeamCnstWid[0] = 0.015;
+     cache.m_BeamCnstWid[1] = 0.015;
+     cache.m_BeamCnstWid[2] = 56.;
+     cache.m_savedTrkFittedPerigees.clear();
+     cache.m_fittedTrkCov.clear();
+     //------------------------------------------------------------------------------------------
+     //  Creating the necessary vectors
+
+     std::vector<const Trk::Track*> SelectedTrkTracks;
+     std::vector<const Trk::TrackParticleBase*> SelectedTrackParticles;
+     std::vector<Amg::Vector3D> PrimVrtList;
+     std::vector<AmgSymMatrix(3)> ErrorMatrixPerVrt;
+     std::vector<double> Chi2PerVrt;
+     std::vector<double> ControlVariablePerVrt;
+     std::vector<std::vector<const Trk::Track*>> TrkPerVrt;
+     std::vector<std::vector<const Trk::TrackParticleBase*>> PrtPerVrt;
+     std::vector<std::vector<double>> TrkWgtPerVrt;
+     std::vector<int> NTrkPerVrt;
+     //
+     int NFoundVrt = 0;
+     SelectedTrkTracks.clear();
+     SelectedTrackParticles.clear();
+     NTrkPerVrt.clear();
+     TrkPerVrt.clear();
+     PrtPerVrt.clear();
+
+     const Trk::Perigee* mPer = NULL;
+     AmgVector(5) VectPerig;
+     VectPerig << 0., 0., 0., 0., 0.;
+     const Trk::FitQuality* TrkQual = 0;
+     std::vector<double> Impact, ImpactError;
+
+     //
+     //   Now we start a work.
+     //
+     const DataVector<Trk::Track>* newTrkCol = trackTES;
+
+     if (m_BeamConstraint) {
+       SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey };
+       if (beamSpotHandle.isValid()) {
          const Amg::Vector3D &beam=beamSpotHandle->beamPos();
-         m_BeamCnst[0]=beam.x();
-         m_BeamCnst[1]=beam.y();
-         m_BeamCnst[2]=beam.z();
-         m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0);
-         m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1);
-         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<m_BeamCnst[0]<<", "<<m_BeamCnst[1]<<
-	               ", "<<m_BeamCnst[2]<<" wid="<<m_BeamCnstWid[0]<<", "<<m_BeamCnstWid[1]<<endmsg;
-         if(msgLvl(MSG::DEBUG) && m_BeamCnst[2]!=0.)msg(MSG::DEBUG) << "BeamSpot Z must be 0 in finder!!! Make Z=0."<<endmsg;
-         m_BeamCnst[2]=0.;
+         cache.m_BeamCnst[0]=beam.x();
+         cache.m_BeamCnst[1]=beam.y();
+         cache.m_BeamCnst[2]=beam.z();
+         cache.m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0);
+         cache.m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1);
+         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<
+	               ", "<<cache.m_BeamCnst[2]<<" wid="<<cache.m_BeamCnstWid[0]<<", "<<cache.m_BeamCnstWid[1]<<endmsg;
+         if(msgLvl(MSG::DEBUG) && cache.m_BeamCnst[2]!=0.)msg(MSG::DEBUG) << "BeamSpot Z must be 0 in finder!!! Make Z=0."<<endmsg;
+         cache.m_BeamCnst[2]=0.;
       }
     }else{
        Amg::Vector3D approx_beam=findIniXY(newTrkCol);
-       m_BeamCnst[0]=approx_beam.x();
-       m_BeamCnst[1]=approx_beam.y();
-       m_BeamCnst[2]=0.;
-       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<m_BeamCnst[0]<<", "<<m_BeamCnst[1]<<endmsg;
+       cache.m_BeamCnst[0]=approx_beam.x();
+       cache.m_BeamCnst[1]=approx_beam.y();
+       cache.m_BeamCnst[2]=0.;
+       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<endmsg;
     }
-    Trk::Vertex selectionVertex(m_BeamCnst);
+    Trk::Vertex selectionVertex(cache.m_BeamCnst);
 
        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Trk::Track number=" <<newTrkCol->size()<< endmsg;
        DataVector<Trk::Track>::const_iterator    i_ntrk;
@@ -281,8 +282,8 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
               delete testSum;
             }
 //---------------------------------------------------------	
-            //double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), m_BeamCnst, 1, Impact, ImpactError);  //VK ImpactSignif not needed
-            m_fitSvc->VKalGetImpact((*i_ntrk), m_BeamCnst, 1, Impact, ImpactError);
+            //double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError);  //VK ImpactSignif not needed
+            m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError);
 	    double ImpactA0=VectPerig[0]; //double ImpactZ=VectPerig[1];   // Temporary
 	    ImpactA0=Impact[0];           //ImpactZ=Impact[1];   
 
@@ -322,7 +323,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	     if(SharedHits>0) SharedHits--;
              BLayHits++;
              PixelHits++;
-             m_fitSvc->VKalGetImpact((*i_ntrk), m_BeamCnst, 1, Impact, ImpactError);
+             m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError);
 	     double ImpactA0=Impact[0]; 
              StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , 
 		          TrkQual->chiSquared() / TrkQual->numberDoF(),
@@ -340,12 +341,16 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
         UniqList(SelectedTrkTracks);
                       /* And now primary vertex search itself*/
 
-        NFoundVrt =  PVrtListFind( SelectedTrackParticles, SelectedTrkTracks,
-                                   PrimVrtList,
-				   ErrorMatrixPerVrt,
-				   Chi2PerVrt,
-		                   ControlVariablePerVrt,
-				   PrtPerVrt, TrkPerVrt, TrkWgtPerVrt );
+        NFoundVrt = PVrtListFind(cache,
+                                 SelectedTrackParticles,
+                                 SelectedTrkTracks,
+                                 PrimVrtList,
+                                 ErrorMatrixPerVrt,
+                                 Chi2PerVrt,
+                                 ControlVariablePerVrt,
+                                 PrtPerVrt,
+                                 TrkPerVrt,
+                                 TrkWgtPerVrt);
 
         for (int i=0; i<NFoundVrt; i++) NTrkPerVrt.push_back((int)TrkPerVrt[i].size()); 
      
@@ -362,29 +367,40 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 //
 //---- Save vertices 
 //
-    return  SaveResults( NFoundVrt, PrimVrtList,ErrorMatrixPerVrt, Chi2PerVrt,
-                                         NTrkPerVrt,PrtPerVrt,TrkPerVrt,TrkWgtPerVrt,trackTES);
+    return SaveResults(cache,
+                       NFoundVrt,
+                       PrimVrtList,
+                       ErrorMatrixPerVrt,
+                       Chi2PerVrt,
+                       NTrkPerVrt,
+                       PrtPerVrt,
+                       TrkPerVrt,
+                       TrkWgtPerVrt,
+                       trackTES);
   }
 
 
-
-
-
-
-
-
-
 //__________________________________________________________________________
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* newPrtCol)
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  InDetVKalPriVxFinderTool::findVertex(
+    const Trk::TrackParticleBaseCollection* newPrtCol) const
   {
     //.............................................
     
     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Primary vertex with InDetVKalPriVxFinderTool starts" << endmsg;
 //
 //
-    m_savedTrkFittedPerigees.clear();
-    m_fittedTrkCov.clear();
+     Cache cache{};
+     cache.m_BeamCnst[0] = m_BeamPositionX;
+     cache.m_BeamCnst[1] = m_BeamPositionY;
+     cache.m_BeamCnst[2] = 0.;
+     cache.m_BeamCnstWid.resize(3);
+     cache.m_BeamCnstWid[0] = 0.015;
+     cache.m_BeamCnstWid[1] = 0.015;
+     cache.m_BeamCnstWid[2] = 56.;
+     cache.m_savedTrkFittedPerigees.clear();
+     cache.m_fittedTrkCov.clear();
 //------------------------------------------------------------------------------------------
 //  Creating the necessary vectors
 
@@ -412,22 +428,22 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
       SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
       if(beamSpotHandle.isValid()){
          const Amg::Vector3D &beam=beamSpotHandle->beamPos();
-         m_BeamCnst[0]=beam.x();
-         m_BeamCnst[1]=beam.y();
-         m_BeamCnst[2]=beam.z();
-         m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0);
-         m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1);
-         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<m_BeamCnst[0]<<", "<<m_BeamCnst[1]<<
-	               ", "<<m_BeamCnst[2]<<" wid="<<m_BeamCnstWid[0]<<", "<<m_BeamCnstWid[1]<<endmsg;
+         cache.m_BeamCnst[0]=beam.x();
+         cache.m_BeamCnst[1]=beam.y();
+         cache.m_BeamCnst[2]=beam.z();
+         cache.m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0);
+         cache.m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1);
+         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<
+	               ", "<<cache.m_BeamCnst[2]<<" wid="<<cache.m_BeamCnstWid[0]<<", "<<cache.m_BeamCnstWid[1]<<endmsg;
       }
     }else{
        Amg::Vector3D approx_beam=findIniXY(newPrtCol);
-       m_BeamCnst[0]=approx_beam.x();
-       m_BeamCnst[1]=approx_beam.y();
-       m_BeamCnst[2]=0.;
-       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<m_BeamCnst[0]<<", "<<m_BeamCnst[1]<<endmsg;
+       cache.m_BeamCnst[0]=approx_beam.x();
+       cache.m_BeamCnst[1]=approx_beam.y();
+       cache.m_BeamCnst[2]=0.;
+       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<endmsg;
     }
-    Trk::Vertex selectionVertex(m_BeamCnst);
+    Trk::Vertex selectionVertex(cache.m_BeamCnst);
 
           if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Trk::TrackParticleBase number=" <<newPrtCol->size()<< endmsg;
           Trk::TrackParticleBaseCollection::const_iterator i_nprt  = newPrtCol->begin();
@@ -452,7 +468,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	         if(PixelHits<0)PixelHits=0;
                  if(SctHits<0)SctHits=0;
                  if(BLayHits<0)BLayHits=0; 
-                 m_fitSvc->VKalGetImpact((*i_nprt), m_BeamCnst, 1, Impact, ImpactError);
+                 m_fitSvc->VKalGetImpact((*i_nprt), cache.m_BeamCnst, 1, Impact, ImpactError);
 	         double ImpactA0=VectPerig[0]; //double ImpactZ=VectPerig[1];   // Temporary
 	         ImpactA0=Impact[0];           //ImpactZ=Impact[1];   
 
@@ -488,7 +504,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	         if(SharedHits>0) SharedHits--;
                  BLayHits++;
                  PixelHits++;
-                 m_fitSvc->VKalGetImpact((*i_nprt), m_BeamCnst, 1, Impact, ImpactError);
+                 m_fitSvc->VKalGetImpact((*i_nprt), cache.m_BeamCnst, 1, Impact, ImpactError);
 	         double ImpactA0=Impact[0];  
                  StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 ,
 		              TrkQual->chiSquared() / TrkQual->numberDoF(),
@@ -505,13 +521,17 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
           UniqList(SelectedTrackParticles);
                       /* And now primary vertex search itself*/
 
-          NFoundVrt =  PVrtListFind( SelectedTrackParticles, SelectedTrkTracks,
-                                     PrimVrtList,
-	  	 		     ErrorMatrixPerVrt,
-				     Chi2PerVrt,
-		                     ControlVariablePerVrt,
-				     PrtPerVrt, TrkPerVrt, TrkWgtPerVrt );
-	  for (int i=0; i<NFoundVrt; i++) NTrkPerVrt.push_back((int) PrtPerVrt[i].size()); 
+          NFoundVrt = PVrtListFind(cache,
+                                   SelectedTrackParticles,
+                                   SelectedTrkTracks,
+                                   PrimVrtList,
+                                   ErrorMatrixPerVrt,
+                                   Chi2PerVrt,
+                                   ControlVariablePerVrt,
+                                   PrtPerVrt,
+                                   TrkPerVrt,
+                                   TrkWgtPerVrt);
+          for (int i=0; i<NFoundVrt; i++) NTrkPerVrt.push_back((int) PrtPerVrt[i].size()); 
        
 
 //--------------------------------------------------------------------
@@ -526,14 +546,24 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 //
 //---- Save vertices 
 //
-   return  SaveResults( NFoundVrt, PrimVrtList,ErrorMatrixPerVrt, Chi2PerVrt,
-                                         NTrkPerVrt,PrtPerVrt,TrkPerVrt,TrkWgtPerVrt,0,newPrtCol);
+    return SaveResults(cache,
+                       NFoundVrt,
+                       PrimVrtList,
+                       ErrorMatrixPerVrt,
+                       Chi2PerVrt,
+                       NTrkPerVrt,
+                       PrtPerVrt,
+                       TrkPerVrt,
+                       TrkWgtPerVrt,
+                       0,
+                       newPrtCol);
   }
 
 
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>  
-  InDetVKalPriVxFinderTool::SaveResults( int NFoundVrt,
+  InDetVKalPriVxFinderTool::SaveResults(Cache& cache,
+   int NFoundVrt,
 	 std::vector< Amg::Vector3D >                & PrimVrtList,
    std::vector< AmgSymMatrix(3) >              & ErrorMatrixPerVrt,
 	 std::vector<double>                         & Chi2PerVrt,
@@ -542,7 +572,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	 std::vector< std::vector<const Trk::Track*> >             & TrkPerVrt,
 	 std::vector< std::vector<double> >                        & TrkWgtPerVrt,
    const TrackCollection* trackTES,
-	 const Trk::TrackParticleBaseCollection* partTES){
+	 const Trk::TrackParticleBaseCollection* partTES) const{
 	 
      xAOD::VertexContainer  *  vrtCont    = new xAOD::VertexContainer;
      xAOD::VertexAuxContainer *vrtAuxCont = new xAOD::VertexAuxContainer;
@@ -560,11 +590,11 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
        std::vector<Trk::VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex();    
        tmpVTAV.clear();
        for(ii=0; ii<NTrkPerVrt[i]; ii++) {
-         AmgSymMatrix(5) * tmpCovMatr=new AmgSymMatrix(5)(m_fittedTrkCov.at(i).at(ii));
+         AmgSymMatrix(5) * tmpCovMatr=new AmgSymMatrix(5)(cache.m_fittedTrkCov.at(i).at(ii));
          Trk::Perigee * tmpMeasPer = new Trk::Perigee( 0.,0.,
-		           m_savedTrkFittedPerigees[i][ii][0] ,        /* Phi   */
-		           m_savedTrkFittedPerigees[i][ii][1] ,        /* Theta */
-		           m_savedTrkFittedPerigees[i][ii][2] ,        /* 1/p   */
+		           cache.m_savedTrkFittedPerigees[i][ii][0] ,        /* Phi   */
+		           cache.m_savedTrkFittedPerigees[i][ii][1] ,        /* Theta */
+		           cache.m_savedTrkFittedPerigees[i][ii][2] ,        /* 1/p   */
 	             Trk::PerigeeSurface(PrimVrtList[i]),
 		           tmpCovMatr );
          Trk::VxTrackAtVertex * tmpPointer = new Trk::VxTrackAtVertex( 1., tmpMeasPer ) ;
@@ -601,11 +631,11 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
       //-Remove refitted track parameters from HEAP
       //
      for( i=0; i< NFoundVrt; i++){ 
-       double** pntTracks=m_savedTrkFittedPerigees[i];
+       double** pntTracks=cache.m_savedTrkFittedPerigees[i];
        removeWorkArr2(pntTracks,(long int)NTrkPerVrt[i],3);
      }
-     m_savedTrkFittedPerigees.clear();
-     m_fittedTrkCov.clear();
+     cache.m_savedTrkFittedPerigees.clear();
+     cache.m_fittedTrkCov.clear();
      return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> (vrtCont,vrtAuxCont);
    }
  
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx
index b6a0a04ca90b..58fb66b56ceb 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx
@@ -15,126 +15,196 @@
 //
 namespace InDet {
 
-  int InDetVKalPriVxFinderTool::PVrtListFind(std::vector<const Trk::TrackParticleBase*>   & ListParticles,
-                                             std::vector<const Trk::Track*>               & ListTracks,
-	                                     std::vector< Amg::Vector3D >                 & PVrtList,
-                                             std::vector< AmgSymMatrix(3) >               & ErrorMatrixPerVrt,
-			           	     std::vector<double>                          & Chi2PerVrt,
-			           	     std::vector<double>                          & ControlVariablePerVrt,
-			            	     std::vector< std::vector<const Trk::TrackParticleBase*> > & PrtPerVrt,
-			            	     std::vector< std::vector<const Trk::Track*> >             & TrkPerVrt,
-			           	     std::vector< std::vector<double> >                & TrkWgtPerVrt )
-  {
-     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Primary Vertex Finder called " <<endmsg;
-
-//  Select track type for vertex finding.
-
-     int Selector=2;   // Initial choice
-     int NTracksVrt = 0;
-     if( ListParticles.size() == 0 && ListTracks.size() == 0 ){return 0; }
-     if( ListParticles.size() != 0 && ListTracks.size() == 0 ){ Selector =1; NTracksVrt=ListParticles.size(); }
-     if( ListParticles.size() == 0 && ListTracks.size() != 0 ){ Selector =2; NTracksVrt=ListTracks.size();}
-     if( NTracksVrt == 0) return 0;
-     if( NTracksVrt == 1 && !m_BeamConstraint) return 0;
-     if(Selector==1 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Trk::TrackParticlesBase are used for vertex search!!!="<<NTracksVrt<<endmsg;
-     if(Selector==2 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Trk::Tracks are used for vertex search!!!="<<NTracksVrt<<endmsg;
-//
-     int NFoundVertices = 0;
-     std::vector<const Trk::TrackParticleBase*> SelectedParticles;
-     std::vector<const Trk::Track*>             SelectedTracks;
-
-     PVrtList.clear();ErrorMatrixPerVrt.clear();Chi2PerVrt.clear();ControlVariablePerVrt.clear();
-     TrkPerVrt.clear(); PrtPerVrt.clear(); TrkWgtPerVrt.clear();
-//
-// Fit preparation
-//
-     double ZStartFit=0., ControlVariable, Chi2 ;
-     std::vector<double>  VertexErrorMatrix;
-     std::vector<double>  TrkWeights;
-     AmgSymMatrix(3)     CovMtx;
-     Amg::Vector3D FitVertex(0.,0.,0.);
-
-//
-// Start of fit
-//
-
-     while ( 1 ) {
-       if(Selector==1) ZStartFit = FindZPosTrk( ListParticles, ControlVariable);
-       if(Selector==2) ZStartFit = FindZPosTrk( ListTracks,    ControlVariable);
-       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< " Z pos estimation= " <<ZStartFit<<" for vertex="<<NFoundVertices<< endmsg;
-       if(ZStartFit < -10000.) return NFoundVertices;                  // No more candidates
-       if(NFoundVertices > m_NPVertexMax) return NFoundVertices;         // Too many candidates
-       Amg::Vector3D IniVertex(m_BeamCnst[0], m_BeamCnst[1], ZStartFit);
-//
-//  track selection for given vertex candidates
-//
-       inpSelector(ListParticles,ListTracks,IniVertex,SelectedParticles,SelectedTracks);
-//
-       if(Selector==1){
-           if( SelectedParticles.size() == 0)  break;      // 0 tracks selected for fit. Break.
-           if( SelectedParticles.size() < 2 && NFoundVertices>0 )  break;   // One vertex is found already. Break.
-           if( SelectedParticles.size() == 1 && (!m_BeamConstraint)) break; // 1 track selected for fit. Break.
-//VK now after fit     RemoveUsedEntry(ListParticles,SelectedParticles);
-       }
-       if(Selector==2){
-           if( SelectedTracks.size() == 0)  break;      // 0 tracks selected for fit. Break.
-           if( SelectedTracks.size() < 2 && NFoundVertices>0 )      break; // One vertex is found already. Break.
-           if( SelectedTracks.size() == 1 && (!m_BeamConstraint) )  break; // 1 track selected for fit. Break.
-//VK now after fit     RemoveUsedEntry(ListTracks,SelectedTracks);
-       }
-
-// Now common vertex fit. Also saves results for current vertex, so each vertex may be fitted only ONCE!!!
-
-       Chi2 = FitCommonVrt(SelectedParticles,SelectedTracks,ZStartFit,FitVertex,VertexErrorMatrix,TrkWeights);
-//       if( Chi2 < 0.) break;    //Bad fit. Break vertex search  !!VK 6.02.2008 Wrong!!! 
-       if( Chi2 > 0. ){
-         int NTrkInVrt=0;
-         if(Selector==1)NTrkInVrt=SelectedParticles.size();
-         if(Selector==2)NTrkInVrt=SelectedTracks.size();
-         if(fabs(FitVertex.z()-IniVertex.z())>m_ZDistSelCut/2. && NTrkInVrt>4){ 
-	    ZStartFit=FitVertex.z(); 
-	    IniVertex<<FitVertex.x(),FitVertex.y(),FitVertex.z();
-            int lastVrt=m_savedTrkFittedPerigees.size()-1;
-            removeWorkArr2(m_savedTrkFittedPerigees[lastVrt],NTrkInVrt,3);     // Remove previous fit results
-            m_savedTrkFittedPerigees.pop_back();    m_fittedTrkCov.pop_back(); // Remove previous fit results!!!See above
-            inpSelector(ListParticles,ListTracks,IniVertex,SelectedParticles,SelectedTracks);
-            Chi2 = FitCommonVrt(SelectedParticles,SelectedTracks,ZStartFit,FitVertex,VertexErrorMatrix,TrkWeights);
-	    if(Chi2 > 0){
-              if(Selector==1)NTrkInVrt=SelectedParticles.size();
-              if(Selector==2)NTrkInVrt=SelectedTracks.size();
-            }else{ NTrkInVrt=0; }
-	 }
-         if( NTrkInVrt && (NTrkInVrt>1 || NFoundVertices==0) ){ 
-           NFoundVertices++;
-           Chi2PerVrt.push_back(Chi2);
-           ControlVariablePerVrt.push_back(ControlVariable);
-           PVrtList.push_back(FitVertex);
-           if(Selector==1)PrtPerVrt.push_back(SelectedParticles);
-           if(Selector==2)TrkPerVrt.push_back(SelectedTracks);
-           TrkWgtPerVrt.push_back(TrkWeights);
-//
-           CovMtx(0,0)=               VertexErrorMatrix[0];
-           CovMtx(1,0)= CovMtx(0,1) = VertexErrorMatrix[1];
-           CovMtx(1,1)=               VertexErrorMatrix[2];
-           CovMtx(2,0)= CovMtx(0,2) = VertexErrorMatrix[3];
-           CovMtx(2,1)= CovMtx(1,2) = VertexErrorMatrix[4];
-           CovMtx(2,2)=               VertexErrorMatrix[5];
-           ErrorMatrixPerVrt.push_back( CovMtx );
-         }
-       }
-//
-//  VK now only tracks attached to vertex are excluded (with weight > m_WeightCut)
-
-       if(Selector==1){ RemoveUsedEntry(ListParticles,SelectedParticles,TrkWeights);}
-       if(Selector==2){ RemoveUsedEntry(ListTracks,SelectedTracks,TrkWeights);}
-       if(Selector==1 && ListParticles.size() < 2)  break;      // Less than 2 tracks left
-       if(Selector==2 && ListTracks.size()    < 2)  break;      // Less than 2 tracks left
-
-     }         // Next beam vertex
-
-     return NFoundVertices;
-   }
-
-
-
+int
+InDetVKalPriVxFinderTool::PVrtListFind(
+  Cache& cache,
+  std::vector<const Trk::TrackParticleBase*>& ListParticles,
+  std::vector<const Trk::Track*>& ListTracks,
+  std::vector<Amg::Vector3D>& PVrtList,
+  std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt,
+  std::vector<double>& Chi2PerVrt,
+  std::vector<double>& ControlVariablePerVrt,
+  std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt,
+  std::vector<std::vector<const Trk::Track*>>& TrkPerVrt,
+  std::vector<std::vector<double>>& TrkWgtPerVrt) const
+{
+  if (msgLvl(MSG::DEBUG))
+    msg(MSG::DEBUG) << "Primary Vertex Finder called " << endmsg;
+
+  //  Select track type for vertex finding.
+
+  int Selector = 2; // Initial choice
+  int NTracksVrt = 0;
+  if (ListParticles.size() == 0 && ListTracks.size() == 0) {
+    return 0;
+  }
+  if (ListParticles.size() != 0 && ListTracks.size() == 0) {
+    Selector = 1;
+    NTracksVrt = ListParticles.size();
+  }
+  if (ListParticles.size() == 0 && ListTracks.size() != 0) {
+    Selector = 2;
+    NTracksVrt = ListTracks.size();
+  }
+  if (NTracksVrt == 0)
+    return 0;
+  if (NTracksVrt == 1 && !m_BeamConstraint)
+    return 0;
+  if (Selector == 1 && msgLvl(MSG::DEBUG))
+    msg(MSG::DEBUG) << " Trk::TrackParticlesBase are used for vertex search!!!="
+                    << NTracksVrt << endmsg;
+  if (Selector == 2 && msgLvl(MSG::DEBUG))
+    msg(MSG::DEBUG) << " Trk::Tracks are used for vertex search!!!="
+                    << NTracksVrt << endmsg;
+  //
+  int NFoundVertices = 0;
+  std::vector<const Trk::TrackParticleBase*> SelectedParticles;
+  std::vector<const Trk::Track*> SelectedTracks;
+
+  PVrtList.clear();
+  ErrorMatrixPerVrt.clear();
+  Chi2PerVrt.clear();
+  ControlVariablePerVrt.clear();
+  TrkPerVrt.clear();
+  PrtPerVrt.clear();
+  TrkWgtPerVrt.clear();
+  //
+  // Fit preparation
+  //
+  double ZStartFit = 0., ControlVariable, Chi2;
+  std::vector<double> VertexErrorMatrix;
+  std::vector<double> TrkWeights;
+  AmgSymMatrix(3) CovMtx;
+  Amg::Vector3D FitVertex(0., 0., 0.);
+
+  //
+  // Start of fit
+  //
+
+  while (1) {
+    if (Selector == 1)
+      ZStartFit = FindZPosTrk(cache,ListParticles, ControlVariable);
+    if (Selector == 2)
+      ZStartFit = FindZPosTrk(cache,ListTracks, ControlVariable);
+    if (msgLvl(MSG::DEBUG))
+      msg(MSG::DEBUG) << " Z pos estimation= " << ZStartFit
+                      << " for vertex=" << NFoundVertices << endmsg;
+    if (ZStartFit < -10000.)
+      return NFoundVertices; // No more candidates
+    if (NFoundVertices > m_NPVertexMax)
+      return NFoundVertices; // Too many candidates
+    Amg::Vector3D IniVertex(cache.m_BeamCnst[0], cache.m_BeamCnst[1], ZStartFit);
+    //
+    //  track selection for given vertex candidates
+    //
+    inpSelector(
+      ListParticles, ListTracks, IniVertex, SelectedParticles, SelectedTracks);
+    //
+    if (Selector == 1) {
+      if (SelectedParticles.size() == 0)
+        break; // 0 tracks selected for fit. Break.
+      if (SelectedParticles.size() < 2 && NFoundVertices > 0)
+        break; // One vertex is found already. Break.
+      if (SelectedParticles.size() == 1 && (!m_BeamConstraint))
+        break; // 1 track selected for fit. Break.
+      // VK now after fit     RemoveUsedEntry(ListParticles,SelectedParticles);
+    }
+    if (Selector == 2) {
+      if (SelectedTracks.size() == 0)
+        break; // 0 tracks selected for fit. Break.
+      if (SelectedTracks.size() < 2 && NFoundVertices > 0)
+        break; // One vertex is found already. Break.
+      if (SelectedTracks.size() == 1 && (!m_BeamConstraint))
+        break; // 1 track selected for fit. Break.
+      // VK now after fit     RemoveUsedEntry(ListTracks,SelectedTracks);
+    }
+
+    // Now common vertex fit. Also saves results for current vertex, so each
+    // vertex may be fitted only ONCE!!!
+
+    Chi2 = FitCommonVrt(cache,
+                        SelectedParticles,
+                        SelectedTracks,
+                        ZStartFit,
+                        FitVertex,
+                        VertexErrorMatrix,
+                        TrkWeights);
+    //       if( Chi2 < 0.) break;    //Bad fit. Break vertex search
+    //       !!VK 6.02.2008 Wrong!!!
+    if (Chi2 > 0.) {
+      int NTrkInVrt = 0;
+      if (Selector == 1)
+        NTrkInVrt = SelectedParticles.size();
+      if (Selector == 2)
+        NTrkInVrt = SelectedTracks.size();
+      if (fabs(FitVertex.z() - IniVertex.z()) > m_ZDistSelCut / 2. &&
+          NTrkInVrt > 4) {
+        ZStartFit = FitVertex.z();
+        IniVertex << FitVertex.x(), FitVertex.y(), FitVertex.z();
+        int lastVrt = cache.m_savedTrkFittedPerigees.size() - 1;
+        removeWorkArr2(cache.m_savedTrkFittedPerigees[lastVrt],
+                       NTrkInVrt,
+                       3); // Remove previous fit results
+        cache.m_savedTrkFittedPerigees.pop_back();
+        cache.m_fittedTrkCov.pop_back(); // Remove previous fit results!!!See above
+        inpSelector(ListParticles,
+                    ListTracks,
+                    IniVertex,
+                    SelectedParticles,
+                    SelectedTracks);
+        Chi2 = FitCommonVrt(cache,
+                            SelectedParticles,
+                            SelectedTracks,
+                            ZStartFit,
+                            FitVertex,
+                            VertexErrorMatrix,
+                            TrkWeights);
+        if (Chi2 > 0) {
+          if (Selector == 1)
+            NTrkInVrt = SelectedParticles.size();
+          if (Selector == 2)
+            NTrkInVrt = SelectedTracks.size();
+        } else {
+          NTrkInVrt = 0;
+        }
+      }
+      if (NTrkInVrt && (NTrkInVrt > 1 || NFoundVertices == 0)) {
+        NFoundVertices++;
+        Chi2PerVrt.push_back(Chi2);
+        ControlVariablePerVrt.push_back(ControlVariable);
+        PVrtList.push_back(FitVertex);
+        if (Selector == 1)
+          PrtPerVrt.push_back(SelectedParticles);
+        if (Selector == 2)
+          TrkPerVrt.push_back(SelectedTracks);
+        TrkWgtPerVrt.push_back(TrkWeights);
+        //
+        CovMtx(0, 0) = VertexErrorMatrix[0];
+        CovMtx(1, 0) = CovMtx(0, 1) = VertexErrorMatrix[1];
+        CovMtx(1, 1) = VertexErrorMatrix[2];
+        CovMtx(2, 0) = CovMtx(0, 2) = VertexErrorMatrix[3];
+        CovMtx(2, 1) = CovMtx(1, 2) = VertexErrorMatrix[4];
+        CovMtx(2, 2) = VertexErrorMatrix[5];
+        ErrorMatrixPerVrt.push_back(CovMtx);
+      }
+    }
+    //
+    //  VK now only tracks attached to vertex are excluded (with weight >
+    //  m_WeightCut)
+
+    if (Selector == 1) {
+      RemoveUsedEntry(ListParticles, SelectedParticles, TrkWeights);
+    }
+    if (Selector == 2) {
+      RemoveUsedEntry(ListTracks, SelectedTracks, TrkWeights);
+    }
+    if (Selector == 1 && ListParticles.size() < 2)
+      break; // Less than 2 tracks left
+    if (Selector == 2 && ListTracks.size() < 2)
+      break; // Less than 2 tracks left
+
+  } // Next beam vertex
+
+  return NFoundVertices;
+}
 }
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx
index 858c9a74b885..c83c186756a8 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx
@@ -17,117 +17,212 @@
 //
 namespace InDet {
 
-  void InDetVKalPriVxFinderTool::CleanTrkSet(std::vector<const Trk::TrackParticleBase*>& ListParticles,
-                                             std::vector<const Trk::Track*>& ListTracks,
-                                             Amg::Vector3D  &FitVertex,
-                                             std::vector<double> &Chi2PerTrk,
-                                             std::vector<const Trk::TrackParticleBase*>& badPart,
-                                             std::vector<const Trk::Track*>& badTrk)
-  {
-      int Selector=2;   // Initial choice
-      int NTracksVrt = 0;
-      badPart.clear(); badTrk.clear();
-      const bool particlesExist{!ListParticles.empty()};
-      const bool tracksExist{!ListTracks.empty()};
-      if( (not particlesExist) and (not tracksExist))return;
-      if( particlesExist and (not tracksExist)){ Selector =1; NTracksVrt=ListParticles.size(); }
-      if( (not particlesExist) and tracksExist){ Selector =2; NTracksVrt=ListTracks.size();}
-      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "CleanTrkSet() called. Total tracks= " << NTracksVrt<< endmsg;
-      if( NTracksVrt<10 ) return;  //nothing to do
-//
-//
-// Cleaning
-//
-      int it,jt;
-      std::vector<int> setOfBadTrk;
-      std::vector<const Trk::TrackParticleBase*> ListP(2);
-      std::vector<const Trk::Track*>             ListT(2);
-      std::vector<double> trkChi2,ErrorMatrix;
-      std::vector< std::vector<double> > tmpAtV; 
-      Amg::Vector3D  tmpFV;
-      double tmpChi2;
-      std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState();
-      for(it=0; it<NTracksVrt-1; it++){
-        if(Chi2PerTrk[it]< 2.) continue;  
-        for(jt=it+1; jt<NTracksVrt; jt++){
-           if(Chi2PerTrk[jt]< 2.) continue;  
-           if(Chi2PerTrk[it]+Chi2PerTrk[jt] < 10.) continue;   //too close pair
-           if(Selector==1){ ListP[0]=ListParticles[it]; ListP[1]=ListParticles[jt];
-              m_sc=m_fitSvc->VKalVrtFit(ListP,tmpFV, m_Momentum,m_Charge,ErrorMatrix,trkChi2,tmpAtV,tmpChi2,*state);}
-           if(Selector==2){ ListT[0]=ListTracks[it]; ListT[1]=ListTracks[jt];
-              m_sc=m_fitSvc->VKalVrtFit(ListT,tmpFV, m_Momentum,m_Charge,ErrorMatrix,trkChi2,tmpAtV,tmpChi2,*state);}
-           if(tmpChi2<1.0) {                                           // Good pair away from primary vertex found
-             double direction = (tmpFV.x()-FitVertex.x())*m_Momentum.Px()+
-                               +(tmpFV.y()-FitVertex.y())*m_Momentum.Py()+
-                               +(tmpFV.z()-FitVertex.z())*m_Momentum.Pz();
-             double det=ErrorMatrix[0]*ErrorMatrix[2]-ErrorMatrix[1]*ErrorMatrix[1];
-	     double wgt11 = ErrorMatrix[2]/det;
-	     double wgt22 = ErrorMatrix[0]/det;
-	     double wgt12 =-ErrorMatrix[1]/det;
-             double distR =sqrt(    (tmpFV.x()-FitVertex.x())*(tmpFV.x()-FitVertex.x())*wgt11
-                                +   (tmpFV.y()-FitVertex.y())*(tmpFV.y()-FitVertex.y())*wgt22
-				+2.*(tmpFV.x()-FitVertex.x())*(tmpFV.y()-FitVertex.y())*wgt12 );
-             double distZ =fabs(tmpFV.z()-FitVertex.z())/sqrt(ErrorMatrix[5]);
-	     if(distR<6.0)continue;
-	     if(direction<0)continue;
-	     if(distZ<4.0)continue;
-
-	     setOfBadTrk.push_back(it); setOfBadTrk.push_back(jt);
-	   }
-         }
-      }
-      m_fitSvc->setVertexForConstraint(m_BeamCnst[0],m_BeamCnst[1], FitVertex.z(),*state);
-      m_fitSvc->setCovVrtForConstraint(m_BeamCnstWid[0]*m_BeamCnstWid[0], 0., m_BeamCnstWid[1]*m_BeamCnstWid[1], 0., 0., 56.*56., *state);
-      m_fitSvc->setCnstType(6, *state);
-      ListP.resize(1); ListT.resize(1);
-      for(it=0; it<NTracksVrt; it++){
-         if(Chi2PerTrk[it] < 4.) continue;
-         if(Selector==1){ ListP[0]=ListParticles[it];
-            m_sc=m_fitSvc->VKalVrtFit(ListP,tmpFV, m_Momentum,m_Charge,ErrorMatrix,trkChi2,tmpAtV,tmpChi2,*state);}
-         if(Selector==2){ ListT[0]=ListTracks[it]; 
-            m_sc=m_fitSvc->VKalVrtFit(ListT,tmpFV, m_Momentum,m_Charge,ErrorMatrix,trkChi2,tmpAtV,tmpChi2,*state);}
-         if(tmpChi2<0.5)setOfBadTrk.push_back(it);
-       }
-//
-// Bad track removal      
-//
-      ListP.clear(); ListT.clear(); badPart.clear(); badTrk.clear();
-      if( setOfBadTrk.empty()) return;   //nothing found
-//
-      for(it=0; it<NTracksVrt; it++){
-        std::vector<int>::iterator found = find(setOfBadTrk.begin(), setOfBadTrk.end(), it);
-        if(found != setOfBadTrk.end()){
-	  if(Selector==1)badPart.push_back(ListParticles[it]);
-	  if(Selector==2)badTrk.push_back(ListTracks[it]);
-        }else{
-	  if(Selector==1)ListP.push_back(ListParticles[it]);
-	  if(Selector==2)ListT.push_back(ListTracks[it]);
-        }
+void
+InDetVKalPriVxFinderTool::CleanTrkSet(
+  Cache& cache,
+  std::vector<const Trk::TrackParticleBase*>& ListParticles,
+  std::vector<const Trk::Track*>& ListTracks,
+  Amg::Vector3D& FitVertex,
+  std::vector<double>& Chi2PerTrk,
+  std::vector<const Trk::TrackParticleBase*>& badPart,
+  std::vector<const Trk::Track*>& badTrk) const
+{
+  int Selector = 2; // Initial choice
+  int NTracksVrt = 0;
+  badPart.clear();
+  badTrk.clear();
+  const bool particlesExist{ !ListParticles.empty() };
+  const bool tracksExist{ !ListTracks.empty() };
+  if ((not particlesExist) and (not tracksExist))
+    return;
+  if (particlesExist and (not tracksExist)) {
+    Selector = 1;
+    NTracksVrt = ListParticles.size();
+  }
+  if ((not particlesExist) and tracksExist) {
+    Selector = 2;
+    NTracksVrt = ListTracks.size();
+  }
+  if (msgLvl(MSG::DEBUG))
+    msg(MSG::DEBUG) << "CleanTrkSet() called. Total tracks= " << NTracksVrt
+                    << endmsg;
+  if (NTracksVrt < 10)
+    return; // nothing to do
+  //
+  //
+  // Cleaning
+  //
+  int it, jt;
+  std::vector<int> setOfBadTrk;
+  std::vector<const Trk::TrackParticleBase*> ListP(2);
+  std::vector<const Trk::Track*> ListT(2);
+  std::vector<double> trkChi2, ErrorMatrix;
+  std::vector<std::vector<double>> tmpAtV;
+  Amg::Vector3D tmpFV;
+  double tmpChi2;
+  std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState();
+  for (it = 0; it < NTracksVrt - 1; it++) {
+    if (Chi2PerTrk[it] < 2.)
+      continue;
+    for (jt = it + 1; jt < NTracksVrt; jt++) {
+      if (Chi2PerTrk[jt] < 2.)
+        continue;
+      if (Chi2PerTrk[it] + Chi2PerTrk[jt] < 10.)
+        continue; // too close pair
+      if (Selector == 1) {
+        ListP[0] = ListParticles[it];
+        ListP[1] = ListParticles[jt];
+        cache.m_sc = m_fitSvc->VKalVrtFit(ListP,
+                                    tmpFV,
+                                    cache.m_Momentum,
+                                    cache.m_Charge,
+                                    ErrorMatrix,
+                                    trkChi2,
+                                    tmpAtV,
+                                    tmpChi2,
+                                    *state);
       }
-//
-      if(Selector==1) if(ListP.size()<badPart.size()) return; //protection
-      if(Selector==2) if(ListT.size()<badTrk.size()) return; //protection
-//
-      if(Selector==1){ 
-         ListParticles.resize(ListP.size()); copy(ListP.begin(),ListP.end(),ListParticles.begin());
-         std::vector<const Trk::TrackParticleBase*>::iterator last=unique(badPart.begin(),badPart.end()); 
-         badPart.erase(last,badPart.end());
+      if (Selector == 2) {
+        ListT[0] = ListTracks[it];
+        ListT[1] = ListTracks[jt];
+        cache.m_sc = m_fitSvc->VKalVrtFit(ListT,
+                                    tmpFV,
+                                    cache.m_Momentum,
+                                    cache.m_Charge,
+                                    ErrorMatrix,
+                                    trkChi2,
+                                    tmpAtV,
+                                    tmpChi2,
+                                    *state);
       }
-      if(Selector==2){ 
-         ListTracks.resize(ListT.size());    copy(ListT.begin(),ListT.end(),ListTracks.begin());
-         std::vector<const Trk::Track*>::iterator last=unique(badTrk.begin(),badTrk.end()); 
-         badTrk.erase(last,badTrk.end());
+      if (tmpChi2 < 1.0) { // Good pair away from primary vertex found
+        double direction = (tmpFV.x() - FitVertex.x()) * cache.m_Momentum.Px() +
+                           +(tmpFV.y() - FitVertex.y()) * cache.m_Momentum.Py() +
+                           +(tmpFV.z() - FitVertex.z()) * cache.m_Momentum.Pz();
+        double det =
+          ErrorMatrix[0] * ErrorMatrix[2] - ErrorMatrix[1] * ErrorMatrix[1];
+        double wgt11 = ErrorMatrix[2] / det;
+        double wgt22 = ErrorMatrix[0] / det;
+        double wgt12 = -ErrorMatrix[1] / det;
+        double distR = sqrt(
+          (tmpFV.x() - FitVertex.x()) * (tmpFV.x() - FitVertex.x()) * wgt11 +
+          (tmpFV.y() - FitVertex.y()) * (tmpFV.y() - FitVertex.y()) * wgt22 +
+          2. * (tmpFV.x() - FitVertex.x()) * (tmpFV.y() - FitVertex.y()) *
+            wgt12);
+        double distZ = fabs(tmpFV.z() - FitVertex.z()) / sqrt(ErrorMatrix[5]);
+        if (distR < 6.0)
+          continue;
+        if (direction < 0)
+          continue;
+        if (distZ < 4.0)
+          continue;
+
+        setOfBadTrk.push_back(it);
+        setOfBadTrk.push_back(jt);
       }
-      return;
+    }
+  }
+  m_fitSvc->setVertexForConstraint(
+    cache.m_BeamCnst[0], cache.m_BeamCnst[1], FitVertex.z(), *state);
+  m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0] * cache.m_BeamCnstWid[0],
+                                   0.,
+                                   cache.m_BeamCnstWid[1] * cache.m_BeamCnstWid[1],
+                                   0.,
+                                   0.,
+                                   56. * 56.,
+                                   *state);
+  m_fitSvc->setCnstType(6, *state);
+  ListP.resize(1);
+  ListT.resize(1);
+  for (it = 0; it < NTracksVrt; it++) {
+    if (Chi2PerTrk[it] < 4.)
+      continue;
+    if (Selector == 1) {
+      ListP[0] = ListParticles[it];
+      cache.m_sc = m_fitSvc->VKalVrtFit(ListP,
+                                  tmpFV,
+                                  cache.m_Momentum,
+                                  cache.m_Charge,
+                                  ErrorMatrix,
+                                  trkChi2,
+                                  tmpAtV,
+                                  tmpChi2,
+                                  *state);
+    }
+    if (Selector == 2) {
+      ListT[0] = ListTracks[it];
+      cache.m_sc = m_fitSvc->VKalVrtFit(ListT,
+                                  tmpFV,
+                                  cache.m_Momentum,
+                                  cache.m_Charge,
+                                  ErrorMatrix,
+                                  trkChi2,
+                                  tmpAtV,
+                                  tmpChi2,
+                                  *state);
+    }
+    if (tmpChi2 < 0.5)
+      setOfBadTrk.push_back(it);
+  }
+  //
+  // Bad track removal
+  //
+  ListP.clear();
+  ListT.clear();
+  badPart.clear();
+  badTrk.clear();
+  if (setOfBadTrk.empty())
+    return; // nothing found
+  //
+  for (it = 0; it < NTracksVrt; it++) {
+    std::vector<int>::iterator found =
+      find(setOfBadTrk.begin(), setOfBadTrk.end(), it);
+    if (found != setOfBadTrk.end()) {
+      if (Selector == 1)
+        badPart.push_back(ListParticles[it]);
+      if (Selector == 2)
+        badTrk.push_back(ListTracks[it]);
+    } else {
+      if (Selector == 1)
+        ListP.push_back(ListParticles[it]);
+      if (Selector == 2)
+        ListT.push_back(ListTracks[it]);
+    }
+  }
+  //
+  if (Selector == 1)
+    if (ListP.size() < badPart.size())
+      return; // protection
+  if (Selector == 2)
+    if (ListT.size() < badTrk.size())
+      return; // protection
+  //
+  if (Selector == 1) {
+    ListParticles.resize(ListP.size());
+    copy(ListP.begin(), ListP.end(), ListParticles.begin());
+    std::vector<const Trk::TrackParticleBase*>::iterator last =
+      unique(badPart.begin(), badPart.end());
+    badPart.erase(last, badPart.end());
+  }
+  if (Selector == 2) {
+    ListTracks.resize(ListT.size());
+    copy(ListT.begin(), ListT.end(), ListTracks.begin());
+    std::vector<const Trk::Track*>::iterator last =
+      unique(badTrk.begin(), badTrk.end());
+    badTrk.erase(last, badTrk.end());
+  }
+  return;
   }
 
-
-  double InDetVKalPriVxFinderTool::FitCommonVrt(std::vector<const Trk::TrackParticleBase*>& ListParticles,
-                                                std::vector<const Trk::Track*>& ListTracks,
-			                        double ZEstimation,
-	                                        Amg::Vector3D           & FitVertex,
-                                                std::vector<double>  & ErrorMatrix,
-				                std::vector<double>  & TrkWeights)
+  double
+  InDetVKalPriVxFinderTool::FitCommonVrt(
+    Cache& cache,
+    std::vector<const Trk::TrackParticleBase*>& ListParticles,
+    std::vector<const Trk::Track*>& ListTracks,
+    double ZEstimation,
+    Amg::Vector3D& FitVertex,
+    std::vector<double>& ErrorMatrix,
+    std::vector<double>& TrkWeights) const
   {
       int Selector=2;   // Initial choice
       int NTracksVrt = 0;
@@ -146,10 +241,10 @@ namespace InDet {
 // Start of fit
 //
       std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState();
-      m_fitSvc->setApproximateVertex(m_BeamCnst[0],m_BeamCnst[1],ZEstimation, *state);  /* Use as starting point */
+      m_fitSvc->setApproximateVertex(cache.m_BeamCnst[0],cache.m_BeamCnst[1],ZEstimation, *state);  /* Use as starting point */
       if(m_BeamConstraint) {
-         m_fitSvc->setVertexForConstraint(m_BeamCnst[0],m_BeamCnst[1],ZEstimation,*state);
-         m_fitSvc->setCovVrtForConstraint(m_BeamCnstWid[0]*m_BeamCnstWid[0], 0., m_BeamCnstWid[1]*m_BeamCnstWid[1], 0., 0., 56.*56., *state);
+         m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],ZEstimation,*state);
+         m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0], 0., cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1], 0., 0., 56.*56., *state);
 	 m_fitSvc->setCnstType(6, *state);
       }
       //m_fitSvc->setRobustness(m_TypeRobust);
@@ -160,22 +255,22 @@ namespace InDet {
 //
       int IterationLimit=NTracksVrt-1; if(IterationLimit<1)IterationLimit=1;
       for (i=0; i < IterationLimit; i++) {
-         if(Selector==1){ m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex, m_Momentum,m_Charge,
+         if(Selector==1){ cache.m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex, cache.m_Momentum,cache.m_Charge,
                                          ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,
                                          *state);
              NTracksVrt=ListParticles.size();
 	 }	
-         if(Selector==2){ m_sc=m_fitSvc->VKalVrtFit(ListTracks,FitVertex, m_Momentum,m_Charge,
+         if(Selector==2){ cache.m_sc=m_fitSvc->VKalVrtFit(ListTracks,FitVertex, cache.m_Momentum,cache.m_Charge,
                                          ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,
                                          *state);
              NTracksVrt=ListTracks.size();
          }
 	 if(NTracksVrt <= 2 )                  break;                     // Only <2 tracks left
-         if(m_sc.isFailure() ||  Chi2 > 1000000. ) { return -10000.;}     // No fit
+         if(cache.m_sc.isFailure() ||  Chi2 > 1000000. ) { return -10000.;}     // No fit
          Outlier = FindMax( Chi2PerTrk ); OutlierNext=FindMaxSecond( Chi2PerTrk );
 	 PtF=fabs(sin(TrkAtVrt[Outlier][0])/TrkAtVrt[Outlier][2]); PtS=fabs(sin(TrkAtVrt[OutlierNext][0])/TrkAtVrt[OutlierNext][2]);
          TrkWeights.clear();
-         m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state);  if(m_sc.isFailure() ) return -10000.;  // problem
+         cache.m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state);  if(cache.m_sc.isFailure() ) return -10000.;  // problem
          double dof=0.; for(int itk=0; itk<NTracksVrt; itk++)dof += TrkWeights[itk]; 
 	 long int nDoF=(long int)(5.*dof-3.*NTracksVrt-3.); if(m_BeamConstraint)nDoF += 2; if(nDoF<1)nDoF=1;
          float vrtProb=TMath::Prob(Chi2,nDoF);
@@ -204,8 +299,8 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
 // Prepare next iteration
          m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z(), *state); /*Use as starting point*/
          if(m_BeamConstraint) {
-           m_fitSvc->setVertexForConstraint(m_BeamCnst[0],m_BeamCnst[1],FitVertex.z(), *state);
-           m_fitSvc->setCovVrtForConstraint(m_BeamCnstWid[0]*m_BeamCnstWid[0],0.,m_BeamCnstWid[1]*m_BeamCnstWid[1],0.,0., 56.*56., *state);
+           m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],FitVertex.z(), *state);
+           m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0],0.,cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1],0.,0., 56.*56., *state);
          }
       }
 //----------------------------------------------------------------------------
@@ -214,15 +309,15 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
 
       state = m_fitSvc->makeState();
       if(m_BeamConstraint) {
-         m_fitSvc->setVertexForConstraint(m_BeamCnst[0],m_BeamCnst[1],FitVertex.z(), *state);
-         m_fitSvc->setCovVrtForConstraint(m_BeamCnstWid[0]*m_BeamCnstWid[0], 0., m_BeamCnstWid[1]*m_BeamCnstWid[1], 0., 0., 56.*56., *state);
+         m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],FitVertex.z(), *state);
+         m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0], 0., cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1], 0., 0., 56.*56., *state);
 	 m_fitSvc->setCnstType(6, *state);
       }
       m_fitSvc->setRobustness(m_TypeRobust, *state);
       m_fitSvc->setRobustScale(m_RobustScale, *state);
-      if(Selector==1)m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex,m_Momentum,m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true);
-      if(Selector==2)m_sc=m_fitSvc->VKalVrtFit(ListTracks,   FitVertex,m_Momentum,m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true);
-      if(m_sc.isFailure()) return -10000.;     // Problem
+      if(Selector==1)cache.m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex,cache.m_Momentum,cache.m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true);
+      if(Selector==2)cache.m_sc=m_fitSvc->VKalVrtFit(ListTracks,   FitVertex,cache.m_Momentum,cache.m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true);
+      if(cache.m_sc.isFailure()) return -10000.;     // Problem
 //
 //
       Outlier = FindMax( Chi2PerTrk );
@@ -237,8 +332,8 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
 //          TMath::Prob( Chi2,2*NTracksVrt-3)<1.e-3 )
       {   return -10000.;  }  
       TrkWeights.clear();
-      m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state);
-      if(m_sc.isFailure()) return -10000.;     // Problem
+      cache.m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state);
+      if(cache.m_sc.isFailure()) return -10000.;     // Problem
 //
 //--   Create array on HEAP to store fitted track parameters. Should be removed in  SaveResults
 //
@@ -249,7 +344,7 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
                  pntTracks[i][2]=TrkAtVrt[i][2];
       }
 //
-      m_savedTrkFittedPerigees.push_back(pntTracks);
+      cache.m_savedTrkFittedPerigees.push_back(pntTracks);
 //
       std::vector <double> CovFull;
       StatusCode sc = m_fitSvc->VKalGetFullCov( (long int) NTracksVrt, CovFull,
@@ -261,36 +356,37 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
         if(covarExist) {  tmpTrkCov.push_back( FillCovMatrix( i,CovFull ) );}
         else{             tmpTrkCov.push_back( One ); }
       }
-      m_fittedTrkCov.push_back(tmpTrkCov);
+      cache.m_fittedTrkCov.push_back(tmpTrkCov);
 //
       return Chi2;
    }
 
-
-
-
-
-                    /* Basic primary Z finder */
-
+   /* Basic primary Z finder */
 
 #define SigmaZBeam 156.
 #define NMesh      140
 
-  double InDetVKalPriVxFinderTool::FindZPosTrk(std::vector<const Trk::Track*>& ListTracks,
-                               double & ControlVariable)
-  {
-    std::vector<double> PtTrk,PxTrk,PyTrk;
-    std::vector<double> ZTrk,PhiTrk;
-    SetTrkParamVectors(ListTracks,ZTrk,PtTrk,PxTrk,PyTrk,PhiTrk);
-    return FindZPos( ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk, ControlVariable);
+   double
+   InDetVKalPriVxFinderTool::FindZPosTrk(
+     Cache& cache,
+     std::vector<const Trk::Track*>& ListTracks,
+     double& ControlVariable) const
+   {
+     std::vector<double> PtTrk, PxTrk, PyTrk;
+     std::vector<double> ZTrk, PhiTrk;
+     SetTrkParamVectors(cache,ListTracks, ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk);
+     return FindZPos(ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk, ControlVariable);
   }
 
-  double InDetVKalPriVxFinderTool::FindZPosTrk(std::vector<const Trk::TrackParticleBase*>& ListTracks,
-                                     double & ControlVariable)
+  double
+  InDetVKalPriVxFinderTool::FindZPosTrk(
+    Cache& cache,
+    std::vector<const Trk::TrackParticleBase*>& ListTracks,
+    double& ControlVariable) const
   {
     std::vector<double> PtTrk,PxTrk,PyTrk;
     std::vector<double> ZTrk,PhiTrk;
-    SetTrkParamVectors(ListTracks,ZTrk,PtTrk,PxTrk,PyTrk,PhiTrk);
+    SetTrkParamVectors(cache,ListTracks,ZTrk,PtTrk,PxTrk,PyTrk,PhiTrk);
     return FindZPos( ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk, ControlVariable);
   }
 
@@ -300,12 +396,13 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
  
 //  Unified program for Z position estimation
 //
-   double InDetVKalPriVxFinderTool::FindZPos( std::vector<double>   &ZTrk,
-                                    std::vector<double>   &PtTrk,
-                                    std::vector<double>   &PxTrk,
-                                    std::vector<double>   &PyTrk,
-                                    std::vector<double>   &PhiTrk,
-				    double & ControlVariable)
+  double
+  InDetVKalPriVxFinderTool::FindZPos(std::vector<double>& ZTrk,
+                                     std::vector<double>& PtTrk,
+                                     std::vector<double>& PxTrk,
+                                     std::vector<double>& PyTrk,
+                                     std::vector<double>& PhiTrk,
+                                     double& ControlVariable) const
   {
     double Step, LowLim, HighLim, Angle;
     int NTracks =ZTrk.size();
@@ -368,15 +465,15 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
     
   }
 
-
-
-  
-  void InDetVKalPriVxFinderTool::SetTrkParamVectors(std::vector<const Trk::Track*>& ListTracks,
-                                          std::vector<double>   &ZTrk,
-                                          std::vector<double>   &PtTrk,
-                                          std::vector<double>   &PxTrk,
-                                          std::vector<double>   &PyTrk,
-                                          std::vector<double>   &PhiTrk)
+  void
+  InDetVKalPriVxFinderTool::SetTrkParamVectors(
+    Cache& cache,
+    std::vector<const Trk::Track*>& ListTracks,
+    std::vector<double>& ZTrk,
+    std::vector<double>& PtTrk,
+    std::vector<double>& PxTrk,
+    std::vector<double>& PyTrk,
+    std::vector<double>& PhiTrk) const
 
   {    std::vector<const Trk::Track*>::const_iterator i_ntrk;
        AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.;
@@ -395,21 +492,24 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
 	  PxTrk.push_back(std::sin(VectPerig[3])*std::cos(VectPerig[2])/InverseP);
 	  PyTrk.push_back(std::sin(VectPerig[3])*std::sin(VectPerig[2])/InverseP);
 	  PhiTrk.push_back(GetLimitAngle(VectPerig[2]));
-	  if( m_BeamCnst[0] == 0. && m_BeamCnst[1] == 0.) {
+	  if( cache.m_BeamCnst[0] == 0. && cache.m_BeamCnst[1] == 0.) {
 	    ZTrk.push_back(VectPerig[1]);
           } else {
-	    m_fitSvc->VKalGetImpact((*i_ntrk),m_BeamCnst,1,Impact,ImpError);
+	    m_fitSvc->VKalGetImpact((*i_ntrk),cache.m_BeamCnst,1,Impact,ImpError);
 	    ZTrk.push_back(Impact[1]);
 	  }
        }
   }
 
-  void InDetVKalPriVxFinderTool::SetTrkParamVectors(std::vector<const Trk::TrackParticleBase*>& ListTracks,
-                                          std::vector<double>   &ZTrk,
-                                          std::vector<double>   &PtTrk,
-                                          std::vector<double>   &PxTrk,
-                                          std::vector<double>   &PyTrk,
-			  	          std::vector<double>   &PhiTrk)
+  void
+  InDetVKalPriVxFinderTool::SetTrkParamVectors(
+    Cache& cache,
+    std::vector<const Trk::TrackParticleBase*>& ListTracks,
+    std::vector<double>& ZTrk,
+    std::vector<double>& PtTrk,
+    std::vector<double>& PxTrk,
+    std::vector<double>& PyTrk,
+    std::vector<double>& PhiTrk) const
 
   {    std::vector<const Trk::TrackParticleBase*>::const_iterator i_ntrk;
        AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.;
@@ -428,10 +528,10 @@ if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<
 	  PxTrk.push_back(std::sin(VectPerig[3])*cos(VectPerig[2])/InverseP);
 	  PyTrk.push_back(std::sin(VectPerig[3])*sin(VectPerig[2])/InverseP);
 	  PhiTrk.push_back(GetLimitAngle(VectPerig[2]));
-	  if( m_BeamCnst[0] == 0. && m_BeamCnst[1] == 0.) {
+	  if( cache.m_BeamCnst[0] == 0. && cache.m_BeamCnst[1] == 0.) {
 	    ZTrk.push_back(VectPerig[1]);
           } else {
-            Amg::Vector3D refVrt(m_BeamCnst.x(),m_BeamCnst.y(),0.);             // Z==0 is needed for initial Z finder
+            Amg::Vector3D refVrt(cache.m_BeamCnst.x(),cache.m_BeamCnst.y(),0.);             // Z==0 is needed for initial Z finder
 	    m_fitSvc->VKalGetImpact((*i_ntrk),refVrt,1,Impact,ImpError); // 
 	    ZTrk.push_back(Impact[1]);
 	  }
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
index b8e2b2e7e7f0..3fc7a0bcd309 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
@@ -18,43 +18,63 @@
 
 namespace InDet {
 
-
-   void InDetVKalPriVxFinderTool::inpSelector(std::vector<const Trk::TrackParticleBase*>   & ListParticles,
-                                              std::vector<const Trk::Track*>               & ListTracks,
-	                                      Amg::Vector3D                                   & IniVertex,
-                                              std::vector<const Trk::TrackParticleBase*>   & SelectedParticles,
-                                              std::vector<const Trk::Track*>               & SelectedTracks)
-   {
-     int Selector=2;   // Initial choice
-     int NTrkInList = 0;
-     SelectedParticles.clear(); SelectedTracks.clear();
-     if( ListParticles.empty() && ListTracks.empty() ) return;
-     if( (not ListParticles.empty()) && ListTracks.empty() ){ Selector =1; NTrkInList=ListParticles.size(); }
-     if( ListParticles.empty() && (not ListTracks.empty()) ){ Selector =2; NTrkInList=ListTracks.size();}
-//
-//  track selection for given vertex candidates
-     std::vector<double>  Impact, ImpactError;
-     double Signif=0.;
-     for(int i=0; i < NTrkInList; i++) {
-        if(Selector==1)Signif=m_fitSvc->VKalGetImpact( ListParticles[i], IniVertex, 1, Impact, ImpactError);
-        if(Selector==2)Signif=m_fitSvc->VKalGetImpact( ListTracks[i],    IniVertex, 1, Impact, ImpactError);
-        if ( std::fabs(Impact[0])/std::sqrt(ImpactError[0])  > m_RImpSelCut)   continue;
-        if ( std::fabs(Impact[1])/std::sqrt(ImpactError[2])  > m_ZImpSelCut)   continue;
-        if (  Signif                               > m_SignifSelCut) continue;
-        if ( std::fabs(Impact[0])                 > m_RDistSelCut)       continue;
-        if ( std::fabs(Impact[1]*sin(Impact[2]))  > m_ZDistSelCut)       continue;
-        if(Selector==1)SelectedParticles.push_back( ListParticles[i] );
-        if(Selector==2)SelectedTracks.push_back( ListTracks[i] );
-      }
-      if(Selector==1) ATH_MSG_DEBUG( "Chosen for vertex fit="<<SelectedParticles.size());
-      if(Selector==2) ATH_MSG_DEBUG( "Chosen for vertex fit="<<SelectedTracks.size());
-      return;
+void
+InDetVKalPriVxFinderTool::inpSelector(
+  std::vector<const Trk::TrackParticleBase*>& ListParticles,
+  std::vector<const Trk::Track*>& ListTracks,
+  Amg::Vector3D& IniVertex,
+  std::vector<const Trk::TrackParticleBase*>& SelectedParticles,
+  std::vector<const Trk::Track*>& SelectedTracks) const
+{
+  int Selector = 2; // Initial choice
+  int NTrkInList = 0;
+  SelectedParticles.clear();
+  SelectedTracks.clear();
+  if (ListParticles.empty() && ListTracks.empty())
+    return;
+  if ((not ListParticles.empty()) && ListTracks.empty()) {
+    Selector = 1;
+    NTrkInList = ListParticles.size();
+  }
+  if (ListParticles.empty() && (not ListTracks.empty())) {
+    Selector = 2;
+    NTrkInList = ListTracks.size();
+  }
+  //
+  //  track selection for given vertex candidates
+  std::vector<double> Impact, ImpactError;
+  double Signif = 0.;
+  for (int i = 0; i < NTrkInList; i++) {
+    if (Selector == 1)
+      Signif = m_fitSvc->VKalGetImpact(
+        ListParticles[i], IniVertex, 1, Impact, ImpactError);
+    if (Selector == 2)
+      Signif = m_fitSvc->VKalGetImpact(
+        ListTracks[i], IniVertex, 1, Impact, ImpactError);
+    if (std::fabs(Impact[0]) / std::sqrt(ImpactError[0]) > m_RImpSelCut)
+      continue;
+    if (std::fabs(Impact[1]) / std::sqrt(ImpactError[2]) > m_ZImpSelCut)
+      continue;
+    if (Signif > m_SignifSelCut)
+      continue;
+    if (std::fabs(Impact[0]) > m_RDistSelCut)
+      continue;
+    if (std::fabs(Impact[1] * sin(Impact[2])) > m_ZDistSelCut)
+      continue;
+    if (Selector == 1)
+      SelectedParticles.push_back(ListParticles[i]);
+    if (Selector == 2)
+      SelectedTracks.push_back(ListTracks[i]);
+  }
+  if (Selector == 1)
+    ATH_MSG_DEBUG("Chosen for vertex fit=" << SelectedParticles.size());
+  if (Selector == 2)
+    ATH_MSG_DEBUG("Chosen for vertex fit=" << SelectedTracks.size());
+  return;
    }
 
-
-
-
-   int InDetVKalPriVxFinderTool::FindMin( std::vector<double>& Chi2PerTrk)
+   int
+   InDetVKalPriVxFinderTool::FindMin(std::vector<double>& Chi2PerTrk) const
    { 
       double Chi2Ref=1.e12;
       int Position=0;
@@ -63,8 +83,9 @@ namespace InDet {
          if( Chi2PerTrk[i] < Chi2Ref) { Chi2Ref=Chi2PerTrk[i]; Position=i;}
       }
       return Position;
-   }      
-   int InDetVKalPriVxFinderTool::FindMax( std::vector<double>& Chi2PerTrk)
+   }
+   int
+   InDetVKalPriVxFinderTool::FindMax(std::vector<double>& Chi2PerTrk) const
    { 
       double Chi2Ref=0.;
       int Position=0;
@@ -74,7 +95,7 @@ namespace InDet {
       }
       return Position;
    }      
-   int InDetVKalPriVxFinderTool::FindMaxSecond( std::vector<double>& Chi2PerTrk)
+   int InDetVKalPriVxFinderTool::FindMaxSecond( std::vector<double>& Chi2PerTrk) const
    { 
       double Chi2Ref=0.,Chi2RefS=0.;
       int Position=0;
@@ -87,37 +108,42 @@ namespace InDet {
          if( Chi2PerTrk[i] > Chi2RefS ) { Chi2RefS=Chi2PerTrk[i]; Position=i;}
       }
       return Position;
-   }      
-  
- 
-
+   }
 
-  const Trk::Perigee* InDetVKalPriVxFinderTool::GetPerigee( const Trk::TrackParticleBase* i_ntrk) 
-  {
-//
-//-- Perigee in TrackParticle
-//
+   const Trk::Perigee*
+   InDetVKalPriVxFinderTool::GetPerigee(const Trk::TrackParticleBase* i_ntrk) const
+   {
+     //
+     //-- Perigee in TrackParticle
+     //
      const Trk::Perigee* mPer;
      mPer = dynamic_cast<const Trk::Perigee*>( &(i_ntrk->definingParameters()) );
      return mPer;
   }
 
-  const Trk::Perigee* InDetVKalPriVxFinderTool::GetPerigee( const Trk::Track* i_ntrk) 
+  const Trk::Perigee*
+  InDetVKalPriVxFinderTool::GetPerigee(const Trk::Track* i_ntrk) const
   {
      return i_ntrk->perigeeParameters();
 
   }
 //-----------------------------------------------------------------------------------------------
-  void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<const Trk::Track*>& ListTracks, int Outlier)
+  void
+  InDetVKalPriVxFinderTool::RemoveEntryInList(
+    std::vector<const Trk::Track*>& ListTracks,
+    int Outlier) const
   {
     if(Outlier < 0 ) return;
     if(Outlier >= (int)ListTracks.size() ) return;
     std::vector<const Trk::Track*>::iterator   TransfEnd;
     TransfEnd = remove( ListTracks.begin(), ListTracks.end(), ListTracks[Outlier]);
     ListTracks.erase( TransfEnd,ListTracks.end());
-  }     
+  }
 
-  void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<const Trk::TrackParticleBase*>& ListTracks, int Outlier)
+  void
+  InDetVKalPriVxFinderTool::RemoveEntryInList(
+    std::vector<const Trk::TrackParticleBase*>& ListTracks,
+    int Outlier) const
   {
     if(Outlier < 0 ) return;
     if(Outlier >= (int)ListTracks.size() ) return;
@@ -126,7 +152,7 @@ namespace InDet {
     ListTracks.erase( TransfEnd,ListTracks.end());
   }     
 
-  void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<double>& List, int Outlier)
+  void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<double>& List, int Outlier) const
   {
     if(Outlier < 0 ) return;
     if(Outlier >= (int)List.size() ) return;
@@ -136,9 +162,11 @@ namespace InDet {
   }     
 //-----------------------------------------------------------------------------------------------
 
-  void InDetVKalPriVxFinderTool::RemoveUsedEntry(std::vector<const Trk::Track*>& List, 
-                                       std::vector<const Trk::Track*>& ListUsed,
-				       std::vector<double> & TrkWeights)
+  void
+  InDetVKalPriVxFinderTool::RemoveUsedEntry(
+    std::vector<const Trk::Track*>& List,
+    std::vector<const Trk::Track*>& ListUsed,
+    std::vector<double>& TrkWeights) const
   {
     int UseWgt=0;
     if(ListUsed.size()   == 0 ) return;
@@ -152,9 +180,11 @@ namespace InDet {
     List.erase( TransfEnd,List.end());
   }
 
-  void InDetVKalPriVxFinderTool::RemoveUsedEntry(std::vector<const Trk::TrackParticleBase*>& List, 
-                                       std::vector<const Trk::TrackParticleBase*>& ListUsed,
-				       std::vector<double> & TrkWeights)
+  void
+  InDetVKalPriVxFinderTool::RemoveUsedEntry(
+    std::vector<const Trk::TrackParticleBase*>& List,
+    std::vector<const Trk::TrackParticleBase*>& ListUsed,
+    std::vector<double>& TrkWeights) const
   {
     int UseWgt=0;
     if(ListUsed.size() == 0 ) return;
@@ -168,7 +198,7 @@ namespace InDet {
     List.erase( TransfEnd,List.end());
   }
 
-  double InDetVKalPriVxFinderTool::GetLimitAngle(double Phi){
+  double InDetVKalPriVxFinderTool::GetLimitAngle(double Phi) const {
   constexpr double twoPi (2.*M_PI);
   while ( Phi < 0.) { Phi += twoPi;}
   while ( Phi > twoPi) {Phi -=twoPi;}
@@ -177,15 +207,17 @@ namespace InDet {
 
 //  Track list cleaning
 
-
-  void InDetVKalPriVxFinderTool::UniqList(std::vector<const Trk::Track*> & List)
+  void
+  InDetVKalPriVxFinderTool::UniqList(std::vector<const Trk::Track*>& List) const
   {
       std::vector<const Trk::Track*>::iterator   TransfEnd ;
       sort(List.begin(),List.end());
       TransfEnd =  unique(List.begin(),List.end());
       List.erase( TransfEnd, List.end());
   }
-  void InDetVKalPriVxFinderTool::UniqList(std::vector<const Trk::TrackParticleBase*> & List)
+  void
+  InDetVKalPriVxFinderTool::UniqList(
+    std::vector<const Trk::TrackParticleBase*>& List) const
   {
       std::vector<const Trk::TrackParticleBase*>::iterator   TransfEnd ;
       sort(List.begin(),List.end());
@@ -193,20 +225,27 @@ namespace InDet {
       List.erase( TransfEnd, List.end());
   }
 
-  double** InDetVKalPriVxFinderTool::getWorkArr2(long int dim1,long int dim2)
+  double**
+  InDetVKalPriVxFinderTool::getWorkArr2(long int dim1, long int dim2) const
   { 
      double **ppArr = new double*[dim1];
      for (int i = 0; i < dim1; i++) ppArr[i] = new double[dim2];
      return ppArr;
   }
 
-  void InDetVKalPriVxFinderTool::removeWorkArr2(double **ppArr, long int dim1,long int )
+  void
+  InDetVKalPriVxFinderTool::removeWorkArr2(double** ppArr,
+                                           long int dim1,
+                                           long int) const
   {  
      for (int i = 0; i < dim1; i++) delete[] ppArr[i];
      delete[] ppArr;
   }
 
-  double*** InDetVKalPriVxFinderTool::getWorkArr3(long int dim1,long int dim2,long int dim3)
+  double***
+  InDetVKalPriVxFinderTool::getWorkArr3(long int dim1,
+                                        long int dim2,
+                                        long int dim3) const
   { 
      int i,j; 
      double ***ppArr = new double**[dim1];
@@ -215,7 +254,11 @@ namespace InDet {
      return ppArr;
   }
 
-  void InDetVKalPriVxFinderTool::removeWorkArr3(double ***ppArr, long int dim1,long int dim2,long int )
+  void
+  InDetVKalPriVxFinderTool::removeWorkArr3(double*** ppArr,
+                                           long int dim1,
+                                           long int dim2,
+                                           long int) const
   {  
      int i,j; 
      for (i = 0; i < dim1; i++){ for (j = 0; j < dim2; j++) delete[]ppArr[i][j]; }
@@ -225,8 +268,10 @@ namespace InDet {
 
 
 // Fills 5x5 matrix.  Input Matrix is a full covariance
-  AmgSymMatrix(5)  InDetVKalPriVxFinderTool::FillCovMatrix(int iTrk, std::vector<double> & Matrix)
- {
+  AmgSymMatrix(5)
+    InDetVKalPriVxFinderTool::FillCovMatrix(int iTrk,
+                                            std::vector<double>& Matrix) const
+  {
     int iTmp=(iTrk+1)*3;
     int NContent = Matrix.size();
     AmgSymMatrix(5) CovMtx; CovMtx.setZero(); CovMtx(2,2)=1.; CovMtx(3,3)=1.; CovMtx(4,4)=1.;
@@ -242,10 +287,9 @@ namespace InDet {
     return CovMtx;
   }
 
-
-
-  Amg::Vector3D 
-  InDetVKalPriVxFinderTool::findIniXY(const TrackCollection* trackTES){
+  Amg::Vector3D
+  InDetVKalPriVxFinderTool::findIniXY(const TrackCollection* trackTES) const
+  {
     //.............................................
     AmgVector(5) VectPerig; 
     VectPerig<<0.,0.,0.,0.,0.;
@@ -284,11 +328,11 @@ namespace InDet {
       if(sc.isFailure()) Vertex<<0.,0.,0.;
     }
     return Vertex;
-  } 
-
-
+  }
 
-  Amg::Vector3D InDetVKalPriVxFinderTool::findIniXY(const Trk::TrackParticleBaseCollection* newPrtCol)
+  Amg::Vector3D
+  InDetVKalPriVxFinderTool::findIniXY(
+    const Trk::TrackParticleBaseCollection* newPrtCol) const
   {
     //.............................................
     AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.;
@@ -322,6 +366,4 @@ namespace InDet {
     }
     return Vertex;
   } 
-
-
 }
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
index 8b125b6ba1ff..84ad630ba480 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -71,12 +71,20 @@ namespace InDet
       virtual ~ZVTOP_Tool ();
       
        /** standard Athena-Algorithm method */
-      virtual StatusCode initialize();
+      virtual StatusCode initialize() override ;
        /** standard Athena-Algorithm method */
-      virtual StatusCode finalize  ();
-      std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trackTES);
-      std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES);
-      std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles);
+      virtual StatusCode finalize  () override ;
+      
+      using  IVertexFinder::findVertex;
+      virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+        const TrackCollection* trackTES) const override ;
+      
+      virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+        const Trk::TrackParticleBaseCollection* trackTES) const override;
+
+      virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+        const xAOD::TrackParticleContainer* trackParticles) const override;
+
     private:
       
       ToolHandle <Trk::IVertexFitter>			m_iVertexFitter;
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx
index 2df1c4819377..ada2747a6e09 100644
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx
@@ -69,30 +69,30 @@ StatusCode InDet::ZVTOP_SecVtxTool::initialize()
   if ( m_iSpatialPointFinder.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iSpatialPointFinder << endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg;
 
   //Gaussian Probability Tube for the Track Trajectory
   if ( m_iTrkProbTubeCalc.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iTrkProbTubeCalc<< endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg;
 
   //Vertex Probability Function
   if ( m_iVtxProbCalc.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVtxProbCalc<< endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg;
 
   //VxFitter
   if ( m_iVertexFitter.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg;
 
   if ( m_iAmbiguitySolver.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iAmbiguitySolver << endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iAmbiguitySolver << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iAmbiguitySolver << endmsg;
 
   msg (MSG::INFO) << "initialize() successful in " << name() << endmsg;
   return StatusCode::SUCCESS;
@@ -119,7 +119,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
   std::vector<xAOD::Vertex*> new_secVertices(0);
   //if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et s= "<<jetMomentum.et() <<  endmsg; --David S.
   if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et s= "<<jetMomentum.Et() <<  endmsg;
-  if (inputTracks.size() != 0) {
+  if (!inputTracks.empty()) {
     //some variables
     typedef std::vector<const Trk::TrackParticleBase*>::const_iterator TrkPartVecIter;
     std::vector<const Trk::TrackParticleBase*> trkColl; // the collection of tracks, which are assigned to one spatial point
@@ -140,7 +140,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
     {
       Trk::Vertex* spatialPoint;
       spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2));
-      if (spatialPoint != 0) 
+      if (spatialPoint != nullptr) 
       {
 	double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
 	double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint);
@@ -159,9 +159,9 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
       delete spatialPoint;
     }
     //trk-IP combination
-    Trk::Vertex* spatialPoint = 0;
+    Trk::Vertex* spatialPoint = nullptr;
     spatialPoint = m_iSpatialPointFinder->findSpatialPoint(primaryVertex,(*itr_1));
-    if (spatialPoint != 0) 
+    if (spatialPoint != nullptr) 
     {
       double IPprobTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,*spatialPoint);
       double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
@@ -185,7 +185,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
   for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++)
   {
 
-    if (vtxState.size() == 0) vtxState.push_back(*itr1);
+    if (vtxState.empty()) vtxState.push_back(*itr1);
     else 
       {
 	Trk::Vertex vtx_new = (*itr1)->vertex();
@@ -215,7 +215,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 //----associated tracks are taken as an input for the vertex fit. --------//
 //------------------------------------------------------------------------------//
 
-  if (vtxState.size() != 0 ){
+  if (!vtxState.empty() ){
     if (msgLvl(MSG::DEBUG)) msg () << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg;
     //sort the vtxState collection, starting with a highest vtx probability
     std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_sorted;
@@ -253,7 +253,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 		break; // break inner loop if found
               }
 	  }
-	  if (vtx_is_stored == true) break; // break outer loop if found
+	  if (vtx_is_stored) break; // break outer loop if found
 	}
       if (!vtx_is_stored) {
 	//if not stored
@@ -331,7 +331,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	}
       //call the fitter
       //Trk::VxCandidate * myVxCandidate(0); --David S.
-      xAOD::Vertex * myxAODVertex(0);
+      xAOD::Vertex * myxAODVertex(nullptr);
       //const Amg::Vector3D p(0.,0.,0.); --David S.
       const Amg::Vector3D startingPoint(0.,0.,0.);
       //Trk::Vertex startingPoint(p); --David S.
@@ -364,22 +364,22 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	      if (largest_chi2 > m_trk_chi2_cut)
 		{
 		  if (trk_coll.size() < 3) break;
-		  else {
+		  
 		    trk_coll.erase(index);
 		    if (trk_coll.size() >= 2) {
 		      //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S.
-		      if (myxAODVertex!=0) { delete myxAODVertex; myxAODVertex=0; }
+		      if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; }
 		      //myVxCandidate = m_iVertexFitter->fit(trk_coll, startingPoint); --David S.
 		      myxAODVertex = m_iVertexFitter->fit(trk_coll, startingPoint);
 		    }
 		    //if (myVxCandidate == 0) break; --David S.
-		    if (myxAODVertex == 0) break;
-		  }
+		    if (myxAODVertex == nullptr) break;
+		  
 		} else bad_chi2 = false;
 	    }
 	}
       //if (myVxCandidate && bad_chi2 == false) secVertices.push_back(myVxCandidate); --David S.
-      if (myxAODVertex && bad_chi2 == false) secVertices.push_back(myxAODVertex);
+      if (myxAODVertex && !bad_chi2) secVertices.push_back(myxAODVertex);
     }
   new_secVertices = m_iAmbiguitySolver->solveAmbiguities(secVertices);
   if (msgLvl(MSG::DEBUG)) msg () <<"vertex container size = "<<secVertices.size()<<endmsg;
@@ -403,7 +403,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const xAOD::Vertex
     msg(MSG::DEBUG) << "Returning null VxSecVertexInfo*" << endmsg;
   }
 
-  Trk::VxSecVertexInfo* returnInfo(0);
+  Trk::VxSecVertexInfo* returnInfo(nullptr);
   return returnInfo;
 
 }
@@ -417,7 +417,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
   std::vector<xAOD::Vertex*> secVertices;
   //if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et = "<<jetMomentum.et() <<  endmsg; --David S.
   if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et = "<<jetMomentum.Et() <<  endmsg;
-  if (inputTracks.size() != 0) {
+  if (!inputTracks.empty()) {
     //some variables
     typedef std::vector<const Trk::Track*>::const_iterator TrackDataVecIter;
     std::vector<const Trk::Track*> trkColl(0); // the collection of tracks, which are assigned to one spatial point
@@ -440,7 +440,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	  {
 	    Trk::Vertex* spatialPoint;
 	    spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2));
-	    if (spatialPoint != 0) 
+	    if (spatialPoint != nullptr) 
 	      {
 		double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
 		double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint);
@@ -459,9 +459,9 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	    delete spatialPoint;
 	  }
 	//trk-IP combination
-	Trk::Vertex* spatialPoint = 0;
+	Trk::Vertex* spatialPoint = nullptr;
 	spatialPoint = m_iSpatialPointFinder->findSpatialPoint(primaryVertex,(*itr_1));
-	if (spatialPoint != 0) 
+	if (spatialPoint != nullptr) 
 	  {
 	    double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,*spatialPoint);
 	    double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
@@ -485,7 +485,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
     for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++)
       {
 	
-	if (vtxState.size() == 0) vtxState.push_back(*itr1);
+	if (vtxState.empty()) vtxState.push_back(*itr1);
 	else {
 	  Trk::Vertex vtx_new = (*itr1)->vertex();
 	  bool can_be_resolved = false;
@@ -515,7 +515,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
     //------------------------------------------------------------------------------//
 
 
-    if (vtxState.size() != 0 ){
+    if (!vtxState.empty() ){
       if (msgLvl(MSG::DEBUG)) msg () << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg;
       //sort the vtxState collection, starting with a highest vtx probability
       std::vector<InDet::ZVTOP_VertexState*> vtxState_sorted;
@@ -556,7 +556,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 		      break; // break inner loop if found
 		    }
 		}
-	      if (vtx_is_stored == true) break; // break outer loop if found
+	      if (vtx_is_stored) break; // break outer loop if found
 	    }
 	  if (!vtx_is_stored) {
 	    //if not stored
@@ -632,7 +632,7 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	  }
 	//call the fitter
 	//Trk::VxCandidate * myVxCandidate(0); --David S.
-	xAOD::Vertex * myxAODVertex(0);
+	xAOD::Vertex * myxAODVertex(nullptr);
 	//if (!with_IP) myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S.
 	if (!with_IP) myxAODVertex = m_iVertexFitter->fit(trk_coll);
 	bool bad_chi2 = true;
@@ -659,22 +659,22 @@ Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVerte
 	      if (largest_chi2 > m_trk_chi2_cut)
 		{
 		  if (trk_coll.size() < 3) break;
-		  else {
+		  
 		    trk_coll.erase(index);
 		    if (trk_coll.size() >= 2) {
 		      //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S.
-		      if (myxAODVertex!=0) { delete myxAODVertex; myxAODVertex=0; }
+		      if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; }
 		      //myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S.
 		      myxAODVertex = m_iVertexFitter->fit(trk_coll);
 		    }
 		    //if (myVxCandidate == 0) break; --David S.
-		    if (myxAODVertex == 0) break;
-		  }
+		    if (myxAODVertex == nullptr) break;
+		  
 		} else bad_chi2 = false;
 	    }
 	}
 	//if (myVxCandidate && bad_chi2 == false) secVertices.push_back(myVxCandidate); --David S.
-	if (myxAODVertex && bad_chi2 == false) secVertices.push_back(myxAODVertex);
+	if (myxAODVertex && !bad_chi2) secVertices.push_back(myxAODVertex);
       }
     if (msgLvl(MSG::DEBUG)) msg () <<"vertex container size = "<<secVertices.size()<<endmsg;
     for (Sp_Iter iter = vtxState_org.begin(); iter != vtxState_org.end(); iter++) delete *iter;
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx
index feae80000393..ee93309594b1 100644
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ StatusCode InDet::ZVTOP_SlowSpatialPointFinder::initialize()
     {
       msg (MSG::ERROR) <<"Could not find ToolSvc."<<endmsg;
       return sc;
-    } else msg (MSG::INFO) << "Retrieved tool " << m_linFactory << endmsg;
+    } msg (MSG::INFO) << "Retrieved tool " << m_linFactory << endmsg;
   
   msg (MSG::INFO) << "initialize() successful in " << name() << endmsg;
   return StatusCode::SUCCESS;
@@ -64,11 +64,11 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Tr
   const Trk::TrackParameters* perigee_2(dynamic_cast<const Trk::TrackParameters*>(trk_2->perigeeParameters()));
   if (!perigee_1 | !perigee_2) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
 		Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2);
 		return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 
 //============================================================================================
@@ -78,12 +78,12 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Re
   const Trk::TrackParameters *perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters()));
   if (!perigee_1) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
     //we need Trk::Vertex
     Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1);
     return vertex;
-  }
+  
 }
 
 //============================================================================================
@@ -93,12 +93,12 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Rec::Tr
   const Trk::TrackParameters* perigee_2(trk_2->measuredPerigee());
   if (!perigee_1 | !perigee_2) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
     //we need Trk::Vertex
     Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2);
     return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 
 //============================================================================================
@@ -107,11 +107,11 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Re
   const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee());
   if (!perigee_1) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1);
     return vertex;
-  }
+  
 }
 
 //============================================================================================
@@ -121,12 +121,12 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Tr
   const Trk::TrackParameters* perigee_2 = dynamic_cast<const Trk::TrackParameters*>(&(trk_2)->definingParameters());
   if (!perigee_1 | !perigee_2) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
     //we need Trk::Vertex
     Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2);
     return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 //============================================================================================
 Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const
@@ -134,11 +134,11 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Re
   const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&(trk_1)->definingParameters());
   if (!perigee_1) {
     if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg;
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1);
     return vertex;
-  }
+  
 }
 
 //=============================================================================================
@@ -193,13 +193,13 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Tr
 	if (msgLvl(MSG::VERBOSE)) msg() <<"chi2 = "<<chi2<<endmsg;
 	linPoint = Trk::Vertex(spatialPoint);
       }	
-    delete linTrack1; linTrack1=0; delete linTrack2; linTrack2=0;
+    delete linTrack1; linTrack1=nullptr; delete linTrack2; linTrack2=nullptr;
   }// two iterations
   if (chi2 <= m_chi2) return new Trk::Vertex(spatialPoint);
-  else {
+  
     if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg;
-    return 0;
-  }
+    return nullptr;
+  
 }
 
 //========================================================================================================
@@ -245,11 +245,11 @@ Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Re
 	if (msgLvl(MSG::VERBOSE)) msg() <<"chi2 = "<<chi2<<endmsg;
 	linPoint = Trk::Vertex (spatialPoint);
       }
-    delete linTrack1; linTrack1=0; 
+    delete linTrack1; linTrack1=nullptr; 
   }
   if (chi2 <= m_chi2) return new Trk::Vertex(spatialPoint);
-  else {
+  
     if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg;
-    return 0;
-  }
+    return nullptr;
+  
 }
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx
index 7805cdb4bf14..971ff9b1fd2a 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -52,11 +52,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::Track*
   const Trk::TrackParameters* perigee_2(dynamic_cast<const Trk::TrackParameters*>(trk_2->perigeeParameters()));
   if ((!perigee_1) or (!perigee_2)) {
     ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2);
     return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 
 //===============================================================================================
@@ -66,10 +66,10 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer
   if (!perigee_1) {
     ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
     return nullptr;
-  } else {
+  } 
     Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1);
     return vertex;
-  }
+  
 }
 
 //============================================================================================
@@ -79,11 +79,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Rec::TrackP
   const Trk::TrackParameters* perigee_2(trk_2->measuredPerigee());
   if ((!perigee_1) or (!perigee_2)) {
     ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
-    return 0;
-  } else {
+    return nullptr;
+  } 
 		Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2);
 		return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 
 //============================================================================================
@@ -92,11 +92,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer
   const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee());
   if (!perigee_1) {
     ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1);
     return vertex;
-  }
+  
 }
 //============================================================================================
 Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const
@@ -105,11 +105,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackP
   const Trk::TrackParameters* perigee_2 = dynamic_cast<const Trk::TrackParameters*>(&trk_2->definingParameters());
   if ((!perigee_1) or (!perigee_2)) {
     ATH_MSG_DEBUG ("Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2);
     return vertex;
-  }//if measured perigee
+  //if measured perigee
 }
 
 //============================================================================================
@@ -118,11 +118,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer
   const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&trk_1->definingParameters());
   if (!perigee_1) {
     ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" );
-    return 0;
-  } else {
+    return nullptr;
+  } 
     Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1);
     return vertex;
-  }
+  
 }
 
 //===============================================================================================
@@ -189,11 +189,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackP
     { 
       ATH_MSG_DEBUG("found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")");
       return new Trk::Vertex(spatialPoint);
-    } else 
-    {
+    } 
+    
       ATH_MSG_DEBUG("found spatial point candidate doesn't pass chi2_cut" );
-      return 0;
-    }
+      return nullptr;
+    
      	
 }
 
@@ -241,11 +241,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer
     { 
       if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"<< endmsg;
       return new Trk::Vertex(spatialPoint);
-    } else 
-    {
+    } 
+    
       if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg;
-      return 0;
-    }
+      return nullptr;
+    
 
 }
 
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
index 3e89af0c1c6f..c622d4ffeffe 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -76,19 +76,19 @@ StatusCode InDet::ZVTOP_Tool::initialize()
   if ( m_iSpatialPointFinder.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iSpatialPointFinder << endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg;
 
   //Gaussian Probability Tube for the Track Trajectory
   if ( m_iTrkProbTubeCalc.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iTrkProbTubeCalc<< endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg;
 
   //Vertex Probability Function
   if ( m_iVtxProbCalc.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVtxProbCalc<< endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg;
 
   //Beam Spot
   sc = m_iBeamCondSvc.retrieve();
@@ -101,7 +101,7 @@ StatusCode InDet::ZVTOP_Tool::initialize()
   if ( m_iVertexFitter.retrieve().isFailure() ) {
       msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg;
       return StatusCode::FAILURE;
-  } else msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg;
+  } msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg;
   msg (MSG::INFO) << "initialize() successful in " << name() << endmsg;
   return StatusCode::SUCCESS;
 }
@@ -116,13 +116,14 @@ StatusCode InDet::ZVTOP_Tool::finalize()
 
 //============================================================================================
 //VxContainer* InDet::ZVTOP_Tool::findVertex(const TrackCollection* trackTES) --David S.
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::ZVTOP_Tool::findVertex(const TrackCollection* trackTES)
+std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+InDet::ZVTOP_Tool::findVertex(const TrackCollection* trackTES) const
 {
 //VxContainer* newVxContainer = new VxContainer; --David S.
 xAOD::VertexContainer* newVertexContainer = new xAOD::VertexContainer;
 xAOD::VertexAuxContainer* newVertexAuxContainer = new xAOD::VertexAuxContainer;
 newVertexContainer->setStore( newVertexAuxContainer );
-if (trackTES->size() != 0) {
+if (!trackTES->empty()) {
   //some variables
   typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
   const Trk::RecVertex beam_spot = m_iBeamCondSvc->beamVtx();
@@ -153,7 +154,7 @@ if (trackTES->size() != 0) {
     {
       Trk::Vertex* spatialPoint;
       spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2));
-      if (spatialPoint != 0) 
+      if (spatialPoint != nullptr) 
       {
          double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
          double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint);
@@ -172,9 +173,9 @@ if (trackTES->size() != 0) {
       delete spatialPoint;
     }
     //trk-IP combination
-    Trk::Vertex* spatialPoint = 0;
+    Trk::Vertex* spatialPoint = nullptr;
     spatialPoint = m_iSpatialPointFinder->findSpatialPoint(beam_spot,(*itr_1));
-    if (spatialPoint != 0) 
+    if (spatialPoint != nullptr) 
     {
       double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,*spatialPoint);
       double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
@@ -198,7 +199,7 @@ if (trackTES->size() != 0) {
   for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++)
   {
 
-     if (vtxState.size() == 0) vtxState.push_back(*itr1);
+     if (vtxState.empty()) vtxState.push_back(*itr1);
      else {
          Trk::Vertex vtx_new = (*itr1)->vertex();
          bool can_be_resolved = false;
@@ -227,7 +228,7 @@ if (trackTES->size() != 0) {
 //------------------------------------------------------------------------------//
 
 
-  if (vtxState.size() != 0 ){
+  if (!vtxState.empty() ){
     if (msgLvl(MSG::DEBUG)) msg() << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg;
     //sort the vtxState collection, starting with a highest vtx probability
     std::vector<InDet::ZVTOP_VertexState*> vtxState_sorted;
@@ -268,7 +269,7 @@ if (trackTES->size() != 0) {
                  break; // break inner loop if found
               }
             }
-            if (vtx_is_stored == true) break; // break outer loop if found
+            if (vtx_is_stored) break; // break outer loop if found
          }
          if (!vtx_is_stored) {
                  //if not stored
@@ -344,7 +345,7 @@ if (trackTES->size() != 0) {
        }
        //call the fitter
        //Trk::VxCandidate * myVxCandidate(0); --David S.
-       xAOD::Vertex * myxAODVertex(0);
+       xAOD::Vertex * myxAODVertex(nullptr);
        //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll,beam_spot); --David S.
        if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll,theconstraint);
        //else myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S.
@@ -373,26 +374,26 @@ if (trackTES->size() != 0) {
              if (largest_chi2 > m_trk_chi2_cut)
              {
                if (trk_coll.size() < 3) break;
-               else {
+               
                   trk_coll.erase(index);
                   if (trk_coll.size() >= 2) {
                     //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S.
-                    if (myxAODVertex!=0) { delete myxAODVertex; myxAODVertex=0; }
+                    if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; }
                     //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll, beam_spot); --David S.
                     if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll, theconstraint);
                     //else myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S.
                     else myxAODVertex = m_iVertexFitter->fit(trk_coll);
                   }
                   //if (myVxCandidate == 0) break; --David S.
-                  if (myxAODVertex == 0) break;
-               }
+                  if (myxAODVertex == nullptr) break;
+               
              } else bad_chi2 = false;
            }
       }
       //if (myVxCandidate && bad_chi2 == false && with_beam_spot) newVxContainer->push_back(myVxCandidate); --David S.
-      if (myxAODVertex && bad_chi2 == false && with_beam_spot) newVertexContainer->push_back(myxAODVertex);
+      if (myxAODVertex && !bad_chi2 && with_beam_spot) newVertexContainer->push_back(myxAODVertex);
       //if (myVxCandidate && bad_chi2 == false && !with_beam_spot) theVxContainer.push_back(myVxCandidate); --David S.
-      if (myxAODVertex && bad_chi2 == false && !with_beam_spot) theVertexContainer.push_back(myxAODVertex);
+      if (myxAODVertex && !bad_chi2 && !with_beam_spot) theVertexContainer.push_back(myxAODVertex);
     }
     //if (msgLvl(MSG::DEBUG)) msg() <<"vertex container size = "<<theVxContainer.size()<<endmsg; --David S.
     if (msgLvl(MSG::DEBUG)) msg() << "vertex container size = " << theVertexContainer.size() << endmsg;
@@ -459,7 +460,7 @@ if (trackTES->size() != 0) {
         }
      }
      //if (first_found==false && second_found==false) newVxContainer->push_back(*twoTrk_itr); --David S.
-     if (first_found==false && second_found==false) newVertexContainer->push_back(*twoTrk_itr);
+     if (!first_found && !second_found) newVertexContainer->push_back(*twoTrk_itr);
      else delete *twoTrk_itr;
    //}//end loop over two track Vx Candidates --David S.
    }//end loop over two track Vertices
@@ -477,13 +478,15 @@ return std::make_pair(newVertexContainer, newVertexAuxContainer);
 ///run on AOD
 /////////////////////////////////////////////////
 //VxContainer* InDet::ZVTOP_Tool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) --David S.
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::ZVTOP_Tool::findVertex(const Trk::TrackParticleBaseCollection* trackTES)
+std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+InDet::ZVTOP_Tool::findVertex(
+  const Trk::TrackParticleBaseCollection* trackTES) const
 {
 //VxContainer* newVxContainer = new VxContainer; --David S.
 xAOD::VertexContainer* newVertexContainer = new xAOD::VertexContainer;
 xAOD::VertexAuxContainer* newVertexAuxContainer = new xAOD::VertexAuxContainer;
 newVertexContainer->setStore( newVertexAuxContainer );
-if (trackTES->size() != 0) {
+if (!trackTES->empty()) {
   //some variables
   typedef Trk::TrackParticleBaseCollection::const_iterator TrackDataVecIter;
   const Trk::RecVertex beam_spot = m_iBeamCondSvc->beamVtx();
@@ -514,7 +517,7 @@ if (trackTES->size() != 0) {
     {
       Trk::Vertex* spatialPoint;
       spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2));
-      if (spatialPoint != 0) 
+      if (spatialPoint != nullptr) 
       {
          double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
          double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint);
@@ -533,9 +536,9 @@ if (trackTES->size() != 0) {
       delete spatialPoint;
     }
     //trk-IP combination
-    Trk::Vertex* spatialPoint = 0;
+    Trk::Vertex* spatialPoint = nullptr;
     spatialPoint = m_iSpatialPointFinder->findSpatialPoint(beam_spot,(*itr_1));
-    if (spatialPoint != 0) 
+    if (spatialPoint != nullptr) 
     {
       double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,*spatialPoint);
       double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
@@ -559,7 +562,7 @@ if (trackTES->size() != 0) {
   for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++)
   {
 
-     if (vtxState.size() == 0) vtxState.push_back(*itr1);
+     if (vtxState.empty()) vtxState.push_back(*itr1);
      else {
          Trk::Vertex vtx_new = (*itr1)->vertex();
          bool can_be_resolved = false;
@@ -588,7 +591,7 @@ if (trackTES->size() != 0) {
 //------------------------------------------------------------------------------//
 
 
-  if (vtxState.size() != 0 ){
+  if (!vtxState.empty() ){
     if (msgLvl(MSG::DEBUG)) msg() << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg;
     //sort the vtxState collection, starting with a highest vtx probability
     std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_sorted;
@@ -629,7 +632,7 @@ if (trackTES->size() != 0) {
                  break; // break inner loop if found
               }
             }
-            if (vtx_is_stored == true) break; // break outer loop if found
+            if (vtx_is_stored) break; // break outer loop if found
          }
          if (!vtx_is_stored) {
                  //if not stored
@@ -705,7 +708,7 @@ if (trackTES->size() != 0) {
        }
        //call the fitter
        //Trk::VxCandidate * myVxCandidate(0); --David S.
-       xAOD::Vertex * myxAODVertex(0);
+       xAOD::Vertex * myxAODVertex(nullptr);
        //const Amg::Vector3D p(0.,0.,0.); --David S.
        const Amg::Vector3D startingPoint(0.,0.,0.);
        //Trk::Vertex startingPoint(p); --David S.
@@ -738,26 +741,26 @@ if (trackTES->size() != 0) {
              if (largest_chi2 > m_trk_chi2_cut)
              {
                if (trk_coll.size() < 3) break;
-               else {
+               
                   trk_coll.erase(index);
                   if (trk_coll.size() >= 2) {
                     //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S.
-                    if (myxAODVertex!=0) { delete myxAODVertex; myxAODVertex=0; }
+                    if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; }
                     //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll, beam_spot); --David S.
                     if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll, theconstraint);
                     //else myVxCandidate = m_iVertexFitter->fit(trk_coll,startingPoint); --David S.
                     else myxAODVertex = m_iVertexFitter->fit(trk_coll,startingPoint);
                   }
                   //if (myVxCandidate == 0) break; --David S.
-                  if (myxAODVertex == 0) break;
-               }
+                  if (myxAODVertex == nullptr) break;
+               
              } else bad_chi2 = false;
            }
       }
       //if (myVxCandidate && bad_chi2 == false && with_beam_spot) newVxContainer->push_back(myVxCandidate); --David S.
-      if (myxAODVertex && bad_chi2 == false && with_beam_spot) newVertexContainer->push_back(myxAODVertex);
+      if (myxAODVertex && !bad_chi2 && with_beam_spot) newVertexContainer->push_back(myxAODVertex);
       //if (myVxCandidate && bad_chi2 == false && !with_beam_spot) theVxContainer.push_back(myVxCandidate); --David S.
-      if (myxAODVertex && bad_chi2 == false && !with_beam_spot) theVertexContainer.push_back(myxAODVertex);
+      if (myxAODVertex && !bad_chi2 && !with_beam_spot) theVertexContainer.push_back(myxAODVertex);
     }
     //if (msgLvl(MSG::DEBUG)) msg() <<"vertex container size = "<<theVxContainer.size()<<endmsg; --David S.
     if (msgLvl(MSG::DEBUG)) msg() << "vertex container size = " << theVertexContainer.size() << endmsg;
@@ -824,7 +827,7 @@ if (trackTES->size() != 0) {
         }
      }
      //if (first_found==false && second_found==false) newVxContainer->push_back(*twoTrk_itr); --David S.
-     if (first_found == false && second_found == false) newVertexContainer->push_back(*twoTrk_itr);
+     if (!first_found && !second_found) newVertexContainer->push_back(*twoTrk_itr);
      else delete *twoTrk_itr;
    //}//end loop over two track Vx Candidates --David S.
    }//end loop over two track Vertices
@@ -839,15 +842,18 @@ if (trackTES->size() != 0) {
 return std::make_pair(newVertexContainer, newVertexAuxContainer);
 }
 
-
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>  InDet::ZVTOP_Tool::findVertex(const xAOD::TrackParticleContainer* trackParticles)
+std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+InDet::ZVTOP_Tool::findVertex(
+  const xAOD::TrackParticleContainer* trackParticles) const
 {
-     if(msgLvl(MSG::DEBUG)){ 
- 	msg(MSG::DEBUG) << "N="<<trackParticles->size()<<" xAOD::TrackParticles found" << endmsg; 
- 	msg(MSG::DEBUG) << "No ZVTOP_Tool implementation for xAOD::TrackParticle" << endmsg; 
+     if(msgLvl(MSG::DEBUG)){
+       msg(MSG::DEBUG) << "N=" << trackParticles->size()
+                       << " xAOD::TrackParticles found" << endmsg;
+       msg(MSG::DEBUG) << "No ZVTOP_Tool implementation for xAOD::TrackParticle"
+                       << endmsg; 
      } 
-     xAOD::VertexContainer *xAODContainer(0);
-     xAOD::VertexAuxContainer *xAODAuxContainer(0);   
+     xAOD::VertexContainer *xAODContainer(nullptr);
+     xAOD::VertexAuxContainer *xAODAuxContainer(nullptr);   
      return std::make_pair(xAODContainer, xAODAuxContainer); 
 }
 
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx
index 486931a1e225..ea50ad0fcaaf 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -96,7 +96,7 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::TrackParticleBase&
 double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Perigee* trkPer, Trk::Vertex& vec) const {
 
   double probTube = 0.;
-  Amg::Vector3D lp =vec.position();
+  const Amg::Vector3D& lp =vec.position();
   Trk::PerigeeSurface perigeeSurface(lp);
   double f_phi0 = trkPer->parameters()[Trk::phi0];
   double f_theta = trkPer->parameters()[Trk::theta];
@@ -109,7 +109,7 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Perigee* trkPer, Tr
     diff[2]= extrapolatedPerigee->parameters()[Trk::phi0] - f_phi0;
     diff[3]= extrapolatedPerigee->parameters()[Trk::theta] - f_theta;
     diff[4]= extrapolatedPerigee->parameters()[Trk::qOverP] - f_qOverP;
-    if (extrapolatedPerigee->covariance() != 0) {
+    if (extrapolatedPerigee->covariance() != nullptr) {
       AmgMatrix(5,5) exp_perigee_weight = (*extrapolatedPerigee->covariance()).inverse();
       probTube = std::exp(-0.5*diff.transpose()*exp_perigee_weight*diff);
     } else {
-- 
GitLab


From 1e98ba2c2bfc066af8c4f6aef3ab673531212814 Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Wed, 10 Jun 2020 13:41:00 +0200
Subject: [PATCH 113/266] Minor updates for NSW decoding in the trigger

Just making the instances of RDOtoPRD decoding algorithms for the NSW detectors distinct so we don't run into interference issues in the future (probably the only reason it works OK now is that the seeded decoding isn't yet implemented). Also slightly updating the naming for the MM decoding to be consistent with the other technologies (which makes searching the log files easier).
---
 .../TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index e12877a15ce5..c7fd8c0bb7c7 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -100,7 +100,7 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
     ToolSvc += sTgcRdoToPrepDataTool
 
     from MuonRdoToPrepData.MuonRdoToPrepDataConf import StgcRdoToStgcPrepData
-    StgcRdoToStgcPrepData = StgcRdoToStgcPrepData(name                    = "StgcRdoToStgcPrepData")
+    StgcRdoToStgcPrepData = StgcRdoToStgcPrepData(name                    = "StgcRdoToStgcPrepData" + postFix)
 
     viewAlgs_MuonPRD.append( StgcRdoToStgcPrepData )
 
@@ -116,7 +116,7 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
     ToolSvc += MmRdoToPrepDataTool
 
     from MuonRdoToPrepData.MuonRdoToPrepDataConf import MM_RdoToMM_PrepData
-    MM_RdoToMM_PrepData = MM_RdoToMM_PrepData(name                    = "MM_RdoToMM_PrepData",
+    MM_RdoToMM_PrepData = MM_RdoToMM_PrepData(name                    = "MMRdoToMMPrepData" + postFix,
                                             PrintInputRdo = True  )
 
     viewAlgs_MuonPRD.append(  MM_RdoToMM_PrepData )
-- 
GitLab


From c5ff44707365406bc5fb2ecbfb0f4697ea18cffa Mon Sep 17 00:00:00 2001
From: tstreble <thomas.strebler@cern.ch>
Date: Wed, 10 Jun 2020 14:21:04 +0200
Subject: [PATCH 114/266] Fixed bug in track covariance matrix compressor

---
 .../xAOD/xAODTrackingCnv/src/TrackParticleCompressorTool.cxx  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Event/xAOD/xAODTrackingCnv/src/TrackParticleCompressorTool.cxx b/Event/xAOD/xAODTrackingCnv/src/TrackParticleCompressorTool.cxx
index a51ec75f21de..0831e6655ce4 100644
--- a/Event/xAOD/xAODTrackingCnv/src/TrackParticleCompressorTool.cxx
+++ b/Event/xAOD/xAODTrackingCnv/src/TrackParticleCompressorTool.cxx
@@ -78,9 +78,9 @@ namespace xAODMaker {
        return offDiagVecCompr;
      };
 
-     const std::vector< float >& offDiagVec = tp.definingParametersCovMatrixOffDiagVec();
+     const std::vector< float > offDiagVec = tp.definingParametersCovMatrixOffDiagVec();
      tp.setDefiningParametersCovMatrixOffDiagVec( compressOffDiag( offDiagVec, m_offDiagCovMatrixBits ) );
-     int offDiagComprBits = m_offDiagCovMatrixBits-1;
+     int offDiagComprBits = m_offDiagCovMatrixBits;
 
      while( ( tp.definingParametersCovMatrix().determinant() <= 0.0 ) &&
 	    ( ++offDiagComprBits <= m_diagCovMatrixBits ) ) {
-- 
GitLab


From ec3ceda067da8b659de5f62579b83692a8be84f6 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus713.cern.ch>
Date: Wed, 10 Jun 2020 15:45:33 +0200
Subject: [PATCH 115/266] Debug messages and remove irrelevant properties for
 ghost setup

---
 .../Jet/JetRec/Root/JetClusterer.cxx          | 10 ++++++++++
 .../Jet/JetRec/python/JetRecStandardTools.py  | 20 +------------------
 .../Jet/JetRec/src/PseudoJetAlgorithm.cxx     | 16 ++++++++-------
 .../Jet/JetRec/src/PseudoJetAlgorithm.h       |  5 +----
 .../Jet/JetRec/src/PseudoJetMerger.cxx        | 13 +++++++++++-
 5 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx b/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
index a4cf76d335f9..e7ac8847ef1a 100644
--- a/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
@@ -85,6 +85,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
   jets->setStore(auxCont.get());
 
   const PseudoJetVector* pseudoJetVector = pjContHandle->casVectorPseudoJet();
+  ATH_MSG_DEBUG("Pseudojet input container has size " << pseudoJetVector->size());
 
   // -----------------------
   // Build the cluster sequence
@@ -110,6 +111,11 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
   // Thus the contained PseudoJet will be kept frozen there and we can safely use pointer to them from the xAOD::Jet objects
   auto pjVector = std::make_unique<PseudoJetVector>(fastjet::sorted_by_pt(clSequence->inclusive_jets(m_ptmin)) );
   ATH_MSG_DEBUG("Found jet count: " << pjVector->size());
+  if(msgLevel(MSG::VERBOSE)) {
+    for(const auto& pj : *pjVector) {
+      msg() << "  Pseudojet with pt " << std::setprecision(4) << pj.Et()*1e-3 << " has " << pj.constituents().size() << " constituents" << endmsg;
+    }
+  }
   
   // Let fastjet deal with deletion of ClusterSequence, so we don't need to also put it in the EventStore.
   clSequence->delete_self_when_unused();
@@ -117,6 +123,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
 
   // -------------------------------------
   // translate to xAOD::Jet
+  ATH_MSG_DEBUG("Converting pseudojets to xAOD::Jet");
   static SG::AuxElement::Accessor<const fastjet::PseudoJet*> pjAccessor("PseudoJet");
   PseudoJetTranslator pjTranslator(useArea, useArea);
   for (const fastjet::PseudoJet &  pj: *pjVector ) {
@@ -131,6 +138,9 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
     jet->setAlgorithmType(ialg);
     jet->setSizeParameter((float)m_jetrad);
     if(useArea) jet->setAttribute(xAOD::JetAttribute::JetGhostArea, (float)m_ghostarea);
+    
+    ATH_MSG_VERBOSE( "  xAOD::Jet with pt " << std::setprecision(4) << jet->pt()*1e-3 << " has " << jet->getConstituents().size() << " constituents" );
+    ATH_MSG_VERBOSE( "  Leading constituent is of type " << jet->getConstituents()[0].rawConstituent()->type());
   }
 
   // -------------------------------------
diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
index 93215db951c5..9bee2b6c3e78 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
@@ -105,9 +105,6 @@ if jtm.haveParticleJetTools:
   from ParticleJetTools.ParticleJetToolsConf import ParticleJetDeltaRLabelTool
 
 
-ghostScaleFactor = 1e-40
-
-
 #--------------------------------------------------------------
 # Track selection.
 #--------------------------------------------------------------
@@ -218,9 +215,7 @@ jtm += JetConstituentsRetriever(
   UsePseudojet = True,
   UseJetConstituents = True,
   PseudojetRetriever = jtm.jpjretriever,
-  GhostLabels = labs,
-  GhostScale = ghostScaleFactor
-)
+  GhostLabels = labs)
 
 #--------------------------------------------------------------
 # Pseudojet builders.
@@ -244,7 +239,6 @@ jtm += PseudoJetAlgorithm(
   Label = "LCTopoOrigin",
   OutputContainer = "PseudoJetLCTopoOrigin",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 jtm += PseudoJetAlgorithm(
@@ -253,7 +247,6 @@ jtm += PseudoJetAlgorithm(
   Label = "EMTopoOrigin",
   OutputContainer = "PseudoJetEMTopoOrigin",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 # Clusters.
@@ -263,7 +256,6 @@ jtm += PseudoJetAlgorithm(
   Label = "LCTopo",
   OutputContainer = "PseudoJetLCTopo",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 # EM clusters.
@@ -273,7 +265,6 @@ jtm += PseudoJetAlgorithm(
   Label = "EMTopo",
   OutputContainer = "PseudoJetEMTopo",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 # Tracks.
@@ -283,7 +274,6 @@ jtm += PseudoJetAlgorithm(
   Label = "Track",
   OutputContainer = "PseudoJetTrack",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 # Ghost tracks.
@@ -293,7 +283,6 @@ jtm += PseudoJetAlgorithm(
   Label = "GhostTrack",
   OutputContainer = "PseudoJetGhostTrack",
   SkipNegativeEnergy = True,
-  GhostScale = ghostScaleFactor
 )
 
 # Muon segments
@@ -366,7 +355,6 @@ jtm += PseudoJetAlgorithm(
   InputContainer = "CHSParticleFlowObjects",
   OutputContainer = "PseudoJetEMPFlow",
   SkipNegativeEnergy = True,
-  GhostScale = 0.0
 )
 
 # AntiKt2 track jets.
@@ -376,7 +364,6 @@ jtm += PseudoJetAlgorithm(
   Label = "GhostAntiKt2TrackJet",   # this is the name you'll use to retrieve associated ghosts
   OutputContainer = "PseudoJetGhostAntiKt2TrackJet",
   SkipNegativeEnergy = True,
-  GhostScale = ghostScaleFactor,   # This makes the PseudoJet Ghosts, and thus the reco flow will treat them as so.
 )
 
 # AntiKt4 track jets.
@@ -386,7 +373,6 @@ jtm += PseudoJetAlgorithm(
   Label = "GhostAntiKt4TrackJet",   # this is the name you'll use to retrieve associated ghosts
   OutputContainer = "PseudoJetGhostAntiKt4TrackJet",
   SkipNegativeEnergy = True,
-  GhostScale = ghostScaleFactor,   # This makes the PseudoJet Ghosts, and thus the reco flow will treat them as so.
 )
 
 # Truth.
@@ -396,7 +382,6 @@ if jetFlags.useTruth and jtm.haveParticleJetTools:
     Label = "Truth",
     InputContainer = jtm.truthpartcopy.OutputName,
     OutputContainer = "PseudoJetTruth",
-    GhostScale = 0.0,
     SkipNegativeEnergy = True,
 
   )
@@ -405,7 +390,6 @@ if jetFlags.useTruth and jtm.haveParticleJetTools:
     Label = "TruthWZ",
     InputContainer = jtm.truthpartcopywz.OutputName,
     OutputContainer = "PseudoJetTruthWZ",
-    GhostScale = 0.0,
     SkipNegativeEnergy = True,
     
   )
@@ -414,7 +398,6 @@ if jetFlags.useTruth and jtm.haveParticleJetTools:
     Label = "GhostTruth",
     InputContainer = jtm.truthpartcopy.OutputName,
     OutputContainer = "PseudoJetGhostTruth",
-    GhostScale = ghostScaleFactor,
     SkipNegativeEnergy = True,
   )
 
@@ -426,7 +409,6 @@ if jetFlags.useTruth and jtm.haveParticleJetTools:
       Label = "Ghost" + ptype,
       OutputContainer = "PseudoJetGhost" + ptype,
       SkipNegativeEnergy = True,
-      GhostScale = ghostScaleFactor,
     )
 
   # ParticleJetTools tools may be omitted in analysi releases.
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
index 425f0a846415..ad589b54b689 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
@@ -8,6 +8,9 @@
 #include "JetRec/PseudoJetGetter.h"
 #include "JetRec/IParticleExtractor.h"
 
+// Fixed value by which to scale ghost kinematics
+constexpr float ghostscale = 1e-40;
+
 //**********************************************************************
 
 StatusCode PseudoJetAlgorithm::initialize() {
@@ -49,18 +52,16 @@ StatusCode PseudoJetAlgorithm::execute(const EventContext& ctx) const {
     ATH_MSG_WARNING("Failed to retrieve " << m_incoll.key() << " for PseudoJet creation!" );
     return StatusCode::SUCCESS;
   }
-  ATH_MSG_DEBUG("Retrieved xAOD container " << m_incoll.key() << "of size " << incoll->size()
-		<< ", ghost scale=" << m_ghostscale  
-		<<  ", isGhost=" << bool(m_ghostscale));
+  ATH_MSG_DEBUG("Retrieved xAOD container " << m_incoll.key() << " of size " << incoll->size()
+		<<  ", isGhost=" << m_isGhost);
 
   ATH_MSG_DEBUG("Creating PseudoJetContainer...");
   std::unique_ptr<PseudoJetContainer> pjcont( createPJContainer(*incoll) );
 
   auto outcoll = SG::makeHandle(m_outcoll, ctx);
-  ATH_CHECK( outcoll.record(std::move(pjcont)) );
+  ATH_MSG_DEBUG("Created new PseudoJetContainer \"" << m_outcoll.key() << "\" with size " << pjcont->size());
 
-  ATH_MSG_DEBUG("Created new PseudoJetContainer in event store: " 
-		<< m_outcoll.key());
+  ATH_CHECK( outcoll.record(std::move(pjcont)) );
 
   return StatusCode::SUCCESS;
 }
@@ -76,7 +77,7 @@ std::unique_ptr<PseudoJetContainer> PseudoJetAlgorithm::createPJContainer(const
   
   // ghostify the pseudojets if necessary
   if(m_isGhost){
-    for(fastjet::PseudoJet& pj : vpj) {pj *= 1e-40;}
+    for(fastjet::PseudoJet& pj : vpj) {pj *= ghostscale;}
   }
   
   // Put the PseudoJetContainer together
@@ -109,6 +110,7 @@ void PseudoJetAlgorithm::print() const {
   ATH_MSG_INFO("   Skip negative E: " << sskip);
   ATH_MSG_INFO("         Is EMTopo: " << m_emtopo);
   ATH_MSG_INFO("          Is PFlow: " << m_pflow);
+  ATH_MSG_INFO("          Is ghost: " << m_isGhost);
   ATH_MSG_INFO(" Treat negative E as ghost: " << m_negEnergyAsGhosts);
 }
 
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
index 760b743160e4..b8e388f38edc 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
@@ -66,15 +66,12 @@ private:
   /// Flag indicating to skip objects with E<0.
   Gaudi::Property<bool> m_skipNegativeEnergy{this, "SkipNegativeEnergy", false, "Whether to skip negative energy inputs"};
 
-  /// Ghost scale factor.
-  Gaudi::Property<double> m_ghostscale{this, "GhostScale", 0.0, "Scale factor to convert PJs into ghosts that don't affect jet kinematics"};
-
   /// Flag indicating to treat objects with E<0 as ghosts  (useful for HI)
   Gaudi::Property<bool> m_negEnergyAsGhosts{this, "TreatNegativeEnergyAsGhost", false, "Whether to convert negative energy inputs into ghosts"};
 
   /// Internal steering flags
   /// Set in initialize()
-  bool m_isGhost{false}; /// Determinines whether the PJs should be made ghosts
+  bool m_isGhost{false}; /// Determines whether the PJs should be made ghosts
   bool m_emtopo{false};  /// True if inputs are EM-scale topo clusters.
   bool m_pflow{false};   /// True if inputs are PFlow
 
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetMerger.cxx b/Reconstruction/Jet/JetRec/src/PseudoJetMerger.cxx
index fdf32d97889a..2f642be18201 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetMerger.cxx
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetMerger.cxx
@@ -12,6 +12,16 @@ StatusCode PseudoJetMerger::initialize() {
     return StatusCode::FAILURE;
   }
 
+  // Ugly check but no other good way of testing at initialisation
+  auto add_if_ghost = [](unsigned int sum_ghosts, const SG::ReadHandleKey<PseudoJetContainer>& pjckey) {
+    return sum_ghosts + pjckey.key().find("Ghost")!=std::string::npos;
+  };
+  unsigned int N_ghosts = std::accumulate(m_inputPJC.begin(), m_inputPJC.end(), 0, add_if_ghost);
+  if(m_inputPJC.size()-N_ghosts!=1) {
+    ATH_MSG_ERROR("List of input pseudojet containers to be merged must have exactly one non-ghost collection!");
+    return StatusCode::FAILURE;
+  }
+
   ATH_CHECK( m_inputPJC.initialize() );
   ATH_CHECK( m_outcoll.initialize() );
   
@@ -28,10 +38,11 @@ StatusCode PseudoJetMerger::execute(const EventContext& ctx) const {
     if(!pjcHandle.isValid()){
       ATH_MSG_ERROR("Can't retrieve PseudoJetContainer "<< pjcKey.key() ); return StatusCode::FAILURE;
     }
-    allPseudoJets->append(pjcHandle.get() );
+    allPseudoJets->append( pjcHandle.get() );
   }
 
   SG::WriteHandle<PseudoJetContainer> outHandle(m_outcoll, ctx);
+  ATH_MSG_DEBUG("Merged PseudoJetContainer \"" << m_outcoll.key() << "\" has size " << allPseudoJets->size());
   ATH_CHECK( outHandle.record(std::move(allPseudoJets)) );
   
   return StatusCode::SUCCESS;
-- 
GitLab


From ee593cc5976fb77e12c9c7c0bb824f12b65b6426 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus713.cern.ch>
Date: Wed, 10 Jun 2020 15:46:33 +0200
Subject: [PATCH 116/266] Need to convert types of some attributes from
 GaudiProperty

---
 Reconstruction/Jet/JetRec/src/JetTrimming.cxx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/src/JetTrimming.cxx b/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
index 353de103e942..445674e9ffa5 100644
--- a/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
+++ b/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
@@ -104,9 +104,10 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
     
     int nptrim = trimmedPJ.pieces().size();
     jet->setAttribute<int>(xAOD::JetAttribute::TransformType, xAOD::JetTransform::Trim);
-    jet->setAttribute(xAOD::JetAttribute::RClus, m_rclus);
-    jet->setAttribute(xAOD::JetAttribute::PtFrac, m_ptfrac);
     jet->setAttribute<int>(xAOD::JetAttribute::NTrimSubjets, nptrim);
+    // Need to convert from GaudiProperty
+    jet->setAttribute(xAOD::JetAttribute::RClus, float(m_rclus));
+    jet->setAttribute(xAOD::JetAttribute::PtFrac, float(m_ptfrac));
     ATH_MSG_DEBUG("Properties after trimming:");
     ATH_MSG_DEBUG("   ncon: " << trimmedPJ.constituents().size() << "/"
 		  << parentPJ->constituents().size());
-- 
GitLab


From d27841b9502ceaf0d5c25699b175405a0b7298d9 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus713.cern.ch>
Date: Wed, 10 Jun 2020 15:46:48 +0200
Subject: [PATCH 117/266] Making grooming test actually do useful stuff,
 switched from JetTrimmer to JetTrimming

---
 .../Jet/JetRec/share/JetRecAlgTestCfg.py      | 91 ++++++++++---------
 1 file changed, 46 insertions(+), 45 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
index ccf56adce351..ad9f2e7cc755 100755
--- a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
+++ b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
@@ -84,16 +84,14 @@ def JetInputCfg(ConfigFlags):
         InputContainer = "LCOriginTopoClusters",
         OutputContainer = "PseudoJetLCTopo",
         Label = "LCTopo",
-        SkipNegativeEnergy=True,
-        GhostScale=0.)
+        SkipNegativeEnergy=True)
 
     ghostpjgalg = CompFactory.PseudoJetAlgorithm(
-        "pjgalg_Truth",
+        "pjgalg_GhostTruth",
         InputContainer = "TruthParticles",
-        OutputContainer = "PseudoJetTruth",
-        Label = "Truth",
-        SkipNegativeEnergy=True,
-        GhostScale=0.)
+        OutputContainer = "PseudoJetGhostTruth",
+        Label = "GhostTruth",
+        SkipNegativeEnergy=True)
 
     pjcs = [constitpjgalg.OutputContainer,ghostpjgalg.OutputContainer]
 
@@ -122,14 +120,14 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
         "pjmergealg_"+buildjetsname,
         InputPJContainers = pjcs,
         OutputContainer = "PseudoJetMerged_"+buildjetsname)
-
+    
     buildcfg.addEventAlgo(mergepjalg)
 
     # Create the JetClusterer, set some standard options
     jclust = CompFactory.JetClusterer("builder")
     jclust.JetAlgorithm = "AntiKt"
     jclust.JetRadius = 1.0
-    jclust.PtMin = 5e5 # MeV
+    jclust.PtMin = 10e3 # MeV
     jclust.InputPseudoJets = "PseudoJetMerged_"+buildjetsname
     jclust.JetInputType = 1 # Hardcoded "magic number" for now
     # See https://gitlab.cern.ch/atlas/athena/blob/master/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
@@ -163,17 +161,17 @@ def JetGroomAlgCfg(ConfigFlags,buildjetsname,groomjetsname):
     groomcfg.addSequence( CompFactory.AthSequencer(sequencename) )
 
     # Create the JetGroomer, provide it with a JetTrimmer
-    jgroom = CompFactory.JetGroomer("groomer")
-    jgroom.Groomer = CompFactory.JetTrimmer("trimSmallR2Frac5",RClus=0.2,PtFrac=0.05,JetBuilder=CompFactory.JetFromPseudojet())
-    jgroom.UngroomedJets = buildjetsname
-    jgroom.ParentPseudoJets = "PseudoJetMerged_"+buildjetsname
+    jtrim = CompFactory.JetTrimming("trimSmallR2Frac5",RClus=0.2,PtFrac=0.05)
+    jtrim.InputJetContainer = buildjetsname
+    jtrim.InputPseudoJets = "PseudoJetMerged_"+buildjetsname
+    jtrim.TrimmedOutputPseudoJets = "PseudoJet"+groomjetsname
 
     # Create the JetRecAlg, configure it to use the builder
     # using constructor syntax instead
     # (equivalent to setting properties with "=")
     jra = CompFactory.JetRecAlg(
         "JRA_groom",
-        Provider = jgroom,       # Single ToolHandle
+        Provider = jtrim,       # Single ToolHandle
         Modifiers = [], # ToolHandleArray
         OutputContainer = groomjetsname)
 
@@ -212,34 +210,37 @@ def JetCopyAlgCfg(ConfigFlags,buildjetsname,copyjetsname):
     copycfg.addEventAlgo( jra, sequencename )
     return copycfg
 
-# Add the build config to the job
-# One could add options to make it more customisable
-buildjetsname = "MyAntiKt10LCTopoJets"
-groomjetsname = "MyAntiKt10LCTopoTrimmedSmallR5Frac20Jets"
-copyjetsname = "CopyAntiKt10LCTopoJets"
-cfg.merge( JetBuildAlgCfg(ConfigFlags, buildjetsname) )
-cfg.merge( JetGroomAlgCfg(ConfigFlags, buildjetsname, groomjetsname) )
-cfg.merge( JetCopyAlgCfg(ConfigFlags, buildjetsname, copyjetsname) )
-
-# Write what we produced to AOD
-# First define the output list
-outputlist = ["EventInfo#*"]
-jetlist = [buildjetsname]
-for jetcoll in jetlist:
-    outputlist += ["xAOD::JetContainer#"+jetcoll,
-                   "xAOD::JetAuxContainer#"+jetcoll+"Aux.-PseudoJet"]
-outputlist += ["xAOD::JetContainer#"+copyjetsname,
-               "xAOD::ShallowAuxContainer#"+copyjetsname+"Aux.-PseudoJet"]
-
-# Now get the output stream components
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-cfg.merge(OutputStreamCfg(ConfigFlags,"xAOD",ItemList=outputlist))
-from pprint import pprint
-pprint( cfg.getEventAlgo("OutputStreamxAOD").ItemList )
-
-# For local tests, not in the CI
-# Print the contents of the store every event
-# cfg.getService("StoreGateSvc").Dump = True
-
-# Run the job
-cfg.run(maxEvents=1)
+if __name__=="__main__":
+    # Add the build config to the job
+    # One could add options to make it more customisable
+    buildjetsname = "MyAntiKt10LCTopoJets"
+    groomjetsname = "MyAntiKt10LCTopoTrimmedSmallR5Frac20Jets"
+    copyjetsname = "CopyAntiKt10LCTopoJets"
+    cfg.merge( JetBuildAlgCfg(ConfigFlags, buildjetsname) )
+    cfg.merge( JetGroomAlgCfg(ConfigFlags, buildjetsname, groomjetsname) )
+    cfg.merge( JetCopyAlgCfg(ConfigFlags, buildjetsname, copyjetsname) )
+
+    # Write what we produced to AOD
+    # First define the output list
+    outputlist = ["EventInfo#*"]
+    jetlist = [buildjetsname,groomjetsname,copyjetsname]
+    for jetcoll in jetlist:
+        if "Copy" in jetcoll:
+            outputlist += ["xAOD::JetContainer#"+copyjetsname,
+                           "xAOD::ShallowAuxContainer#"+copyjetsname+"Aux.-PseudoJet"]
+        else:
+            outputlist += ["xAOD::JetContainer#"+jetcoll,
+                           "xAOD::JetAuxContainer#"+jetcoll+"Aux.-PseudoJet"]
+
+    # Now get the output stream components
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    cfg.merge(OutputStreamCfg(ConfigFlags,"xAOD",ItemList=outputlist))
+    from pprint import pprint
+    pprint( cfg.getEventAlgo("OutputStreamxAOD").ItemList )
+
+    # For local tests, not in the CI
+    # Print the contents of the store every event
+    # cfg.getService("StoreGateSvc").Dump = True
+
+    # Run the job
+    cfg.run(maxEvents=10)
-- 
GitLab


From 0c6dddf832904e905c57160c7679395aa92457f1 Mon Sep 17 00:00:00 2001
From: Somadutta Bhatta <somadutta.bhatta@stonybrook.edu>
Date: Wed, 10 Jun 2020 14:13:43 +0000
Subject: [PATCH 118/266] added decoration to TriggerEDMRun3 py file

---
 .../src/HLTMinBiasMonAlgMT.cxx                 |  6 +++---
 .../TrigEDMConfig/python/TriggerEDMRun3.py     | 18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasMonAlgMT.cxx b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasMonAlgMT.cxx
index f6febdad729e..700f5f0d566b 100644
--- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasMonAlgMT.cxx
+++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasMonAlgMT.cxx
@@ -145,11 +145,11 @@ StatusCode HLTMinBiasMonAlgMT::monitorSPCounts(const EventContext& context) cons
           auto xaodntrk = Scalar( "xaodnTrk", HLTxaodTrkHandle->size() );
           auto decision = Scalar<int>("decision", trigDecTool->isPassed(trig) ? 1 : 0);
           auto NumGoodOfflineTracks = Scalar("NumGoodOfflineTracks", inDetTrackParticlesHandle->size());
-          //auto ntrk = Scalar( "nTrk", trkCountsHandle->at(0)->getDetail<int>("ntrks") );
-          //auto NumGoodOnlineTracks = Scalar("NumGoodOnlineTracks", trkCountsHandle->at(0)->getDetail<int>("ntrks"));
+          auto ntrk = Scalar( "nTrk", trkCountsHandle->at(0)->getDetail<int>("ntrks") );
+          auto NumGoodOnlineTracks = Scalar("NumGoodOnlineTracks", trkCountsHandle->at(0)->getDetail<int>("ntrks"));//set appropriate condition for selection later
           auto whichtrigger =  Scalar("whichTrigger",trig);
 
-          fill(thisTrig+"_Eff",/*ntrk,NumGoodOnlineTracks,*/xaodntrk,decision,NumGoodOfflineTracks,whichtrigger);
+          fill(thisTrig+"_Eff",ntrk,NumGoodOnlineTracks,xaodntrk,decision,NumGoodOfflineTracks,whichtrigger);
           fill("EffAll",decision,whichtrigger);
         }
 
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 0a7c6c38b6dd..f84f7f781660 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -100,7 +100,7 @@ TriggerHLTListRun3 = [
     ('xAOD::TrigEMClusterAuxContainer#HLT_L2CaloEMClustersAux.',    'BS ESD AODFULL', 'Egamma'),
     ('xAOD::TrigRingerRingsContainer#HLT_FastCaloRinger',             'BS ESD AODFULL', 'Egamma', 'inViews:EMCaloViews'), #Ringer
     ('xAOD::TrigRingerRingsAuxContainer#HLT_FastCaloRingerAux.',      'BS ESD AODFULL', 'Egamma'), #Ringer
-    
+
     ('xAOD::TrigPhotonContainer#HLT_L2Photons',                     'BS ESD AODFULL', 'Egamma', 'inViews:EMPhotonViews'),
     ('xAOD::TrigPhotonAuxContainer#HLT_L2PhotonsAux.',              'BS ESD AODFULL', 'Egamma'),
     ('xAOD::TrigElectronContainer#HLT_L2Electrons',                 'BS ESD AODFULL', 'Egamma', 'inViews:EMElectronViews'),
@@ -249,7 +249,7 @@ TriggerHLTListRun3 = [
 
     ('xAOD::JetContainer#HLT_AntiKt4EMTopoJets_subjes',                        'BS ESD AODFULL', 'Jet'),
     ('xAOD::JetAuxContainer#HLT_AntiKt4EMTopoJets_subjesAux.'+JetVars,         'BS ESD AODFULL', 'Jet'),
-   
+
     ('xAOD::JetContainer#HLT_AntiKt4EMTopoJets_nojcalib',                      'BS ESD AODFULL', 'Jet'),
     ('xAOD::JetAuxContainer#HLT_AntiKt4EMTopoJets_nojcalibAux.'+JetVars,       'BS ESD AODFULL', 'Jet'),
 
@@ -289,9 +289,9 @@ TriggerHLTListRun3 = [
     ('xAOD::TrackParticleContainer#HLT_IDTrack_FS_FTF',                 'BS ESD AODFULL', 'Jet'),
     ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_FS_FTFAux.',          'BS ESD AODFULL', 'Jet'),
 
-    # custom BeamSpot tracks - we don't want to write these out in general so this 
+    # custom BeamSpot tracks - we don't want to write these out in general so this
     # is commented, if we want to write them out at some point, then these lines
-    # should be uncommented and they should get written out   
+    # should be uncommented and they should get written out
     #    ('xAOD::TrackParticleContainer#HLT_IDTrack_BeamSpot_FTF',         'BS ESD AODFULL', 'ID', 'inViews:beamspotViewRoIs' ),
     #    ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_BeamSpot_FTFAux.',  'BS ESD AODFULL', 'ID', 'inViews:beamspotViewRoIs' ),
 
@@ -352,11 +352,11 @@ TriggerHLTListRun3 = [
     # bjet RoI Descriptor used for EventView creation
     ('TrigRoiDescriptorCollection#HLT_Roi_Bjet',                   'BS ESD AODFULL', 'Bjet'),
 
-    # bjet Second Stage Fast tracks 
+    # bjet Second Stage Fast tracks
     ('xAOD::TrackParticleContainer#HLT_IDTrack_Bjet_FTF',        'BS ESD AODFULL', 'Bjet', 'inViews:BTagViews'),
     ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Bjet_FTFAux.', 'BS ESD AODFULL', 'Bjet'),
 
-    # bjet Second Stage Precision tracks 
+    # bjet Second Stage Precision tracks
     ('xAOD::TrackParticleContainer#HLT_IDTrack_Bjet_IDTrig',        'BS ESD AODFULL', 'Bjet', 'inViews:BTagViews'),
     ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Bjet_IDTrigAux.', 'BS ESD AODFULL', 'Bjet'),
 
@@ -393,10 +393,10 @@ TriggerHLTListRun3 = [
     ('ROIB::RoIBResult#*',                         'ESD', 'Misc'),
 
     ('xAOD::TrigCompositeContainer#HLT_SpacePointCounts',            'BS ESD AODFULL AODSLIM', 'MinBias'),
-    ('xAOD::TrigCompositeAuxContainer#HLT_SpacePointCountsAux.',     'BS ESD AODFULL AODSLIM', 'MinBias'),
+    ('xAOD::TrigCompositeAuxContainer#HLT_SpacePointCountsAux.totNumPixSP.totNumPixCL_1.totNumPixCL_2.totNumPixCLmin3.pixClBarrel.pixClEndcapA.pixClEndcapC.totNumSctSP.SctSpBarrel.SctSpEndcapA.SctSpEndcapC',     'BS ESD AODFULL AODSLIM', 'MinBias'),
 
-    ('xAOD::TrigCompositeContainer#HLT_TrackCount',                  'BS ESD AODFULL AODSLIM', 'MinBias'),
-    ('xAOD::TrigCompositeAuxContainer#HLT_TrackCountAux.',            'BS ESD AODFULL AODSLIM', 'MinBias'),
+    ('xAOD::TrigCompositeContainer#HLT_TrackCount',                                             'BS ESD AODFULL AODSLIM', 'MinBias'),
+    ('xAOD::TrigCompositeAuxContainer#HLT_TrackCountAux.ntrks.pTcuts.z0cuts.counts',            'BS ESD AODFULL AODSLIM', 'MinBias'),
 ]
 
 
-- 
GitLab


From dee1bf2293b7f3ea7171fbe0d8a7c7ee9997d5d6 Mon Sep 17 00:00:00 2001
From: SG <glazov@mail.desy.de>
Date: Wed, 10 Jun 2020 17:03:00 +0200
Subject: [PATCH 119/266] Change RandGauss to RandGaussZiggurat

---
 .../LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
index 67a1cfb7a13c..221999f6d4ed 100755
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx
@@ -191,7 +191,7 @@ LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag) const
 
   // get a shower from the library
   int randomShift = 0;
-  randomShift = (int)(CLHEP::RandGauss::shoot(G4Random::getTheEngine(), 0., 2.5)+0.5);
+  randomShift = (int)(CLHEP::RandGaussZiggurat::shoot(G4Random::getTheEngine(), 0., 2.5)+0.5);
 
 #ifdef DEBUG_FrozenShowers
   std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), m_statisticsMap[library], randomShift);
-- 
GitLab


From 793b8d41775a924c3d55e3584dc0c6682a6baced Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 17:04:19 +0200
Subject: [PATCH 120/266] LArBadChannelCondAlg: Use
 WriteHandle.addDependency(), reduce boilerplate code

---
 .../LArBadChannelTool/LArBadChannelCondAlg.h  | 23 ++++----
 .../src/LArBadChannelCondAlg.cxx              | 53 +++++--------------
 2 files changed, 26 insertions(+), 50 deletions(-)

diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
index b22a4574b111..41059798aa0c 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
@@ -1,7 +1,7 @@
 //Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARBADCHANNELCONDALG_H
@@ -17,20 +17,23 @@
 
 class LArBadChannelCondAlg: public AthAlgorithm {
  public:
+  //Delegate to base-class ctor
+  using AthAlgorithm::AthAlgorithm;
 
-  LArBadChannelCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
-  ~LArBadChannelCondAlg();
+  ~LArBadChannelCondAlg()=default;
 
-  StatusCode initialize();
-  StatusCode execute();
+  StatusCode initialize() override;
+  StatusCode execute() override;
   StatusCode finalize() {return StatusCode::SUCCESS;}
 
  private:
-  SG::ReadCondHandleKey<CondAttrListCollection>   m_BCInputKey; 
-  SG::ReadCondHandleKey<LArOnOffIdMapping>  m_cablingKey;   
-  SG::WriteCondHandleKey<LArBadChannelCont>      m_BCOutputKey;
-  ServiceHandle<ICondSvc> m_condSvc;
-  std::string m_inputFileName;
+  SG::ReadCondHandleKey<CondAttrListCollection> m_BCInputKey{this,"ReadKey","/LAR/BadChannelsOfl/BadChannels",
+      "Key of input CDO (AttrListCollection)"}; 
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","Key of cabling CDO"};   
+  SG::WriteCondHandleKey<LArBadChannelCont> m_BCOutputKey{this,"WriteKey","LArBadChannel","Key of output CDO"};
+  ServiceHandle<ICondSvc> m_condSvc{this,"CondSvc","CondSvc"};
+  Gaudi::Property<std::string> m_inputFileName{this,"InputFileName","",
+      "Optional file containing (supplemental) bad channels"};
 };
 
 
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx
index 4eabe81622f4..d1c707610963 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArBadChannelTool/LArBadChannelCondAlg.h"
@@ -8,24 +8,7 @@
 #include "LArBadChannelTool/LArBadChannelDecoder.h"
 
 
-LArBadChannelCondAlg::LArBadChannelCondAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_BCInputKey("/LAR/BadChannelsOfl/BadChannels"),
-  m_cablingKey("LArOnOffIdMap"),
-  m_BCOutputKey("LArBadChannel","LArBadChannel"),
-  m_condSvc("CondSvc",name)
-{
-  declareProperty("ReadKey",m_BCInputKey);
-  declareProperty("CablingKey",m_cablingKey);
-  declareProperty("WriteKey",m_BCOutputKey);
-  declareProperty("InputFileName",m_inputFileName="");
-}
-
-LArBadChannelCondAlg::~LArBadChannelCondAlg() {}
-
-
 StatusCode LArBadChannelCondAlg::initialize() {
-
   // CondSvc
   ATH_CHECK( m_condSvc.retrieve() );
   // Read Handles
@@ -44,35 +27,28 @@ StatusCode LArBadChannelCondAlg::initialize() {
 
 StatusCode LArBadChannelCondAlg::execute() {
     
-  SG::WriteCondHandle<LArBadChannelCont> writeHandle{m_BCOutputKey};
-  
+  SG::WriteCondHandle<LArBadChannelCont> writeHandle{m_BCOutputKey};  
   if (writeHandle.isValid()) {
     msg(MSG::DEBUG) << "Found valid write handle" << endmsg;
     return StatusCode::SUCCESS;
   }  
 
-  std::unique_ptr<LArBadChannelCont> badChannelCont(new LArBadChannelCont());
+  std::unique_ptr<LArBadChannelCont> badChannelCont=std::make_unique<LArBadChannelCont>();
 
   SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
   const LArOnOffIdMapping* cabling{*cablingHdl};
  
-  EventIDRange rangeW;
+  writeHandle.addDependency(cablingHdl);
 
-  if(!m_BCInputKey.key().empty()) {
 
+  if(!m_BCInputKey.key().empty()) {
     SG::ReadCondHandle<CondAttrListCollection> readHandle{m_BCInputKey};
-    const CondAttrListCollection* attrListColl{*readHandle};
- 
-    if(!readHandle.range(rangeW)) {
-       ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
-       return StatusCode::FAILURE;
-    }
- 
+    const CondAttrListCollection* attrListColl{*readHandle}; 
     if (attrListColl==nullptr) {
       msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
       return StatusCode::FAILURE;
     }
-
+    writeHandle.addDependency(readHandle);
   
     //Loop over COOL channels:
      CondAttrListCollection::const_iterator chanIt=attrListColl->begin();
@@ -95,12 +71,6 @@ StatusCode LArBadChannelCondAlg::execute() {
        }
        
      }// end loop over COOL channels
-  } else {
-     EventIDBase start(0, 0);
-     EventIDBase stop(std::numeric_limits<unsigned int>::max()-1,0);
-     start.set_lumi_block(0);
-     stop.set_lumi_block(std::numeric_limits<unsigned int>::max()-1);
-     rangeW=EventIDRange( start, stop );
   }
    
   if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
@@ -132,13 +102,16 @@ StatusCode LArBadChannelCondAlg::execute() {
    
   badChannelCont->setOflVec(oflVec);
    
-
-  if(writeHandle.record(rangeW,badChannelCont.release()).isFailure()) {
+  if(writeHandle.record(std::move(badChannelCont)).isFailure()) {
     ATH_MSG_ERROR("Could not record LArBadChannelCont object with " 
 		  << writeHandle.key() 
-		  << " with EventRange " << rangeW
+		  << " with EventRange " << writeHandle.getRange()
 		  << " into Conditions Store");
     return StatusCode::FAILURE;
   }
+  ATH_MSG_INFO("Recorded LArRawChannelCont object with key "
+	       << writeHandle.key() 
+	       << " with EventRange " << writeHandle.getRange()
+	       << " into Conditions Store");
   return StatusCode::SUCCESS;
 }
-- 
GitLab


From 03a0d4088770532caf674343d847e99687027f1b Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 17:04:42 +0200
Subject: [PATCH 121/266] LArBadFebCondAlg: Use WriteHandle.addDependency(),
 reduce boilerplate code

---
 .../LArBadChannelTool/LArBadFebCondAlg.h      | 24 ++++----
 .../src/LArBadFebCondAlg.cxx                  | 61 ++++++-------------
 2 files changed, 31 insertions(+), 54 deletions(-)

diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
index 5b312f1d460e..17f82e86b279 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
@@ -14,24 +14,24 @@
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
 #include "LArRecConditions/LArBadChannelCont.h"
 
-//class LArOnlineID;
-//class LArOnline_SuperCellID;
-
 class LArBadFebCondAlg: public AthAlgorithm {
  public:
+  //Delegate to base-class ctor
+  using AthAlgorithm::AthAlgorithm;
+  ~LArBadFebCondAlg()=default;
 
-  LArBadFebCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
-  ~LArBadFebCondAlg();
-
-  StatusCode initialize();
-  StatusCode execute();
+  StatusCode initialize() override;
+  StatusCode execute() override;
   StatusCode finalize() {return StatusCode::SUCCESS;}
 
  private:
-  SG::ReadCondHandleKey<AthenaAttributeList>   m_BCInputKey; 
-  SG::WriteCondHandleKey<LArBadFebCont>      m_BCOutputKey;
-  ServiceHandle<ICondSvc> m_condSvc;
-  std::string m_inputFileName;
+  SG::ReadCondHandleKey<AthenaAttributeList> m_BCInputKey{this,"ReadKey","/LAR/BadFebsOfl/BadFebs",
+      "Key of input CDO (AttributeList)"}; 
+  SG::WriteCondHandleKey<LArBadFebCont> m_BCOutputKey{this,"WriteKey","LArBadFeb","Key of output CDO"};
+
+  ServiceHandle<ICondSvc> m_condSvc{this,"CondSvc","CondSvc"};
+  Gaudi::Property<std::string> m_inputFileName{this,"InputFileName","",
+      "Optional file containing (supplemental) bad Febs"};
 };
 
 
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
index 6b33ef78792c..b75582b525ef 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArBadChannelTool/LArBadFebCondAlg.h"
@@ -8,20 +8,6 @@
 #include "LArBadChannelTool/LArBadChannelDecoder.h"
 
 
-LArBadFebCondAlg::LArBadFebCondAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_BCInputKey("/LAR/BadFebsOfl/BadFebs"),
-  m_BCOutputKey("LArBadFeb","LArBadFeb"),
-  m_condSvc("CondSvc",name)
-{
-  declareProperty("ReadKey",m_BCInputKey);
-  declareProperty("WriteKey",m_BCOutputKey);
-  declareProperty("InputFileName",m_inputFileName="");
-}
-
-LArBadFebCondAlg::~LArBadFebCondAlg() {}
-
-
 StatusCode LArBadFebCondAlg::initialize() {
 
   // CondSvc
@@ -48,19 +34,18 @@ StatusCode LArBadFebCondAlg::execute() {
     return StatusCode::SUCCESS;
   }  
 
-  std::unique_ptr<LArBadFebCont> badFebCont(new LArBadFebCont());
-  EventIDRange rangeW;
+  std::unique_ptr<LArBadFebCont> badFebCont=std::make_unique<LArBadFebCont>();
+
 
   if(!m_BCInputKey.key().empty()) {
 
     SG::ReadCondHandle<AthenaAttributeList> readHandle{m_BCInputKey};
     const AthenaAttributeList* attrList{*readHandle};
-
     if (attrList==nullptr) {
       msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
       return StatusCode::FAILURE;
     }
- 
+    writeHandle.addDependency(readHandle); 
     
     const coral::Blob& blob = (*attrList)["Blob"].data<coral::Blob>();
     unsigned int chanSize = (*attrList)["ChannelSize"].data<unsigned int>();
@@ -75,20 +60,6 @@ StatusCode LArBadFebCondAlg::execute() {
     for (auto& idBC : bcVec) {
       badFebCont->add(idBC.first,idBC.second);
     }
-    //
-    // Define validity of the output cond object and record it
-    if(!readHandle.range(rangeW)) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
-      return StatusCode::FAILURE;
-    }
-  } else {
-
-    EventIDBase start(0, 0);
-    EventIDBase stop(std::numeric_limits<unsigned int>::max()-1,0);
-    start.set_lumi_block(0);
-    stop.set_lumi_block(std::numeric_limits<unsigned int>::max()-1);
-    rangeW=EventIDRange( start, stop );
-
   }
 
   if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
@@ -100,24 +71,30 @@ StatusCode LArBadFebCondAlg::execute() {
      for (auto& idBC : bcVec) {
        badFebCont->add(idBC.first,idBC.second);
      }
-   } //end if have ASCII filename
+  } //end if have ASCII filename
  
  
  
-   size_t nChanBeforeMege=badFebCont->size();
-   badFebCont->sort(); //Sorts vector of bad febs and merges duplicate entries
+  size_t nChanBeforeMege=badFebCont->size();
+  badFebCont->sort(); //Sorts vector of bad febs and merges duplicate entries
    
-   ATH_MSG_INFO("Read a total of " << badFebCont->size() << " problematic febs from database");
-   if (nChanBeforeMege!=badFebCont->size()) {
-     ATH_MSG_INFO("Merged " << nChanBeforeMege-badFebCont->size() << " duplicate entries");
-   }
+  ATH_MSG_INFO("Read a total of " << badFebCont->size() << " problematic febs from database");
+  if (nChanBeforeMege!=badFebCont->size()) {
+    ATH_MSG_INFO("Merged " << nChanBeforeMege-badFebCont->size() << " duplicate entries");
+  }
  
-  if(writeHandle.record(rangeW,badFebCont.release()).isFailure()) {
+  if(writeHandle.record(std::move(badFebCont)).isFailure()) {
     ATH_MSG_ERROR("Could not record LArBadFebCont object with " 
 		  << writeHandle.key() 
-		  << " with EventRange " << rangeW
+		  << " with EventRange " << writeHandle.getRange()
 		  << " into Conditions Store");
     return StatusCode::FAILURE;
   }
+  ATH_MSG_INFO("Recorded LArBadFebCont object with " 
+	       << writeHandle.key() 
+	       << " with EventRange " << writeHandle.getRange()
+	       << " into Conditions Store");
+
+
   return StatusCode::SUCCESS;
 }
-- 
GitLab


From 410958b937af60efd809d4caa3cdf8dca51beceb Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 12:30:36 +0200
Subject: [PATCH 122/266] PyUtils: Py3 fixes and delete obsolete test files

---
 Tools/PyUtils/python/AthFile/impl.py           |  4 ++--
 Tools/PyUtils/python/AthFileLite.py            |  4 ++--
 Tools/PyUtils/python/Logging.py                |  4 ++--
 Tools/PyUtils/python/MetaReader.py             |  8 ++++----
 Tools/PyUtils/python/PoolFile.py               | 15 ++++++++-------
 Tools/PyUtils/python/scripts/ath_dump.py       |  2 +-
 Tools/PyUtils/python/scripts/check_file.py     |  2 +-
 Tools/PyUtils/python/scripts/check_sg.py       |  2 +-
 Tools/PyUtils/python/scripts/cmake_depends.py  |  5 ++++-
 Tools/PyUtils/python/scripts/filter_files.py   | 12 ++++++------
 Tools/PyUtils/python/scripts/jira_issues.py    |  2 +-
 Tools/PyUtils/python/xmldict.py                | 10 +++++-----
 Tools/PyUtils/share/flake8_OutputLevel.ref     |  3 ---
 Tools/PyUtils/share/flake8_logging.ref         |  6 ------
 Tools/PyUtils/share/flake8_print_statement.ref |  3 ---
 Tools/PyUtils/test/PyUtils.xml                 | 15 ---------------
 16 files changed, 37 insertions(+), 60 deletions(-)
 delete mode 100644 Tools/PyUtils/share/flake8_OutputLevel.ref
 delete mode 100644 Tools/PyUtils/share/flake8_logging.ref
 delete mode 100644 Tools/PyUtils/share/flake8_print_statement.ref
 delete mode 100644 Tools/PyUtils/test/PyUtils.xml

diff --git a/Tools/PyUtils/python/AthFile/impl.py b/Tools/PyUtils/python/AthFile/impl.py
index 8f48be83dc92..da4ae92c8469 100644
--- a/Tools/PyUtils/python/AthFile/impl.py
+++ b/Tools/PyUtils/python/AthFile/impl.py
@@ -1280,14 +1280,14 @@ class FilePeeker(object):
         beam_type   = '<beam-type N/A>'
         try:
             beam_type = data_reader.beamType()
-        except Exception as err:
+        except Exception:
             msg.warning ("problem while extracting beam-type information")
             pass
 
         beam_energy = '<beam-energy N/A>'
         try:
             beam_energy = data_reader.beamEnergy()
-        except Exception as err:
+        except Exception:
             msg.warning ("problem while extracting beam-type information")
             pass
 
diff --git a/Tools/PyUtils/python/AthFileLite.py b/Tools/PyUtils/python/AthFileLite.py
index 5f76fceb26dd..c70736871065 100644
--- a/Tools/PyUtils/python/AthFileLite.py
+++ b/Tools/PyUtils/python/AthFileLite.py
@@ -198,13 +198,13 @@ class AthBSFile(object):
         beam_type   = '<beam-type N/A>'
         try:
             beam_type = data_reader.beamType()
-        except Exception as err:
+        except Exception:
             msg.warning ("problem while extracting beam-type information")
 
         beam_energy = '<beam-energy N/A>'
         try:
             beam_energy = data_reader.beamEnergy()
-        except Exception as err:
+        except Exception:
             msg.warning ("problem while extracting beam-type information")
 
         bs = ef.istream(fname)
diff --git a/Tools/PyUtils/python/Logging.py b/Tools/PyUtils/python/Logging.py
index 974b9462c373..5459479b4db3 100644
--- a/Tools/PyUtils/python/Logging.py
+++ b/Tools/PyUtils/python/Logging.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ## @author: Sebastien Binet
 ## @file :  PyUtils/python/Logging.py
@@ -27,7 +27,7 @@ except ImportError:
         if self.manager.disable >= logging.VERBOSE:
             return
         if logging.VERBOSE >= self.getEffectiveLevel():
-            apply(self._log, (logging.VERBOSE, msg, args), kwargs)
+            self._log(logging.VERBOSE, msg, args, **kwargs)
     cls.verbose = verbose
     del verbose
     
diff --git a/Tools/PyUtils/python/MetaReader.py b/Tools/PyUtils/python/MetaReader.py
index 588fa40ef7d5..3d6992790a31 100644
--- a/Tools/PyUtils/python/MetaReader.py
+++ b/Tools/PyUtils/python/MetaReader.py
@@ -500,9 +500,9 @@ def _extract_fields_iovpc(value):
         elif type_idx == 8:
             attr_value = int(value.m_unsignedLong[obj_idx])
         elif type_idx == 9:
-            attr_value = long(value.m_longLong[obj_idx])
+            attr_value = int(value.m_longLong[obj_idx])
         elif type_idx == 10:
-            attr_value = long(value.m_unsignedLongLong[obj_idx])
+            attr_value = int(value.m_unsignedLongLong[obj_idx])
         elif type_idx == 11:
             attr_value = float(value.m_float[obj_idx])
         elif type_idx == 12:
@@ -519,9 +519,9 @@ def _extract_fields_iovpc(value):
                 attr_value = attr_value.replace('_', '/')
             # Now it is clean
         elif type_idx == 15:
-            attr_value = long(value.m_date[obj_idx])
+            attr_value = int(value.m_date[obj_idx])
         elif type_idx == 16:
-            attr_value = long(value.m_timeStamp[obj_idx])
+            attr_value = int(value.m_timeStamp[obj_idx])
         else:
             raise ValueError('Unknown type id {0} for attribute {1}'.format(type_idx, attr_name))
 
diff --git a/Tools/PyUtils/python/PoolFile.py b/Tools/PyUtils/python/PoolFile.py
index 371e686ade1c..50d6e1262bfd 100644
--- a/Tools/PyUtils/python/PoolFile.py
+++ b/Tools/PyUtils/python/PoolFile.py
@@ -27,6 +27,7 @@ __all__ = [
 import sys
 import os
 import shelve
+from builtins import range
 
 if six.PY2:
     from whichdb import whichdb
@@ -65,10 +66,10 @@ class PoolFileCatalog(object):
             # chase poolfilecatalog location
             catalog = os.environ.get("POOL_CATALOG", self.DefaultCatalog)
 
-        if isinstance(catalog, basestring):
+        if isinstance(catalog, str):
             catalog = [catalog]
             
-        if not isinstance (catalog, (basestring, list)):
+        if not isinstance (catalog, (str, list)):
             raise TypeError(
                 "catalog contact string should be a string or a list thereof! (got %r)"%
                 type(catalog))
@@ -367,12 +368,12 @@ def extract_streams_from_tag (fname,
     #  [CLID=72FBBC6F-C8BE-4122-8790-DC627696C176]\
     #  [TECH=00000202]\
     #  [OID=0000008C-000002BA]'
-    token = re.compile (r'[[]DB=(?P<FID>.*?)[]]'\
-                        r'[[]CNT=(?P<CNT>.*?)[]]'\
-                        r'[[]CLID=(?P<CLID>.*?)[]]'\
-                        r'[[]TECH=(?P<TECH>.*?)[]]'\
+    token = re.compile (r'[[]DB=(?P<FID>.*?)[]]'
+                        r'[[]CNT=(?P<CNT>.*?)[]]'
+                        r'[[]CLID=(?P<CLID>.*?)[]]'
+                        r'[[]TECH=(?P<TECH>.*?)[]]'
                         r'[[]OID=(?P<OID>.*?)[]]')
-    for i in xrange(nentries):
+    for i in range(nentries):
         t.GetEntry (i)
         for ref in stream_refs:
             try:
diff --git a/Tools/PyUtils/python/scripts/ath_dump.py b/Tools/PyUtils/python/scripts/ath_dump.py
index 175df4e6aa7a..24614a71c1ce 100644
--- a/Tools/PyUtils/python/scripts/ath_dump.py
+++ b/Tools/PyUtils/python/scripts/ath_dump.py
@@ -31,7 +31,7 @@ def main(args):
     """
     exitcode = 0
     fnames = args.files
-    if isinstance(fnames, basestring):
+    if isinstance(fnames, str):
         fnames = [fnames]
 
     import sys
diff --git a/Tools/PyUtils/python/scripts/check_file.py b/Tools/PyUtils/python/scripts/check_file.py
index 1ec1321bc5f5..1e80db1102af 100644
--- a/Tools/PyUtils/python/scripts/check_file.py
+++ b/Tools/PyUtils/python/scripts/check_file.py
@@ -43,7 +43,7 @@ def main(args):
     """read a POOL file and dump its content.
     """
     files = args.files
-    if isinstance(files, basestring):
+    if isinstance(files, str):
         files=[files]
 
     import sys
diff --git a/Tools/PyUtils/python/scripts/check_sg.py b/Tools/PyUtils/python/scripts/check_sg.py
index e9b49c24cac6..26c4265ed343 100644
--- a/Tools/PyUtils/python/scripts/check_sg.py
+++ b/Tools/PyUtils/python/scripts/check_sg.py
@@ -35,7 +35,7 @@ def main(args):
      $ check-sg LFN:ttbar.pool
     """
     files = args.files
-    if isinstance(files, basestring):
+    if isinstance(files, str):
         files = [files]
 
     import os
diff --git a/Tools/PyUtils/python/scripts/cmake_depends.py b/Tools/PyUtils/python/scripts/cmake_depends.py
index 44da437d98c0..b0ab8de345e6 100644
--- a/Tools/PyUtils/python/scripts/cmake_depends.py
+++ b/Tools/PyUtils/python/scripts/cmake_depends.py
@@ -20,7 +20,10 @@ import argparse
 try:
    import pygraphviz
 except ImportError:
-   sys.path.append('/cvmfs/sft.cern.ch/lcg/nightlies/dev4/Tue/pygraphviz/1.5/x86_64-centos7-gcc8-opt/lib/python2.7/site-packages/')
+   if sys.version_info[0]==2:
+      sys.path.append('/cvmfs/sft.cern.ch/lcg/nightlies/dev4/Tue/pygraphviz/1.5/x86_64-centos7-gcc8-opt/lib/python2.7/site-packages/')
+   else:
+      sys.path.append('/cvmfs/sft.cern.ch/lcg/nightlies/dev3python3/Tue/pygraphviz/1.5/x86_64-centos7-gcc8-opt/lib/python3.7/site-packages')
    import pygraphviz
 
 #
diff --git a/Tools/PyUtils/python/scripts/filter_files.py b/Tools/PyUtils/python/scripts/filter_files.py
index ad9336e5fa69..4c93e976cb0d 100644
--- a/Tools/PyUtils/python/scripts/filter_files.py
+++ b/Tools/PyUtils/python/scripts/filter_files.py
@@ -62,9 +62,9 @@ def main(args):
                     continue
                 l = line.strip().split()
                 if len(l)==1: # assume this is only the event number
-                    runnbr, evtnbr = None, long(l[0])
+                    runnbr, evtnbr = None, int(l[0])
                 elif len(l)==2: # a pair (run,evt) number
-                    runnbr, evtnbr = long(l[0]), long(l[1])
+                    runnbr, evtnbr = int(l[0]), int(l[1])
                 else:
                     raise RuntimeError(
                         'file [%s] has invalid format at line:\n%r' %
@@ -83,21 +83,21 @@ def main(args):
         
         selection = []
         for item in args.selection:
-            if not isinstance(item, (tuple, list, int, long)):
+            if not isinstance(item, (tuple, list, int, int)):
                 raise TypeError('type: %r' % type(item))
 
             if isinstance(item, (tuple, list)):
                 if len(item) == 1:
-                    runnbr, evtnbr = None, long(item[0])
+                    runnbr, evtnbr = None, int(item[0])
                 elif len(item) == 2:
-                    runnbr, evtnbr = long(item[0]), long(item[1])
+                    runnbr, evtnbr = int(item[0]), int(item[1])
                 else:
                     raise RuntimeError(
                         'item [%s] has invalid arity (%s)' %
                         (item, len(item))
                         )
             else:
-                runnbr, evtnbr = None, long(item)
+                runnbr, evtnbr = None, int(item)
             selection.append((runnbr, evtnbr))
 
     # put back the massaged selection into our workspace
diff --git a/Tools/PyUtils/python/scripts/jira_issues.py b/Tools/PyUtils/python/scripts/jira_issues.py
index c5fa55d513a2..e4286531613e 100644
--- a/Tools/PyUtils/python/scripts/jira_issues.py
+++ b/Tools/PyUtils/python/scripts/jira_issues.py
@@ -60,7 +60,7 @@ def main(args):
 
     #authentication
     try: 
-        cookiesFile = file(args.cookies, 'r')
+        cookiesFile = open(args.cookies, 'r')
         cookies = {}
         for line in cookiesFile:
             text = line.split()
diff --git a/Tools/PyUtils/python/xmldict.py b/Tools/PyUtils/python/xmldict.py
index df8b48e2201c..9d2a6a014481 100644
--- a/Tools/PyUtils/python/xmldict.py
+++ b/Tools/PyUtils/python/xmldict.py
@@ -57,12 +57,12 @@ class XmlDictObject(dict):
     
     ## def __getitem__(self, item):
     ##     o = dict.__getitem__(self, item)
-    ##     if isinstance(o, basestring):
+    ##     if isinstance(o, str):
     ##         return _xml_unescape(o)
     ##     return o
 
     ## def __setitem__(self, item, value):
-    ##     if isinstance(value, basestring):
+    ##     if isinstance(value, str):
     ##         value = _xml_unescape(value)
     ##     dict.__setitem__(self, item, value)
         
@@ -100,7 +100,7 @@ def _dict2xml_recurse(parent, dictitem):
 
     if isinstance(dictitem, dict):
         for (tag, child) in dictitem.iteritems():
-            if isinstance(child, basestring):
+            if isinstance(child, str):
                 child = _xml_escape(child)
             if str(tag) == '_text':
                 parent.text = str(child)
@@ -128,13 +128,13 @@ def _xml2dict_recurse (node, dictclass):
     
     if len(node.items()) > 0:
         # if we have attributes, set them
-        nodedict.update(dict((k, _xml_unescape(v) if isinstance(v, basestring) else v)
+        nodedict.update(dict((k, _xml_unescape(v) if isinstance(v, str) else v)
                              for k,v in node.items()))
     
     for child in node:
         # recursively add the element's children
         newitem = _xml2dict_recurse (child, dictclass)
-        if isinstance(newitem, basestring):
+        if isinstance(newitem, str):
             newitem = _xml_unescape(newitem)
         if child.tag in nodedict:
             # found duplicate tag, force a list
diff --git a/Tools/PyUtils/share/flake8_OutputLevel.ref b/Tools/PyUtils/share/flake8_OutputLevel.ref
deleted file mode 100644
index e48d4980e4e4..000000000000
--- a/Tools/PyUtils/share/flake8_OutputLevel.ref
+++ /dev/null
@@ -1,3 +0,0 @@
-flake8_OutputLevel.py:10:7: ATL900: Do not assign an explicit OutputLevel
-flake8_OutputLevel.py:14:1: ATL900: Do not assign an explicit OutputLevel
-flake8_OutputLevel.py:16:1: ATL900: Do not assign an explicit OutputLevel
diff --git a/Tools/PyUtils/share/flake8_logging.ref b/Tools/PyUtils/share/flake8_logging.ref
deleted file mode 100644
index 11d7905ec8e6..000000000000
--- a/Tools/PyUtils/share/flake8_logging.ref
+++ /dev/null
@@ -1,6 +0,0 @@
-flake8_logging.py:11:39: ATL100: use lazy string formatting in logging calls (',' instead of '%')
-flake8_logging.py:13:37: ATL100: use lazy string formatting in logging calls (',' instead of '%')
-flake8_logging.py:15:43: ATL100: use lazy string formatting in logging calls (',' instead of '%')
-flake8_logging.py:19:1: ATL901: use 'AthenaCommon.Logging' instead of 'print'
-flake8_logging.py:21:1: ATL233: Python 3.x incompatible use of non function-like print statement
-flake8_logging.py:21:1: ATL901: use 'AthenaCommon.Logging' instead of 'print'
diff --git a/Tools/PyUtils/share/flake8_print_statement.ref b/Tools/PyUtils/share/flake8_print_statement.ref
deleted file mode 100644
index 7edfb3be9a1c..000000000000
--- a/Tools/PyUtils/share/flake8_print_statement.ref
+++ /dev/null
@@ -1,3 +0,0 @@
-flake8_print_statement.py:6:1: ATL233: Python 3.x incompatible use of non function-like print statement
-flake8_print_statement.py:8:1: ATL232: Python 3.x incompatible use of print statement
-flake8_print_statement.py:11:1: ATL232: Python 3.x incompatible use of print statement
diff --git a/Tools/PyUtils/test/PyUtils.xml b/Tools/PyUtils/test/PyUtils.xml
deleted file mode 100644
index c05d27a91bf1..000000000000
--- a/Tools/PyUtils/test/PyUtils.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<atn>
-    <TEST name="PyUtilsTest" type="makecheck" suite="Tests">
-       <package>Tools/PyUtils</package>
-       <author> scott snyder </author>
-       <mailto> snyder@bnl.gov </mailto>
-       <expectations>
-          <errorMessage>Athena exited abnormally</errorMessage>
-          <errorMessage>differ</errorMessage>
-          <warningMessage> # WARNING_MESSAGE : post.sh> ERROR</warningMessage>
-          <successMessage>check ok</successMessage>
-          <returnValue>0</returnValue>
-       </expectations>
-    </TEST>
-</atn>
-- 
GitLab


From f72ca7b5206fe6d7837a4c343cefe0eb6ab822eb Mon Sep 17 00:00:00 2001
From: Jannik Geisen <jannik.geisen@cern.ch>
Date: Wed, 10 Jun 2020 16:00:33 +0000
Subject: [PATCH 123/266] Fix config due to athena update, create fCharge
 variable, add pflow variables and averageMu selections to config

---
 .../Jet/JetMonitoring/JetMonitoring/JetVariable.h  | 14 ++++++++++++++
 .../JetMonitoring/python/JetMonitoringConfig.py    |  9 ++++++++-
 .../JetMonitoring/python/JetStandardHistoSpecs.py  | 11 +++++------
 .../Jet/JetMonitoring/src/JetHistoSelectSort.cxx   |  1 +
 .../Jet/JetMonitoring/src/JetVariable.cxx          |  1 +
 .../python/TrigJetMonitorAlgorithm.py              |  6 +++++-
 6 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
index 1666553d75ce..a20cff972370 100644
--- a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
+++ b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
@@ -167,6 +167,20 @@ namespace JetVar {
     using Variable::Variable;
     virtual float value(const xAOD::Jet & j) const { return j.p4().Et()*m_scale;}
   };
+
+  struct FChargeVar : public Variable {
+    using Variable::Variable;
+    virtual float value(const xAOD::Jet & j) const { 
+      bool status = false;
+      float constScalePt = 0.; 
+      std::vector<float> SumPtChargedPFOPt500;
+      status = j.getAttribute<float>("JetConstitScaleMomentum_pt", constScalePt ); // Jet pT at the constituent scale
+      if (!status) return 0;
+      status = j.getAttribute<std::vector<float> >("SumPtChargedPFOPt500", SumPtChargedPFOPt500 ); //Vector over all vertices in the event, each element contains the sum pT of all charged PFO with a pT > 0.5 GeV associated to the vertex.
+      if (!status) return 0;
+      return SumPtChargedPFOPt500.at(0)/=constScalePt; //definition of "fCharge", index 0 points to the primary vertex
+    }
+  };
   
   struct EM3FracVar : public Variable {
     using Variable::Variable;
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
index 8ae162453e5a..c3e3e34cc8ef 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
@@ -430,6 +430,10 @@ class SelectSpec(ToolSpec):
             self.Selector.topLevelDir = self.topLevelDir
             self.Selector.bottomLevelDir = self.bottomLevelDir
             selTool.Selector = self.Selector.toTool()
+        if hasattr(self,'EventSelector'):
+            self.EventSelector.topLevelDir = self.topLevelDir
+            self.EventSelector.bottomLevelDir = self.bottomLevelDir
+            selTool.EventSelector = self.EventSelector.toTool()
         if hasattr(self, 'SortVariable'):
             selTool.SortVariable = retrieveVarToolConf(self.SortVariable)
         suffix = '_'+self.name
@@ -456,6 +460,9 @@ class SelectSpec(ToolSpec):
         if hasattr(self, 'Selector' ):
             write('  Selector=','')
             self.Selector._dump( write2)
+        if hasattr(self, 'EventSelector' ):
+            write('  EventSelector=','')
+            self.EventSelector._dump( write2)
         write('FillerTools= [')
         for hspec in self.FillerTools:
             hspec._dump(write2)
@@ -545,7 +552,7 @@ def retrieveEventVarToolConf(alias):
     if isinstance(alias, str):
         conf = knownEventVar.get(alias,None)
         if conf is None:
-          conf = ToolSpec('EventHistoVarTool', name=alias, Variable=alias)
+          conf = ToolSpec('EventHistoVarTool', alias, Variable=alias)
     else: # assume it's a config dict
         conf = alias
     return conf
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
index 587b5c67221f..16a3c515b0f9 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
@@ -96,12 +96,11 @@ _knownHistos = [
     HistoSpec('Width15', (50, 0, 1.5), title='Jet Width;Width;', xvar='Width'),
     HistoSpec('Mu12', (100, 0, 1.0), title='Mu12;Mu12;', ),
 
-    HistoSpec('NumTrkPt500[0]', (100, 0, 100), title='Number of tracks from PV0 above 0.5 GeV:N_{tracks}(p_{T}>0.5 GeV);', ),
-    HistoSpec('NumTrkPt1000[0]', (100, 0, 100), title='Number of all tracks above 1 GeV:N_{tracks}(p_{T}>1 GeV);', ),
-    HistoSpec('SumPtTrkPt500:GeV', (100, 0, 200), title='Sum Pt of all tracks above 0.5 GeV:SumPtTrk(p_{T}>0.5 GeV);', ),
-    HistoSpec('SumPtTrkPt500[0]:GeV', (100, 0, 200), title='Sum Pt of all tracks above 0.5 GeV[0]:SumPtTrk(p_{T}>0.5 GeV)[0];', ),
-    HistoSpec('SumPtChargedPFOPt500:GeV', (100, 0, 200), title='Sum Pt of all charged PFO above 0.5 GeV:SumPtChargedPFO(p_{T}>0.5 GeV);', ),
-    HistoSpec('SumPtChargedPFOPt500[0]:GeV', (100, 0, 200), title='Sum Pt of all charged PFO above 0.5 GeV[0]:SumPtChargedPFO(p_{T}>0.5 GeV)[0];', ),
+    HistoSpec('NumTrkPt500[0]', (100, 0, 100), title='Number of tracks from PV0 above 0.5 GeV:N_{tracks}(p_{T}>0.5 GeV);NumTrkPt500;Entries', ),
+    HistoSpec('NumTrkPt1000[0]', (100, 0, 100), title='Number of all tracks above 1 GeV:N_{tracks}(p_{T}>1 GeV);NumTrkPt1000;Entries', ),
+    HistoSpec('SumPtTrkPt500[0]:GeV', (100, 0, 200), title='Sum Pt of all tracks above 0.5 GeV:SumPtTrk(p_{T}>0.5 GeV);SumPtTrkPt500 [GeV];Entries', ),
+    HistoSpec('SumPtChargedPFOPt500[0]:GeV', (100, 0, 200), title='Sum Pt of all charged PFO above 0.5 GeV:SumPtChargedPFO(p_{T}>0.5 GeV);SumPtChargedPFOPt500 [GeV];Entries', ),
+    HistoSpec('fCharge', (100, 0, 2), title='Normalised sum Pt of all charged PFO above 0.5 GeV:fCharge(p_{T}>0.5 GeV);fCharge;Entries', ),
 
     HistoSpec('FoxWolfram4', (100, -1, 1), title='FoxWolfram0;FoxWolfram4;', ),
     HistoSpec('FoxWolfram0', (100, -1, 1), title='FoxWolfram0;FoxWolfram0;', ),
diff --git a/Reconstruction/Jet/JetMonitoring/src/JetHistoSelectSort.cxx b/Reconstruction/Jet/JetMonitoring/src/JetHistoSelectSort.cxx
index 93e04da248ef..d6608a9aa7e5 100644
--- a/Reconstruction/Jet/JetMonitoring/src/JetHistoSelectSort.cxx
+++ b/Reconstruction/Jet/JetMonitoring/src/JetHistoSelectSort.cxx
@@ -8,6 +8,7 @@ JetHistoSelectSort::JetHistoSelectSort( const std::string& type,  const std::str
   AthAlgTool( type, name, parent )
   , m_jetFillerTools(this)
   , m_selectTool(this)
+  , m_eventSelTool(this)
   , m_sortVar(this)
   
 
diff --git a/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx b/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
index 7cddf455b631..2ec3b27f6de5 100644
--- a/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
+++ b/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
@@ -17,6 +17,7 @@ namespace JetVar {
     if(name=="abseta") return std::make_unique<AbsEtaVar>(name);
     if(name=="|eta|") return std::make_unique<AbsEtaVar>(name);
     if(name=="rapidity") return std::make_unique<Rapidity>(name);
+    if(name=="fCharge") return std::make_unique<FChargeVar>(name);
     if(name=="EM3Frac") return std::make_unique<EM3FracVar>(name);
     if(name=="Tile0Frac") return std::make_unique<Tile0FracVar>(name);
 
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
index 466b095c7fb1..03b0c440600c 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
@@ -155,7 +155,8 @@ def basicJetMonAlgSpec(jetcoll,isOnline,athenaMT):
 
     SelectSpec( 'central', '|eta|<3.2', path, FillerTools = ["pt","et","m"] ),
     SelectSpec( 'forward', '3.2<|eta|', path, FillerTools = ["pt","et","m"] ),
-
+    SelectSpec( 'lowmu', 'avgMu<30', path, isEventVariable=True, FillerTools = ["pt","et","m","phi","eta"]),
+    SelectSpec( 'highmu', '30<avgMu', path, isEventVariable=True, FillerTools = ["pt","et","m","phi","eta"]),
     # TProfile2D : just use 3 variables. For now the sytem will automatically
     #  interpret it as a TProfile2D (the 3rd variable being profiled)
     #"phi;eta;e", # --> Average Energy vs pt and eta
@@ -232,6 +233,9 @@ def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
        for hist in ExtraLargeROnlineHists: conf.appendHistos(hist)
    else: # offline
      for hist in ExtraOfflineHists: conf.appendHistos(hist)
+     if 'pf' in jetcoll or 'PF' in jetcoll:
+       conf.appendHistos("SumPtChargedPFOPt500[0]")
+       conf.appendHistos("fCharge")
 
    return conf
 
-- 
GitLab


From 7a02808007e765dc7049f2063088feb7d8ae9322 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Wed, 10 Jun 2020 16:07:51 +0000
Subject: [PATCH 124/266] Extrapolator format.

---
 .../TrkExTools/TrkExTools/Extrapolator.h      | 1765 ++++---
 .../TrkExTools/TrkExTools/Extrapolator.icc    |    7 +-
 .../TrkExTools/src/Extrapolator.cxx           | 4163 ++++++++---------
 3 files changed, 2901 insertions(+), 3034 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
index 3d70a4026ae5..ff85058fac41 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
@@ -13,41 +13,41 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 
-//Event Context
+// Event Context
 #include "GaudiKernel/EventContext.h"
 
 // Trk
-#include "TrkExInterfaces/IPropagator.h"
+#include "TrkDetDescrUtils/GeometrySignature.h"
+#include "TrkEventPrimitives/ParticleHypothesis.h"
+#include "TrkEventPrimitives/PropDirection.h"
 #include "TrkExInterfaces/IExtrapolator.h"
-#include "TrkExInterfaces/INavigator.h"
 #include "TrkExInterfaces/IMaterialEffectsUpdator.h"
-#include "TrkEventPrimitives/PropDirection.h"
-#include "TrkEventPrimitives/ParticleHypothesis.h"
-#include "TrkParameters/TrackParameters.h"
+#include "TrkExInterfaces/INavigator.h"
+#include "TrkExInterfaces/IPropagator.h"
+#include "TrkExUtils/ExtrapolationCache.h"
+#include "TrkGeometry/MagneticFieldProperties.h"
+#include "TrkGeometry/TrackingVolume.h"
 #include "TrkNeutralParameters/NeutralParameters.h"
+#include "TrkParameters/TrackParameters.h"
 #include "TrkSurfaces/BoundaryCheck.h"
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkVolumes/BoundarySurface.h"
 #include "TrkVolumes/BoundarySurfaceFace.h"
-#include "TrkGeometry/TrackingVolume.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
-#include "TrkDetDescrUtils/GeometrySignature.h"
-#include "TrkExUtils/ExtrapolationCache.h"
 // STL
 #include <cstring>
 #include <utility>
 
-#include <vector>
 #include <map>
+#include <vector>
 // Amg
-#include "GeoPrimitives/GeoPrimitives.h"
 #include "EventPrimitives/EventPrimitives.h"
+#include "GeoPrimitives/GeoPrimitives.h"
 // xAOD
-#include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/NeutralParticle.h"
+#include "xAODTracking/TrackParticle.h"
 
-#include <Gaudi/Accumulators.h>
 #include "ObjContainer.h"
+#include <Gaudi/Accumulators.h>
 
 class MsgStream;
 namespace Trk {
@@ -68,56 +68,57 @@ class AlignableTrackingVolume;
 class ExtrapolationCache;
 
 typedef std::vector<const Trk::TrackParameters*> TrackParametersVector;
-typedef std::vector<std::unique_ptr<const Trk::TrackParameters> > TrackParametersUVector;
-typedef std::pair< const Surface*,BoundaryCheck  > DestSurf;
+typedef std::vector<std::unique_ptr<const Trk::TrackParameters>> TrackParametersUVector;
+typedef std::pair<const Surface*, BoundaryCheck> DestSurf;
 
-using TrackParmContainer  = ObjContainer<const Trk::TrackParameters>;
-using TrackParmPtr        = ObjRef<>;
+using TrackParmContainer = ObjContainer<const Trk::TrackParameters>;
+using TrackParmPtr = ObjRef<>;
 using ManagedTrackParmPtr = ObjPtr<const Trk::TrackParameters>;
 
-
 /** @struct ParametersAtBoundarySurface
   has only three member
   - BoundarySurface
   - TrackParameters
   - bool that indicated the deletion of the TrackParameters
   */
-struct ParametersNextVolume {
+struct ParametersNextVolume
+{
   //!< the members
-  const TrackingVolume*    nextVolume;
-  ManagedTrackParmPtr      nextParameters;
-  ManagedTrackParmPtr      navParameters;
-  BoundarySurfaceFace      exitFace;
-
-  ParametersNextVolume(TrackParmContainer &track_parm_container)
-     : nextParameters(track_parm_container),
-       navParameters(track_parm_container)
+  const TrackingVolume* nextVolume;
+  ManagedTrackParmPtr nextParameters;
+  ManagedTrackParmPtr navParameters;
+  BoundarySurfaceFace exitFace;
+
+  ParametersNextVolume(TrackParmContainer& track_parm_container)
+    : nextParameters(track_parm_container)
+    , navParameters(track_parm_container)
   {
-    nextVolume              = nullptr;
-    exitFace                = undefinedFace;
+    nextVolume = nullptr;
+    exitFace = undefinedFace;
   }
 
   //!< update the boundaryInformation
   void boundaryInformation(const TrackingVolume* tvol,
-                           ManagedTrackParmPtr   nextPars,
-                           ManagedTrackParmPtr   navPars,
-                           BoundarySurfaceFace   face=undefinedFace)
+                           ManagedTrackParmPtr nextPars,
+                           ManagedTrackParmPtr navPars,
+                           BoundarySurfaceFace face = undefinedFace)
   {
-    nextVolume       = tvol;
-    nextParameters   = std::move(nextPars);
-    navParameters    = std::move(navPars);
-    exitFace         = face;
+    nextVolume = tvol;
+    nextParameters = std::move(nextPars);
+    navParameters = std::move(navPars);
+    exitFace = face;
   }
   //!< reset the boundary information by invalidating it
-  void resetBoundaryInformation(){
-    nextVolume       = nullptr;
-    exitFace         = undefinedFace;
-    nextParameters   = ManagedTrackParmPtr();
-    navParameters    = ManagedTrackParmPtr();
+  void resetBoundaryInformation()
+  {
+    nextVolume = nullptr;
+    exitFace = undefinedFace;
+    nextParameters = ManagedTrackParmPtr();
+    navParameters = ManagedTrackParmPtr();
   }
 };
 
-/** 
+/**
   @class Extrapolator
 
   The Extrapolator can be used in different setups:
@@ -127,7 +128,7 @@ struct ParametersNextVolume {
   - <b>(Full) Configured AlgTool</b> usage
 
 
-  This design allows external clients to choose their own propagation logic, 
+  This design allows external clients to choose their own propagation logic,
   but also ensures an easy to use AlgTool for users
 
   The output level is as follows:
@@ -138,864 +139,844 @@ VERBOSE : Method call sequence with values
 @author Andreas.Salzburger@cern.ch
 */
 
-  class Extrapolator : public AthAlgTool,
-  virtual public IExtrapolator {
-  public:
-
-    /** This following "using" statements can be removed after the methods in IExtrapolator.h for the
-     * old interfaces WITHOUT EventContext are removed, i.e. only the new ones with EventContext are
-     * used throughout the sw */
-    using IExtrapolator::extrapolate;
-    using IExtrapolator::extrapolateStepwise;
-    using IExtrapolator::extrapolateDirectly;
-    using IExtrapolator::extrapolateBlindly;
-    using IExtrapolator::extrapolateToNextActiveLayer;      
-    using IExtrapolator::extrapolateToNextActiveLayerM;
-    using IExtrapolator::extrapolateToVolume;
-    using IExtrapolator::extrapolateM;
-    using IExtrapolator::extrapolateWithPathLimit;
-    
-      
-    /**Constructor */
-    Extrapolator(const std::string&,const std::string&,const IInterface*);
-    /**Destructor*/
-    ~Extrapolator();
-
-    /** AlgTool initailize method.
-      In this method the extrapolator should retrieve the Propagator of highest order which is then passed through
-      the extrapolate method. The Propagator itself should be specified whether to use propagators of a lower hirarchy
-      level or not.
-      */
-    virtual StatusCode initialize() override;
-    /** AlgTool finalize method */
-    virtual StatusCode finalize() override;
-
-    /** [xAOD] interface ------------------------------------------------------------------ */
-
-    /** xAOD 0) neutral xAOD particle */
-    virtual const NeutralParameters* extrapolate(
-      const xAOD::NeutralParticle& xnParticle,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true) const override final;
-
-    /** xAOD 0) neutral xAOD particle */
-    virtual const TrackParameters* extrapolate(
-        const EventContext& ctx,
-        const xAOD::TrackParticle& particleBase,
-        const Surface& sf,
-        PropDirection dir=anyDirection,
-        const BoundaryCheck&  bcheck = true,
-        ParticleHypothesis particle=pion,
-        MaterialUpdateMode matupmode=addNoise) const override final;
-
-    /** [NeutralParameters] ------------------------------------------------------------- */
-
-    /** N 0) <b>Neutral parameters method </b>
-      - returns a ParametersBase object as well, 0 if the extrapolation did not succeed
-      */
-
-    virtual const NeutralParameters* extrapolate(
-      const NeutralParameters& parameters,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true) const override final;
-
-    /**  1) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual const TrackParameters* extrapolate(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise,
-      Trk::ExtrapolationCache* cache = nullptr) const override final;
-
-    /** 2) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual TrackParametersUVector extrapolateStepwise(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion) const override final;
-
-    /** 3) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual const TrackParameters* extrapolate(
-      const EventContext& ctx,
-      const Track& trk,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise,
-      Trk::ExtrapolationCache* cache = nullptr) const override final;
-
-    /** 4) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual TrackParameters* extrapolateDirectly(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion) const override final;
-
-    /** 4.1) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual TrackParameters* extrapolateDirectly(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion) const override final;
-
-    /** 5) <b>Configured AlgTool extrapolation method</b>):*/
-    virtual TrackParametersUVector extrapolateBlindly(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      const Volume* boundaryVol = nullptr) const override final;
-
-    /** 6) <b>Configured AlgTool extrapolation method</b> ):*/
-    virtual std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayer(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const override final;
-
-    /** 7) <b>Configured AlgTool extrapolation method</b> ):*/
-    virtual std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayerM(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      std::vector<const Trk::TrackStateOnSurface*>& material,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const override final;
-
-    /** 8) <b>Configured AlgTool extrapolation method</b> ):*/
-    virtual const TrackParameters* extrapolateToVolume(
-      const EventContext& ctx,
-      const TrackParameters& parm,
-      const Trk::TrackingVolume& vol,
-      PropDirection dir = anyDirection,
-      ParticleHypothesis particle = pion) const override final;
-
-    /** 9) <b>Configured AlgTool extrapolation method</b>:
-      - Extrapolate to a destination surface, while collecting all the material layers in between.
-      */
-    virtual std::vector<const TrackStateOnSurface*>* extrapolateM(
-      const EventContext& ctx,
-      const TrackParameters& parameters,
-      const Surface& sf,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      ParticleHypothesis particle = pion,
-      Trk::ExtrapolationCache* cache = nullptr) const override final;
-
-    /** 10) <b>Configured AlgTool extrapolation method</b>:
-      - Extrapolate to a destination surface, while collecting all the material layers and transport jacobians in
-      between.
-      */
-    virtual std::vector<const TrackParameters*>* extrapolateM(
-      const EventContext& ctx,
-      const TrackParameters& parameters,
-      const Surface& sf,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      std::vector<MaterialEffectsOnTrack>& material,
-      std::vector<Trk::TransportJacobian*>& jacs,
-      ParticleHypothesis particle = pion,
-      Trk::ExtrapolationCache* cache = nullptr) const override final;
-
-    virtual const Trk::TrackParameters* extrapolateWithPathLimit(
-      const EventContext& ctx,
-      const Trk::TrackParameters& parm,
-      double& pathLim,
-      Trk::PropDirection dir,
-      Trk::ParticleHypothesis particle,
-      std::vector<const Trk::TrackParameters*>*& parmOnSf,
-      std::vector<const Trk::TrackStateOnSurface*>*& material,
-      const Trk::TrackingVolume* boundaryVol = nullptr,
-      MaterialUpdateMode matupmod = Trk::addNoise) const override final;
-
-    /** extrapolation method collecting intersections with subdetector
-      boundaries and active volumes/layers. A primitive identification is
-      provided - to be replaced with appropriate identifier, and possibly merged
-      with TrackParameters. Material collection in option. Destination
-      (subdetector boundary) : geoID (+ entry, -exit) ( default MS exit )
-      */
-    virtual const std::vector<std::pair<const Trk::TrackParameters*, int>>* extrapolate(
-      const EventContext& ctx,
-      const Trk::TrackParameters& parm,
-      Trk::PropDirection dir,
-      Trk::ParticleHypothesis particle,
-      std::vector<const Trk::TrackStateOnSurface*>*& material,
-      int destination = 3) const override final;
-
-    /** Return the TrackingGeometry used by the Extrapolator (forward information from Navigator)*/
-    virtual const TrackingGeometry* trackingGeometry() const override final;
-
-    /** Validation Action:
-      Can be implemented optionally, outside access to internal validation steps */
-    virtual void validationAction() const override final;
-
-  private:
-    
-    /**
-     * Cache to be passed to and between the private methods
-     */
-    typedef std::vector< std::pair< const Trk::TrackParameters*, int > > identifiedParameters_t;
-    struct Cache{
-
-      TrackParmContainer                                   m_trackParmContainer;
-       //!< parameters to be used for final propagation in case of fallback
-      ManagedTrackParmPtr                                  m_lastValidParameters;              
-      //!< return helper for parameters and boundary
-      ParametersNextVolume                                 m_parametersAtBoundary;       
-       //!< Caches per MaterialUpdator
-      std::vector<std::unique_ptr<Trk::IMaterialEffectsUpdator::ICache>> m_MaterialUpCache;            
-      //!< garbage collection during extrapolation
-      std::map<const Trk::TrackParameters*, bool>          m_garbageBin;           
-      //!<  internal switch for resolved configuration
-      bool                                                 m_dense=false; 
-      //!< Flag the recall solution
-      bool                                                 m_recall=false;                
-      bool                                                 m_robustSampling=true; 
-      bool                                                 m_ownParametersOnDetElements = true;
-      unsigned int                                         m_layerResolved{};  
-      unsigned int                                         m_methodSequence = 0;
-      const Surface*                                       m_destinationSurface=nullptr;  
-      //!< the boundary volume check
-      const Volume*                                        m_boundaryVolume=nullptr;      
-      //!< Destination Surface for recall
-      const Surface*                                       m_recallSurface=nullptr;   
-      //!< Destination Layer for recall
-      const Layer*                                         m_recallLayer=nullptr;         
-      //!< Destination TrackingVolume for recall
-      const TrackingVolume*                                m_recallTrackingVolume=nullptr;
-      const Trk::TrackingVolume*                           m_currentStatic=nullptr;
-      const Trk::TrackingVolume*                           m_currentDense=nullptr;
-      const Trk::TrackingVolume*                           m_highestVolume=nullptr;
-      //!< return helper for parameters on detector elements
-      TrackParametersVector*                               m_parametersOnDetElements=nullptr;  
-     //!< cache layer with last material update
-      const Layer*                                         m_lastMaterialLayer=nullptr;       
-      //!< cache for collecting the total X0 ans Eloss
-      Trk::ExtrapolationCache*                             m_extrapolationCache=nullptr;      
-      //!< cache pointer for Eloss
-      const Trk::EnergyLoss*                               m_cacheEloss=nullptr;               
-       //!< cache of TrackStateOnSurfaces
-      std::vector<const Trk::TrackStateOnSurface*>*        m_matstates=nullptr;     
-      //!< cache of Transport Jacobians
-      std::vector<Trk::TransportJacobian*>*                m_jacs=nullptr;                     
-      // for active volumes
-      std::unique_ptr<identifiedParameters_t>              m_identifiedParameters;          
-
-      double                                               m_path{};    
-
-      std::pair<unsigned int, unsigned int>                m_denseResolved;
-      
-      std::vector<DestSurf>                                m_staticBoundaries;
-      std::vector<DestSurf>                                m_detachedBoundaries;
-      std::vector<DestSurf>                                m_denseBoundaries;
-      std::vector<DestSurf>                                m_navigBoundaries;
-      std::vector<DestSurf>                                m_layers;
-
-      std::vector<std::pair<const Trk::DetachedTrackingVolume*,unsigned int> >    m_detachedVols;
-      std::vector<std::pair<const Trk::TrackingVolume*,unsigned int> >            m_denseVols;
-      std::vector<std::pair<const Trk::TrackingVolume*,const Trk::Layer*> >       m_navigLays; 
-      std::vector<std::pair<const Trk::Surface*,Trk::BoundaryCheck> >             m_navigSurfs;
-      std::vector<const Trk::DetachedTrackingVolume*>                             m_navigVols;
-      std::vector<std::pair<const Trk::TrackingVolume*,unsigned int> >            m_navigVolsInt;
-
-      TrackParmContainer& trackParmContainer() { return m_trackParmContainer; }
-
-      ManagedTrackParmPtr manage(const Trk::TrackParameters& parm)
-      {
-        return ManagedTrackParmPtr(trackParmContainer(), parm);
-      }
-      ManagedTrackParmPtr manage(const Trk::TrackParameters* parm)
-      {
-        return ManagedTrackParmPtr(trackParmContainer(), parm);
-      }
-      ManagedTrackParmPtr manage(TrackParmPtr parm)
-      {
-        return ManagedTrackParmPtr(trackParmContainer(), parm);
-      }
-      ManagedTrackParmPtr manage()
-      {
-        return ManagedTrackParmPtr(trackParmContainer());
-      }
+class Extrapolator
+  : public AthAlgTool
+  , virtual public IExtrapolator
+{
+public:
+  /** This following "using" statements can be removed after the methods in IExtrapolator.h for the
+   * old interfaces WITHOUT EventContext are removed, i.e. only the new ones with EventContext are
+   * used throughout the sw */
+  using IExtrapolator::extrapolate;
+  using IExtrapolator::extrapolateBlindly;
+  using IExtrapolator::extrapolateDirectly;
+  using IExtrapolator::extrapolateM;
+  using IExtrapolator::extrapolateStepwise;
+  using IExtrapolator::extrapolateToNextActiveLayer;
+  using IExtrapolator::extrapolateToNextActiveLayerM;
+  using IExtrapolator::extrapolateToVolume;
+  using IExtrapolator::extrapolateWithPathLimit;
+
+  /**Constructor */
+  Extrapolator(const std::string&, const std::string&, const IInterface*);
+  /**Destructor*/
+  ~Extrapolator();
+
+  /** AlgTool initailize method.
+    In this method the extrapolator should retrieve the Propagator of highest order which is then
+    passed through the extrapolate method. The Propagator itself should be specified whether to use
+    propagators of a lower hirarchy level or not.
+    */
+  virtual StatusCode initialize() override;
+  /** AlgTool finalize method */
+  virtual StatusCode finalize() override;
+
+  /** [xAOD] interface ------------------------------------------------------------------ */
+
+  /** xAOD 0) neutral xAOD particle */
+  virtual const NeutralParameters* extrapolate(
+    const xAOD::NeutralParticle& xnParticle,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true) const override final;
+
+  /** xAOD 0) neutral xAOD particle */
+  virtual const TrackParameters* extrapolate(
+    const EventContext& ctx,
+    const xAOD::TrackParticle& particleBase,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const override final;
+
+  /** [NeutralParameters] ------------------------------------------------------------- */
+
+  /** N 0) <b>Neutral parameters method </b>
+    - returns a ParametersBase object as well, 0 if the extrapolation did not succeed
+    */
+
+  virtual const NeutralParameters* extrapolate(
+    const NeutralParameters& parameters,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true) const override final;
+
+  /**  1) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual const TrackParameters* extrapolate(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise,
+    Trk::ExtrapolationCache* cache = nullptr) const override final;
+
+  /** 2) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual TrackParametersUVector extrapolateStepwise(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion) const override final;
+
+  /** 3) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual const TrackParameters* extrapolate(
+    const EventContext& ctx,
+    const Track& trk,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise,
+    Trk::ExtrapolationCache* cache = nullptr) const override final;
+
+  /** 4) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual TrackParameters* extrapolateDirectly(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion) const override final;
+
+  /** 4.1) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual TrackParameters* extrapolateDirectly(
+    const EventContext& ctx,
+    const IPropagator& prop,
+    const TrackParameters& parm,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion) const override final;
+
+  /** 5) <b>Configured AlgTool extrapolation method</b>):*/
+  virtual TrackParametersUVector extrapolateBlindly(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    const Volume* boundaryVol = nullptr) const override final;
+
+  /** 6) <b>Configured AlgTool extrapolation method</b> ):*/
+  virtual std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayer(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const override final;
+
+  /** 7) <b>Configured AlgTool extrapolation method</b> ):*/
+  virtual std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayerM(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    PropDirection dir,
+    const BoundaryCheck& bcheck,
+    std::vector<const Trk::TrackStateOnSurface*>& material,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const override final;
+
+  /** 8) <b>Configured AlgTool extrapolation method</b> ):*/
+  virtual const TrackParameters* extrapolateToVolume(
+    const EventContext& ctx,
+    const TrackParameters& parm,
+    const Trk::TrackingVolume& vol,
+    PropDirection dir = anyDirection,
+    ParticleHypothesis particle = pion) const override final;
+
+  /** 9) <b>Configured AlgTool extrapolation method</b>:
+    - Extrapolate to a destination surface, while collecting all the material layers in between.
+    */
+  virtual std::vector<const TrackStateOnSurface*>* extrapolateM(
+    const EventContext& ctx,
+    const TrackParameters& parameters,
+    const Surface& sf,
+    PropDirection dir,
+    const BoundaryCheck& bcheck,
+    ParticleHypothesis particle = pion,
+    Trk::ExtrapolationCache* cache = nullptr) const override final;
+
+  /** 10) <b>Configured AlgTool extrapolation method</b>:
+    - Extrapolate to a destination surface, while collecting all the material layers and transport
+    jacobians in between.
+    */
+  virtual std::vector<const TrackParameters*>* extrapolateM(
+    const EventContext& ctx,
+    const TrackParameters& parameters,
+    const Surface& sf,
+    PropDirection dir,
+    const BoundaryCheck& bcheck,
+    std::vector<MaterialEffectsOnTrack>& material,
+    std::vector<Trk::TransportJacobian*>& jacs,
+    ParticleHypothesis particle = pion,
+    Trk::ExtrapolationCache* cache = nullptr) const override final;
+
+  virtual const Trk::TrackParameters* extrapolateWithPathLimit(
+    const EventContext& ctx,
+    const Trk::TrackParameters& parm,
+    double& pathLim,
+    Trk::PropDirection dir,
+    Trk::ParticleHypothesis particle,
+    std::vector<const Trk::TrackParameters*>*& parmOnSf,
+    std::vector<const Trk::TrackStateOnSurface*>*& material,
+    const Trk::TrackingVolume* boundaryVol = nullptr,
+    MaterialUpdateMode matupmod = Trk::addNoise) const override final;
+
+  /** extrapolation method collecting intersections with subdetector
+    boundaries and active volumes/layers. A primitive identification is
+    provided - to be replaced with appropriate identifier, and possibly merged
+    with TrackParameters. Material collection in option. Destination
+    (subdetector boundary) : geoID (+ entry, -exit) ( default MS exit )
+    */
+  virtual const std::vector<std::pair<const Trk::TrackParameters*, int>>* extrapolate(
+    const EventContext& ctx,
+    const Trk::TrackParameters& parm,
+    Trk::PropDirection dir,
+    Trk::ParticleHypothesis particle,
+    std::vector<const Trk::TrackStateOnSurface*>*& material,
+    int destination = 3) const override final;
+
+  /** Return the TrackingGeometry used by the Extrapolator (forward information from Navigator)*/
+  virtual const TrackingGeometry* trackingGeometry() const override final;
+
+  /** Validation Action:
+    Can be implemented optionally, outside access to internal validation steps */
+  virtual void validationAction() const override final;
+
+private:
+  /**
+   * Cache to be passed to and between the private methods
+   */
+  typedef std::vector<std::pair<const Trk::TrackParameters*, int>> identifiedParameters_t;
+  struct Cache
+  {
 
-      Cache()
-        : m_trackParmContainer(128)
-        , // always reserve some space; still occasionally more slots are
-          // needed; above 150 there are very few cases the max in q431 was 257
-        m_lastValidParameters(m_trackParmContainer)
-        , m_parametersAtBoundary(m_trackParmContainer)
-      {
-        m_navigSurfs.reserve(1024);
-        m_navigVols.reserve(64);
-        m_navigVolsInt.reserve(64);
-      }
-      ~Cache() {
-        s_navigSurfsMax.update(m_navigSurfs.size());
-        s_navigVolsMax.update(m_navigVols.size());
-        s_navigVolsIntMax.update(m_navigVols.size());
-        if (m_ownParametersOnDetElements && m_parametersOnDetElements) {
-          for (const Trk::TrackParameters* parm : *m_parametersOnDetElements) {
-            delete parm;
-          }
+    TrackParmContainer m_trackParmContainer;
+    //!< parameters to be used for final propagation in case of fallback
+    ManagedTrackParmPtr m_lastValidParameters;
+    //!< return helper for parameters and boundary
+    ParametersNextVolume m_parametersAtBoundary;
+    //!< Caches per MaterialUpdator
+    std::vector<std::unique_ptr<Trk::IMaterialEffectsUpdator::ICache>> m_MaterialUpCache;
+    //!< garbage collection during extrapolation
+    std::map<const Trk::TrackParameters*, bool> m_garbageBin;
+    //!<  internal switch for resolved configuration
+    bool m_dense = false;
+    //!< Flag the recall solution
+    bool m_recall = false;
+    bool m_robustSampling = true;
+    bool m_ownParametersOnDetElements = true;
+    unsigned int m_layerResolved{};
+    unsigned int m_methodSequence = 0;
+    const Surface* m_destinationSurface = nullptr;
+    //!< the boundary volume check
+    const Volume* m_boundaryVolume = nullptr;
+    //!< Destination Surface for recall
+    const Surface* m_recallSurface = nullptr;
+    //!< Destination Layer for recall
+    const Layer* m_recallLayer = nullptr;
+    //!< Destination TrackingVolume for recall
+    const TrackingVolume* m_recallTrackingVolume = nullptr;
+    const Trk::TrackingVolume* m_currentStatic = nullptr;
+    const Trk::TrackingVolume* m_currentDense = nullptr;
+    const Trk::TrackingVolume* m_highestVolume = nullptr;
+    //!< return helper for parameters on detector elements
+    TrackParametersVector* m_parametersOnDetElements = nullptr;
+    //!< cache layer with last material update
+    const Layer* m_lastMaterialLayer = nullptr;
+    //!< cache for collecting the total X0 ans Eloss
+    Trk::ExtrapolationCache* m_extrapolationCache = nullptr;
+    //!< cache pointer for Eloss
+    const Trk::EnergyLoss* m_cacheEloss = nullptr;
+    //!< cache of TrackStateOnSurfaces
+    std::vector<const Trk::TrackStateOnSurface*>* m_matstates = nullptr;
+    //!< cache of Transport Jacobians
+    std::vector<Trk::TransportJacobian*>* m_jacs = nullptr;
+    // for active volumes
+    std::unique_ptr<identifiedParameters_t> m_identifiedParameters;
+
+    double m_path{};
+
+    std::pair<unsigned int, unsigned int> m_denseResolved;
+
+    std::vector<DestSurf> m_staticBoundaries;
+    std::vector<DestSurf> m_detachedBoundaries;
+    std::vector<DestSurf> m_denseBoundaries;
+    std::vector<DestSurf> m_navigBoundaries;
+    std::vector<DestSurf> m_layers;
+
+    std::vector<std::pair<const Trk::DetachedTrackingVolume*, unsigned int>> m_detachedVols;
+    std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>> m_denseVols;
+    std::vector<std::pair<const Trk::TrackingVolume*, const Trk::Layer*>> m_navigLays;
+    std::vector<std::pair<const Trk::Surface*, Trk::BoundaryCheck>> m_navigSurfs;
+    std::vector<const Trk::DetachedTrackingVolume*> m_navigVols;
+    std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>> m_navigVolsInt;
+
+    TrackParmContainer& trackParmContainer() { return m_trackParmContainer; }
+
+    ManagedTrackParmPtr manage(const Trk::TrackParameters& parm)
+    {
+      return ManagedTrackParmPtr(trackParmContainer(), parm);
+    }
+    ManagedTrackParmPtr manage(const Trk::TrackParameters* parm)
+    {
+      return ManagedTrackParmPtr(trackParmContainer(), parm);
+    }
+    ManagedTrackParmPtr manage(TrackParmPtr parm)
+    {
+      return ManagedTrackParmPtr(trackParmContainer(), parm);
+    }
+    ManagedTrackParmPtr manage() { return ManagedTrackParmPtr(trackParmContainer()); }
+
+    Cache()
+      : m_trackParmContainer(128)
+      , // always reserve some space; still occasionally more slots are
+        // needed; above 150 there are very few cases the max in q431 was 257
+      m_lastValidParameters(m_trackParmContainer)
+      , m_parametersAtBoundary(m_trackParmContainer)
+    {
+      m_navigSurfs.reserve(1024);
+      m_navigVols.reserve(64);
+      m_navigVolsInt.reserve(64);
+    }
+    ~Cache()
+    {
+      s_navigSurfsMax.update(m_navigSurfs.size());
+      s_navigVolsMax.update(m_navigVols.size());
+      s_navigVolsIntMax.update(m_navigVols.size());
+      if (m_ownParametersOnDetElements && m_parametersOnDetElements) {
+        for (const Trk::TrackParameters* parm : *m_parametersOnDetElements) {
+          delete parm;
         }
-         s_containerSizeMax.update(trackParmContainer().size());
       }
+      s_containerSizeMax.update(trackParmContainer().size());
+    }
 
-      /**
-       * struct for accumulating stat counters
-       */
-      struct AtomicMax
+    /**
+     * struct for accumulating stat counters
+     */
+    struct AtomicMax
+    {
+      void update(size_t val)
       {
-        void update(size_t val)
-        {
-          while (val > m_maxVal) {
-            val = m_maxVal.exchange(val);
-          }
+        while (val > m_maxVal) {
+          val = m_maxVal.exchange(val);
         }
-        size_t val() const { return m_maxVal; }
-        std::atomic<size_t> m_maxVal = 0;
-      };
-      static AtomicMax s_navigSurfsMax ATLAS_THREAD_SAFE;
-      static AtomicMax s_navigVolsMax ATLAS_THREAD_SAFE;
-      static AtomicMax s_navigVolsIntMax ATLAS_THREAD_SAFE;
-      static AtomicMax s_containerSizeMax ATLAS_THREAD_SAFE;
-      static bool s_reported ATLAS_THREAD_SAFE;
+      }
+      size_t val() const { return m_maxVal; }
+      std::atomic<size_t> m_maxVal = 0;
     };
+    static AtomicMax s_navigSurfsMax ATLAS_THREAD_SAFE;
+    static AtomicMax s_navigVolsMax ATLAS_THREAD_SAFE;
+    static AtomicMax s_navigVolsIntMax ATLAS_THREAD_SAFE;
+    static AtomicMax s_containerSizeMax ATLAS_THREAD_SAFE;
+    static bool s_reported ATLAS_THREAD_SAFE;
+  };
 
-    /**
-     * Actual heavy lifting implementation for
-     * - returns the TrackParameters at the Destination Surface (if extrapolation succeeds),
-     *   0 if extrapolation to destination surface does not suceed
-     */
-    ManagedTrackParmPtr extrapolateImpl(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** * Actual heavy lifting implementation for
-    - returns a vector of TrackParameters representing the tracking detector elements
-    hit in between and the TrackParameters at the destination Surface (if final extrapolation suceeds),
-    empty if the extrapolation to the destination surface does not suceed*/
-    TrackParametersUVector extrapolateStepwiseImpl(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion) const;
-
-    /**
-     * Actual heavy lifting implementation for
-     * - Extrapolation using specific intermediate surfaces and energy loss effects to be accounted for at
-     *   each surface as specified by the corresponding MaterialEffectsOnTrack
-     *   -Final boolean only relevant if LandauMode = true for the configured MaterialEffectsUpdator
-     */
-    ManagedTrackParmPtr extrapolateImpl(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const std::vector<MaterialEffectsOnTrack>& sfMeff,
-      const TrackingVolume& tvol,
-      PropDirection dir,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Actual heavy lifting implementation for  
-     * 1) <b>Configured AlgTool extrapolation method</b>):
-     * */
-    virtual ManagedTrackParmPtr extrapolateImpl(
-      const EventContext& ctx,
-      Cache& cache,
-      TrackParmPtr parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise,
-      Trk::ExtrapolationCache* extrapolationCache = nullptr) const;
-
-    /** Actual heavy lifting implementation for
-     * 4) <b>Configured AlgTool extrapolation method</b>):*/
-    TrackParameters* extrapolateDirectlyImpl(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      const Surface& sf,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion) const;
-
-    /** Actual heavy lifting implementation for
-     * 5) <b>Configured AlgTool extrapolation method</b>):*/
-    Trk::TrackParametersUVector extrapolateBlindlyImpl(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      const Volume* boundaryVol = nullptr) const;
-
-    /** Actual heavy lifting implementation for  
-     * 6) <b>Configured AlgTool extrapolation method</b>):*/
-    std::pair<const TrackParameters*, const Layer*>
-    extrapolateToNextActiveLayerImpl(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Actual heavy lifting implementation for
-     * 7) <b>Configured AlgTool extrapolation method</b>
-     */
-    std::pair<const TrackParameters*, const Layer*>
-    extrapolateToNextActiveLayerMImpl(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      std::vector<const Trk::TrackStateOnSurface*>& material,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Actual heavy lifting implementation for
-     * 8) <b>Configured AlgTool extrapolation method</b>
-     */
-    const TrackParameters* extrapolateToVolumeImpl(
-      const EventContext& ctx,
-      const IPropagator& prop,
-      const TrackParameters& parm,
-      const Trk::TrackingVolume& vol,
-      PropDirection dir = anyDirection,
-      ParticleHypothesis particle = pion) const;
-
-    /** Private method for extrapolation in final volume to destination surface
-      - Parameters are: IPropagator& prop            ... propagator to be used
-      TrackParameters& parm        ... starting parameters
-      Surface& sf                  ... destination surface
-      TrackingVolume&              ... the initial volume
-      Layer* associatedLayer       ... layer associatiated with starting parameters (steers postupdate)
-      PropDirection dir            ... propagation direction
-      const BoundaryCheck&  bcheck         ... boolean for bounday check
-      ParticleHypothesis  particle ... the particle hypothesis
-      std::vector<const TrackParameters*>* dethits ... for blind extrapolation
-
-      it will call:
-      - A) insideVolumeStaticLayers() for a TrackingVolume with static layers
-      - C) insideVolumeDetachedVolumes() for a TrackingVolume with detached inner Volumes
-      */
-    ManagedTrackParmPtr extrapolateInsideVolume(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Surface& sf,
-      const Layer* associatedLayer,
-      const TrackingVolume& tvol,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** A) call from extrapolateInsideVolume or toBoundary,
-      if it is to boundary, the return parameters are the parameters at the boundary
-      */
-    ManagedTrackParmPtr insideVolumeStaticLayers(
-      const EventContext& ctx,
-      Cache& cache,
-      bool toBoundary,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Layer* associatedLayer,
-      const TrackingVolume& tvol,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** C) call from extrapolateInsideVolume */
-    ManagedTrackParmPtr extrapolateWithinDetachedVolumes(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Surface& sf,
-      const TrackingVolume& tvol,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    ManagedTrackParmPtr extrapolateToNextMaterialLayer(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Trk::Surface* destSurf,
-      const Trk::TrackingVolume* vol,
-      PropDirection dir,
-      const BoundaryCheck& bcheck,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    ManagedTrackParmPtr extrapolateInAlignableTV(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Trk::Surface* destSurf,
-      const Trk::AlignableTrackingVolume* vol,
-      PropDirection dir,
-      ParticleHypothesis particle = pion) const;
-
-    ManagedTrackParmPtr extrapolateToVolumeWithPathLimit(
-      const EventContext& ctx,
-      Cache& cache,
-      TrackParmPtr parm,
-      double pathLim,
-      Trk::PropDirection dir,
-      Trk::ParticleHypothesis particle,
-      const Trk::TrackingVolume* destVol,
-      MaterialUpdateMode matupmod = addNoise) const;
-
-    /** Private method for extrapolation in intermediate volume to boundary surface
-      - Parameters are: IPropagator& prop            ... propagator to be used
-      TrackParameters& parm        ... starting parameters
-      Surface& sf                  ... destination surface
-      TrackingVolume&              ... the initial volume
-      Layer* associatedLayer       ... layer associatiated with starting parameters (steers postupdate)
-      PropDirection dir            ... propagation direction
-      const BoundaryCheck&  bcheck         ... boolean for bounday check
-      ParticleHypothesis  particle ... the particle hypothesis
-      std::vector<const TrackParameters*>* dethits ... for blind extrapolation
-      it will call:
-      - A) toVolumeBoundaryStaticLayers() for a TrackingVolume with static layers
-      - C) toVolumeBoundaryDetachedVolumes() for a TrackingVolume with detached inner Volumes
-      */
-    void extrapolateToVolumeBoundary(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Layer* associatedLayer,
-      const TrackingVolume& tvol,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Private method to step from one to the last
-      layer and stop at last layer (before 0) or before destination layer */
-    ManagedTrackParmPtr extrapolateFromLayerToLayer(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const TrackingVolume& tvol,
-      const Layer* nextLayer,
-      const Layer* destinationLayer,
-      TrackParmPtr navParameters,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Private to extrapolate to the destination layer + surface
-     */
-    ManagedTrackParmPtr extrapolateToDestinationLayer(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Surface& sf,
-      const Layer& lay,
-      const TrackingVolume& tvol,
-      const Layer* startLayer,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise) const;
-
-    /** Private to extrapolate to the destination layer + surface, special treatment for exit layer
-     * @return valid track parameters or nullptr, as first element and in case of nullptr as second element
-     *         true to indicate to kill the loop from material update(?)
-     */
-    std::pair<ManagedTrackParmPtr, bool> extrapolateToIntermediateLayer(
-      const EventContext& ctx,
-      Cache& cache,
-      const IPropagator& prop,
-      TrackParmPtr parm,
-      const Layer& lay,
-      const TrackingVolume& tvol,
-      PropDirection dir = anyDirection,
-      const BoundaryCheck& bcheck = true,
-      ParticleHypothesis particle = pion,
-      MaterialUpdateMode matupmode = addNoise,
-      bool perpendicularCheck = true) const;
-
-    /** Private to search for overlap surfaces */
-    void overlapSearch(const EventContext& ctx,
-                       Cache& cache,
-                       const IPropagator& prop,
-                       TrackParmPtr parm,
-                       TrackParmPtr parsOnLayer,
-                       const Layer& lay,
-                       const TrackingVolume& tvol,
-                       PropDirection dir = anyDirection,
-                       const BoundaryCheck& bcheck = true,
-                       ParticleHypothesis particle = pion,
-                       bool startingLayer = false) const;
-
-    /** Private method for chosing the propagator in the simple/full configured mode */
-    unsigned int propagatorType(const TrackingVolume& tvol) const;
-
-    /** Private method for Initial Extrapolation setup
-      -> overwrites the given pointers for the start and destination parameters
-      -> returns a direction for the Navigation :
-      - usually dir if dir @f$ \in  @f$ [ Trk::alongMomentum, Trk::oppositeMomentum ]
-      - a chosen one if dir == Trk::anyDirection
-      */
-    PropDirection initializeNavigation(
-        const EventContext& ctx,
-        Cache& cache,
-        const Trk::IPropagator& prop,
-        TrackParmPtr startPars,
-        const Trk::Surface& destSurface,
-        Trk::PropDirection dir,
-        ParticleHypothesis particle,
-        ManagedTrackParmPtr& referenceParameters,
-        const Trk::Layer*& associatedLayer,
-        const Trk::TrackingVolume*& associatedVolume,
-        const Trk::TrackingVolume*& destinationVolume) const;
-
-    /** RadialDirection helper method
-      - inbound : -1
-      - outbound:  1  */
-    int radialDirection(const Trk::TrackParameters& pars, PropDirection dir) const;
-
-    /** Check for punchThrough in case of radial (perpendicular) direction change,
-      returns true if the radial direction change is actually ok (i.e. punch-through allowed)
-      */
-    bool radialDirectionCheck(const EventContext& ctx,
-                              const IPropagator& prop,
-                              const TrackParameters& startParm,
-                              const TrackParameters& parsOnLayer,
-                              const TrackingVolume& tvol,
-                              PropDirection dir = anyDirection,
-                              ParticleHypothesis particle = pion) const;
-
-    /** Access the subPropagator to the given volume*/
-    virtual const IPropagator* subPropagator(
-      const TrackingVolume& tvol) const override;
-
-    /** Access the subPropagator to the given volume*/
-    const IMaterialEffectsUpdator* subMaterialEffectsUpdator(
-      const TrackingVolume& tvol) const;
-
-    /** Get the IMaterialEffectsUpdator::ICache  for the MaterialEffectsUpdator*/
-    IMaterialEffectsUpdator::ICache& subMaterialEffectsUpdatorCache(
-      Cache& cache,
-      const TrackingVolume& tvol) const;
-
-    /** Prepare the IMaterialEffectsUpdator::ICache for each
-     * Material Effects updator */
-    void populateMatEffUpdatorCache(Cache& cache) const;
-
-   
-    /** Private method for setting recall Information */
-    void setRecallInformation(Cache& cache,
-                              const Surface&,
-                              const Layer&,
-                              const TrackingVolume&) const;
-
-    /** Private method for resetting the recallInformation */
-    void resetRecallInformation(Cache& cache) const;
-
-    /** Private method for throwing into the GarbageBin */
-    void throwIntoGarbageBin(Cache& cache, const Trk::TrackParameters* garbage) const;
-
-    /** Private method for emptying the GarbageBin */
-    void emptyGarbageBin(Cache& cache) const;
-    void emptyGarbageBin(Cache& cache, const Trk::TrackParameters*) const;
-
-    /** Private method to return from extrapolate() main method,
-        cleans up, calls model action or validation action, empties garbage bin and leaves */
-    const Trk::TrackParameters* returnResult(Cache& cache, const Trk::TrackParameters* result) const;
-
-    /** For the output - layer */
-    std::string layerRZoutput(const Trk::Layer& lay) const;
-
-    /** For the output - global position */
-    std::string positionOutput(const Amg::Vector3D& pos) const;
-    /** For the output - global momentum */
-    std::string momentumOutput(const Amg::Vector3D& mom) const;
-
-    /** helper method for MaterialEffectsOnTrack to be added */
-    void addMaterialEffectsOnTrack(const EventContext& ctx,
+  /**
+   * Actual heavy lifting implementation for
+   * - returns the TrackParameters at the Destination Surface (if extrapolation succeeds),
+   *   0 if extrapolation to destination surface does not suceed
+   */
+  ManagedTrackParmPtr extrapolateImpl(const EventContext& ctx,
+                                      Cache& cache,
+                                      const IPropagator& prop,
+                                      TrackParmPtr parm,
+                                      const Surface& sf,
+                                      PropDirection dir = anyDirection,
+                                      const BoundaryCheck& bcheck = true,
+                                      ParticleHypothesis particle = pion,
+                                      MaterialUpdateMode matupmode = addNoise) const;
+
+  /** * Actual heavy lifting implementation for
+  - returns a vector of TrackParameters representing the tracking detector elements
+  hit in between and the TrackParameters at the destination Surface (if final extrapolation
+  suceeds), empty if the extrapolation to the destination surface does not suceed*/
+  TrackParametersUVector extrapolateStepwiseImpl(const EventContext& ctx,
+                                                 const IPropagator& prop,
+                                                 const TrackParameters& parm,
+                                                 const Surface& sf,
+                                                 PropDirection dir = anyDirection,
+                                                 const BoundaryCheck& bcheck = true,
+                                                 ParticleHypothesis particle = pion) const;
+
+  /**
+   * Actual heavy lifting implementation for
+   * - Extrapolation using specific intermediate surfaces and energy loss effects to be accounted
+   * for at each surface as specified by the corresponding MaterialEffectsOnTrack -Final boolean
+   * only relevant if LandauMode = true for the configured MaterialEffectsUpdator
+   */
+  ManagedTrackParmPtr extrapolateImpl(const EventContext& ctx,
+                                      Cache& cache,
+                                      const IPropagator& prop,
+                                      TrackParmPtr parm,
+                                      const std::vector<MaterialEffectsOnTrack>& sfMeff,
+                                      const TrackingVolume& tvol,
+                                      PropDirection dir,
+                                      ParticleHypothesis particle = pion,
+                                      MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Actual heavy lifting implementation for
+   * 1) <b>Configured AlgTool extrapolation method</b>):
+   * */
+  virtual ManagedTrackParmPtr extrapolateImpl(
+    const EventContext& ctx,
+    Cache& cache,
+    TrackParmPtr parm,
+    const Surface& sf,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise,
+    Trk::ExtrapolationCache* extrapolationCache = nullptr) const;
+
+  /** Actual heavy lifting implementation for
+   * 4) <b>Configured AlgTool extrapolation method</b>):*/
+  TrackParameters* extrapolateDirectlyImpl(const EventContext& ctx,
+                                           const IPropagator& prop,
+                                           const TrackParameters& parm,
+                                           const Surface& sf,
+                                           PropDirection dir = anyDirection,
+                                           const BoundaryCheck& bcheck = true,
+                                           ParticleHypothesis particle = pion) const;
+
+  /** Actual heavy lifting implementation for
+   * 5) <b>Configured AlgTool extrapolation method</b>):*/
+  Trk::TrackParametersUVector extrapolateBlindlyImpl(const EventContext& ctx,
+                                                     Cache& cache,
+                                                     const IPropagator& prop,
+                                                     TrackParmPtr parm,
+                                                     PropDirection dir = anyDirection,
+                                                     const BoundaryCheck& bcheck = true,
+                                                     ParticleHypothesis particle = pion,
+                                                     const Volume* boundaryVol = nullptr) const;
+
+  /** Actual heavy lifting implementation for
+   * 6) <b>Configured AlgTool extrapolation method</b>):*/
+  std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayerImpl(
+    const EventContext& ctx,
+    const IPropagator& prop,
+    const TrackParameters& parm,
+    PropDirection dir,
+    const BoundaryCheck& bcheck,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Actual heavy lifting implementation for
+   * 7) <b>Configured AlgTool extrapolation method</b>
+   */
+  std::pair<const TrackParameters*, const Layer*> extrapolateToNextActiveLayerMImpl(
+    const EventContext& ctx,
+    const IPropagator& prop,
+    const TrackParameters& parm,
+    PropDirection dir,
+    const BoundaryCheck& bcheck,
+    std::vector<const Trk::TrackStateOnSurface*>& material,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Actual heavy lifting implementation for
+   * 8) <b>Configured AlgTool extrapolation method</b>
+   */
+  const TrackParameters* extrapolateToVolumeImpl(const EventContext& ctx,
+                                                 const IPropagator& prop,
+                                                 const TrackParameters& parm,
+                                                 const Trk::TrackingVolume& vol,
+                                                 PropDirection dir = anyDirection,
+                                                 ParticleHypothesis particle = pion) const;
+
+  /** Private method for extrapolation in final volume to destination surface
+    - Parameters are: IPropagator& prop            ... propagator to be used
+    TrackParameters& parm        ... starting parameters
+    Surface& sf                  ... destination surface
+    TrackingVolume&              ... the initial volume
+    Layer* associatedLayer       ... layer associatiated with starting parameters (steers
+    postupdate) PropDirection dir            ... propagation direction const BoundaryCheck&  bcheck
+    ... boolean for bounday check ParticleHypothesis  particle ... the particle hypothesis
+    std::vector<const TrackParameters*>* dethits ... for blind extrapolation
+
+    it will call:
+    - A) insideVolumeStaticLayers() for a TrackingVolume with static layers
+    - C) insideVolumeDetachedVolumes() for a TrackingVolume with detached inner Volumes
+    */
+  ManagedTrackParmPtr extrapolateInsideVolume(const EventContext& ctx,
+                                              Cache& cache,
+                                              const IPropagator& prop,
+                                              TrackParmPtr parm,
+                                              const Surface& sf,
+                                              const Layer* associatedLayer,
+                                              const TrackingVolume& tvol,
+                                              PropDirection dir = anyDirection,
+                                              const BoundaryCheck& bcheck = true,
+                                              ParticleHypothesis particle = pion,
+                                              MaterialUpdateMode matupmode = addNoise) const;
+
+  /** A) call from extrapolateInsideVolume or toBoundary,
+    if it is to boundary, the return parameters are the parameters at the boundary
+    */
+  ManagedTrackParmPtr insideVolumeStaticLayers(const EventContext& ctx,
+                                               Cache& cache,
+                                               bool toBoundary,
+                                               const IPropagator& prop,
+                                               TrackParmPtr parm,
+                                               const Layer* associatedLayer,
+                                               const TrackingVolume& tvol,
+                                               PropDirection dir = anyDirection,
+                                               const BoundaryCheck& bcheck = true,
+                                               ParticleHypothesis particle = pion,
+                                               MaterialUpdateMode matupmode = addNoise) const;
+
+  /** C) call from extrapolateInsideVolume */
+  ManagedTrackParmPtr extrapolateWithinDetachedVolumes(
+    const EventContext& ctx,
+    Cache& cache,
+    const IPropagator& prop,
+    TrackParmPtr parm,
+    const Surface& sf,
+    const TrackingVolume& tvol,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise) const;
+
+  ManagedTrackParmPtr extrapolateToNextMaterialLayer(const EventContext& ctx,
+                                                     Cache& cache,
+                                                     const IPropagator& prop,
+                                                     TrackParmPtr parm,
+                                                     const Trk::Surface* destSurf,
+                                                     const Trk::TrackingVolume* vol,
+                                                     PropDirection dir,
+                                                     const BoundaryCheck& bcheck,
+                                                     ParticleHypothesis particle = pion,
+                                                     MaterialUpdateMode matupmode = addNoise) const;
+
+  ManagedTrackParmPtr extrapolateInAlignableTV(const EventContext& ctx,
+                                               Cache& cache,
+                                               const IPropagator& prop,
+                                               TrackParmPtr parm,
+                                               const Trk::Surface* destSurf,
+                                               const Trk::AlignableTrackingVolume* vol,
+                                               PropDirection dir,
+                                               ParticleHypothesis particle = pion) const;
+
+  ManagedTrackParmPtr extrapolateToVolumeWithPathLimit(
+    const EventContext& ctx,
+    Cache& cache,
+    TrackParmPtr parm,
+    double pathLim,
+    Trk::PropDirection dir,
+    Trk::ParticleHypothesis particle,
+    const Trk::TrackingVolume* destVol,
+    MaterialUpdateMode matupmod = addNoise) const;
+
+  /** Private method for extrapolation in intermediate volume to boundary surface
+    - Parameters are: IPropagator& prop            ... propagator to be used
+    TrackParameters& parm        ... starting parameters
+    Surface& sf                  ... destination surface
+    TrackingVolume&              ... the initial volume
+    Layer* associatedLayer       ... layer associatiated with starting parameters (steers
+    postupdate) PropDirection dir            ... propagation direction const BoundaryCheck&  bcheck
+    ... boolean for bounday check ParticleHypothesis  particle ... the particle hypothesis
+    std::vector<const TrackParameters*>* dethits ... for blind extrapolation
+    it will call:
+    - A) toVolumeBoundaryStaticLayers() for a TrackingVolume with static layers
+    - C) toVolumeBoundaryDetachedVolumes() for a TrackingVolume with detached inner Volumes
+    */
+  void extrapolateToVolumeBoundary(const EventContext& ctx,
                                    Cache& cache,
-                                   const Trk::IPropagator& prop,
+                                   const IPropagator& prop,
                                    TrackParmPtr parm,
-                                   const Trk::Layer& lay,
-                                   const Trk::TrackingVolume& vol,
-                                   Trk::PropDirection propDir,
-                                   Trk::ParticleHypothesis) const;
-
-    void dumpCache(Cache& cache, const std::string& txt) const;
-    bool checkCache(Cache& cache, const std::string& txt) const;
-
-    /** Private method for conversion of the synchronized geometry signature to
-     * the natural subdetector ordering */
-    // unsigned int geoIDToDetOrder(Trk::GeometrySignature geoid) const;
-
-    // --------------- Used Tools ----------------------------- //
-    //!<  Array of Propagators
-    ToolHandleArray<IPropagator> m_propagators{ this, "Propagators", {} };
-    //!<  Steo Propagator
-    ToolHandle<IPropagator> m_stepPropagator{
-      this,
-      "STEP_Propagator",
-      "Trk::STEP_Propagator/AtlasSTEP_Propagator"
-    };
-    //!<  Navigator for TrackingGeometry and magnetic fiels acces
-    ToolHandle<INavigator> m_navigator{ this,
-                                        "Navigator",
-                                        "Trk::Navigator/AtlasNavigator" };
-    //!<  Array of Material updaters
-    ToolHandleArray<IMaterialEffectsUpdator> m_updaters{
-      this,
-      "MaterialEffectsUpdators",
-      {}
-    };
-    //!<  Array of MultipleScattering updaters
-    ToolHandleArray<IMultipleScatteringUpdator> m_msupdaters{
-      this,
-      "MultipleScatteringUpdators",
-      {}
-    };
-    //!<  Array of EnergyLoss updaters
-    ToolHandleArray<IEnergyLossUpdator> m_elossupdaters{ this,
-                                                         "EnergyLossUpdators",
-                                                         {} };
-
-    // ---------------- For Extrapolation handling ------------ //
-
-    std::vector<const IPropagator*> m_subPropagators;          //!< Propagators to chose from (steered by signature)
-    std::vector<const IMaterialEffectsUpdator*> m_subupdaters; //!< updaters to chose from (steered by signature)
-
-    // ---------------- For Extrapolator configuration ------------ //
-
-    std::vector<std::string> m_propNames;  //!<  configuration of subPropagators
-    std::vector<std::string> m_updatNames; //!<  configuration of subupdaters
-
-    // --------------- General steering & Navigation -------------- //
-
-    bool m_includeMaterialEffects;        //!< boolean to switch on/off material effects
-    bool m_requireMaterialDestinationHit; //!< require the destination surface hit for material collection
-    bool m_stopWithNavigationBreak;       //!< return 0 if navigation breaks - for validation reasons
-    bool m_stopWithUpdateZero;            //!< return 0 if update kills the trajectory
-    bool m_subSurfaceLevel;               //!< tep down to sub-surface level
-    bool m_skipInitialLayerUpdate;        //!< skip the initial post-Update at the layer [Fatras conversion mode]
-    bool m_extendedLayerSearch;           //!< extended layer search
-    bool m_robustSampling;
-    bool m_referenceMaterial; //!< use the reference material for the update
-    bool m_resolveActive;
-    bool m_resolveMultilayers;
-    bool m_cacheLastMatLayer; //!< steering of the material layer cache
-    bool m_returnPassiveLayers;
-    unsigned int m_meotpIndex;              //!< if several meotps are available in a volume steer which one to use
-    unsigned int m_configurationLevel;      //!< see the supported levels of configuration above
-    unsigned int m_searchLevel;             //!< see the supported search levels above
-    unsigned int m_initialLayerAttempts;    //!< allowed layer intersection attempts at the start of a volume
-    unsigned int m_successiveLayerAttempts; //!< layer intersection attemps after one layer has been hit sucessfully
-    unsigned int m_maxMethodSequence;
-    double m_tolerance; //!< surfacen & volume tolerance
-    // ------------------------------------------------------- //
-    bool m_activeOverlap;             //!<  consider overlaps between active muon volumes
-    bool m_useMuonMatApprox;          //!<  use approximative MS inert material
-    bool m_useDenseVolumeDescription; //!<  use dense volume description when available in ID/Calo
-    bool m_checkForCompundLayers;     //!<  use the multi-layer tests for compound layers
-    unsigned int m_maxNavigSurf;
-    unsigned int m_maxNavigVol;
-    bool m_dumpCache;
-    //------------ Magnetic field properties
-    bool m_fastField;
-    Trk::MagneticFieldProperties m_fieldProperties;
-    //------------Reference surface --------------
-    Surface* m_referenceSurface;
-    //-------------------------- SCREEN output steering -------------------------------------------//
-    bool m_printHelpOutputAtInitialize;
-    bool m_printRzOutput;
-    //------------------------- VALIDATION  SECTION ------------------------------------------//
-    // flags
-    bool m_navigationStatistics;             //!< steer the output for the navigaiton statistics
-    bool m_navigationBreakDetails;           //!< steer the output for the navigation break details
-    bool m_materialEffectsOnTrackValidation; //!< mat effects on track validation
-    
-    // extrapolation counters
-    mutable Gaudi::Accumulators::Counter<int> m_extrapolateCalls; //!< number of calls: extrapolate() method
-    mutable Gaudi::Accumulators::Counter<int>
-      m_extrapolateBlindlyCalls; //!< number of calls: extrapolateBlindly() method
-    mutable Gaudi::Accumulators::Counter<int>
-      m_extrapolateDirectlyCalls; //!< number of calls: extrapolateDirectly() method
-    mutable Gaudi::Accumulators::Counter<int>
-      m_extrapolateStepwiseCalls; //!< number of calls: extrapolateStepwise() method
-
-    mutable Gaudi::Accumulators::Counter<int> m_startThroughAssociation;        //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_startThroughRecall;             //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_startThroughGlobalSearch;       //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_destinationThroughAssociation;  //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_destinationThroughRecall;       //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_destinationThroughGlobalSearch; //!< navigation intialization
-    mutable Gaudi::Accumulators::Counter<int> m_layerSwitched; //!< number of layers that have been switched
-
-    // navigation counters
-    mutable Gaudi::Accumulators::Counter<int> m_navigationBreakLoop; //!< number of navigation breaks due to loop
-    mutable Gaudi::Accumulators::Counter<int>
-      m_navigationBreakOscillation; //!< number of navigation breaks due to oscillation
-    mutable Gaudi::Accumulators::Counter<int>
-      m_navigationBreakNoVolume; //!< number of navigation breaks due no Volume found
-    mutable Gaudi::Accumulators::Counter<int>
-      m_navigationBreakDistIncrease; //!< number of navigation breaks due to distance increase
-    mutable Gaudi::Accumulators::Counter<int>
-      m_navigationBreakVolumeSignature; //!< number of navigation breaks due to distance increase
-    mutable Gaudi::Accumulators::Counter<int> m_overlapSurfaceHit; //!< number of OverlapSurfaces found
-
-    mutable Gaudi::Accumulators::Counter<int> m_meotSearchCallsFw; //!< how often the meot search is called: forward
-    mutable Gaudi::Accumulators::Counter<int> m_meotSearchCallsBw; //!< how often the meot search is called: backward
-    mutable Gaudi::Accumulators::Counter<int>
-      m_meotSearchSuccessfulFw; //!< how often the meot search was successful: forward
-    mutable Gaudi::Accumulators::Counter<int>
-      m_meotSearchSuccessfulBw; //!< how often the meot search was successful: backward
-  };
+                                   const Layer* associatedLayer,
+                                   const TrackingVolume& tvol,
+                                   PropDirection dir = anyDirection,
+                                   const BoundaryCheck& bcheck = true,
+                                   ParticleHypothesis particle = pion,
+                                   MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Private method to step from one to the last
+    layer and stop at last layer (before 0) or before destination layer */
+  ManagedTrackParmPtr extrapolateFromLayerToLayer(const EventContext& ctx,
+                                                  Cache& cache,
+                                                  const IPropagator& prop,
+                                                  TrackParmPtr parm,
+                                                  const TrackingVolume& tvol,
+                                                  const Layer* nextLayer,
+                                                  const Layer* destinationLayer,
+                                                  TrackParmPtr navParameters,
+                                                  PropDirection dir = anyDirection,
+                                                  const BoundaryCheck& bcheck = true,
+                                                  ParticleHypothesis particle = pion,
+                                                  MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Private to extrapolate to the destination layer + surface
+   */
+  ManagedTrackParmPtr extrapolateToDestinationLayer(const EventContext& ctx,
+                                                    Cache& cache,
+                                                    const IPropagator& prop,
+                                                    TrackParmPtr parm,
+                                                    const Surface& sf,
+                                                    const Layer& lay,
+                                                    const TrackingVolume& tvol,
+                                                    const Layer* startLayer,
+                                                    PropDirection dir = anyDirection,
+                                                    const BoundaryCheck& bcheck = true,
+                                                    ParticleHypothesis particle = pion,
+                                                    MaterialUpdateMode matupmode = addNoise) const;
+
+  /** Private to extrapolate to the destination layer + surface, special treatment for exit layer
+   * @return valid track parameters or nullptr, as first element and in case of nullptr as second
+   * element true to indicate to kill the loop from material update(?)
+   */
+  std::pair<ManagedTrackParmPtr, bool> extrapolateToIntermediateLayer(
+    const EventContext& ctx,
+    Cache& cache,
+    const IPropagator& prop,
+    TrackParmPtr parm,
+    const Layer& lay,
+    const TrackingVolume& tvol,
+    PropDirection dir = anyDirection,
+    const BoundaryCheck& bcheck = true,
+    ParticleHypothesis particle = pion,
+    MaterialUpdateMode matupmode = addNoise,
+    bool perpendicularCheck = true) const;
+
+  /** Private to search for overlap surfaces */
+  void overlapSearch(const EventContext& ctx,
+                     Cache& cache,
+                     const IPropagator& prop,
+                     TrackParmPtr parm,
+                     TrackParmPtr parsOnLayer,
+                     const Layer& lay,
+                     const TrackingVolume& tvol,
+                     PropDirection dir = anyDirection,
+                     const BoundaryCheck& bcheck = true,
+                     ParticleHypothesis particle = pion,
+                     bool startingLayer = false) const;
+
+  /** Private method for chosing the propagator in the simple/full configured mode */
+  unsigned int propagatorType(const TrackingVolume& tvol) const;
+
+  /** Private method for Initial Extrapolation setup
+    -> overwrites the given pointers for the start and destination parameters
+    -> returns a direction for the Navigation :
+    - usually dir if dir @f$ \in  @f$ [ Trk::alongMomentum, Trk::oppositeMomentum ]
+    - a chosen one if dir == Trk::anyDirection
+    */
+  PropDirection initializeNavigation(const EventContext& ctx,
+                                     Cache& cache,
+                                     const Trk::IPropagator& prop,
+                                     TrackParmPtr startPars,
+                                     const Trk::Surface& destSurface,
+                                     Trk::PropDirection dir,
+                                     ParticleHypothesis particle,
+                                     ManagedTrackParmPtr& referenceParameters,
+                                     const Trk::Layer*& associatedLayer,
+                                     const Trk::TrackingVolume*& associatedVolume,
+                                     const Trk::TrackingVolume*& destinationVolume) const;
+
+  /** RadialDirection helper method
+    - inbound : -1
+    - outbound:  1  */
+  int radialDirection(const Trk::TrackParameters& pars, PropDirection dir) const;
+
+  /** Check for punchThrough in case of radial (perpendicular) direction change,
+    returns true if the radial direction change is actually ok (i.e. punch-through allowed)
+    */
+  bool radialDirectionCheck(const EventContext& ctx,
+                            const IPropagator& prop,
+                            const TrackParameters& startParm,
+                            const TrackParameters& parsOnLayer,
+                            const TrackingVolume& tvol,
+                            PropDirection dir = anyDirection,
+                            ParticleHypothesis particle = pion) const;
+
+  /** Access the subPropagator to the given volume*/
+  virtual const IPropagator* subPropagator(const TrackingVolume& tvol) const override;
+
+  /** Access the subPropagator to the given volume*/
+  const IMaterialEffectsUpdator* subMaterialEffectsUpdator(const TrackingVolume& tvol) const;
+
+  /** Get the IMaterialEffectsUpdator::ICache  for the MaterialEffectsUpdator*/
+  IMaterialEffectsUpdator::ICache& subMaterialEffectsUpdatorCache(Cache& cache,
+                                                                  const TrackingVolume& tvol) const;
+
+  /** Prepare the IMaterialEffectsUpdator::ICache for each
+   * Material Effects updator */
+  void populateMatEffUpdatorCache(Cache& cache) const;
+
+  /** Private method for setting recall Information */
+  void setRecallInformation(Cache& cache,
+                            const Surface&,
+                            const Layer&,
+                            const TrackingVolume&) const;
+
+  /** Private method for resetting the recallInformation */
+  void resetRecallInformation(Cache& cache) const;
+
+  /** Private method for throwing into the GarbageBin */
+  void throwIntoGarbageBin(Cache& cache, const Trk::TrackParameters* garbage) const;
+
+  /** Private method for emptying the GarbageBin */
+  void emptyGarbageBin(Cache& cache) const;
+  void emptyGarbageBin(Cache& cache, const Trk::TrackParameters*) const;
+
+  /** Private method to return from extrapolate() main method,
+      cleans up, calls model action or validation action, empties garbage bin and leaves */
+  const Trk::TrackParameters* returnResult(Cache& cache, const Trk::TrackParameters* result) const;
+
+  /** For the output - layer */
+  std::string layerRZoutput(const Trk::Layer& lay) const;
+
+  /** For the output - global position */
+  std::string positionOutput(const Amg::Vector3D& pos) const;
+  /** For the output - global momentum */
+  std::string momentumOutput(const Amg::Vector3D& mom) const;
+
+  /** helper method for MaterialEffectsOnTrack to be added */
+  void addMaterialEffectsOnTrack(const EventContext& ctx,
+                                 Cache& cache,
+                                 const Trk::IPropagator& prop,
+                                 TrackParmPtr parm,
+                                 const Trk::Layer& lay,
+                                 const Trk::TrackingVolume& vol,
+                                 Trk::PropDirection propDir,
+                                 Trk::ParticleHypothesis) const;
+
+  void dumpCache(Cache& cache, const std::string& txt) const;
+  bool checkCache(Cache& cache, const std::string& txt) const;
+
+  /** Private method for conversion of the synchronized geometry signature to
+   * the natural subdetector ordering */
+  // unsigned int geoIDToDetOrder(Trk::GeometrySignature geoid) const;
+
+  // --------------- Used Tools ----------------------------- //
+  //!<  Array of Propagators
+  ToolHandleArray<IPropagator> m_propagators{ this, "Propagators", {} };
+  //!<  Steo Propagator
+  ToolHandle<IPropagator> m_stepPropagator{ this,
+                                            "STEP_Propagator",
+                                            "Trk::STEP_Propagator/AtlasSTEP_Propagator" };
+  //!<  Navigator for TrackingGeometry and magnetic fiels acces
+  ToolHandle<INavigator> m_navigator{ this, "Navigator", "Trk::Navigator/AtlasNavigator" };
+  //!<  Array of Material updaters
+  ToolHandleArray<IMaterialEffectsUpdator> m_updaters{ this, "MaterialEffectsUpdators", {} };
+  //!<  Array of MultipleScattering updaters
+  ToolHandleArray<IMultipleScatteringUpdator> m_msupdaters{ this,
+                                                            "MultipleScatteringUpdators",
+                                                            {} };
+  //!<  Array of EnergyLoss updaters
+  ToolHandleArray<IEnergyLossUpdator> m_elossupdaters{ this, "EnergyLossUpdators", {} };
+
+  // ---------------- For Extrapolation handling ------------ //
+
+  std::vector<const IPropagator*>
+    m_subPropagators; //!< Propagators to chose from (steered by signature)
+  std::vector<const IMaterialEffectsUpdator*>
+    m_subupdaters; //!< updaters to chose from (steered by signature)
+
+  // ---------------- For Extrapolator configuration ------------ //
+
+  std::vector<std::string> m_propNames;  //!<  configuration of subPropagators
+  std::vector<std::string> m_updatNames; //!<  configuration of subupdaters
+
+  // --------------- General steering & Navigation -------------- //
+
+  bool m_includeMaterialEffects;        //!< boolean to switch on/off material effects
+  bool m_requireMaterialDestinationHit; //!< require the destination surface hit for material
+                                        //!< collection
+  bool m_stopWithNavigationBreak;       //!< return 0 if navigation breaks - for validation reasons
+  bool m_stopWithUpdateZero;            //!< return 0 if update kills the trajectory
+  bool m_subSurfaceLevel;               //!< tep down to sub-surface level
+  bool m_skipInitialLayerUpdate; //!< skip the initial post-Update at the layer [Fatras conversion
+                                 //!< mode]
+  bool m_extendedLayerSearch;    //!< extended layer search
+  bool m_robustSampling;
+  bool m_referenceMaterial; //!< use the reference material for the update
+  bool m_resolveActive;
+  bool m_resolveMultilayers;
+  bool m_cacheLastMatLayer; //!< steering of the material layer cache
+  bool m_returnPassiveLayers;
+  unsigned int m_meotpIndex; //!< if several meotps are available in a volume steer which one to use
+  unsigned int m_configurationLevel; //!< see the supported levels of configuration above
+  unsigned int m_searchLevel;        //!< see the supported search levels above
+  unsigned int
+    m_initialLayerAttempts; //!< allowed layer intersection attempts at the start of a volume
+  unsigned int m_successiveLayerAttempts; //!< layer intersection attemps after one layer has been
+                                          //!< hit sucessfully
+  unsigned int m_maxMethodSequence;
+  double m_tolerance; //!< surfacen & volume tolerance
+  // ------------------------------------------------------- //
+  bool m_activeOverlap;             //!<  consider overlaps between active muon volumes
+  bool m_useMuonMatApprox;          //!<  use approximative MS inert material
+  bool m_useDenseVolumeDescription; //!<  use dense volume description when available in ID/Calo
+  bool m_checkForCompundLayers;     //!<  use the multi-layer tests for compound layers
+  unsigned int m_maxNavigSurf;
+  unsigned int m_maxNavigVol;
+  bool m_dumpCache;
+  //------------ Magnetic field properties
+  bool m_fastField;
+  Trk::MagneticFieldProperties m_fieldProperties;
+  //------------Reference surface --------------
+  Surface* m_referenceSurface;
+  //-------------------------- SCREEN output steering -------------------------------------------//
+  bool m_printHelpOutputAtInitialize;
+  bool m_printRzOutput;
+  //------------------------- VALIDATION  SECTION ------------------------------------------//
+  // flags
+  bool m_navigationStatistics;             //!< steer the output for the navigaiton statistics
+  bool m_navigationBreakDetails;           //!< steer the output for the navigation break details
+  bool m_materialEffectsOnTrackValidation; //!< mat effects on track validation
+
+  // extrapolation counters
+  mutable Gaudi::Accumulators::Counter<int>
+    m_extrapolateCalls; //!< number of calls: extrapolate() method
+  mutable Gaudi::Accumulators::Counter<int>
+    m_extrapolateBlindlyCalls; //!< number of calls: extrapolateBlindly() method
+  mutable Gaudi::Accumulators::Counter<int>
+    m_extrapolateDirectlyCalls; //!< number of calls: extrapolateDirectly() method
+  mutable Gaudi::Accumulators::Counter<int>
+    m_extrapolateStepwiseCalls; //!< number of calls: extrapolateStepwise() method
+
+  mutable Gaudi::Accumulators::Counter<int> m_startThroughAssociation; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int> m_startThroughRecall;      //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int>
+    m_startThroughGlobalSearch; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int>
+    m_destinationThroughAssociation; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int>
+    m_destinationThroughRecall; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int>
+    m_destinationThroughGlobalSearch; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<int>
+    m_layerSwitched; //!< number of layers that have been switched
+
+  // navigation counters
+  mutable Gaudi::Accumulators::Counter<int>
+    m_navigationBreakLoop; //!< number of navigation breaks due to loop
+  mutable Gaudi::Accumulators::Counter<int>
+    m_navigationBreakOscillation; //!< number of navigation breaks due to oscillation
+  mutable Gaudi::Accumulators::Counter<int>
+    m_navigationBreakNoVolume; //!< number of navigation breaks due no Volume found
+  mutable Gaudi::Accumulators::Counter<int>
+    m_navigationBreakDistIncrease; //!< number of navigation breaks due to distance increase
+  mutable Gaudi::Accumulators::Counter<int>
+    m_navigationBreakVolumeSignature; //!< number of navigation breaks due to distance increase
+  mutable Gaudi::Accumulators::Counter<int>
+    m_overlapSurfaceHit; //!< number of OverlapSurfaces found
+
+  mutable Gaudi::Accumulators::Counter<int>
+    m_meotSearchCallsFw; //!< how often the meot search is called: forward
+  mutable Gaudi::Accumulators::Counter<int>
+    m_meotSearchCallsBw; //!< how often the meot search is called: backward
+  mutable Gaudi::Accumulators::Counter<int>
+    m_meotSearchSuccessfulFw; //!< how often the meot search was successful: forward
+  mutable Gaudi::Accumulators::Counter<int>
+    m_meotSearchSuccessfulBw; //!< how often the meot search was successful: backward
+};
 
 } // end of namespace
 #include "TrkExTools/Extrapolator.icc"
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.icc b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.icc
index ba4c099010a6..149beb78bae5 100644
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.icc
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.icc
@@ -43,16 +43,15 @@ inline IMaterialEffectsUpdator::ICache&
 Extrapolator::subMaterialEffectsUpdatorCache(Cache& cache,
                                              const TrackingVolume& tvol) const
 {
-  return  *(cache.m_MaterialUpCache[tvol.geometrySignature()]);
+  return *(cache.m_MaterialUpCache[tvol.geometrySignature()]);
 }
 
-
 inline void
 Extrapolator::populateMatEffUpdatorCache(Cache& cache) const
 {
-  size_t numUpdaters=m_subupdaters.size();
+  size_t numUpdaters = m_subupdaters.size();
   cache.m_MaterialUpCache.reserve(numUpdaters);
-  for (size_t i=0; i< numUpdaters ; ++i) {
+  for (size_t i = 0; i < numUpdaters; ++i) {
     cache.m_MaterialUpCache.emplace_back(m_subupdaters[i]->getCache());
   }
 }
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 1602fdc5ed25..3f0cf26e73c9 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -8,67 +8,80 @@
 
 // Trk inlcude
 #include "TrkExTools/ObjContainer.h"
+#include "TrkExToolsStringUtility.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkTrack/TrackStateOnSurface.h"
-#include "TrkExToolsStringUtility.h"
 
 // for debugging could implement these methods to instrument input track parameters with
 // e.g. constructor and destructor monitoring
-inline const Trk::TrackParameters *replaceTrkParm(const Trk::TrackParameters *base_parm) {
-   return base_parm;
+inline const Trk::TrackParameters*
+replaceTrkParm(const Trk::TrackParameters* base_parm)
+{
+  return base_parm;
 }
 
-inline void replaceTrkParm(std::vector< std::pair< const Trk::TrackParameters *, int > > *input) {
-   (void) input;
+inline void
+replaceTrkParm(std::vector<std::pair<const Trk::TrackParameters*, int>>* input)
+{
+  (void)input;
 }
 
-inline void replaceTrkParm(std::vector<const Trk::TrackStateOnSurface *> *input) {
-   (void) input;
+inline void
+replaceTrkParm(std::vector<const Trk::TrackStateOnSurface*>* input)
+{
+  (void)input;
 }
 
-template <>
-inline const Trk::TrackParameters *replaceManagedPtr<const Trk::TrackParameters>(const Trk::TrackParameters *p_ptr) {
-   return p_ptr;
+template<>
+inline const Trk::TrackParameters*
+replaceManagedPtr<const Trk::TrackParameters>(const Trk::TrackParameters* p_ptr)
+{
+  return p_ptr;
 }
 
-// need specialisation of cloneObj used by ObjContainer to properly clones all kinds of TrackParameters:
-template <>
-inline const Trk::TrackParameters *cloneObj<const Trk::TrackParameters>(const Trk::TrackParameters *p_ptr) {
-   return (p_ptr ? p_ptr->clone() : nullptr);
+// need specialisation of cloneObj used by ObjContainer to properly clones all kinds of
+// TrackParameters:
+template<>
+inline const Trk::TrackParameters*
+cloneObj<const Trk::TrackParameters>(const Trk::TrackParameters* p_ptr)
+{
+  return (p_ptr ? p_ptr->clone() : nullptr);
 }
 
-template <>
-inline Trk::TrackParameters *cloneObj<Trk::TrackParameters>(const Trk::TrackParameters *p_ptr) {
-   return (p_ptr ? p_ptr->clone() : nullptr);
+template<>
+inline Trk::TrackParameters*
+cloneObj<Trk::TrackParameters>(const Trk::TrackParameters* p_ptr)
+{
+  return (p_ptr ? p_ptr->clone() : nullptr);
 }
 
-#include "TrkExTools/Extrapolator.h"
-#include "TrkExInterfaces/IMultipleScatteringUpdator.h"
+#include "TrkDetDescrUtils/GeometrySignature.h"
+#include "TrkDetDescrUtils/SharedObject.h"
+#include "TrkEventUtils/TrkParametersComparisonFunction.h"
 #include "TrkExInterfaces/IEnergyLossUpdator.h"
+#include "TrkExInterfaces/IMultipleScatteringUpdator.h"
+#include "TrkExTools/Extrapolator.h"
+#include "TrkExUtils/ExtrapolationCache.h"
 #include "TrkExUtils/IntersectionSolution.h"
-#include "TrkSurfaces/SurfaceBounds.h"
-#include "TrkSurfaces/DiscBounds.h"
-#include "TrkSurfaces/PerigeeSurface.h"
-#include "TrkSurfaces/StraightLineSurface.h"
-#include "TrkSurfaces/CylinderSurface.h"
-#include "TrkTrack/Track.h"
-#include "TrkGeometry/DetachedTrackingVolume.h"
 #include "TrkGeometry/AlignableTrackingVolume.h"
-#include "TrkGeometry/Layer.h"
 #include "TrkGeometry/CompoundLayer.h"
 #include "TrkGeometry/CylinderLayer.h"
+#include "TrkGeometry/DetachedTrackingVolume.h"
+#include "TrkGeometry/Layer.h"
 #include "TrkGeometry/SubtractedCylinderLayer.h"
 #include "TrkGeometry/TrackingGeometry.h"
-#include "TrkVolumes/BoundarySurface.h"
-#include "TrkVolumes/BoundarySurfaceFace.h"
-#include "TrkVolumes/Volume.h"
-#include "TrkEventUtils/TrkParametersComparisonFunction.h"
-#include "TrkDetDescrUtils/SharedObject.h"
-#include "TrkDetDescrUtils/GeometrySignature.h"
 #include "TrkMaterialOnTrack/EnergyLoss.h"
 #include "TrkMaterialOnTrack/ScatteringAngles.h"
 #include "TrkParameters/TrackParameters.h"
-#include "TrkExUtils/ExtrapolationCache.h"
+#include "TrkSurfaces/CylinderSurface.h"
+#include "TrkSurfaces/DiscBounds.h"
+#include "TrkSurfaces/PerigeeSurface.h"
+#include "TrkSurfaces/StraightLineSurface.h"
+#include "TrkSurfaces/SurfaceBounds.h"
+#include "TrkTrack/Track.h"
+#include "TrkVolumes/BoundarySurface.h"
+#include "TrkVolumes/BoundarySurfaceFace.h"
+#include "TrkVolumes/Volume.h"
 // for the comparison with a pointer
 #include <cstdint>
 // Amg
@@ -83,74 +96,74 @@ namespace {
 constexpr double s_distIncreaseTolerance = 100. * Gaudi::Units::millimeter;
 }
 
-Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigSurfsMax    {};
-Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigVolsMax     {};
-Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigVolsIntMax  {};
-Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_containerSizeMax {};
-bool      Trk::Extrapolator::Cache::s_reported        {};
+Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigSurfsMax{};
+Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigVolsMax{};
+Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_navigVolsIntMax{};
+Trk::Extrapolator::Cache::AtomicMax Trk::Extrapolator::Cache::s_containerSizeMax{};
+bool Trk::Extrapolator::Cache::s_reported{};
 
 // constructor
-Trk::Extrapolator::Extrapolator(const std::string &t, const std::string &n, const IInterface *p) :
-  AthAlgTool(t, n, p),
-  m_subPropagators(Trk::NumberOfSignatures),
-  m_subupdaters(Trk::NumberOfSignatures),
-  m_propNames(),
-  m_updatNames(),
-  m_includeMaterialEffects(true),
-  m_requireMaterialDestinationHit(false),
-  m_stopWithNavigationBreak(false),
-  m_stopWithUpdateZero(false),
-  m_subSurfaceLevel(true),
-  m_skipInitialLayerUpdate(false),
-  m_extendedLayerSearch(true),
-  m_robustSampling(true),
-  m_referenceMaterial(false),
-  m_resolveMultilayers(true),
-  m_cacheLastMatLayer(false),
-  m_returnPassiveLayers(false),
-  m_meotpIndex(0),
-  m_configurationLevel(10),
-  m_searchLevel(10),
-  m_initialLayerAttempts(3),
-  m_successiveLayerAttempts(1),
-  m_maxMethodSequence(2000),
-  m_tolerance(0.002),
-  m_activeOverlap(false),
-  m_useMuonMatApprox(false),
-  m_useDenseVolumeDescription(true),
-  m_checkForCompundLayers(false),
-  m_maxNavigSurf{1000},
-  m_maxNavigVol{50},
-  m_dumpCache(false),
-  m_fastField(false),
-  m_referenceSurface{nullptr},
-  m_printHelpOutputAtInitialize(false),
-  m_printRzOutput(true),
-  m_navigationStatistics(false),
-  m_navigationBreakDetails(false),
-  m_materialEffectsOnTrackValidation(false),
-  m_extrapolateCalls{},
-  m_extrapolateBlindlyCalls{},
-  m_extrapolateDirectlyCalls{},
-  m_extrapolateStepwiseCalls{},
-  m_startThroughAssociation{},
-  m_startThroughRecall{},
-  m_startThroughGlobalSearch{},
-  m_destinationThroughAssociation{},
-  m_destinationThroughRecall{},
-  m_destinationThroughGlobalSearch{},
-  m_layerSwitched{},
-  m_navigationBreakLoop{},
-  m_navigationBreakOscillation{},
-  m_navigationBreakNoVolume{},
-  m_navigationBreakDistIncrease{},
-  m_navigationBreakVolumeSignature{},
-  m_overlapSurfaceHit{},
-  m_meotSearchCallsFw{},
-  m_meotSearchCallsBw{},
-  m_meotSearchSuccessfulFw{},
-  m_meotSearchSuccessfulBw{}
-  {
+Trk::Extrapolator::Extrapolator(const std::string& t, const std::string& n, const IInterface* p)
+  : AthAlgTool(t, n, p)
+  , m_subPropagators(Trk::NumberOfSignatures)
+  , m_subupdaters(Trk::NumberOfSignatures)
+  , m_propNames()
+  , m_updatNames()
+  , m_includeMaterialEffects(true)
+  , m_requireMaterialDestinationHit(false)
+  , m_stopWithNavigationBreak(false)
+  , m_stopWithUpdateZero(false)
+  , m_subSurfaceLevel(true)
+  , m_skipInitialLayerUpdate(false)
+  , m_extendedLayerSearch(true)
+  , m_robustSampling(true)
+  , m_referenceMaterial(false)
+  , m_resolveMultilayers(true)
+  , m_cacheLastMatLayer(false)
+  , m_returnPassiveLayers(false)
+  , m_meotpIndex(0)
+  , m_configurationLevel(10)
+  , m_searchLevel(10)
+  , m_initialLayerAttempts(3)
+  , m_successiveLayerAttempts(1)
+  , m_maxMethodSequence(2000)
+  , m_tolerance(0.002)
+  , m_activeOverlap(false)
+  , m_useMuonMatApprox(false)
+  , m_useDenseVolumeDescription(true)
+  , m_checkForCompundLayers(false)
+  , m_maxNavigSurf{ 1000 }
+  , m_maxNavigVol{ 50 }
+  , m_dumpCache(false)
+  , m_fastField(false)
+  , m_referenceSurface{ nullptr }
+  , m_printHelpOutputAtInitialize(false)
+  , m_printRzOutput(true)
+  , m_navigationStatistics(false)
+  , m_navigationBreakDetails(false)
+  , m_materialEffectsOnTrackValidation(false)
+  , m_extrapolateCalls{}
+  , m_extrapolateBlindlyCalls{}
+  , m_extrapolateDirectlyCalls{}
+  , m_extrapolateStepwiseCalls{}
+  , m_startThroughAssociation{}
+  , m_startThroughRecall{}
+  , m_startThroughGlobalSearch{}
+  , m_destinationThroughAssociation{}
+  , m_destinationThroughRecall{}
+  , m_destinationThroughGlobalSearch{}
+  , m_layerSwitched{}
+  , m_navigationBreakLoop{}
+  , m_navigationBreakOscillation{}
+  , m_navigationBreakNoVolume{}
+  , m_navigationBreakDistIncrease{}
+  , m_navigationBreakVolumeSignature{}
+  , m_overlapSurfaceHit{}
+  , m_meotSearchCallsFw{}
+  , m_meotSearchCallsBw{}
+  , m_meotSearchSuccessfulFw{}
+  , m_meotSearchSuccessfulBw{}
+{
   declareInterface<IExtrapolator>(this);
 
   // extrapolation steering
@@ -194,21 +207,21 @@ Trk::Extrapolator::Extrapolator(const std::string &t, const std::string &n, cons
 }
 
 // destructor
-Trk::Extrapolator::~Extrapolator() {
-}
+Trk::Extrapolator::~Extrapolator() {}
 
 // Athena standard methods
 // initialize
 StatusCode
-Trk::Extrapolator::initialize() {
+Trk::Extrapolator::initialize()
+{
 
   m_referenceSurface = new Trk::PlaneSurface(new Amg::Transform3D(Trk::s_idTransform), 0., 0.);
   m_referenceSurface->setOwner(Trk::TGOwn);
 
-  m_fieldProperties = m_fastField ? Trk::MagneticFieldProperties(Trk::FastField) : Trk::MagneticFieldProperties(
-    Trk::FullField);
-    
-  //before we start messing around, how many of these updaters were actually passed in?
+  m_fieldProperties = m_fastField ? Trk::MagneticFieldProperties(Trk::FastField)
+                                  : Trk::MagneticFieldProperties(Trk::FullField);
+
+  // before we start messing around, how many of these updaters were actually passed in?
   const auto numberOfSubPropagatorsGiven = m_propNames.size();
   const auto numberOfSubMatEffUpdatersGiven = m_updatNames.size();
   //
@@ -225,74 +238,79 @@ Trk::Extrapolator::initialize() {
     m_elossupdaters.push_back("Trk::EnergyLossUpdator/AtlasEnergyLossUpdator");
   }
   if (!m_propagators.empty()) {
-    ATH_CHECK( m_propagators.retrieve() ); 
+    ATH_CHECK(m_propagators.retrieve());
   }
 
-
   // from the number of retrieved propagators set the configurationLevel
   unsigned int validprop = m_propagators.size();
 
   if (!validprop) {
     ATH_MSG_WARNING("None of the defined propagators could be retrieved!");
-    ATH_MSG_WARNING("Extrapolators jumps back in unconfigured mode, only strategy pattern methods can be used.");
+    ATH_MSG_WARNING(
+      "Extrapolators jumps back in unconfigured mode, only strategy pattern methods can be used.");
   } else {
     m_configurationLevel = validprop - 1;
     ATH_MSG_VERBOSE("Configuration level automatically set to " << m_configurationLevel);
   }
 
   // Get the Navigation AlgTools
-  ATH_CHECK( m_navigator.retrieve() );
- 
+  ATH_CHECK(m_navigator.retrieve());
+
   // Get the Material Updator
   if (m_includeMaterialEffects && not m_updaters.empty()) {
-    ATH_CHECK( m_updaters.retrieve() );
-      for (auto& tool : m_updaters) {
-        // @TODO tools, that are already used, should not be disabled. Those are
-        // currently disabled to silence the warning issued by the tool usage
-        // detection, which is circumvented in case of the m_updaters.
-        tool.disable();
-      }    
+    ATH_CHECK(m_updaters.retrieve());
+    for (auto& tool : m_updaters) {
+      // @TODO tools, that are already used, should not be disabled. Those are
+      // currently disabled to silence the warning issued by the tool usage
+      // detection, which is circumvented in case of the m_updaters.
+      tool.disable();
+    }
   }
 
   // from the number of retrieved propagators set the configurationLevel
   unsigned int validmeuts = m_updaters.size();
   std::vector<std::string> fullPropagatorNames(m_propagators.size());
   std::vector<std::string> fullUpdatorNames(m_updaters.size());
-  auto extractNameFromTool = [] (const auto & toolHndl ){return toolHndl->name();};
-  std::transform(m_propagators.begin(), m_propagators.end(), fullPropagatorNames.begin(), extractNameFromTool );
-  std::transform(m_updaters.begin(), m_updaters.end(), fullUpdatorNames.begin(), extractNameFromTool );
+  auto extractNameFromTool = [](const auto& toolHndl) { return toolHndl->name(); };
+  std::transform(
+    m_propagators.begin(), m_propagators.end(), fullPropagatorNames.begin(), extractNameFromTool);
+  std::transform(
+    m_updaters.begin(), m_updaters.end(), fullUpdatorNames.begin(), extractNameFromTool);
 
-  // -----------------------------------------------------------
+  // ------------------------------------
   // Sanity check 1
   if (m_propNames.empty() && not m_propagators.empty()) {
-    ATH_MSG_DEBUG("Inconsistent setup of Extrapolator, no sub-propagators configured, doing it for you. ");
+    ATH_MSG_DEBUG(
+      "Inconsistent setup of Extrapolator, no sub-propagators configured, doing it for you. ");
     m_propNames.push_back(TrkExTools::getToolSuffix(fullPropagatorNames[0]));
-    if (TrkExTools::numberOfUniqueEntries(m_propNames) != TrkExTools::numberOfUniqueEntries(fullPropagatorNames)){
+    if (TrkExTools::numberOfUniqueEntries(m_propNames) !=
+        TrkExTools::numberOfUniqueEntries(fullPropagatorNames)) {
       ATH_MSG_ERROR("Some configured propagators have same name but different owners");
     }
-    if (const auto & errMsg=TrkExTools::possibleToolNameError(m_propNames); not errMsg.empty()){
+    if (const auto& errMsg = TrkExTools::possibleToolNameError(m_propNames); not errMsg.empty()) {
       ATH_MSG_ERROR(errMsg);
     }
   }
 
   if (m_updatNames.empty() && not m_updaters.empty()) {
-    ATH_MSG_DEBUG("Inconsistent setup of Extrapolator, no sub-material updaters configured, doing it for you. ");
+    ATH_MSG_DEBUG("Inconsistent setup of Extrapolator, no sub-material updaters configured, doing "
+                  "it for you. ");
     m_updatNames.push_back(TrkExTools::getToolSuffix(fullUpdatorNames[0]));
-    if (TrkExTools::numberOfUniqueEntries(m_updatNames) != TrkExTools::numberOfUniqueEntries(fullUpdatorNames)){
+    if (TrkExTools::numberOfUniqueEntries(m_updatNames) !=
+        TrkExTools::numberOfUniqueEntries(fullUpdatorNames)) {
       ATH_MSG_ERROR("Some configured material updaters have same name but different owners");
     }
-    if (const auto & errMsg=TrkExTools::possibleToolNameError(m_updatNames); not errMsg.empty()){
+    if (const auto& errMsg = TrkExTools::possibleToolNameError(m_updatNames); not errMsg.empty()) {
       ATH_MSG_ERROR(errMsg);
     }
   }
-  
 
-  // -----------------------------------------------------------
+  // ------------------------------------
   // Sanity check 2
   // fill the number of propagator names and updator names up with first one
   m_propNames.resize(int(Trk::NumberOfSignatures), m_propNames[0]);
   m_updatNames.resize(int(Trk::NumberOfSignatures), m_updatNames[0]);
-  
+
   if (validprop && validmeuts) {
     // Per definition: if configured not found, take the lowest one
     for (unsigned int isign = 0; int(isign) < int(Trk::NumberOfSignatures); ++isign) {
@@ -303,8 +321,10 @@ Trk::Extrapolator::initialize() {
           index = iProp;
         }
       }
-      ATH_MSG_DEBUG(" subPropagator:" << isign << " pointing to propagator: " << m_propagators[index]->name());
-      m_subPropagators[isign] = (index < validprop) ? &(*m_propagators[index]) : &(*m_propagators[Trk::Global]);
+      ATH_MSG_DEBUG(
+        " subPropagator:" << isign << " pointing to propagator: " << m_propagators[index]->name());
+      m_subPropagators[isign] =
+        (index < validprop) ? &(*m_propagators[index]) : &(*m_propagators[Trk::Global]);
 
       index = 0;
       for (unsigned int iUp = 0; iUp < m_updaters.size(); iUp++) {
@@ -313,134 +333,161 @@ Trk::Extrapolator::initialize() {
           index = iUp;
         }
       }
-      ATH_MSG_DEBUG(" subMEUpdator:" << isign << " pointing to updator: " << m_updaters[index]->name());
-      m_subupdaters[isign] = (index < validmeuts) ? &(*m_updaters[index]) : &(*m_updaters[Trk::Global]);
+      ATH_MSG_DEBUG(" subMEUpdator:" << isign
+                                     << " pointing to updator: " << m_updaters[index]->name());
+      m_subupdaters[isign] =
+        (index < validmeuts) ? &(*m_updaters[index]) : &(*m_updaters[Trk::Global]);
     }
   } else {
-    ATH_MSG_FATAL("Configuration Problem of Extrapolator: "
-                  << "  -- At least one IPropagator and IMaterialUpdator instance have to be given.! ");
-  }
-  const std::string propStr =
-    std::to_string(numberOfSubPropagatorsGiven) + " propagator" +
-    std::string((numberOfSubPropagatorsGiven == 1) ? "" : "s");
-  const std::string updStr =
-    std::to_string(numberOfSubMatEffUpdatersGiven) + " updater" +
-    std::string((numberOfSubMatEffUpdatersGiven == 1) ? "" : "s");
+    ATH_MSG_FATAL(
+      "Configuration Problem of Extrapolator: "
+      << "  -- At least one IPropagator and IMaterialUpdator instance have to be given.! ");
+  }
+  const std::string propStr = std::to_string(numberOfSubPropagatorsGiven) + " propagator" +
+                              std::string((numberOfSubPropagatorsGiven == 1) ? "" : "s");
+  const std::string updStr = std::to_string(numberOfSubMatEffUpdatersGiven) + " updater" +
+                             std::string((numberOfSubMatEffUpdatersGiven == 1) ? "" : "s");
   std::string msgString{ "\nThe extrapolator uses six sub-propagators and "
                          "sub-material effects updaters:\n" };
-  msgString += propStr + " and "+updStr+" were given in the configuration,\n";
+  msgString += propStr + " and " + updStr + " were given in the configuration,\n";
   msgString += "the extrapolator sub-tools have been defined as follows: \n";
-  for (int i(0);i != int(Trk::NumberOfSignatures);++i){
-    msgString += std::to_string(i) +
-                 ") propagator: " + m_subPropagators[i]->name() +
+  for (int i(0); i != int(Trk::NumberOfSignatures); ++i) {
+    msgString += std::to_string(i) + ") propagator: " + m_subPropagators[i]->name() +
                  ", updater: " + m_subupdaters[i]->name() + "\n";
   }
   ATH_MSG_VERBOSE(msgString);
-  ATH_CHECK( m_stepPropagator.retrieve() );
+  ATH_CHECK(m_stepPropagator.retrieve());
   ATH_MSG_DEBUG("initialize() successful");
   return StatusCode::SUCCESS;
 }
 
 // finalize
 StatusCode
-Trk::Extrapolator::finalize() {
+Trk::Extrapolator::finalize()
+{
   if (m_navigationStatistics) {
     ATH_MSG_INFO(" Perfomance Statistics  : ");
-    ATH_MSG_INFO(" [P] Method Statistics ------- -----------------------------------------------------------");
+    ATH_MSG_INFO(" [P] Method Statistics ------- ------------------------------------");
     ATH_MSG_INFO("     -> Number of extrapolate() calls                : " << m_extrapolateCalls);
-    ATH_MSG_INFO("     -> Number of extrapolateBlindly() calls         : " << m_extrapolateBlindlyCalls);
-    ATH_MSG_INFO("     -> Number of extrapolateDirectly() calls        : " << m_extrapolateDirectlyCalls);
-    ATH_MSG_INFO("     -> Number of extrapolateStepwise() calls        : " << m_extrapolateStepwiseCalls);
+    ATH_MSG_INFO(
+      "     -> Number of extrapolateBlindly() calls         : " << m_extrapolateBlindlyCalls);
+    ATH_MSG_INFO(
+      "     -> Number of extrapolateDirectly() calls        : " << m_extrapolateDirectlyCalls);
+    ATH_MSG_INFO(
+      "     -> Number of extrapolateStepwise() calls        : " << m_extrapolateStepwiseCalls);
     ATH_MSG_INFO("     -> Number of layers switched in layer2layer     : " << m_layerSwitched);
-    ATH_MSG_INFO("[P] Navigation Initialization ------------------------------------------------------------");
-    ATH_MSG_INFO("      -> Number of start associations                : " << m_startThroughAssociation);
+    ATH_MSG_INFO("[P] Navigation Initialization -------------------------------------");
+    ATH_MSG_INFO(
+      "      -> Number of start associations                : " << m_startThroughAssociation);
     ATH_MSG_INFO("      -> Number of start recalls                     : " << m_startThroughRecall);
-    ATH_MSG_INFO("      -> Number of start global searches             : " << m_startThroughGlobalSearch);
-    ATH_MSG_INFO("      -> Number of destination associations          : " << m_destinationThroughAssociation);
-    ATH_MSG_INFO("      -> Number of destination recalls               : " << m_destinationThroughRecall);
-    ATH_MSG_INFO("      -> Number of destination global searches       : " << m_destinationThroughGlobalSearch);
-    ATH_MSG_INFO("[P] Navigation Breaks --------------------------------------------------------------------");
-    ATH_MSG_INFO("     -> Number of navigation breaks: loop            : " << m_navigationBreakLoop);
-    ATH_MSG_INFO("     -> Number of navigation breaks: oscillation     : " << m_navigationBreakOscillation);
-    ATH_MSG_INFO("     -> Number of navigation breaks: no volume found : " << m_navigationBreakNoVolume);
-    ATH_MSG_INFO("     -> Number of navigation breaks: dist. increase  : " << m_navigationBreakDistIncrease);
-    ATH_MSG_INFO("     -> Number of navigation breaks: dist. increase  : " << m_navigationBreakVolumeSignature);
+    ATH_MSG_INFO(
+      "      -> Number of start global searches             : " << m_startThroughGlobalSearch);
+    ATH_MSG_INFO(
+      "      -> Number of destination associations          : " << m_destinationThroughAssociation);
+    ATH_MSG_INFO(
+      "      -> Number of destination recalls               : " << m_destinationThroughRecall);
+    ATH_MSG_INFO("      -> Number of destination global searches       : "
+                 << m_destinationThroughGlobalSearch);
+    ATH_MSG_INFO("[P] Navigation Breaks ---------------------------------------------");
+    ATH_MSG_INFO(
+      "     -> Number of navigation breaks: loop            : " << m_navigationBreakLoop);
+    ATH_MSG_INFO(
+      "     -> Number of navigation breaks: oscillation     : " << m_navigationBreakOscillation);
+    ATH_MSG_INFO(
+      "     -> Number of navigation breaks: no volume found : " << m_navigationBreakNoVolume);
+    ATH_MSG_INFO(
+      "     -> Number of navigation breaks: dist. increase  : " << m_navigationBreakDistIncrease);
+    ATH_MSG_INFO("     -> Number of navigation breaks: dist. increase  : "
+                 << m_navigationBreakVolumeSignature);
     if (m_navigationBreakDetails) {
       ATH_MSG_DEBUG("   Detailed output for Navigation breaks             : ");
-      ATH_MSG_DEBUG("    o " << m_navigationBreakLoop << " loops occured in the following volumes:    ");
-      ATH_MSG_DEBUG("    o " << m_navigationBreakOscillation << " oscillations occured in following volumes: ");
-      ATH_MSG_DEBUG("    o " << m_navigationBreakNoVolume << " times no next volume found of  volumes: ");
-      ATH_MSG_DEBUG("    o " << m_navigationBreakDistIncrease << " distance increases detected at volumes: ");
-      ATH_MSG_DEBUG("    o " << m_navigationBreakVolumeSignature << " no propagator configured for volumes: ");
+      ATH_MSG_DEBUG("    o " << m_navigationBreakLoop
+                             << " loops occured in the following volumes:    ");
+      ATH_MSG_DEBUG("    o " << m_navigationBreakOscillation
+                             << " oscillations occured in following volumes: ");
+      ATH_MSG_DEBUG("    o " << m_navigationBreakNoVolume
+                             << " times no next volume found of  volumes: ");
+      ATH_MSG_DEBUG("    o " << m_navigationBreakDistIncrease
+                             << " distance increases detected at volumes: ");
+      ATH_MSG_DEBUG("    o " << m_navigationBreakVolumeSignature
+                             << " no propagator configured for volumes: ");
     }
     // validation of the overlap search
-    ATH_MSG_INFO("[P] Overlaps found -----------------------------------------------------------------------");
+    ATH_MSG_INFO("[P] Overlaps found ------------------------------------------------");
     ATH_MSG_INFO("     -> Number of overlap Surface hit                : " << m_overlapSurfaceHit);
-    ATH_MSG_INFO(" -----------------------------------------------------------------------------------------");
+    ATH_MSG_INFO(" ------------------------------------------------------------------");
     // validation of the material collection methods
     if (m_materialEffectsOnTrackValidation) {
-      ATH_MSG_INFO("[P] MaterialEffectsOnTrack collection ----------------------------------------------------");
-      ATH_MSG_INFO("     -> Forward successful/calls (ratio)           : " 
-                   << m_meotSearchSuccessfulFw << "/"
-                   << m_meotSearchCallsFw << " (" 
-                   << double(m_meotSearchSuccessfulFw.value()) / m_meotSearchCallsFw.value() << ")");
-      ATH_MSG_INFO("     -> Backward successful/calls (ratio)          : " 
-                   << m_meotSearchSuccessfulBw << "/"
-                   << m_meotSearchCallsBw << " (" <<
-                   double(m_meotSearchSuccessfulBw.value()) / m_meotSearchCallsBw.value() << ")");
-      ATH_MSG_INFO(" -----------------------------------------------------------------------------------------");
+      ATH_MSG_INFO("[P] MaterialEffectsOnTrack collection -----------------------------");
+      ATH_MSG_INFO("     -> Forward successful/calls (ratio)           : "
+                   << m_meotSearchSuccessfulFw << "/" << m_meotSearchCallsFw << " ("
+                   << double(m_meotSearchSuccessfulFw.value()) / m_meotSearchCallsFw.value()
+                   << ")");
+      ATH_MSG_INFO("     -> Backward successful/calls (ratio)          : "
+                   << m_meotSearchSuccessfulBw << "/" << m_meotSearchCallsBw << " ("
+                   << double(m_meotSearchSuccessfulBw.value()) / m_meotSearchCallsBw.value()
+                   << ")");
+      ATH_MSG_INFO(" ------------------------------------------------------------------");
     }
   }
   delete m_referenceSurface;
 
   if (!Trk::Extrapolator::Cache::s_reported) {
-     Trk::Extrapolator::Cache::s_reported=true;
-     ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigSurfsMax    = " << Trk::Extrapolator::Cache::s_navigSurfsMax.val());
-     ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigSurfsMax    = " << Trk::Extrapolator::Cache::s_navigSurfsMax.val());
-     ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigVolsMax     = " << Trk::Extrapolator::Cache::s_navigVolsMax.val());
-     ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigVolsIntMax  = " << Trk::Extrapolator::Cache::s_navigVolsIntMax.val());
-     ATH_MSG_INFO("Trk::Extrapolator::Cache s_containerSizeMax = " << Trk::Extrapolator::Cache::s_containerSizeMax.val());
+    Trk::Extrapolator::Cache::s_reported = true;
+    ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigSurfsMax    = "
+                 << Trk::Extrapolator::Cache::s_navigSurfsMax.val());
+    ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigSurfsMax    = "
+                 << Trk::Extrapolator::Cache::s_navigSurfsMax.val());
+    ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigVolsMax     = "
+                 << Trk::Extrapolator::Cache::s_navigVolsMax.val());
+    ATH_MSG_INFO("Trk::Extrapolator::Cache s_navigVolsIntMax  = "
+                 << Trk::Extrapolator::Cache::s_navigVolsIntMax.val());
+    ATH_MSG_INFO("Trk::Extrapolator::Cache s_containerSizeMax = "
+                 << Trk::Extrapolator::Cache::s_containerSizeMax.val());
   }
 
   ATH_MSG_INFO("finalize() successful");
   return StatusCode::SUCCESS;
 }
 
-const Trk::NeutralParameters *
-Trk::Extrapolator::extrapolate(const xAOD::NeutralParticle &xnParticle,
-                               const Surface &sf,
+const Trk::NeutralParameters*
+Trk::Extrapolator::extrapolate(const xAOD::NeutralParticle& xnParticle,
+                               const Surface& sf,
                                PropDirection dir,
-                               const BoundaryCheck&  bcheck) const {
-  const Trk::NeutralPerigee &nPerigee = xnParticle.perigeeParameters();
+                               const BoundaryCheck& bcheck) const
+{
+  const Trk::NeutralPerigee& nPerigee = xnParticle.perigeeParameters();
 
   return extrapolate(nPerigee, sf, dir, bcheck);
 }
 
-const Trk::TrackParameters *
+const Trk::TrackParameters*
 Trk::Extrapolator::extrapolate(const EventContext& ctx,
-                               const xAOD::TrackParticle &xtParticle,
-                               const Surface &sf,
+                               const xAOD::TrackParticle& xtParticle,
+                               const Surface& sf,
                                PropDirection dir,
-                               const BoundaryCheck&  bcheck,
+                               const BoundaryCheck& bcheck,
                                ParticleHypothesis particle,
-                               MaterialUpdateMode matupmode) const {
-  const Trk::Perigee &tPerigee = xtParticle.perigeeParameters();
-  // !< @TODO: search for closest parameter in on new curvilinear 
+                               MaterialUpdateMode matupmode) const
+{
+  const Trk::Perigee& tPerigee = xtParticle.perigeeParameters();
+  // !< @TODO: search for closest parameter in on new curvilinear
   // x/y/z and surface distance ...
   // ... for the moment ... take the perigee
   return extrapolate(ctx, tPerigee, sf, dir, bcheck, particle, matupmode);
 }
 
-const Trk::NeutralParameters *
-Trk::Extrapolator::extrapolate(const NeutralParameters &parameters,
-                               const Surface &sf,
+const Trk::NeutralParameters*
+Trk::Extrapolator::extrapolate(const NeutralParameters& parameters,
+                               const Surface& sf,
                                PropDirection dir,
-                               const BoundaryCheck&  bcheck) const {
+                               const BoundaryCheck& bcheck) const
+{
   if (m_configurationLevel < 10) {
     const IPropagator* currentPropagator =
       !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
     if (currentPropagator) {
-      return currentPropagator->propagate( parameters, sf, dir, bcheck);
+      return currentPropagator->propagate(parameters, sf, dir, bcheck);
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
@@ -448,14 +495,13 @@ Trk::Extrapolator::extrapolate(const NeutralParameters &parameters,
 }
 
 Trk::TrackParametersUVector
-Trk::Extrapolator::extrapolateStepwiseImpl(
-  const EventContext& ctx,
-  const IPropagator& prop,
-  const Trk::TrackParameters& parm,
-  const Trk::Surface& sf,
-  Trk::PropDirection dir,
-  const Trk::BoundaryCheck& bcheck,
-  Trk::ParticleHypothesis particle) const
+Trk::Extrapolator::extrapolateStepwiseImpl(const EventContext& ctx,
+                                           const IPropagator& prop,
+                                           const Trk::TrackParameters& parm,
+                                           const Trk::Surface& sf,
+                                           Trk::PropDirection dir,
+                                           const Trk::BoundaryCheck& bcheck,
+                                           Trk::ParticleHypothesis particle) const
 {
 
   Cache cache{};
@@ -466,93 +512,88 @@ Trk::Extrapolator::extrapolateStepwiseImpl(
   // initialize the return parameters vector
   // create a new internal helper vector
   Trk::TrackParametersVector tmp;
-  cache.m_parametersOnDetElements    = &tmp;
+  cache.m_parametersOnDetElements = &tmp;
   cache.m_ownParametersOnDetElements = true;
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   // run the extrapolation
-  ManagedTrackParmPtr parameterOnSf(extrapolateImpl(
-    ctx, cache, prop, cache.manage(parm).index(), sf, dir, bcheck, particle));
+  ManagedTrackParmPtr parameterOnSf(
+    extrapolateImpl(ctx, cache, prop, cache.manage(parm).index(), sf, dir, bcheck, particle));
   // assign the return parameter and set cache.m_parametersOnDetElements = 0;
   if (parameterOnSf) {
     tmp.push_back(parameterOnSf.release());
-    cache.m_parametersOnDetElements    = nullptr;
+    cache.m_parametersOnDetElements = nullptr;
     cache.m_ownParametersOnDetElements = false;
   } else {
 
-     if (!cache.m_ownParametersOnDetElements) {
-        std::stringstream msg;
-        msg << "Will not cleanup " << static_cast<const void *>(cache.m_parametersOnDetElements);
-        throw std::logic_error(msg.str());
-     }
-     tmp.clear();
+    if (!cache.m_ownParametersOnDetElements) {
+      std::stringstream msg;
+      msg << "Will not cleanup " << static_cast<const void*>(cache.m_parametersOnDetElements);
+      throw std::logic_error(msg.str());
+    }
+    tmp.clear();
   }
-  return Trk::TrackParametersUVector (tmp.begin(), tmp.end());
+  return Trk::TrackParametersUVector(tmp.begin(), tmp.end());
 }
 std::pair<const Trk::TrackParameters*, const Trk::Layer*>
-Trk::Extrapolator::extrapolateToNextActiveLayerImpl(
-  const EventContext& ctx,
-  const IPropagator& prop,
-  const Trk::TrackParameters& parm,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateToNextActiveLayerImpl(const EventContext& ctx,
+                                                    const IPropagator& prop,
+                                                    const Trk::TrackParameters& parm,
+                                                    PropDirection dir,
+                                                    const BoundaryCheck& bcheck,
+                                                    ParticleHypothesis particle,
+                                                    MaterialUpdateMode matupmode) const
 {
 
   Cache cache{};
   // statistics && sequence output ----------------------------------------
   ++cache.m_methodSequence;
   ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolateToNextActiveLayer(...) ");
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   // initialize the return parameters vector
   ManagedTrackParmPtr currPar(cache.manage(parm));
-  const Trk::TrackingVolume *staticVol = nullptr;
-  const Trk::Surface *destSurface = nullptr;
-  const Trk::Layer *assocLayer = nullptr;
+  const Trk::TrackingVolume* staticVol = nullptr;
+  const Trk::Surface* destSurface = nullptr;
+  const Trk::Layer* assocLayer = nullptr;
 
-  // -----------------------------------------------------------------------
+  // ------------------------------------------------
   //
   while (currPar) {
     assocLayer = nullptr;
-    ManagedTrackParmPtr nextPar(extrapolateToNextMaterialLayer(ctx,
-                                                               cache,
-                                                               prop,
-                                                               currPar.index(),
-                                                               destSurface,
-                                                               staticVol,
-                                                               dir,
-                                                               bcheck,
-                                                               particle,
-                                                               matupmode));
+    ManagedTrackParmPtr nextPar(extrapolateToNextMaterialLayer(
+      ctx, cache, prop, currPar.index(), destSurface, staticVol, dir, bcheck, particle, matupmode));
     if (nextPar) {
       if (cache.m_lastMaterialLayer &&
-          cache.m_lastMaterialLayer->surfaceRepresentation().isOnSurface(nextPar->position(), bcheck, m_tolerance,
-                                                                   m_tolerance)) {
+          cache.m_lastMaterialLayer->surfaceRepresentation().isOnSurface(
+            nextPar->position(), bcheck, m_tolerance, m_tolerance)) {
         assocLayer = cache.m_lastMaterialLayer;
       }
       if (!assocLayer) {
-        ATH_MSG_ERROR("  [!] No associated layer found  -   at " << positionOutput(nextPar->position()));
+        ATH_MSG_ERROR("  [!] No associated layer found  -   at "
+                      << positionOutput(nextPar->position()));
       }
     } else {
       // static volume boundary ?
       if (cache.m_parametersAtBoundary.nextParameters && cache.m_parametersAtBoundary.nextVolume) {
         if (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::MS ||
-            (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo && m_useDenseVolumeDescription)) {
+            (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo &&
+             m_useDenseVolumeDescription)) {
           staticVol = cache.m_parametersAtBoundary.nextVolume;
           nextPar = cache.m_parametersAtBoundary.nextParameters;
           ATH_MSG_DEBUG("  [+] Static volume boundary: continue loop over active layers in '"
                         << staticVol->volumeName() << "'.");
-        } else {   // MSentrance
+        } else { // MSentrance
           nextPar = std::move(cache.m_parametersAtBoundary.nextParameters);
           cache.m_parametersAtBoundary.resetBoundaryInformation();
-          return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(nextPar.release(), nullptr);
+          return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(nextPar.release(),
+                                                                           nullptr);
         }
       } else if (cache.m_parametersAtBoundary.nextParameters) { // outer boundary
         nextPar = std::move(cache.m_parametersAtBoundary.nextParameters);
         cache.m_parametersAtBoundary.resetBoundaryInformation();
-        return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(nextPar.release(), nullptr);
+        return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(nextPar.release(),
+                                                                         nullptr);
       }
     }
     currPar = std::move(nextPar);
@@ -560,7 +601,7 @@ Trk::Extrapolator::extrapolateToNextActiveLayerImpl(
       break;
     }
   }
-  return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(currPar.release(), assocLayer);
+  return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(currPar.release(), assocLayer);
 }
 
 std::pair<const Trk::TrackParameters*, const Trk::Layer*>
@@ -577,55 +618,51 @@ Trk::Extrapolator::extrapolateToNextActiveLayerMImpl(
   Cache cache{};
   ++cache.m_methodSequence;
   ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolateToNextActiveLayerM(...) ");
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   // initialize the return parameters vector
   ManagedTrackParmPtr currPar(cache.manage(parm));
-  const Trk::TrackingVolume *staticVol = nullptr;
-  const Trk::Surface *destSurface = nullptr;
-  const Trk::Layer *assocLayer = nullptr;
+  const Trk::TrackingVolume* staticVol = nullptr;
+  const Trk::Surface* destSurface = nullptr;
+  const Trk::Layer* assocLayer = nullptr;
   // initialize material collection
   cache.m_matstates = &material;
 
   while (currPar) {
     assocLayer = nullptr;
-    ManagedTrackParmPtr nextPar(extrapolateToNextMaterialLayer(ctx,
-                                                               cache,
-                                                               prop,
-                                                               currPar.index(),
-                                                               destSurface,
-                                                               staticVol,
-                                                               dir,
-                                                               bcheck,
-                                                               particle,
-                                                               matupmode));
+    ManagedTrackParmPtr nextPar(extrapolateToNextMaterialLayer(
+      ctx, cache, prop, currPar.index(), destSurface, staticVol, dir, bcheck, particle, matupmode));
     if (nextPar) {
       if (cache.m_lastMaterialLayer &&
-          cache.m_lastMaterialLayer->surfaceRepresentation().isOnSurface(nextPar->position(), bcheck, m_tolerance,
-                                                                   m_tolerance)) {
+          cache.m_lastMaterialLayer->surfaceRepresentation().isOnSurface(
+            nextPar->position(), bcheck, m_tolerance, m_tolerance)) {
         assocLayer = cache.m_lastMaterialLayer;
       }
       if (!assocLayer) {
-        ATH_MSG_ERROR("  [!] No associated layer found  -   at " << positionOutput(nextPar->position()));
+        ATH_MSG_ERROR("  [!] No associated layer found  -   at "
+                      << positionOutput(nextPar->position()));
       }
     } else {
       // static volume boundary ?
       if (cache.m_parametersAtBoundary.nextParameters && cache.m_parametersAtBoundary.nextVolume) {
         if (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::MS ||
-            (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo && m_useDenseVolumeDescription)) {
+            (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo &&
+             m_useDenseVolumeDescription)) {
           staticVol = cache.m_parametersAtBoundary.nextVolume;
           nextPar = cache.m_parametersAtBoundary.nextParameters;
           ATH_MSG_DEBUG("  [+] Static volume boundary: continue loop over active layers in '"
                         << staticVol->volumeName() << "'.");
-        } else {   // MSentrance
+        } else { // MSentrance
           nextPar = std::move(cache.m_parametersAtBoundary.nextParameters);
           cache.m_parametersAtBoundary.resetBoundaryInformation();
-          return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(nextPar.release(), nullptr);
+          return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(nextPar.release(),
+                                                                           nullptr);
         }
       } else if (cache.m_parametersAtBoundary.nextParameters) { // outer boundary
         nextPar = std::move(cache.m_parametersAtBoundary.nextParameters);
         cache.m_parametersAtBoundary.resetBoundaryInformation();
-        return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(nextPar.release(), nullptr);
+        return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(nextPar.release(),
+                                                                         nullptr);
       }
     }
     currPar = std::move(nextPar);
@@ -636,21 +673,20 @@ Trk::Extrapolator::extrapolateToNextActiveLayerMImpl(
   // reset the boundary information
   cache.m_parametersAtBoundary.resetBoundaryInformation();
   cache.m_matstates = nullptr;
-  return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(currPar.release(), assocLayer);
+  return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(currPar.release(), assocLayer);
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateToNextMaterialLayer(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm_ref,
-  const Trk::Surface* destSurf,
-  const Trk::TrackingVolume* vol,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateToNextMaterialLayer(const EventContext& ctx,
+                                                  Cache& cache,
+                                                  const IPropagator& prop,
+                                                  TrackParmPtr parm_ref,
+                                                  const Trk::Surface* destSurf,
+                                                  const Trk::TrackingVolume* vol,
+                                                  PropDirection dir,
+                                                  const BoundaryCheck& bcheck,
+                                                  ParticleHypothesis particle,
+                                                  MaterialUpdateMode matupmode) const
 {
   ++cache.m_methodSequence;
   ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolateToNextMaterialLayer(...) ");
@@ -666,11 +702,11 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   // initialize the return parameters vector
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   ManagedTrackParmPtr currPar(parm);
-  const Trk::TrackingVolume *staticVol = nullptr;
-  const Trk::TrackingVolume *currVol = nullptr;
-  const Trk::TrackingVolume *nextVol = nullptr;
+  const Trk::TrackingVolume* staticVol = nullptr;
+  const Trk::TrackingVolume* currVol = nullptr;
+  const Trk::TrackingVolume* nextVol = nullptr;
   std::vector<unsigned int> solutions;
-  const Trk::TrackingVolume *assocVol = nullptr;
+  const Trk::TrackingVolume* assocVol = nullptr;
   // double tol = 0.001;
   double path = 0.;
   bool resolveActive = destSurf == nullptr;
@@ -689,7 +725,7 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     staticVol = vol;
   } else {
     staticVol = m_navigator->trackingGeometry()->lowestStaticTrackingVolume(gp);
-    const Trk::TrackingVolume *nextStatVol = nullptr;
+    const Trk::TrackingVolume* nextStatVol = nullptr;
     if (m_navigator->atVolumeBoundary(currPar.get(), staticVol, dir, nextStatVol, m_tolerance) &&
         nextStatVol != staticVol) {
       staticVol = nextStatVol;
@@ -706,7 +742,7 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   }
   // alignable frame volume ?
   if (staticVol && staticVol->geometrySignature() == Trk::Calo) {
-    if (staticVol->isAlignable()){
+    if (staticVol->isAlignable()) {
       const Trk::AlignableTrackingVolume* alignTV =
         static_cast<const Trk::AlignableTrackingVolume*>(staticVol);
       cache.m_identifiedParameters.reset();
@@ -716,14 +752,14 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   }
 
   // update if new static volume
-  if (staticVol && (staticVol != cache.m_currentStatic || resolveActive != m_resolveActive)) {    
+  if (staticVol && (staticVol != cache.m_currentStatic || resolveActive != m_resolveActive)) {
     // retrieve boundaries
     cache.m_currentStatic = staticVol;
     cache.m_staticBoundaries.clear();
     const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
       staticVol->boundarySurfaces();
     for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-      const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+      const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
       cache.m_staticBoundaries.emplace_back(&surf, true);
     }
 
@@ -734,112 +770,111 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     cache.m_layers.clear();
     cache.m_navigLays.clear();
 
-    const std::vector<const Trk::DetachedTrackingVolume *> *detVols = staticVol->confinedDetachedVolumes();
+    const std::vector<const Trk::DetachedTrackingVolume*>* detVols =
+      staticVol->confinedDetachedVolumes();
     if (detVols) {
-      std::vector<const Trk::DetachedTrackingVolume *>::const_iterator iTer = detVols->begin();
+      std::vector<const Trk::DetachedTrackingVolume*>::const_iterator iTer = detVols->begin();
       for (; iTer != detVols->end(); iTer++) {
         // active station ?
-        const Trk::Layer *layR = (*iTer)->layerRepresentation();
+        const Trk::Layer* layR = (*iTer)->layerRepresentation();
         bool active = layR && layR->layerType();
-        const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > >  &detBounds =
+        const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& detBounds =
           (*iTer)->trackingVolume()->boundarySurfaces();
         if (active) {
           if (resolveActive) {
             cache.m_detachedVols.emplace_back(*iTer, detBounds.size());
             for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-              const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+              const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
               cache.m_detachedBoundaries.emplace_back(&surf, true);
             }
           } else {
             if (!m_resolveMultilayers || !(*iTer)->multilayerRepresentation()) {
-              cache.m_layers.emplace_back(&(layR->surfaceRepresentation()),
-                                                                                     true);
+              cache.m_layers.emplace_back(&(layR->surfaceRepresentation()), true);
               cache.m_navigLays.emplace_back((*iTer)->trackingVolume(), layR);
             } else {
-              const std::vector<const Trk::Layer *> *multi = (*iTer)->multilayerRepresentation();
+              const std::vector<const Trk::Layer*>* multi = (*iTer)->multilayerRepresentation();
               for (unsigned int i = 0; i < multi->size(); i++) {
                 cache.m_layers.emplace_back(&((*multi)[i]->surfaceRepresentation()), true);
                 cache.m_navigLays.emplace_back((*iTer)->trackingVolume(), (*multi)[i]);
               }
             }
           }
-        } else if (staticVol->geometrySignature() != Trk::MS ||
-                   !m_useMuonMatApprox ||
-                   (*iTer)->name().substr((*iTer)->name().size() - 4, 4) ==
-                     "PERM") { // retrieve
-                               // inert
-                               // detached
-                               // objects
-                               // only if
-                               // needed
+        } else if (staticVol->geometrySignature() != Trk::MS || !m_useMuonMatApprox ||
+                   (*iTer)->name().substr((*iTer)->name().size() - 4, 4) == "PERM") { // retrieve
+                                                                                      // inert
+                                                                                      // detached
+                                                                                      // objects
+                                                                                      // only if
+                                                                                      // needed
           if ((*iTer)->trackingVolume()->zOverAtimesRho() != 0. &&
               (!(*iTer)->trackingVolume()->confinedDenseVolumes() ||
-               (*iTer)->trackingVolume()->confinedDenseVolumes()->empty())
-              && (!(*iTer)->trackingVolume()->confinedArbitraryLayers() ||
-                  (*iTer)->trackingVolume()->confinedArbitraryLayers()->empty())) {
-            cache.m_denseVols.emplace_back((*iTer)->trackingVolume(),detBounds.size());
+               (*iTer)->trackingVolume()->confinedDenseVolumes()->empty()) &&
+              (!(*iTer)->trackingVolume()->confinedArbitraryLayers() ||
+               (*iTer)->trackingVolume()->confinedArbitraryLayers()->empty())) {
+            cache.m_denseVols.emplace_back((*iTer)->trackingVolume(), detBounds.size());
 
             for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-              const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+              const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
               cache.m_denseBoundaries.emplace_back(&surf, true);
             }
           }
-          const std::vector<const Trk::Layer *> *confLays = (*iTer)->trackingVolume()->confinedArbitraryLayers();
+          const std::vector<const Trk::Layer*>* confLays =
+            (*iTer)->trackingVolume()->confinedArbitraryLayers();
           if ((*iTer)->trackingVolume()->confinedDenseVolumes() ||
               (confLays && confLays->size() > detBounds.size())) {
             cache.m_detachedVols.emplace_back(*iTer, detBounds.size());
             for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-              const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+              const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
               cache.m_detachedBoundaries.emplace_back(&surf, true);
             }
           } else if (confLays) {
-            std::vector<const Trk::Layer *>::const_iterator lIt = confLays->begin();
+            std::vector<const Trk::Layer*>::const_iterator lIt = confLays->begin();
             for (; lIt != confLays->end(); lIt++) {
-              cache.m_layers.emplace_back(&((*lIt)->surfaceRepresentation()),true);
+              cache.m_layers.emplace_back(&((*lIt)->surfaceRepresentation()), true);
               cache.m_navigLays.emplace_back((*iTer)->trackingVolume(), *lIt);
             }
           }
         }
       }
     }
-    cache.m_denseResolved = std::pair<unsigned int, unsigned int>(
-      cache.m_denseVols.size(), cache.m_denseBoundaries.size());
+    cache.m_denseResolved = std::pair<unsigned int, unsigned int>(cache.m_denseVols.size(),
+                                                                  cache.m_denseBoundaries.size());
     cache.m_layerResolved = cache.m_layers.size();
   }
 
-  cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                            cache.m_staticBoundaries.begin(),
-                            cache.m_staticBoundaries.end());
+  cache.m_navigSurfs.insert(
+    cache.m_navigSurfs.end(), cache.m_staticBoundaries.begin(), cache.m_staticBoundaries.end());
 
   // resolve the use of dense volumes
   if (staticVol) {
     cache.m_dense = (staticVol->geometrySignature() == Trk::MS && m_useMuonMatApprox) ||
-              (staticVol->geometrySignature() != Trk::MS && m_useDenseVolumeDescription);
+                    (staticVol->geometrySignature() != Trk::MS && m_useDenseVolumeDescription);
   }
   while (currPar && staticVol && !staticVol->confinedDetachedVolumes()) {
     // propagate to closest surface
     solutions.resize(0);
-    const Trk::TrackingVolume *propagVol = cache.m_dense ? staticVol : cache.m_highestVolume;
+    const Trk::TrackingVolume* propagVol = cache.m_dense ? staticVol : cache.m_highestVolume;
     ATH_MSG_DEBUG("  [+] Starting propagation (static)  at " << positionOutput(currPar->position())
-                                                             << " in '" << propagVol->volumeName() << "'");
+                                                             << " in '" << propagVol->volumeName()
+                                                             << "'");
     // current static may carry non-trivial material properties, their use is optional;
     // use highest volume as B field source
     // const Trk::TrackParameters* nextPar =
-    ManagedTrackParmPtr nextPar(
-      ManagedTrackParmPtr::recapture(currPar,
-                                     prop.propagate(ctx,
-                                                    *currPar,
-                                                    cache.m_navigSurfs,
-                                                    dir,
-                                                    m_fieldProperties,
-                                                    particle,
-                                                    solutions,
-                                                    path,
-                                                    false,
-                                                    false,
-                                                    propagVol)));
+    ManagedTrackParmPtr nextPar(ManagedTrackParmPtr::recapture(currPar,
+                                                               prop.propagate(ctx,
+                                                                              *currPar,
+                                                                              cache.m_navigSurfs,
+                                                                              dir,
+                                                                              m_fieldProperties,
+                                                                              particle,
+                                                                              solutions,
+                                                                              path,
+                                                                              false,
+                                                                              false,
+                                                                              propagVol)));
     if (nextPar) {
-      ATH_MSG_DEBUG("  [+] Position after propagation -   at " << positionOutput(nextPar->position()));
+      ATH_MSG_DEBUG("  [+] Position after propagation -   at "
+                    << positionOutput(nextPar->position()));
     }
     if (!nextPar) {
       cache.m_parametersAtBoundary.resetBoundaryInformation();
@@ -848,25 +883,24 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     if (nextPar) {
       // collect material
       if (propagVol->zOverAtimesRho() != 0. && !cache.m_matstates && cache.m_extrapolationCache) {
-        if (checkCache(cache," extrapolateToNextMaterialLayer")) {
+        if (checkCache(cache, " extrapolateToNextMaterialLayer")) {
           if (m_dumpCache) {
-            dumpCache(cache," extrapolateToNextMaterialLayer");
+            dumpCache(cache, " extrapolateToNextMaterialLayer");
           }
           double dInX0 = fabs(path) / propagVol->x0();
           ATH_MSG_DEBUG(" add x0 " << dInX0);
           cache.m_extrapolationCache->updateX0(dInX0);
           Trk::MaterialProperties materialProperties(*propagVol, fabs(path));
           double currentqoverp = nextPar->parameters()[Trk::qOverP];
-          Trk::EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(
-                                                                    1. / currentqoverp), 1., dir, particle);
+          Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+            materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
           ATH_MSG_DEBUG("  [M] Energy loss: STEP,EnergyLossUpdator:"
-                        << nextPar->momentum().mag() - currPar->momentum().mag() << "," << eloss->deltaE());
-          cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                  eloss->sigmaIoni(),
-                                                  eloss->meanRad(),
-                                                  eloss->sigmaRad());
+                        << nextPar->momentum().mag() - currPar->momentum().mag() << ","
+                        << eloss->deltaE());
+          cache.m_extrapolationCache->updateEloss(
+            eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
           if (m_dumpCache) {
-            dumpCache(cache," After");
+            dumpCache(cache, " After");
           }
           delete eloss;
         }
@@ -874,40 +908,37 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
       if (propagVol->zOverAtimesRho() != 0. && cache.m_matstates) {
         double dInX0 = fabs(path) / propagVol->x0();
         Trk::MaterialProperties materialProperties(*propagVol, fabs(path));
-        double scatsigma =
-          sqrt(m_msupdaters[0]->sigmaSquare(materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1.,
-                                            particle));
-        Trk::ScatteringAngles *newsa = new Trk::ScatteringAngles(0, 0, scatsigma / sin(
-                                                                   nextPar->parameters()[Trk::theta]), scatsigma);
+        double scatsigma = sqrt(m_msupdaters[0]->sigmaSquare(
+          materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
+        Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+          0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
         // energy loss
         double currentqoverp = nextPar->parameters()[Trk::qOverP];
-        Trk::EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(
-                                                                  1. / currentqoverp), 1., dir, particle);
+        Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+          materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
         // compare energy loss
         ATH_MSG_DEBUG("  [M] Energy loss: STEP,EnergyLossUpdator:"
-                      << nextPar->momentum().mag() - currPar->momentum().mag() << "," << eloss->deltaE());
+                      << nextPar->momentum().mag() - currPar->momentum().mag() << ","
+                      << eloss->deltaE());
         // use curvilinear TPs to simplify retrieval by fitters
-        const Trk::TrackParameters* cvlTP =
-          replaceTrkParm(new Trk::CurvilinearParameters(
-            nextPar->position(), nextPar->momentum(), nextPar->charge()));
-        Trk::MaterialEffectsOnTrack *mefot = new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss,
-                                                                             cvlTP->associatedSurface());
+        const Trk::TrackParameters* cvlTP = replaceTrkParm(new Trk::CurvilinearParameters(
+          nextPar->position(), nextPar->momentum(), nextPar->charge()));
+        Trk::MaterialEffectsOnTrack* mefot =
+          new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss, cvlTP->associatedSurface());
         cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
         if (cache.m_extrapolationCache) {
           if (m_dumpCache) {
-            dumpCache(cache," mat states extrapolateToNextMaterialLayer");
+            dumpCache(cache, " mat states extrapolateToNextMaterialLayer");
           }
           cache.m_extrapolationCache->updateX0(dInX0);
-          cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                  eloss->sigmaIoni(),
-                                                  eloss->meanRad(),
-                                                  eloss->sigmaRad());
+          cache.m_extrapolationCache->updateEloss(
+            eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
           if (m_dumpCache) {
-            dumpCache(cache," After");
+            dumpCache(cache, " After");
           }
         }
-        ATH_MSG_DEBUG(
-          "  [M] Collecting material from static volume '" << propagVol->volumeName() << "', t/X0 = " << dInX0);
+        ATH_MSG_DEBUG("  [M] Collecting material from static volume '" << propagVol->volumeName()
+                                                                       << "', t/X0 = " << dInX0);
       }
     }
     currPar = std::move(nextPar);
@@ -918,15 +949,15 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     if (destSurf && solutions.size() > 1 && solutions[1] == 0) {
       return currPar;
     }
-    if (solutions[0] <= isurf + cache.m_staticBoundaries.size()) {  // static volume boundary
+    if (solutions[0] <= isurf + cache.m_staticBoundaries.size()) { // static volume boundary
       // use global coordinates to retrieve attached volume (just for static!)
-      const Trk::TrackingVolume *nextVol =
+      const Trk::TrackingVolume* nextVol =
         cache.m_currentStatic->boundarySurfaces()[solutions[0] - isurf].get()->attachedVolume(
           currPar->position(), currPar->momentum(), dir);
       cache.m_parametersAtBoundary.boundaryInformation(nextVol, currPar, currPar);
       if (!nextVol) {
-        ATH_MSG_DEBUG(
-          "  [!] World boundary at position R,z: " << currPar->position().perp() << "," << currPar->position().z());
+        ATH_MSG_DEBUG("  [!] World boundary at position R,z: " << currPar->position().perp() << ","
+                                                               << currPar->position().z());
       } else {
         ATH_MSG_DEBUG("M-S Crossing to static volume '" << nextVol->volumeName() << "'.'");
       }
@@ -939,7 +970,7 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   }
 
   // reset remaining counters
-  cache.m_currentDense = cache.m_dense ?  cache.m_currentStatic : cache.m_highestVolume;
+  cache.m_currentDense = cache.m_dense ? cache.m_currentStatic : cache.m_highestVolume;
   cache.m_navigBoundaries.clear();
   if (cache.m_denseVols.size() > cache.m_denseResolved.first) {
     cache.m_denseVols.resize(cache.m_denseResolved.first);
@@ -964,11 +995,11 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   cache.m_navigVolsInt.clear();
 
   gp = currPar->position();
-  std::vector<const Trk::DetachedTrackingVolume *> *detVols =
+  std::vector<const Trk::DetachedTrackingVolume*>* detVols =
     m_navigator->trackingGeometry()->lowestDetachedTrackingVolumes(gp);
-  std::vector<const Trk::DetachedTrackingVolume *>::iterator dIter = detVols->begin();
+  std::vector<const Trk::DetachedTrackingVolume*>::iterator dIter = detVols->begin();
   for (; dIter != detVols->end(); dIter++) {
-    const Trk::Layer *layR = (*dIter)->layerRepresentation();
+    const Trk::Layer* layR = (*dIter)->layerRepresentation();
     bool active = layR && layR->layerType();
     if (active && !resolveActive) {
       continue;
@@ -977,38 +1008,40 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
         (*dIter)->name().substr((*dIter)->name().size() - 4, 4) != "PERM") {
       continue;
     }
-    const Trk::TrackingVolume *dVol = (*dIter)->trackingVolume();
+    const Trk::TrackingVolume* dVol = (*dIter)->trackingVolume();
     // detached volume exit ?
-    bool dExit = m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) && !nextVol;
+    bool dExit =
+      m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) && !nextVol;
     if (dExit) {
       continue;
     }
     // inert material
-    const std::vector<const Trk::TrackingVolume *> *confinedDense = dVol->confinedDenseVolumes();
-    const std::vector<const Trk::Layer *> *confinedLays = dVol->confinedArbitraryLayers();
+    const std::vector<const Trk::TrackingVolume*>* confinedDense = dVol->confinedDenseVolumes();
+    const std::vector<const Trk::Layer*>* confinedLays = dVol->confinedArbitraryLayers();
 
     if (!active && !confinedDense && !confinedLays) {
       continue;
     }
-    const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds = dVol->boundarySurfaces();
+    const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+      dVol->boundarySurfaces();
     if (!active && !confinedDense && confinedLays->size() <= bounds.size()) {
       continue;
     }
     if (confinedDense || confinedLays) {
       cache.m_navigVolsInt.emplace_back(dVol, bounds.size());
       for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-        const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+        const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
         cache.m_navigBoundaries.emplace_back(&surf, true);
       }
       // collect dense volume boundary
       if (confinedDense) {
-        std::vector<const Trk::TrackingVolume *>::const_iterator vIter = confinedDense->begin();
+        std::vector<const Trk::TrackingVolume*>::const_iterator vIter = confinedDense->begin();
         for (; vIter != confinedDense->end(); vIter++) {
-          const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds =
+          const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
             (*vIter)->boundarySurfaces();
           cache.m_denseVols.emplace_back(*vIter, bounds.size());
           for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-            const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+            const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
             cache.m_denseBoundaries.emplace_back(&surf, true);
           }
         }
@@ -1020,10 +1053,10 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           cache.m_navigLays.emplace_back(dVol, (*confinedLays)[il]);
         }
       }
-    } else {   // active material
-      const Trk::TrackingVolume *detVol = dVol->associatedSubVolume(gp);
+    } else { // active material
+      const Trk::TrackingVolume* detVol = dVol->associatedSubVolume(gp);
       if (!detVol && dVol->confinedVolumes()) {
-        std::vector<const Trk::TrackingVolume *> subvols = dVol->confinedVolumes()->arrayObjects();
+        std::vector<const Trk::TrackingVolume*> subvols = dVol->confinedVolumes()->arrayObjects();
         for (unsigned int iv = 0; iv < subvols.size(); iv++) {
           if (subvols[iv]->inside(gp, m_tolerance)) {
             detVol = subvols[iv];
@@ -1035,33 +1068,35 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
       if (!detVol) {
         detVol = dVol;
       }
-      bool vExit = m_navigator->atVolumeBoundary(currPar.get(), detVol, dir, nextVol, m_tolerance) && nextVol != detVol;
+      bool vExit =
+        m_navigator->atVolumeBoundary(currPar.get(), detVol, dir, nextVol, m_tolerance) &&
+        nextVol != detVol;
       if (vExit && nextVol && nextVol->inside(gp, m_tolerance)) {
         detVol = nextVol;
         vExit = false;
       }
       if (!vExit) {
-        const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds = detVol->boundarySurfaces();
+        const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+          detVol->boundarySurfaces();
         cache.m_navigVolsInt.emplace_back(detVol, bounds.size());
         for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-          const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+          const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
           cache.m_navigBoundaries.emplace_back(&surf, true);
         }
         if (detVol->zOverAtimesRho() != 0.) {
           cache.m_denseVols.emplace_back(detVol, bounds.size());
           for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-            const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+            const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
             cache.m_denseBoundaries.emplace_back(&surf, true);
           }
         }
         // layers ?
         if (detVol->confinedLayers()) {
-          const Trk::Layer *lay = detVol->associatedLayer(gp);
+          const Trk::Layer* lay = detVol->associatedLayer(gp);
           // if (lay && ( (*dIter)->layerRepresentation()
           //         &&(*dIter)->layerRepresentation()->layerType()>0 ) ) currentActive=(*dIter);
           if (lay) {
-            cache.m_layers.emplace_back(
-                                 &(lay->surfaceRepresentation()), true);
+            cache.m_layers.emplace_back(&(lay->surfaceRepresentation()), true);
             cache.m_navigLays.emplace_back(detVol, lay);
           }
           const Trk::Layer* nextLayer =
@@ -1071,7 +1106,7 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
             cache.m_navigLays.emplace_back(detVol, nextLayer);
           }
         } else if (detVol->confinedArbitraryLayers()) {
-          const std::vector<const Trk::Layer *> *layers = detVol->confinedArbitraryLayers();
+          const std::vector<const Trk::Layer*>* layers = detVol->confinedArbitraryLayers();
           for (unsigned int il = 0; il < layers->size(); il++) {
             cache.m_layers.emplace_back(&((*layers)[il]->surfaceRepresentation()), true);
             cache.m_navigLays.emplace_back(detVol, (*layers)[il]);
@@ -1082,20 +1117,17 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
   }
   delete detVols;
 
-
   if (not cache.m_layers.empty()) {
     cache.m_navigSurfs.insert(
       cache.m_navigSurfs.end(), cache.m_layers.begin(), cache.m_layers.end());
   }
   if (not cache.m_denseBoundaries.empty()) {
-    cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                              cache.m_denseBoundaries.begin(),
-                              cache.m_denseBoundaries.end());
+    cache.m_navigSurfs.insert(
+      cache.m_navigSurfs.end(), cache.m_denseBoundaries.begin(), cache.m_denseBoundaries.end());
   }
   if (not cache.m_navigBoundaries.empty()) {
-    cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                              cache.m_navigBoundaries.begin(),
-                              cache.m_navigBoundaries.end());
+    cache.m_navigSurfs.insert(
+      cache.m_navigSurfs.end(), cache.m_navigBoundaries.begin(), cache.m_navigBoundaries.end());
   }
   if (not cache.m_detachedBoundaries.empty()) {
     cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
@@ -1108,9 +1140,10 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     cache.m_currentDense = cache.m_currentStatic;
   } else {
     for (unsigned int i = 0; i < cache.m_denseVols.size(); i++) {
-      const Trk::TrackingVolume *dVol = cache.m_denseVols[i].first;
+      const Trk::TrackingVolume* dVol = cache.m_denseVols[i].first;
       if (dVol->inside(currPar->position(), m_tolerance) && dVol->zOverAtimesRho() != 0.) {
-        if (!m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) || nextVol == dVol) {
+        if (!m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) ||
+            nextVol == dVol) {
           cache.m_currentDense = dVol;
         }
       }
@@ -1119,7 +1152,7 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
 
   // ready to propagate
   // till: A/ static volume boundary(bcheck=true) , B/ material layer(bcheck=true), C/ destination
-  // surface(bcheck=false) update of cache.m_navigSurfs required if I/ entry into new navig volume, 
+  // surface(bcheck=false) update of cache.m_navigSurfs required if I/ entry into new navig volume,
   // II/ exit from currentActive without overlaps
 
   nextVol = nullptr;
@@ -1127,14 +1160,15 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     double path = 0.;
     std::vector<unsigned int> solutions;
     // verify that material input makes sense
-    Amg::Vector3D tp = currPar->position() + 2 * m_tolerance * dir * currPar->momentum().normalized();
+    Amg::Vector3D tp =
+      currPar->position() + 2 * m_tolerance * dir * currPar->momentum().normalized();
     if (!(cache.m_currentDense->inside(tp, 0.))) {
       cache.m_currentDense = cache.m_highestVolume;
       if (cache.m_dense && cache.m_denseVols.empty()) {
         cache.m_currentDense = cache.m_currentStatic;
       } else {
         for (unsigned int i = 0; i < cache.m_denseVols.size(); i++) {
-          const Trk::TrackingVolume *dVol = cache.m_denseVols[i].first;
+          const Trk::TrackingVolume* dVol = cache.m_denseVols[i].first;
           if (dVol->inside(tp, 0.) && dVol->zOverAtimesRho() != 0.) {
             cache.m_currentDense = dVol;
           }
@@ -1144,10 +1178,8 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
     // propagate now
     ATH_MSG_DEBUG("  [+] Starting propagation at position  "
                   << positionOutput(currPar->position())
-                  << " (current momentum: " << currPar->momentum().mag()
-                  << ")");
-    ATH_MSG_DEBUG("  [+] " << cache.m_navigSurfs.size()
-                           << " target surfaces in '"
+                  << " (current momentum: " << currPar->momentum().mag() << ")");
+    ATH_MSG_DEBUG("  [+] " << cache.m_navigSurfs.size() << " target surfaces in '"
                            << cache.m_currentDense->volumeName() << "'.");
     ManagedTrackParmPtr nextPar(
       ManagedTrackParmPtr::recapture(currPar,
@@ -1163,26 +1195,29 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
                                                     false,
                                                     cache.m_currentDense)));
     if (nextPar) {
-      ATH_MSG_DEBUG("  [+] Position after propagation -   at " << positionOutput(nextPar->position()));
+      ATH_MSG_DEBUG("  [+] Position after propagation -   at "
+                    << positionOutput(nextPar->position()));
     }
     // check missing volume boundary
-    if (nextPar &&
-        !(cache.m_currentDense->inside(nextPar->position(), m_tolerance) ||
-          m_navigator->atVolumeBoundary(nextPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
-      ATH_MSG_DEBUG("  [!] ERROR: missing volume boundary for volume" << cache.m_currentDense->volumeName());
+    if (nextPar && !(cache.m_currentDense->inside(nextPar->position(), m_tolerance) ||
+                     m_navigator->atVolumeBoundary(
+                       nextPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
+      ATH_MSG_DEBUG("  [!] ERROR: missing volume boundary for volume"
+                    << cache.m_currentDense->volumeName());
       if (cache.m_currentDense->zOverAtimesRho() != 0.) {
-        ATH_MSG_DEBUG("  [!] ERROR: trying to recover: repeat the propagation step in" <<
-          cache.m_highestVolume->volumeName());
+        ATH_MSG_DEBUG("  [!] ERROR: trying to recover: repeat the propagation step in"
+                      << cache.m_highestVolume->volumeName());
         cache.m_currentDense = cache.m_highestVolume;
         continue;
       }
     }
     if (nextPar) {
       ATH_MSG_DEBUG("  [+] Number of intersection solutions: " << solutions.size());
-      if (cache.m_currentDense->zOverAtimesRho() != 0. && !cache.m_matstates && cache.m_extrapolationCache) {
-        if (checkCache(cache," extrapolateToNextMaterialLayer dense")) {
+      if (cache.m_currentDense->zOverAtimesRho() != 0. && !cache.m_matstates &&
+          cache.m_extrapolationCache) {
+        if (checkCache(cache, " extrapolateToNextMaterialLayer dense")) {
           if (m_dumpCache) {
-            dumpCache(cache," extrapolateToNextMaterialLayer dense ");
+            dumpCache(cache, " extrapolateToNextMaterialLayer dense ");
           }
           double dInX0 = fabs(path) / cache.m_currentDense->x0();
           cache.m_extrapolationCache->updateX0(dInX0);
@@ -1190,12 +1225,10 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           double currentqoverp = nextPar->parameters()[Trk::qOverP];
           Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
             materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
-          cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                  eloss->sigmaIoni(),
-                                                  eloss->meanRad(),
-                                                  eloss->sigmaRad());
+          cache.m_extrapolationCache->updateEloss(
+            eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
           if (m_dumpCache) {
-            dumpCache(cache," After");
+            dumpCache(cache, " After");
           }
           delete eloss;
         }
@@ -1207,41 +1240,37 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           ATH_MSG_WARNING(" got negative path!! " << path);
         }
         Trk::MaterialProperties materialProperties(*cache.m_currentDense, fabs(path));
-        double scatsigma =
-          sqrt(m_msupdaters[0]->sigmaSquare(materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1.,
-                                            particle));
-        Trk::ScatteringAngles *newsa = new Trk::ScatteringAngles(0, 0, scatsigma / sin(
-                                                                   nextPar->parameters()[Trk::theta]), scatsigma);
+        double scatsigma = sqrt(m_msupdaters[0]->sigmaSquare(
+          materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
+        Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+          0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
         // energy loss
         double currentqoverp = nextPar->parameters()[Trk::qOverP];
-        Trk::EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(1. / currentqoverp), 1.,
-                                                                dir, particle);
+        Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+          materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
         // compare energy loss
         ATH_MSG_DEBUG("  [M] Energy loss: STEP,EnergyLossUpdator:"
-                      << nextPar->momentum().mag() - currPar->momentum().mag() << "," << eloss->deltaE());
-
+                      << nextPar->momentum().mag() - currPar->momentum().mag() << ","
+                      << eloss->deltaE());
 
         // use curvilinear TPs to simplify retrieval by fitters
-        const Trk::TrackParameters* cvlTP =
-          replaceTrkParm(new Trk::CurvilinearParameters(
-            nextPar->position(), nextPar->momentum(), nextPar->charge()));
-        
-        Trk::MaterialEffectsOnTrack* mefot = new Trk::MaterialEffectsOnTrack(
-          dInX0, newsa, eloss, cvlTP->associatedSurface());
-        
+        const Trk::TrackParameters* cvlTP = replaceTrkParm(new Trk::CurvilinearParameters(
+          nextPar->position(), nextPar->momentum(), nextPar->charge()));
+
+        Trk::MaterialEffectsOnTrack* mefot =
+          new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss, cvlTP->associatedSurface());
+
         cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
-        
+
         if (cache.m_extrapolationCache) {
           if (m_dumpCache) {
-            dumpCache(cache," extrapolateToNextMaterialLayer dense");
+            dumpCache(cache, " extrapolateToNextMaterialLayer dense");
           }
           cache.m_extrapolationCache->updateX0(dInX0);
-          cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                  eloss->sigmaIoni(),
-                                                  eloss->meanRad(),
-                                                  eloss->sigmaRad());
+          cache.m_extrapolationCache->updateEloss(
+            eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
           if (m_dumpCache) {
-            dumpCache(cache," After");
+            dumpCache(cache, " After");
           }
         }
         ATH_MSG_DEBUG("  [M] Collecting material from dense volume '"
@@ -1257,8 +1286,8 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
       // destination surface missed ?
       if (destSurf) {
         double dist = 0.;
-        Trk::DistanceSolution distSol = destSurf->straightLineDistanceEstimate(nextPar->position(),
-                                                                               nextPar->momentum().normalized());
+        Trk::DistanceSolution distSol = destSurf->straightLineDistanceEstimate(
+          nextPar->position(), nextPar->momentum().normalized());
         if (distSol.numberOfSolutions() > 0) {
           dist = distSol.first();
           if (distSol.numberOfSolutions() > 1 && fabs(dist) < m_tolerance) {
@@ -1283,24 +1312,21 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
       while (iSol < solutions.size()) {
         if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
           // material attached ?
-          const Trk::Layer *mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
+          const Trk::Layer* mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
           if (mb) {
-            if (mb->layerMaterialProperties() && mb->layerMaterialProperties()->fullMaterial(nextPar->position())) {
-              
+            if (mb->layerMaterialProperties() &&
+                mb->layerMaterialProperties()->fullMaterial(nextPar->position())) {
+
               const IMaterialEffectsUpdator* currentUpdator =
                 subMaterialEffectsUpdator(*cache.m_currentStatic);
               IMaterialEffectsUpdator::ICache& currentUpdatorCache =
                 subMaterialEffectsUpdatorCache(cache, *cache.m_currentStatic);
-          
+
               if (currentUpdator) {
                 nextPar = ManagedTrackParmPtr::recapture(
                   nextPar,
-                  currentUpdator->update(currentUpdatorCache,
-                                         nextPar.get(),
-                                         *mb,
-                                         dir,
-                                         particle,
-                                         matupmode));
+                  currentUpdator->update(
+                    currentUpdatorCache, nextPar.get(), *mb, dir, particle, matupmode));
               }
               if (!nextPar) {
                 cache.m_parametersAtBoundary.resetBoundaryInformation();
@@ -1308,37 +1334,37 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
               }
 
               // collect material
-              const Trk::MaterialProperties *lmat = mb->fullUpdateMaterialProperties(*nextPar);
+              const Trk::MaterialProperties* lmat = mb->fullUpdateMaterialProperties(*nextPar);
               double lx0 = lmat->x0();
               double layThick = mb->thickness();
 
               double thick = 0.;
-              double costr = fabs(nextPar->momentum().normalized().dot(mb->surfaceRepresentation().normal()));
+              double costr =
+                fabs(nextPar->momentum().normalized().dot(mb->surfaceRepresentation().normal()));
 
-              if (mb->surfaceRepresentation().isOnSurface(mb->surfaceRepresentation().center(), false, 0., 0.)) {
+              if (mb->surfaceRepresentation().isOnSurface(
+                    mb->surfaceRepresentation().center(), false, 0., 0.)) {
                 thick = fmin(mb->surfaceRepresentation().bounds().r(),
-                             layThick /
-                             fabs(nextPar->momentum().normalized().dot(mb->surfaceRepresentation().normal())));
+                             layThick / fabs(nextPar->momentum().normalized().dot(
+                                          mb->surfaceRepresentation().normal())));
               } else {
                 thick = fmin(2 * mb->thickness(), layThick / (1 - costr));
               }
 
               if (!cache.m_matstates && cache.m_extrapolationCache) {
-                if (checkCache(cache," extrapolateToNextMaterialLayer thin")) {
+                if (checkCache(cache, " extrapolateToNextMaterialLayer thin")) {
                   double dInX0 = thick / lx0;
                   if (m_dumpCache) {
-                    dumpCache(cache," extrapolateToNextMaterialLayer thin ");
+                    dumpCache(cache, " extrapolateToNextMaterialLayer thin ");
                   }
                   cache.m_extrapolationCache->updateX0(dInX0);
                   double currentqoverp = nextPar->parameters()[Trk::qOverP];
                   EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
                     *lmat, fabs(1. / currentqoverp), 1. / costr, dir, particle);
-                  cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                          eloss->sigmaIoni(),
-                                                          eloss->meanRad(),
-                                                          eloss->sigmaRad());
+                  cache.m_extrapolationCache->updateEloss(
+                    eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
                   if (m_dumpCache) {
-                    dumpCache(cache," After");
+                    dumpCache(cache, " After");
                   }
                   delete eloss;
                 }
@@ -1346,40 +1372,38 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
 
               if (cache.m_matstates) {
                 double dInX0 = thick / lx0;
-                double scatsigma =
-                  sqrt(m_msupdaters[0]->sigmaSquare(*lmat, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
-                Trk::ScatteringAngles *newsa =
-                  new Trk::ScatteringAngles(0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
+                double scatsigma = sqrt(m_msupdaters[0]->sigmaSquare(
+                  *lmat, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
+                Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+                  0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
                 // energy loss
                 double currentqoverp = nextPar->parameters()[Trk::qOverP];
                 EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
                   *lmat, fabs(1. / currentqoverp), 1. / costr, dir, particle);
 
                 // use curvilinear TPs to simplify retrieval by fitters
-                const Trk::TrackParameters* cvlTP = replaceTrkParm(
-                  new Trk::CurvilinearParameters(nextPar->position(),
-                                                 nextPar->momentum(),
-                                                 nextPar->charge()));
+                const Trk::TrackParameters* cvlTP = replaceTrkParm(new Trk::CurvilinearParameters(
+                  nextPar->position(), nextPar->momentum(), nextPar->charge()));
                 Trk::MaterialEffectsOnTrack* mefot =
-                  new Trk::MaterialEffectsOnTrack(
-                    dInX0, newsa, eloss, cvlTP->associatedSurface());
+                  new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss, cvlTP->associatedSurface());
                 if (cache.m_extrapolationCache) {
-                  if (checkCache(cache," mat states extrapolateToNextMaterialLayer thin")) {
+                  if (checkCache(cache, " mat states extrapolateToNextMaterialLayer thin")) {
                     if (m_dumpCache) {
-                      dumpCache(cache," extrapolateToNextMaterialLayer thin");
+                      dumpCache(cache, " extrapolateToNextMaterialLayer thin");
                     }
                     cache.m_extrapolationCache->updateX0(dInX0);
-                    cache.m_extrapolationCache->updateEloss(eloss->meanIoni(), eloss->sigmaIoni(),
-                                                      eloss->meanRad(), eloss->sigmaRad());
+                    cache.m_extrapolationCache->updateEloss(
+                      eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
                     if (m_dumpCache) {
-                      dumpCache(cache," After");
+                      dumpCache(cache, " After");
                     }
                   }
                 }
-                cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
+                cache.m_matstates->push_back(
+                  new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
               }
             }
-          }  // end material update at massive (static volume) boundary
+          } // end material update at massive (static volume) boundary
 
           // static volume boundary; return to the main loop
           unsigned int index = solutions[iSol] - iDest;
@@ -1388,10 +1412,10 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
             nextPar->position(), nextPar->momentum(), dir);
           // double check the next volume
           if (nextVol &&
-              !(nextVol->inside(nextPar->position() + 0.01 * dir * nextPar->momentum().normalized(), m_tolerance))) {
-            ATH_MSG_DEBUG(
-              "  [!] WARNING: wrongly assigned static volume ?" << cache.m_currentStatic->volumeName() << "->" <<
-              nextVol->volumeName());
+              !(nextVol->inside(nextPar->position() + 0.01 * dir * nextPar->momentum().normalized(),
+                                m_tolerance))) {
+            ATH_MSG_DEBUG("  [!] WARNING: wrongly assigned static volume ?"
+                          << cache.m_currentStatic->volumeName() << "->" << nextVol->volumeName());
             nextVol = m_navigator->trackingGeometry()->lowestStaticTrackingVolume(
               nextPar->position() + 0.01 * nextPar->momentum().normalized());
             if (nextVol) {
@@ -1401,57 +1425,58 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           // end double check - to be removed after validation of the geometry gluing
           if (nextVol != cache.m_currentStatic) {
             cache.m_parametersAtBoundary.boundaryInformation(nextVol, nextPar, nextPar);
-            ATH_MSG_DEBUG("  [+] StaticVol boundary reached of '" << cache.m_currentStatic->volumeName() << "'.");
-            if (m_navigator->atVolumeBoundary(nextPar.get(), cache.m_currentStatic, dir, assocVol,
-                                              m_tolerance) && assocVol != cache.m_currentStatic) {
+            ATH_MSG_DEBUG("  [+] StaticVol boundary reached of '"
+                          << cache.m_currentStatic->volumeName() << "'.");
+            if (m_navigator->atVolumeBoundary(
+                  nextPar.get(), cache.m_currentStatic, dir, assocVol, m_tolerance) &&
+                assocVol != cache.m_currentStatic) {
               cache.m_currentDense = m_useMuonMatApprox ? nextVol : cache.m_highestVolume;
             }
             // no next volume found --- end of the world
             if (!nextVol) {
-              ATH_MSG_DEBUG("  [+] Word boundary reached        - at " << positionOutput(nextPar->position()));
+              ATH_MSG_DEBUG("  [+] Word boundary reached        - at "
+                            << positionOutput(nextPar->position()));
             }
             // next volume found and parameters are at boundary
             if (nextVol && nextPar) {
               ATH_MSG_DEBUG("  [+] Crossing to next volume '" << nextVol->volumeName() << "'");
-              ATH_MSG_DEBUG("  [+] Crossing position is         - at " << positionOutput(nextPar->position()));
+              ATH_MSG_DEBUG("  [+] Crossing position is         - at "
+                            << positionOutput(nextPar->position()));
             }
             return ManagedTrackParmPtr();
           }
-        }
-        else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() + cache.m_layers.size()) {
+        } else if (solutions[iSol] <
+                   iDest + cache.m_staticBoundaries.size() + cache.m_layers.size()) {
           // next layer; don't return passive material layers unless required
           unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size();
-          const Trk::Layer *nextLayer = cache.m_navigLays[index].second;
+          const Trk::Layer* nextLayer = cache.m_navigLays[index].second;
           // material update HERE and NOW (pre/post udpdate ? )
           // don't repeat if identical to last update && input parameters on the layer
           bool collect = true;
           if (nextLayer == cache.m_lastMaterialLayer &&
               nextLayer->surfaceRepresentation().type() != Trk::Surface::Cylinder) {
-            ATH_MSG_DEBUG("  [!] This layer is identical to the one with last material update, return layer "
-                          "without repeating the update");
+            ATH_MSG_DEBUG(
+              "  [!] This layer is identical to the one with last material update, return layer "
+              "without repeating the update");
             collect = false;
             if (!destSurf && (nextLayer->layerType() > 0 || m_returnPassiveLayers)) {
               return nextPar;
             }
           }
           double layThick = nextLayer->thickness();
-          if (collect && layThick > 0.) {// collect material
-           
+          if (collect && layThick > 0.) { // collect material
+
             // get the right updator
             const IMaterialEffectsUpdator* currentUpdator =
               subMaterialEffectsUpdator(*cache.m_currentStatic);
             IMaterialEffectsUpdator::ICache& currentUpdatorCache =
               subMaterialEffectsUpdatorCache(cache, *cache.m_currentStatic);
-            
+
             if (currentUpdator) {
               nextPar = ManagedTrackParmPtr::recapture(
                 nextPar,
-                currentUpdator->update(currentUpdatorCache,
-                                       nextPar.get(),
-                                       *nextLayer,
-                                       dir,
-                                       particle,
-                                       matupmode));
+                currentUpdator->update(
+                  currentUpdatorCache, nextPar.get(), *nextLayer, dir, particle, matupmode));
             }
             if (!nextPar) {
               cache.m_parametersAtBoundary.resetBoundaryInformation();
@@ -1462,35 +1487,34 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
             double lx0 = nextLayer->fullUpdateMaterialProperties(*nextPar)->x0();
 
             double thick = 0.;
-            double costr = fabs(nextPar->momentum().normalized().dot(nextLayer->surfaceRepresentation().normal()));
+            double costr = fabs(
+              nextPar->momentum().normalized().dot(nextLayer->surfaceRepresentation().normal()));
 
-            if (nextLayer->surfaceRepresentation().isOnSurface(nextLayer->surfaceRepresentation().center(), false, 0.,
-                                                               0.)) {
+            if (nextLayer->surfaceRepresentation().isOnSurface(
+                  nextLayer->surfaceRepresentation().center(), false, 0., 0.)) {
               thick = fmin(nextLayer->surfaceRepresentation().bounds().r(),
-                           layThick /
-                           fabs(nextPar->momentum().normalized().dot(nextLayer->surfaceRepresentation().normal())));
+                           layThick / fabs(nextPar->momentum().normalized().dot(
+                                        nextLayer->surfaceRepresentation().normal())));
             } else {
               thick = fmin(2 * nextLayer->thickness(), layThick / (1 - costr));
             }
 
             if (!cache.m_matstates && cache.m_extrapolationCache) {
-              if (checkCache(cache," extrapolateToNextMaterialLayer thin")) {
+              if (checkCache(cache, " extrapolateToNextMaterialLayer thin")) {
                 double dInX0 = thick / lx0;
                 if (m_dumpCache) {
-                  dumpCache(cache," extrapolateToNextMaterialLayer thin ");
+                  dumpCache(cache, " extrapolateToNextMaterialLayer thin ");
                 }
                 cache.m_extrapolationCache->updateX0(dInX0);
                 Trk::MaterialProperties materialProperties(
                   *nextLayer->fullUpdateMaterialProperties(*nextPar)); // !<@TODO check
                 double currentqoverp = nextPar->parameters()[Trk::qOverP];
-                EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(
-                                                                     1. / currentqoverp), 1. / costr, dir, particle);
-                cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                        eloss->sigmaIoni(),
-                                                        eloss->meanRad(),
-                                                        eloss->sigmaRad());
+                EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+                  materialProperties, fabs(1. / currentqoverp), 1. / costr, dir, particle);
+                cache.m_extrapolationCache->updateEloss(
+                  eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
                 if (m_dumpCache) {
-                  dumpCache(cache," After");
+                  dumpCache(cache, " After");
                 }
                 delete eloss;
               }
@@ -1500,35 +1524,30 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
               double dInX0 = thick / lx0;
               Trk::MaterialProperties materialProperties(
                 *nextLayer->fullUpdateMaterialProperties(*nextPar)); // !<@TODOcheck
-              double scatsigma =
-                sqrt(m_msupdaters[0]->sigmaSquare(materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1.,
-                                                  particle));
-              Trk::ScatteringAngles *newsa =
-                new Trk::ScatteringAngles(0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
+              double scatsigma = sqrt(m_msupdaters[0]->sigmaSquare(
+                materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
+              Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+                0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
               // energy loss
               double currentqoverp = nextPar->parameters()[Trk::qOverP];
-              EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(
-                                                                   1. / currentqoverp), 1. / costr,
-                                                                 dir, particle);
+              EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+                materialProperties, fabs(1. / currentqoverp), 1. / costr, dir, particle);
 
               // use curvilinear TPs to simplify retrieval by fitters
-              const Trk::TrackParameters *cvlTP = replaceTrkParm(new Trk::CurvilinearParameters(nextPar->position(),
-                                                                                                nextPar->momentum(),
-                                                                                                nextPar->charge()));
-              Trk::MaterialEffectsOnTrack *mefot = new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss,
-                                                                                   cvlTP->associatedSurface());
+              const Trk::TrackParameters* cvlTP = replaceTrkParm(new Trk::CurvilinearParameters(
+                nextPar->position(), nextPar->momentum(), nextPar->charge()));
+              Trk::MaterialEffectsOnTrack* mefot =
+                new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss, cvlTP->associatedSurface());
               if (cache.m_extrapolationCache) {
-                if (checkCache(cache," mat states extrapolateToNextMaterialLayer thin")) {
+                if (checkCache(cache, " mat states extrapolateToNextMaterialLayer thin")) {
                   if (m_dumpCache) {
-                    dumpCache(cache," extrapolateToNextMaterialLayer thin");
+                    dumpCache(cache, " extrapolateToNextMaterialLayer thin");
                   }
                   cache.m_extrapolationCache->updateX0(dInX0);
-                  cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                          eloss->sigmaIoni(),
-                                                          eloss->meanRad(),
-                                                          eloss->sigmaRad());
+                  cache.m_extrapolationCache->updateEloss(
+                    eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
                   if (m_dumpCache) {
-                    dumpCache(cache," After");
+                    dumpCache(cache, " After");
                   }
                 }
               }
@@ -1544,8 +1563,9 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           }
           if (resolveActive) {
             // if ordered layers, retrieve the next layer and replace the current one in the list
-            if (cache.m_navigLays[index].first && cache.m_navigLays[index].first->confinedLayers()) {
-              const Trk::Layer *newLayer = cache.m_navigLays[index].first->nextLayer(
+            if (cache.m_navigLays[index].first &&
+                cache.m_navigLays[index].first->confinedLayers()) {
+              const Trk::Layer* newLayer = cache.m_navigLays[index].first->nextLayer(
                 nextPar->position(), dir * nextPar->momentum().normalized(), true);
               if (newLayer) {
                 cache.m_navigLays[index].second = newLayer;
@@ -1553,12 +1573,13 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
               }
             }
           }
-          // not necessary: currPar = nextPar; since done outside the loop and currPar not used inside the loop
+          // not necessary: currPar = nextPar; since done outside the loop and currPar not used
+          // inside the loop
         } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                       cache.m_layers.size() +
-                                       cache.m_denseBoundaries.size()) {
+                                       cache.m_layers.size() + cache.m_denseBoundaries.size()) {
           // dense volume boundary
-          unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size();
+          unsigned int index =
+            solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size();
           std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>>::iterator dIter =
             cache.m_denseVols.begin();
           while (index >= (*dIter).second && dIter != cache.m_denseVols.end()) {
@@ -1567,37 +1588,40 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           }
           if (dIter != cache.m_denseVols.end()) {
             currVol = (*dIter).first;
-            nextVol = ((*dIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
+            nextVol =
+              ((*dIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
             // boundary orientation not reliable
-            Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+            Amg::Vector3D tp =
+              nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
             if (currVol->inside(tp, m_tolerance)) {
               cache.m_currentDense = currVol;
-            } else if (!nextVol || !nextVol->inside(tp, m_tolerance)) {   // search for dense volumes
+            } else if (!nextVol || !nextVol->inside(tp, m_tolerance)) { // search for dense volumes
               cache.m_currentDense = cache.m_highestVolume;
               if (cache.m_dense && cache.m_denseVols.empty()) {
                 cache.m_currentDense = cache.m_currentStatic;
               } else {
                 for (unsigned int i = 0; i < cache.m_denseVols.size(); i++) {
-                  const Trk::TrackingVolume *dVol = cache.m_denseVols[i].first;
+                  const Trk::TrackingVolume* dVol = cache.m_denseVols[i].first;
                   if (dVol->inside(tp, 0.) && dVol->zOverAtimesRho() != 0.) {
                     cache.m_currentDense = dVol;
-                    ATH_MSG_DEBUG("  [+] Next dense volume found: '" << cache.m_currentDense->volumeName() << "'.");
+                    ATH_MSG_DEBUG("  [+] Next dense volume found: '"
+                                  << cache.m_currentDense->volumeName() << "'.");
                     break;
                   }
                 } // loop over dense volumes
               }
             } else {
               cache.m_currentDense = nextVol;
-              ATH_MSG_DEBUG("  [+] Next dense volume: '" << cache.m_currentDense->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Next dense volume: '" << cache.m_currentDense->volumeName()
+                                                         << "'.");
             }
           }
         } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                       cache.m_layers.size() +
-                                       cache.m_denseBoundaries.size() +
+                                       cache.m_layers.size() + cache.m_denseBoundaries.size() +
                                        cache.m_navigBoundaries.size()) {
           // navig volume boundary
-          unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size() -
-                               cache.m_denseBoundaries.size();
+          unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() -
+                               cache.m_layers.size() - cache.m_denseBoundaries.size();
           std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>>::iterator nIter =
             cache.m_navigVolsInt.begin();
           while (index >= (*nIter).second && nIter != cache.m_navigVolsInt.end()) {
@@ -1606,20 +1630,25 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           }
           if (nIter != cache.m_navigVolsInt.end()) {
             currVol = (*nIter).first;
-            nextVol = ((*nIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
+            nextVol =
+              ((*nIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
             // boundary orientation not reliable
-            Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+            Amg::Vector3D tp =
+              nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
             if (nextVol && nextVol->inside(tp, 0.)) {
-              ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '"
+                            << nextVol->volumeName() << "'.");
             } else if (currVol->inside(tp, 0.)) {
               nextVol = currVol;
-              ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '"
+                            << nextVol->volumeName() << "'.");
             } else {
               nextVol = nullptr;
-              ATH_MSG_DEBUG("  [+] Navigation volume boundary, leaving volume '" << currVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Navigation volume boundary, leaving volume '"
+                            << currVol->volumeName() << "'.");
             }
-            // not necessary: currPar = nextPar; since done outside the loop and currPar not used inside the loop
-            // return only if detached volume boundaries not collected
+            // not necessary: currPar = nextPar; since done outside the loop and currPar not used
+            // inside the loop return only if detached volume boundaries not collected
             if (nextVol) {
               return extrapolateToNextMaterialLayer(ctx,
                                                     cache,
@@ -1634,15 +1663,15 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
             }
           }
         } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                       cache.m_layers.size() +
-                                       cache.m_denseBoundaries.size() +
+                                       cache.m_layers.size() + cache.m_denseBoundaries.size() +
                                        cache.m_navigBoundaries.size() +
                                        cache.m_detachedBoundaries.size()) {
           // detached volume boundary
-          unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size()
-                               - cache.m_denseBoundaries.size() - cache.m_navigBoundaries.size();
-          std::vector< std::pair<const Trk::DetachedTrackingVolume *,
-                                 unsigned int> >::iterator dIter = cache.m_detachedVols.begin();
+          unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() -
+                               cache.m_layers.size() - cache.m_denseBoundaries.size() -
+                               cache.m_navigBoundaries.size();
+          std::vector<std::pair<const Trk::DetachedTrackingVolume*, unsigned int>>::iterator dIter =
+            cache.m_detachedVols.begin();
           while (index >= (*dIter).second && dIter != cache.m_detachedVols.end()) {
             index -= (*dIter).second;
             dIter++;
@@ -1650,20 +1679,25 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
           if (dIter != cache.m_detachedVols.end()) {
             currVol = (*dIter).first->trackingVolume();
             // boundary orientation not reliable
-            nextVol = ((*dIter).first->trackingVolume()->boundarySurfaces())[index].get()->attachedVolume(*nextPar,
-                                                                                                             dir);
-            Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+            nextVol =
+              ((*dIter).first->trackingVolume()->boundarySurfaces())[index].get()->attachedVolume(
+                *nextPar, dir);
+            Amg::Vector3D tp =
+              nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
             if (nextVol && nextVol->inside(tp, 0.)) {
-              ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '"
+                            << nextVol->volumeName() << "'.");
             } else if (currVol->inside(tp, 0.)) {
               nextVol = currVol;
-              ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '"
+                            << nextVol->volumeName() << "'.");
             } else {
               nextVol = nullptr;
-              ATH_MSG_DEBUG("  [+] Detached volume boundary, leaving volume '" << currVol->volumeName() << "'.");
+              ATH_MSG_DEBUG("  [+] Detached volume boundary, leaving volume '"
+                            << currVol->volumeName() << "'.");
             }
-            // not necessary: currPar = nextPar; since done outside the loop and currPar not used inside the loop
-            // if ( nextVol || !detachedBoundariesIncluded)
+            // not necessary: currPar = nextPar; since done outside the loop and currPar not used
+            // inside the loop if ( nextVol || !detachedBoundariesIncluded)
             if (nextVol) {
               return extrapolateToNextMaterialLayer(ctx,
                                                     cache,
@@ -1692,15 +1726,14 @@ Trk::Extrapolator::extrapolateToNextMaterialLayer(
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateInAlignableTV(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm_ref,
-  const Trk::Surface* destSurf,
-  const Trk::AlignableTrackingVolume* vol,
-  PropDirection dir,
-  ParticleHypothesis particle) const
+Trk::Extrapolator::extrapolateInAlignableTV(const EventContext& ctx,
+                                            Cache& cache,
+                                            const IPropagator& prop,
+                                            TrackParmPtr parm_ref,
+                                            const Trk::Surface* destSurf,
+                                            const Trk::AlignableTrackingVolume* vol,
+                                            PropDirection dir,
+                                            ParticleHypothesis particle) const
 {
   ++cache.m_methodSequence;
   ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolateInAlignableTV(...) ");
@@ -1715,11 +1748,11 @@ Trk::Extrapolator::extrapolateInAlignableTV(
   // initialize the return parameters vector
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   ManagedTrackParmPtr currPar(parm);
-  const Trk::AlignableTrackingVolume *staticVol = nullptr;
-  const Trk::TrackingVolume *currVol = nullptr;
-  const Trk::TrackingVolume *nextVol = nullptr;
+  const Trk::AlignableTrackingVolume* staticVol = nullptr;
+  const Trk::TrackingVolume* currVol = nullptr;
+  const Trk::TrackingVolume* nextVol = nullptr;
   std::vector<unsigned int> solutions;
-  const Trk::TrackingVolume *assocVol = nullptr;
+  const Trk::TrackingVolume* assocVol = nullptr;
   // double tol = 0.001;
   // double path = 0.;
   if (!cache.m_highestVolume) {
@@ -1732,14 +1765,16 @@ Trk::Extrapolator::extrapolateInAlignableTV(
     staticVol = vol;
   } else {
     currVol = m_navigator->trackingGeometry()->lowestStaticTrackingVolume(gp);
-    const Trk::TrackingVolume *nextStatVol = nullptr;
-    if (m_navigator->atVolumeBoundary(currPar.get(), currVol, dir, nextStatVol, m_tolerance) && nextStatVol != currVol) {
+    const Trk::TrackingVolume* nextStatVol = nullptr;
+    if (m_navigator->atVolumeBoundary(currPar.get(), currVol, dir, nextStatVol, m_tolerance) &&
+        nextStatVol != currVol) {
       currVol = nextStatVol;
     }
     if (currVol && currVol != vol) {
-      if(currVol->isAlignable()){
-      const Trk::AlignableTrackingVolume *aliTG = static_cast<const Trk::AlignableTrackingVolume *> (currVol);
-      staticVol = aliTG;
+      if (currVol->isAlignable()) {
+        const Trk::AlignableTrackingVolume* aliTG =
+          static_cast<const Trk::AlignableTrackingVolume*>(currVol);
+        staticVol = aliTG;
       }
     }
   }
@@ -1754,11 +1789,12 @@ Trk::Extrapolator::extrapolateInAlignableTV(
   // save volume entry if collection present
 
   if (cache.m_identifiedParameters) {
-    const Trk::BinnedMaterial *binMat = staticVol->binnedMaterial();
+    const Trk::BinnedMaterial* binMat = staticVol->binnedMaterial();
     if (binMat) {
-      const Trk::IdentifiedMaterial *binIDMat = binMat->material(currPar->position());
+      const Trk::IdentifiedMaterial* binIDMat = binMat->material(currPar->position());
       if (binIDMat->second > 0) {
-        ManagedTrackParmPtr identified_parm(currPar); // first create a copy, to not invalidate currPar on release
+        ManagedTrackParmPtr identified_parm(
+          currPar); // first create a copy, to not invalidate currPar on release
         cache.m_identifiedParameters->push_back(
           std::pair<const Trk::TrackParameters*, int>(identified_parm.release(), binIDMat->second));
       }
@@ -1778,15 +1814,15 @@ Trk::Extrapolator::extrapolateInAlignableTV(
   // assume new static volume, retrieve boundaries
   cache.m_currentStatic = staticVol;
   cache.m_staticBoundaries.clear();
-  const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds = staticVol->boundarySurfaces();
+  const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+    staticVol->boundarySurfaces();
   for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-    const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+    const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
     cache.m_staticBoundaries.emplace_back(&surf, true);
   }
 
-  cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                            cache.m_staticBoundaries.begin(),
-                            cache.m_staticBoundaries.end());
+  cache.m_navigSurfs.insert(
+    cache.m_navigSurfs.end(), cache.m_staticBoundaries.begin(), cache.m_staticBoundaries.end());
 
   // current dense
   cache.m_currentDense = staticVol;
@@ -1801,46 +1837,46 @@ Trk::Extrapolator::extrapolateInAlignableTV(
     // propagate now
     ATH_MSG_DEBUG("  [+] Starting propagation at position  "
                   << positionOutput(currPar->position())
-                  << " (current momentum: " << currPar->momentum().mag()
-                  << ")");
-    ATH_MSG_DEBUG("  [+] " << cache.m_navigSurfs.size()
-                           << " target surfaces in '"
+                  << " (current momentum: " << currPar->momentum().mag() << ")");
+    ATH_MSG_DEBUG("  [+] " << cache.m_navigSurfs.size() << " target surfaces in '"
                            << cache.m_currentDense->volumeName() << "'.");
-    //  arguments : inputParameters, vector of navigation surfaces, propagation direction, b field service, particle
+    //  arguments : inputParameters, vector of navigation surfaces, propagation direction, b field
+    //  service, particle
     // type, result,
-    // material collection, intersection collection, path limit, switch for use of path limit, switch for
-    // curvilinear on return, current TG volume
+    // material collection, intersection collection, path limit, switch for use of path limit,
+    // switch for curvilinear on return, current TG volume
     if (m_dumpCache && cache.m_extrapolationCache) {
       ATH_MSG_DEBUG("  prop.propagateM " << cache.m_extrapolationCache);
     }
     // propagateM takes intersections by non-const reference to a pointer.
     // however, it does not modify the pointer, so the parameter
     // should really be passed just by pointer.
-    identifiedParameters_t *intersections = cache.m_identifiedParameters.get();
-    ManagedTrackParmPtr nextPar(ManagedTrackParmPtr::recapture(
-      currPar,
-      prop.propagateM(ctx,
-                      *currPar,
-                      cache.m_navigSurfs,
-                      dir,
-                      m_fieldProperties,
-                      particle,
-                      solutions,
-                      cache.m_matstates,
-                      intersections,
-                      path,
-                      false,
-                      false,
-                      cache.m_currentDense,
-                      cache.m_extrapolationCache)));
+    identifiedParameters_t* intersections = cache.m_identifiedParameters.get();
+    ManagedTrackParmPtr nextPar(
+      ManagedTrackParmPtr::recapture(currPar,
+                                     prop.propagateM(ctx,
+                                                     *currPar,
+                                                     cache.m_navigSurfs,
+                                                     dir,
+                                                     m_fieldProperties,
+                                                     particle,
+                                                     solutions,
+                                                     cache.m_matstates,
+                                                     intersections,
+                                                     path,
+                                                     false,
+                                                     false,
+                                                     cache.m_currentDense,
+                                                     cache.m_extrapolationCache)));
     // does nothing
-    // can be used for debugging to instrument track parameters with some monitoring (e.g. construction and
-    // destruction)
+    // can be used for debugging to instrument track parameters with some monitoring (e.g.
+    // construction and destruction)
     replaceTrkParm(cache.m_identifiedParameters.get());
     replaceTrkParm(cache.m_matstates);
 
     if (nextPar) {
-      ATH_MSG_DEBUG("  [+] Position after propagation -   at " << positionOutput(nextPar->position()));
+      ATH_MSG_DEBUG("  [+] Position after propagation -   at "
+                    << positionOutput(nextPar->position()));
       ATH_MSG_DEBUG("  [+] Number of intersection solutions: " << solutions.size());
       // destination surface
       if (destSurf && solutions[0] == 0) {
@@ -1852,8 +1888,8 @@ Trk::Extrapolator::extrapolateInAlignableTV(
       // destination surface missed ?
       if (destSurf) {
         double dist = 0.;
-        Trk::DistanceSolution distSol = destSurf->straightLineDistanceEstimate(nextPar->position(),
-                                                                               nextPar->momentum().normalized());
+        Trk::DistanceSolution distSol = destSurf->straightLineDistanceEstimate(
+          nextPar->position(), nextPar->momentum().normalized());
         if (distSol.numberOfSolutions() > 0) {
           dist = distSol.first();
           if (distSol.numberOfSolutions() > 1 && fabs(dist) < m_tolerance) {
@@ -1885,10 +1921,10 @@ Trk::Extrapolator::extrapolateInAlignableTV(
             nextPar->position(), nextPar->momentum(), dir);
           // double check the next volume
           if (nextVol &&
-              !(nextVol->inside(nextPar->position() + 0.01 * dir * nextPar->momentum().normalized(), m_tolerance))) {
-            ATH_MSG_DEBUG(
-              "  [!] WARNING: wrongly assigned static volume ?" << cache.m_currentStatic->volumeName() << "->" <<
-              nextVol->volumeName());
+              !(nextVol->inside(nextPar->position() + 0.01 * dir * nextPar->momentum().normalized(),
+                                m_tolerance))) {
+            ATH_MSG_DEBUG("  [!] WARNING: wrongly assigned static volume ?"
+                          << cache.m_currentStatic->volumeName() << "->" << nextVol->volumeName());
             nextVol = m_navigator->trackingGeometry()->lowestStaticTrackingVolume(
               nextPar->position() + 0.01 * nextPar->momentum().normalized());
             if (nextVol) {
@@ -1898,19 +1934,22 @@ Trk::Extrapolator::extrapolateInAlignableTV(
           // end double check - to be removed after validation of the geometry gluing
           // lateral exit from calo sample can be handled here
           if (cache.m_identifiedParameters) {
-            const Trk::BinnedMaterial *binMat = staticVol->binnedMaterial();
+            const Trk::BinnedMaterial* binMat = staticVol->binnedMaterial();
             if (binMat) {
-              const Trk::IdentifiedMaterial *binIDMat = binMat->material(nextPar->position());
-              // save only if entry to the sample present, the exit missing and non-zero step in the sample
+              const Trk::IdentifiedMaterial* binIDMat = binMat->material(nextPar->position());
+              // save only if entry to the sample present, the exit missing and non-zero step in the
+              // sample
               if (binIDMat && binIDMat->second > 0 && !cache.m_identifiedParameters->empty() &&
                   cache.m_identifiedParameters->back().second == binIDMat->second) {
-                double s = (nextPar->position() - cache.m_identifiedParameters->back().first->position()).mag();
+                double s =
+                  (nextPar->position() - cache.m_identifiedParameters->back().first->position())
+                    .mag();
                 if (s > 0.001) {
                   // first create a copy, to not invalidate nextPar on release
-                  ManagedTrackParmPtr identified_parm(nextPar); 
+                  ManagedTrackParmPtr identified_parm(nextPar);
                   cache.m_identifiedParameters->push_back(
-                    std::pair<const Trk::TrackParameters*, int>(
-                      identified_parm.release(), -binIDMat->second));
+                    std::pair<const Trk::TrackParameters*, int>(identified_parm.release(),
+                                                                -binIDMat->second));
                 }
               }
             }
@@ -1918,23 +1957,28 @@ Trk::Extrapolator::extrapolateInAlignableTV(
           // end lateral exit handling
           if (nextVol != cache.m_currentStatic) {
             cache.m_parametersAtBoundary.boundaryInformation(nextVol, nextPar, nextPar);
-            ATH_MSG_DEBUG("  [+] StaticVol boundary reached of '" << cache.m_currentStatic->volumeName() << "'.");
-            if (m_navigator->atVolumeBoundary(nextPar.get(), cache.m_currentStatic, dir, assocVol,
-                                              m_tolerance) && assocVol != cache.m_currentStatic) {
+            ATH_MSG_DEBUG("  [+] StaticVol boundary reached of '"
+                          << cache.m_currentStatic->volumeName() << "'.");
+            if (m_navigator->atVolumeBoundary(
+                  nextPar.get(), cache.m_currentStatic, dir, assocVol, m_tolerance) &&
+                assocVol != cache.m_currentStatic) {
               cache.m_currentDense = m_useMuonMatApprox ? nextVol : cache.m_highestVolume;
             }
             // no next volume found --- end of the world
             if (!nextVol) {
-              ATH_MSG_DEBUG("  [+] Word boundary reached        - at " << positionOutput(nextPar->position()));
+              ATH_MSG_DEBUG("  [+] Word boundary reached        - at "
+                            << positionOutput(nextPar->position()));
             }
             // next volume found and parameters are at boundary
             if (nextVol && nextPar) {
               ATH_MSG_DEBUG("  [+] Crossing to next volume '" << nextVol->volumeName() << "'");
-              ATH_MSG_DEBUG("  [+] Crossing position is         - at " << positionOutput(nextPar->position()));
+              ATH_MSG_DEBUG("  [+] Crossing position is         - at "
+                            << positionOutput(nextPar->position()));
               if (!destSurf) {
-                return nextPar; //  return value differs between e->surface (cached boundary values used)
+                return nextPar; //  return value differs between e->surface (cached boundary values
+                                //  used)
               }
-              //implicit : parameters at boundary returned
+              // implicit : parameters at boundary returned
             }
             return ManagedTrackParmPtr();
           }
@@ -1953,28 +1997,27 @@ Trk::Extrapolator::extrapolateInAlignableTV(
 }
 
 Trk::TrackParameters*
-Trk::Extrapolator::extrapolateDirectlyImpl(
-  const EventContext& ctx,
-  const IPropagator& prop,
-  const Trk::TrackParameters& parm,
-  const Trk::Surface& sf,
-  Trk::PropDirection dir,
-  const Trk::BoundaryCheck& bcheck,
-  Trk::ParticleHypothesis particle) const
+Trk::Extrapolator::extrapolateDirectlyImpl(const EventContext& ctx,
+                                           const IPropagator& prop,
+                                           const Trk::TrackParameters& parm,
+                                           const Trk::Surface& sf,
+                                           Trk::PropDirection dir,
+                                           const Trk::BoundaryCheck& bcheck,
+                                           Trk::ParticleHypothesis particle) const
 {
   // statistics && sequence output ----------------------------------------
   ++m_extrapolateDirectlyCalls;
 
   // now du the stuff
-  const Trk::TrackingVolume *currentVolume = m_navigator->highestVolume();
+  const Trk::TrackingVolume* currentVolume = m_navigator->highestVolume();
 
-  // --------------------------------------------------------------------------------------
+  // ---------------------------------------------------------------
   // [?]: cannot increment and display m_methodSequence here, since the cache is not passed here
-  ATH_MSG_DEBUG("P-[?] extrapolateDirectly(...) inside '"
-                      << currentVolume->volumeName() << "' to destination surface. ");
+  ATH_MSG_DEBUG("P-[?] extrapolateDirectly(...) inside '" << currentVolume->volumeName()
+                                                          << "' to destination surface. ");
 
   if (currentVolume) {
-    return prop.propagate(ctx,parm, sf, dir, bcheck, m_fieldProperties, particle);
+    return prop.propagate(ctx, parm, sf, dir, bcheck, m_fieldProperties, particle);
   }
   return nullptr;
 }
@@ -1987,21 +2030,21 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
                                            PropDirection dir,
                                            ParticleHypothesis particle) const
 {
-  // @TODO in principle the cache should already be created 
-  //here to correctly set cache.m_methodSequence for sub-sequent calls ...
+  // @TODO in principle the cache should already be created
+  // here to correctly set cache.m_methodSequence for sub-sequent calls ...
   ATH_MSG_DEBUG("V-[?" /*<< cache.m_methodSequence*/
-                << "] extrapolateToVolume(...) to volume '" << vol.volumeName()
-                << "'.");
-  const TrackParameters *returnParms=nullptr;
+                << "] extrapolateToVolume(...) to volume '" << vol.volumeName() << "'.");
+  const TrackParameters* returnParms = nullptr;
   Trk::PropDirection propDir = dir == Trk::oppositeMomentum ? dir : Trk::alongMomentum;
   double dist = 0.;
 
   // retrieve boundary surfaces, order them according to distance estimate
-  const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > >& bounds = vol.boundarySurfaces();
-  std::vector<std::pair<const Trk::Surface *, double> > surfaces;
+  const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+    vol.boundarySurfaces();
+  std::vector<std::pair<const Trk::Surface*, double>> surfaces;
   surfaces.reserve(bounds.size());
   for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-    const Trk::Surface *nextSurface = &((bounds[ib].get())->surfaceRepresentation());
+    const Trk::Surface* nextSurface = &((bounds[ib].get())->surfaceRepresentation());
     if (nextSurface) {
       Trk::DistanceSolution distSol = nextSurface->straightLineDistanceEstimate(
         parm.position(), propDir * parm.momentum().normalized());
@@ -2011,15 +2054,14 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
         dist = distSol.toPointOfClosestApproach();
       }
       if (!surfaces.empty() && distSol.numberOfSolutions() >= 0 && dist < surfaces.back().second) {
-         std::vector<std::pair<const Trk::Surface *, double> >::iterator
-            sIter = surfaces.begin();
+        std::vector<std::pair<const Trk::Surface*, double>>::iterator sIter = surfaces.begin();
         while (sIter != surfaces.end()) {
           if (dist < (*sIter).second) {
             break;
           }
           sIter++;
         }
-        sIter = surfaces.insert(sIter, (std::pair<const Trk::Surface *, double>(nextSurface, dist)));
+        sIter = surfaces.insert(sIter, (std::pair<const Trk::Surface*, double>(nextSurface, dist)));
       } else {
         surfaces.emplace_back(nextSurface, dist);
       }
@@ -2027,22 +2069,17 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
   }
 
   // solution along path
-  for ( std::pair<const Trk::Surface *, double> & a_surface : surfaces) {
+  for (std::pair<const Trk::Surface*, double>& a_surface : surfaces) {
     if (a_surface.second > 0) {
       Cache cache{};
-      //Material effect updator cache
+      // Material effect updator cache
       populateMatEffUpdatorCache(cache);
-      returnParms = extrapolateImpl(ctx,
-                                    cache,
-                                    prop,
-                                    cache.manage(parm).index(),
-                                    *(a_surface.first),
-                                    propDir,
-                                    true,
-                                    particle)
-                      .release();
+      returnParms =
+        extrapolateImpl(
+          ctx, cache, prop, cache.manage(parm).index(), *(a_surface.first), propDir, true, particle)
+          .release();
       if (returnParms == &parm) {
-         throw std::logic_error("Did not create new track parameters.");
+        throw std::logic_error("Did not create new track parameters.");
       }
       if (returnParms) {
         break;
@@ -2051,13 +2088,13 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
   }
 
   if (!returnParms && dir == anyDirection) {
-    for (std::vector<std::pair<const Trk::Surface *, double> >::reverse_iterator
-            rsIter = surfaces.rbegin();
+    for (std::vector<std::pair<const Trk::Surface*, double>>::reverse_iterator rsIter =
+           surfaces.rbegin();
          rsIter != surfaces.rend();
          rsIter++) {
       if ((*rsIter).second < 0) {
         Cache cache{};
-        //Material effect updator cache
+        // Material effect updator cache
         populateMatEffUpdatorCache(cache);
         returnParms = extrapolateImpl(ctx,
                                       cache,
@@ -2069,7 +2106,7 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
                                       particle)
                         .release();
         if (returnParms == &parm) {
-           throw std::logic_error("Did not create new track parameters.");
+          throw std::logic_error("Did not create new track parameters.");
         }
 
         if (returnParms) {
@@ -2078,23 +2115,25 @@ Trk::Extrapolator::extrapolateToVolumeImpl(const EventContext& ctx,
       }
     }
   }
-  // cache.m_methodSequence=0; // originially m_methodSequence was reset here but cache not available here
+  // cache.m_methodSequence=0; // originially m_methodSequence was reset here but cache not
+  // available here
   return returnParms;
 }
 
 // Configured AlgTool extrapolation methods
-// ---------------------------------------------------------------------------------------/
-const Trk::TrackParameters *
+// ----------------------------------------------------------------/
+const Trk::TrackParameters*
 Trk::Extrapolator::extrapolate(const EventContext& ctx,
-                               const TrackParameters &parm,
-                               const Surface &sf,
+                               const TrackParameters& parm,
+                               const Surface& sf,
                                PropDirection dir,
-                               const BoundaryCheck&  bcheck,
+                               const BoundaryCheck& bcheck,
                                ParticleHypothesis particle,
                                MaterialUpdateMode matupmode,
-                               Trk::ExtrapolationCache *extrapolationCache) const {
+                               Trk::ExtrapolationCache* extrapolationCache) const
+{
   Cache cache{};
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   return extrapolateImpl(ctx,
                          cache,
@@ -2109,20 +2148,20 @@ Trk::Extrapolator::extrapolate(const EventContext& ctx,
 }
 
 Trk::TrackParametersUVector
-Trk::Extrapolator::extrapolateStepwise(
-  const EventContext& ctx,    
-  const Trk::TrackParameters &parm,
-  const Trk::Surface &sf,
-  Trk::PropDirection dir,
-  const Trk::BoundaryCheck&  bcheck,
-  Trk::ParticleHypothesis particle) const {
+Trk::Extrapolator::extrapolateStepwise(const EventContext& ctx,
+                                       const Trk::TrackParameters& parm,
+                                       const Trk::Surface& sf,
+                                       Trk::PropDirection dir,
+                                       const Trk::BoundaryCheck& bcheck,
+                                       Trk::ParticleHypothesis particle) const
+{
 
   if (m_configurationLevel < 10) {
     // set propagator to the sticky one, will be adopted if m_stickyConfiguration == false
-    const IPropagator *currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
     if (currentPropagator) {
-      return extrapolateStepwiseImpl(
-        ctx, (*currentPropagator), parm, sf, dir, bcheck, particle);
+      return extrapolateStepwiseImpl(ctx, (*currentPropagator), parm, sf, dir, bcheck, particle);
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
@@ -2130,29 +2169,31 @@ Trk::Extrapolator::extrapolateStepwise(
 }
 
 const Trk::TrackParameters*
-Trk::Extrapolator::extrapolate(
-  const EventContext& ctx,    
-  const Trk::Track& trk,
-  const Trk::Surface& sf,
-  Trk::PropDirection dir,
-  const Trk::BoundaryCheck& bcheck,
-  Trk::ParticleHypothesis particle,
-  MaterialUpdateMode matupmode,
-  Trk::ExtrapolationCache* extrapolationCache) const
+Trk::Extrapolator::extrapolate(const EventContext& ctx,
+                               const Trk::Track& trk,
+                               const Trk::Surface& sf,
+                               Trk::PropDirection dir,
+                               const Trk::BoundaryCheck& bcheck,
+                               Trk::ParticleHypothesis particle,
+                               MaterialUpdateMode matupmode,
+                               Trk::ExtrapolationCache* extrapolationCache) const
 {
-  const IPropagator *searchProp = nullptr;
+  const IPropagator* searchProp = nullptr;
   // use global propagator for the search
   if (m_searchLevel < 2 && not m_subPropagators.empty()) {
     searchProp = m_subPropagators[Trk::Global];
   }
 
-  const Trk::TrackParameters *closestTrackParameters = m_navigator->closestParameters(trk, sf, searchProp);
+  const Trk::TrackParameters* closestTrackParameters =
+    m_navigator->closestParameters(trk, sf, searchProp);
   if (closestTrackParameters) {
-    return(extrapolate(ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
+    return (extrapolate(
+      ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
   } else {
     closestTrackParameters = *(trk.trackParameters()->begin());
     if (closestTrackParameters) {
-      return(extrapolate(ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
+      return (extrapolate(
+        ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
     }
   }
 
@@ -2160,21 +2201,21 @@ Trk::Extrapolator::extrapolate(
 }
 
 Trk::TrackParametersUVector
-Trk::Extrapolator::extrapolateBlindly(
-    const EventContext& ctx,    
-    const Trk::TrackParameters& parm,
-    Trk::PropDirection dir,
-    const Trk::BoundaryCheck& bcheck,
-    Trk::ParticleHypothesis particle,
-    const Trk::Volume* boundaryVol) const
+Trk::Extrapolator::extrapolateBlindly(const EventContext& ctx,
+                                      const Trk::TrackParameters& parm,
+                                      Trk::PropDirection dir,
+                                      const Trk::BoundaryCheck& bcheck,
+                                      Trk::ParticleHypothesis particle,
+                                      const Trk::Volume* boundaryVol) const
 {
   if (m_configurationLevel < 10) {
     // set propagator to the global one
-    const IPropagator* currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
-  
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
+
     if (currentPropagator) {
       Cache cache{};
-      //Material effect updator cache
+      // Material effect updator cache
       populateMatEffUpdatorCache(cache);
       return extrapolateBlindlyImpl(ctx,
                                     cache,
@@ -2190,105 +2231,102 @@ Trk::Extrapolator::extrapolateBlindly(
   return TrackParametersUVector();
 }
 
-Trk::TrackParameters *
-Trk::Extrapolator::extrapolateDirectly(
-    const EventContext& ctx,
-    const Trk::TrackParameters &parm,
-    const Trk::Surface &sf,
-    Trk::PropDirection dir,
-    const Trk::BoundaryCheck&  bcheck,
-    Trk::ParticleHypothesis particle) const {
-   
+Trk::TrackParameters*
+Trk::Extrapolator::extrapolateDirectly(const EventContext& ctx,
+                                       const Trk::TrackParameters& parm,
+                                       const Trk::Surface& sf,
+                                       Trk::PropDirection dir,
+                                       const Trk::BoundaryCheck& bcheck,
+                                       Trk::ParticleHypothesis particle) const
+{
+
   if (m_configurationLevel < 10) {
-    // set propagator to the global one - can be reset inside the next methode (once volume information is there)
-    const IPropagator *currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
+    // set propagator to the global one - can be reset inside the next methode (once volume
+    // information is there)
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
     if (currentPropagator) {
-      return (extrapolateDirectlyImpl(
-        ctx, (*currentPropagator), parm, sf, dir, bcheck, particle));
+      return (extrapolateDirectlyImpl(ctx, (*currentPropagator), parm, sf, dir, bcheck, particle));
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
   return nullptr;
 }
 
-Trk::TrackParameters *
-Trk::Extrapolator::extrapolateDirectly(
-    const EventContext& ctx,
-    const IPropagator& prop,
-    const Trk::TrackParameters &parm,
-    const Trk::Surface &sf,
-    Trk::PropDirection dir,
-    const Trk::BoundaryCheck&  bcheck,
-    Trk::ParticleHypothesis particle) const {
-  
+Trk::TrackParameters*
+Trk::Extrapolator::extrapolateDirectly(const EventContext& ctx,
+                                       const IPropagator& prop,
+                                       const Trk::TrackParameters& parm,
+                                       const Trk::Surface& sf,
+                                       Trk::PropDirection dir,
+                                       const Trk::BoundaryCheck& bcheck,
+                                       Trk::ParticleHypothesis particle) const
+{
+
   return extrapolateDirectlyImpl(ctx, prop, parm, sf, dir, bcheck, particle);
 }
 
 std::pair<const Trk::TrackParameters*, const Trk::Layer*>
-Trk::Extrapolator::extrapolateToNextActiveLayer(
-    const EventContext& ctx,
-    const TrackParameters& parm,
-    PropDirection dir,
-    const BoundaryCheck& bcheck,
-    ParticleHypothesis particle,
-    MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateToNextActiveLayer(const EventContext& ctx,
+                                                const TrackParameters& parm,
+                                                PropDirection dir,
+                                                const BoundaryCheck& bcheck,
+                                                ParticleHypothesis particle,
+                                                MaterialUpdateMode matupmode) const
 {
   if (m_configurationLevel < 10) {
-    // set propagator to the MS one - can be reset inside the next methode (once volume information is there)
-    const IPropagator *currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::MS] : nullptr;
+    // set propagator to the MS one - can be reset inside the next methode (once volume information
+    // is there)
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::MS] : nullptr;
     if (currentPropagator) {
       return (extrapolateToNextActiveLayerImpl(
         ctx, (*currentPropagator), parm, dir, bcheck, particle, matupmode));
     }
   }
   ATH_MSG_ERROR("[!] No default Propagator is configured ! Please check jobOptions.");
-  return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(0, 0);
+  return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(0, 0);
 }
 
 std::pair<const Trk::TrackParameters*, const Trk::Layer*>
 Trk::Extrapolator::extrapolateToNextActiveLayerM(
-    const EventContext& ctx,
-    const TrackParameters& parm,
-    PropDirection dir,
-    const BoundaryCheck& bcheck,
-    std::vector<const Trk::TrackStateOnSurface*>& material,
-    ParticleHypothesis particle,
-    MaterialUpdateMode matupmode) const
+  const EventContext& ctx,
+  const TrackParameters& parm,
+  PropDirection dir,
+  const BoundaryCheck& bcheck,
+  std::vector<const Trk::TrackStateOnSurface*>& material,
+  ParticleHypothesis particle,
+  MaterialUpdateMode matupmode) const
 {
   if (m_configurationLevel < 10) {
-    // set propagator to the MS one - can be reset inside the next methode (once volume information is there)
-    // set propagator to the MS one - can be reset inside the next methode (once volume information is there)
-    const IPropagator *currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::MS] : nullptr;
+    // set propagator to the MS one - can be reset inside the next methode (once volume information
+    // is there) set propagator to the MS one - can be reset inside the next methode (once volume
+    // information is there)
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::MS] : nullptr;
     if (currentPropagator) {
-      return (extrapolateToNextActiveLayerMImpl(ctx,
-                                                (*currentPropagator),
-                                                parm,
-                                                dir,
-                                                bcheck,
-                                                material,
-                                                particle,
-                                                matupmode));
+      return (extrapolateToNextActiveLayerMImpl(
+        ctx, (*currentPropagator), parm, dir, bcheck, material, particle, matupmode));
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
-  return std::pair<const Trk::TrackParameters *, const Trk::Layer *>(0, 0);
+  return std::pair<const Trk::TrackParameters*, const Trk::Layer*>(0, 0);
 }
 
-const Trk::TrackParameters *
-Trk::Extrapolator::extrapolateToVolume(
-    const EventContext& ctx,
-    const Trk::TrackParameters &parm,
-    const Trk::TrackingVolume &vol,
-    PropDirection dir,
-    ParticleHypothesis particle) const {
-  
+const Trk::TrackParameters*
+Trk::Extrapolator::extrapolateToVolume(const EventContext& ctx,
+                                       const Trk::TrackParameters& parm,
+                                       const Trk::TrackingVolume& vol,
+                                       PropDirection dir,
+                                       ParticleHypothesis particle) const
+{
+
   if (m_configurationLevel < 10) {
     // take the volume signatrue to define the right propagator
     const IPropagator* currentPropagator =
       !m_subPropagators.empty() ? m_subPropagators[vol.geometrySignature()] : nullptr;
     if (currentPropagator) {
-      return (extrapolateToVolumeImpl(
-        ctx, *currentPropagator, parm, vol, dir, particle));
+      return (extrapolateToVolumeImpl(ctx, *currentPropagator, parm, vol, dir, particle));
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
@@ -2296,46 +2334,43 @@ Trk::Extrapolator::extrapolateToVolume(
 }
 
 std::vector<const Trk::TrackStateOnSurface*>*
-Trk::Extrapolator::extrapolateM(
-    const EventContext& ctx,
-    const TrackParameters& parm,
-    const Surface& sf,
-    PropDirection dir,
-    const BoundaryCheck& bcheck,
-    ParticleHypothesis particle,
-    Trk::ExtrapolationCache* extrapolationCache) const
+Trk::Extrapolator::extrapolateM(const EventContext& ctx,
+                                const TrackParameters& parm,
+                                const Surface& sf,
+                                PropDirection dir,
+                                const BoundaryCheck& bcheck,
+                                ParticleHypothesis particle,
+                                Trk::ExtrapolationCache* extrapolationCache) const
 {
 
   Cache cache{};
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   ATH_MSG_DEBUG("C-[" << cache.m_methodSequence << "] extrapolateM()");
   // create a new vector for the material to be collected
-  cache.m_matstates = new std::vector<const Trk::TrackStateOnSurface *>;
+  cache.m_matstates = new std::vector<const Trk::TrackStateOnSurface*>;
   if (m_dumpCache && extrapolationCache) {
-    ATH_MSG_DEBUG(" extrapolateM pointer extrapolationCache "
-                  << extrapolationCache << " x0tot "
-                  << extrapolationCache->x0tot());
+    ATH_MSG_DEBUG(" extrapolateM pointer extrapolationCache " << extrapolationCache << " x0tot "
+                                                              << extrapolationCache->x0tot());
   }
 
   // collect the material
-  ManagedTrackParmPtr parameterAtDestination(
-    extrapolateImpl(ctx,
-                    cache,
-                    cache.manage(parm).index(),
-                    sf,
-                    dir,
-                    bcheck,
-                    particle,
-                    Trk::addNoise,
-                    extrapolationCache));
+  ManagedTrackParmPtr parameterAtDestination(extrapolateImpl(ctx,
+                                                             cache,
+                                                             cache.manage(parm).index(),
+                                                             sf,
+                                                             dir,
+                                                             bcheck,
+                                                             particle,
+                                                             Trk::addNoise,
+                                                             extrapolationCache));
   // there are no parameters
   if (!parameterAtDestination && m_requireMaterialDestinationHit) {
-    ATH_MSG_VERBOSE(
-      "  [!] Destination surface for extrapolateM has not been hit (required through configuration). Return 0");
+    ATH_MSG_VERBOSE("  [!] Destination surface for extrapolateM has not been hit (required through "
+                    "configuration). Return 0");
     // loop over and clean up
-    std::vector<const Trk::TrackStateOnSurface *>::iterator tsosIter = cache.m_matstates->begin();
-    std::vector<const Trk::TrackStateOnSurface *>::iterator tsosIterEnd = cache.m_matstates->end();
+    std::vector<const Trk::TrackStateOnSurface*>::iterator tsosIter = cache.m_matstates->begin();
+    std::vector<const Trk::TrackStateOnSurface*>::iterator tsosIterEnd = cache.m_matstates->end();
     for (; tsosIter != tsosIterEnd; ++tsosIter) {
       delete (*tsosIter);
     }
@@ -2346,35 +2381,38 @@ Trk::Extrapolator::extrapolateM(
   }
   if (parameterAtDestination) {
     ATH_MSG_VERBOSE("  [+] Adding the destination surface to the TSOS vector in extrapolateM() ");
-    cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, parameterAtDestination.release(), nullptr, nullptr));
+    cache.m_matstates->push_back(
+      new TrackStateOnSurface(nullptr, parameterAtDestination.release(), nullptr, nullptr));
   } else {
-    ATH_MSG_VERBOSE("  [-] Destination surface was not hit extrapolateM(), but not required through configuration.");
+    ATH_MSG_VERBOSE("  [-] Destination surface was not hit extrapolateM(), but not required "
+                    "through configuration.");
   }
   // assign the temporary states
-  std::vector<const Trk::TrackStateOnSurface *> *tmpMatStates = cache.m_matstates;
+  std::vector<const Trk::TrackStateOnSurface*>* tmpMatStates = cache.m_matstates;
   cache.m_matstates = nullptr;
   // retunr the material states
   return tmpMatStates;
 }
 
-std::vector<const Trk::TrackParameters *> *
-Trk::Extrapolator::extrapolateM(
-    const EventContext& /*ctx*/,
-    const TrackParameters &,
-    const Surface &,
-    PropDirection,
-    const BoundaryCheck& ,
-    std::vector<MaterialEffectsOnTrack> &,
-    std::vector<Trk::TransportJacobian *> &,
-    ParticleHypothesis,
-    Trk::ExtrapolationCache *) const {
+std::vector<const Trk::TrackParameters*>*
+Trk::Extrapolator::extrapolateM(const EventContext& /*ctx*/,
+                                const TrackParameters&,
+                                const Surface&,
+                                PropDirection,
+                                const BoundaryCheck&,
+                                std::vector<MaterialEffectsOnTrack>&,
+                                std::vector<Trk::TransportJacobian*>&,
+                                ParticleHypothesis,
+                                Trk::ExtrapolationCache*) const
+{
   ATH_MSG_DEBUG("C-[?] extrapolateM(..) with jacobian collection - Not implemented yet.");
   return nullptr;
 }
 
 // the validation action -> propagated to the SubTools
 void
-Trk::Extrapolator::validationAction() const {
+Trk::Extrapolator::validationAction() const
+{
   // record the updator validation information
   for (unsigned int imueot = 0; imueot < m_subupdaters.size(); ++imueot) {
     m_subupdaters[imueot]->validationAction();
@@ -2385,7 +2423,7 @@ Trk::Extrapolator::validationAction() const {
 
 /* Private methods
  *
- * Most accept a Cache struct  as an argument. 
+ * Most accept a Cache struct  as an argument.
  * This is passed to them from the public/interface methods.
  * Then it is also propagated in-between the private methods.
  *
@@ -2393,16 +2431,15 @@ Trk::Extrapolator::validationAction() const {
  */
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateImpl(
-    const EventContext& ctx,
-    Cache& cache,
-    const IPropagator& prop,
-    TrackParmPtr parm_ref,
-    const Trk::Surface& sf,
-    Trk::PropDirection dir,
-    const Trk::BoundaryCheck& bcheck,
-    Trk::ParticleHypothesis particle,
-    MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateImpl(const EventContext& ctx,
+                                   Cache& cache,
+                                   const IPropagator& prop,
+                                   TrackParmPtr parm_ref,
+                                   const Trk::Surface& sf,
+                                   Trk::PropDirection dir,
+                                   const Trk::BoundaryCheck& bcheck,
+                                   Trk::ParticleHypothesis particle,
+                                   MaterialUpdateMode matupmode) const
 {
   // set the model action of the material effects updaters
   for (unsigned int imueot = 0; imueot < m_subupdaters.size(); ++imueot) {
@@ -2415,30 +2452,31 @@ Trk::Extrapolator::extrapolateImpl(
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   // skip rest of navigation if particle hypothesis is nonInteracting
   if (particle == Trk::nonInteracting || int(dir) > 5) {
-     if (cache.m_methodSequence) {
-       ++cache.m_methodSequence; // extrapolateDirectly does not have the cache and cannot increment m_methodSequence
-                                 // therefore do it here
-     }
-     return ManagedTrackParmPtr::recapture(
-       parm,
-       extrapolateDirectlyImpl(ctx, prop, *parm, sf, dir, bcheck, particle));
+    if (cache.m_methodSequence) {
+      ++cache.m_methodSequence; // extrapolateDirectly does not have the cache and cannot increment
+                                // m_methodSequence therefore do it here
+    }
+    return ManagedTrackParmPtr::recapture(
+      parm, extrapolateDirectlyImpl(ctx, prop, *parm, sf, dir, bcheck, particle));
   }
 
   // statistics && sequence output ----------------------------------------
   ++m_extrapolateCalls;
   ++cache.m_methodSequence;
-  // prepare the values for the startup and call the initialization ------------------------------------------
-  const Trk::TrackingVolume *startVolume = nullptr;
-  const Trk::TrackingVolume *destVolume = nullptr;
-  const Trk::Layer *nextLayer = nullptr;
-  const Trk::TrackingVolume *nextVolume = nullptr;
-  const Trk::TrackingVolume *lastVolume = nullptr;
+  // prepare the values for the startup and call the initialization
+  // ------------------------------------------
+  const Trk::TrackingVolume* startVolume = nullptr;
+  const Trk::TrackingVolume* destVolume = nullptr;
+  const Trk::Layer* nextLayer = nullptr;
+  const Trk::TrackingVolume* nextVolume = nullptr;
+  const Trk::TrackingVolume* lastVolume = nullptr;
   ManagedTrackParmPtr refParameters(cache.trackParmContainer());
   ManagedTrackParmPtr lastParameters(cache.trackParmContainer());
   ManagedTrackParmPtr navParameters(cache.trackParmContainer());
   ManagedTrackParmPtr nextParameters(parm);
 
-  // initialize Navigation (calls as well initialize on garbe collection) -------------------------------------
+  // initialize Navigation (calls as well initialize on garbe collection)
+  // -------------------------------------
   Trk::PropDirection navDir = initializeNavigation(ctx,
                                                    cache,
                                                    prop,
@@ -2450,21 +2488,22 @@ Trk::Extrapolator::extrapolateImpl(
                                                    nextLayer,
                                                    nextVolume,
                                                    destVolume);
-  // ---------------------------------------------------
+  // ----------------------------
   // if anyDirection has been chosen as a start directive:
   //   -> overwrite the dir with the navigation direction
   dir = (dir == Trk::anyDirection) ? navDir : dir;
   // check for consistency
   if (dir == Trk::anyDirection || navDir != dir) {
     // navigation could not be resolved
-    ATH_MSG_VERBOSE("  [!] Navigation direction could not be resolved, switching to extrapolateDirectly()");
+    ATH_MSG_VERBOSE(
+      "  [!] Navigation direction could not be resolved, switching to extrapolateDirectly()");
     // the extrapolate directly call
-    ++cache.m_methodSequence; // extrapolateDirectly does not have the cache and cannot increment m_methodSequence
+    ++cache.m_methodSequence; // extrapolateDirectly does not have the cache and cannot increment
+                              // m_methodSequence
     return ManagedTrackParmPtr::recapture(
-      parm,
-      extrapolateDirectlyImpl(ctx, prop, *parm, sf, navDir, bcheck, particle));
+      parm, extrapolateDirectlyImpl(ctx, prop, *parm, sf, navDir, bcheck, particle));
   }
-  // -----------------------------------------------------
+  // ------------------------------
   startVolume = nextVolume;
   // fallback setup  -------------------------------------
   bool fallback = false;
@@ -2473,7 +2512,8 @@ Trk::Extrapolator::extrapolateImpl(
   double previousDistance = 0.;
   // reference parameters and distance solution: use consistently one of each
   if (refParameters) {
-    ATH_MSG_VERBOSE("  [+] Reference Parameters       -   at " << positionOutput(refParameters->position()));
+    ATH_MSG_VERBOSE("  [+] Reference Parameters       -   at "
+                    << positionOutput(refParameters->position()));
     currentDistance = (refParameters->position() - parm->position()).mag();
   } else {
     // using fast but accureate sl distance from surface
@@ -2487,28 +2527,30 @@ Trk::Extrapolator::extrapolateImpl(
     // VERBOSE output
   }
   ATH_MSG_VERBOSE("  [+] Initial 3D-distance to destination - d3 = " << currentDistance);
-  // and for oscillation protection ---------------------------------------------------------------------------
-  const Trk::TrackingVolume *previousVolume = nullptr;
-  // ----------------------------------------------------------------------------------------------------------
+  // and for oscillation protection ----------------------------------------------------
+  const Trk::TrackingVolume* previousVolume = nullptr;
+  // -----------------------------------------------------------------------------------
   std::string startVolumeName = (nextVolume) ? nextVolume->volumeName() : "Unknown (ERROR)";
-  std::string destVolumeName = destVolume ? destVolume->volumeName() : "Unknown (blind extrapolation)";
+  std::string destVolumeName =
+    destVolume ? destVolume->volumeName() : "Unknown (blind extrapolation)";
 
-  ATH_MSG_VERBOSE("  [" << cache.m_methodSequence << "] extrapolate() "
-                        << startVolumeName << " ->  " << destVolumeName);
+  ATH_MSG_VERBOSE("  [" << cache.m_methodSequence << "] extrapolate() " << startVolumeName
+                        << " ->  " << destVolumeName);
   ATH_MSG_VERBOSE("  [+] Starting position determined - at " << positionOutput(parm->position()));
   if (nextLayer) {
-    ATH_MSG_VERBOSE("  [+] Starting layer determined  - with "<< layerRZoutput(*nextLayer));
+    ATH_MSG_VERBOSE("  [+] Starting layer determined  - with " << layerRZoutput(*nextLayer));
   }
 
-  // ----------------------------------------------------------------------------------------------------------
-  const IPropagator *currentPropagator = nullptr;
-  // ----------------- extrapolation from One Volume to the next Volume  --------------------------------------
-  // the loop continues while:
+  // -----------------------------------------------------------------------------------
+  const IPropagator* currentPropagator = nullptr;
+  // ----------------- extrapolation from One Volume to the next Volume
+  // -------------------------------------- the loop continues while:
   //       - nextVolume extists
   //       - nextVolume is different from lastVolume (prevent infinite loops)
   //       - nextVolume is different from destinationVolume (change to extrapolateInsideVolume)
   //       - nextParameters exist
-  //       - lastVolume is different from previousVolume (prevent oscillation loop, one-time-punch-through allowed)
+  //       - lastVolume is different from previousVolume (prevent oscillation loop,
+  //       one-time-punch-through allowed)
   //       - the reinforced navigation can find destination parameters
   //       - the maximum method sequence is not met
 
@@ -2517,15 +2559,12 @@ Trk::Extrapolator::extrapolateImpl(
   // one-time-punch-through allows for volume2 - volume1 - volume2 (cosmics)
   bool punchThroughDone = false;
 
-  auto navigationBreakOscillation=m_navigationBreakOscillation.buffer();
-  auto navigationBreakNoVolume= m_navigationBreakNoVolume.buffer();
-  auto navigationBreakDistIncrease=m_navigationBreakDistIncrease.buffer();
-  auto navigationBreakVolumeSignature=m_navigationBreakVolumeSignature.buffer();
+  auto navigationBreakOscillation = m_navigationBreakOscillation.buffer();
+  auto navigationBreakNoVolume = m_navigationBreakNoVolume.buffer();
+  auto navigationBreakDistIncrease = m_navigationBreakDistIncrease.buffer();
+  auto navigationBreakVolumeSignature = m_navigationBreakVolumeSignature.buffer();
 
-  while (nextVolume &&
-         nextVolume != destVolume &&
-         nextVolume != lastVolume &&
-         nextParameters &&
+  while (nextVolume && nextVolume != destVolume && nextVolume != lastVolume && nextParameters &&
          cache.m_methodSequence < m_maxMethodSequence) {
     // chose the propagtor type
     currentPropagator = subPropagator(*nextVolume);
@@ -2533,7 +2572,8 @@ Trk::Extrapolator::extrapolateImpl(
       // [0] Navigation break : configuration problem or consistency problem of TrackingGeometry
       // output
       ATH_MSG_DEBUG("  [X] Navigation break [X]");
-      ATH_MSG_DEBUG("          - Reason      : No Propagator found for Volume '" << nextVolume->volumeName() << "'");
+      ATH_MSG_DEBUG("          - Reason      : No Propagator found for Volume '"
+                    << nextVolume->volumeName() << "'");
       // debug statistics
       ++m_navigationBreakVolumeSignature;
       // trigger the fallback solution
@@ -2542,7 +2582,7 @@ Trk::Extrapolator::extrapolateImpl(
     }
 
     // check for the distance to destination
-    // ------------------------------------------------------------------------------------
+    // -------------------------------------------------------------
     if (updateLastValid) {
       cache.m_lastValidParameters = nextParameters;
     }
@@ -2568,11 +2608,12 @@ Trk::Extrapolator::extrapolateImpl(
     ManagedTrackParmPtr lastParameters(nextParameters);
 
     // MS specific code ------------------
-    // extrapolation within detached volumes - returns parameters on destination surfaces, or boundary solution
-    // handles also dense volume description in Calo and beam pipe
-    if ( nextVolume->geometrySignature()>1 ) {
+    // extrapolation within detached volumes - returns parameters on destination surfaces, or
+    // boundary solution handles also dense volume description in Calo and beam pipe
+    if (nextVolume->geometrySignature() > 1) {
       if (cache.m_parametersAtBoundary.navParameters &&
-          cache.m_parametersAtBoundary.navParameters.get() != cache.m_parametersAtBoundary.nextParameters.get()) {
+          cache.m_parametersAtBoundary.navParameters.get() !=
+            cache.m_parametersAtBoundary.nextParameters.get()) {
         // extrapolate to volume boundary to avoid navigation break
         ManagedTrackParmPtr nextPar(ManagedTrackParmPtr::recapture(
           cache.m_parametersAtBoundary.nextParameters,
@@ -2596,22 +2637,22 @@ Trk::Extrapolator::extrapolateImpl(
       ManagedTrackParmPtr resultParameters(cache.trackParmContainer());
       if (nextParameters) {
         if (!m_stepPropagator) {
-          ATH_MSG_ERROR("extrapolation in Calo/MS called without configured STEP propagator, aborting"); 
+          ATH_MSG_ERROR(
+            "extrapolation in Calo/MS called without configured STEP propagator, aborting");
           return ManagedTrackParmPtr();
         }
-        resultParameters =
-          extrapolateWithinDetachedVolumes(ctx,
-                                           cache,
-                                           *m_stepPropagator,
-                                           nextParameters.index(),
-                                           sf,
-                                           *nextVolume,
-                                           dir,
-                                           bcheck,
-                                           particle,
-                                           matupmode);
+        resultParameters = extrapolateWithinDetachedVolumes(ctx,
+                                                            cache,
+                                                            *m_stepPropagator,
+                                                            nextParameters.index(),
+                                                            sf,
+                                                            *nextVolume,
+                                                            dir,
+                                                            bcheck,
+                                                            particle,
+                                                            matupmode);
       }
-      if (resultParameters){
+      if (resultParameters) {
         // destination reached : indicated through result parameters
         // set the model action of the material effects updaters
         for (unsigned int imueot = 0; imueot < m_subupdaters.size(); ++imueot) {
@@ -2621,14 +2662,16 @@ Trk::Extrapolator::extrapolateImpl(
         ATH_MSG_DEBUG("  [+] Destination surface successfully hit.");
         // return the result (succesful)
         return resultParameters;
-      } else if (!cache.m_parametersAtBoundary.nextParameters || !cache.m_parametersAtBoundary.nextVolume) {
+      } else if (!cache.m_parametersAtBoundary.nextParameters ||
+                 !cache.m_parametersAtBoundary.nextVolume) {
         ATH_MSG_DEBUG("  [-] Destination surface could not be hit.");
         return resultParameters;
       }
     } else {
-      // ------------------------------------------------------------------------------------------------
+      // -------------------------------------------------------------------------
       // standard loop over volumes (but last one)
-      // extrapolate to volume boundary - void method as 'cache.m_parametersAtBoundary' hold the information
+      // extrapolate to volume boundary - void method as 'cache.m_parametersAtBoundary' hold the
+      // information
       extrapolateToVolumeBoundary(ctx,
                                   cache,
                                   *currentPropagator,
@@ -2644,27 +2687,29 @@ Trk::Extrapolator::extrapolateImpl(
     nextVolume = cache.m_parametersAtBoundary.nextVolume;
     nextParameters = cache.m_parametersAtBoundary.nextParameters;
     navParameters = cache.m_parametersAtBoundary.navParameters;
-    // new distance estimation ( after step to next volume ) ------------------------------------------------
+    // new distance estimation ( after step to next volume ) -------------------------
     previousDistance = currentDistance;
     // make it either from the navParmaters (if the exist) or the nextParameters
     {
-       const Trk::TrackParameters *distParameters = cache.m_parametersAtBoundary.navParameters ?
-          cache.m_parametersAtBoundary.navParameters.get() : nextParameters.get();
-
-       if (distParameters) {
-          // use consistently either the:
-          // (A) reference parameters or the
-          if (refParameters) {
-             currentDistance = (refParameters->position() - distParameters->position()).mag();
-          } else {
-             // (B) distance solution to surface
-             Trk::DistanceSolution newDistSol = sf.straightLineDistanceEstimate(distParameters->position(),
-                                                                                dir *
-                                                                                distParameters->momentum().normalized());
-             currentDistance = newDistSol.numberOfSolutions() > 0 ? newDistSol.absClosest() : fabs(
-                                                                                                   newDistSol.toPointOfClosestApproach());
-          }
-       }
+      const Trk::TrackParameters* distParameters =
+        cache.m_parametersAtBoundary.navParameters
+          ? cache.m_parametersAtBoundary.navParameters.get()
+          : nextParameters.get();
+
+      if (distParameters) {
+        // use consistently either the:
+        // (A) reference parameters or the
+        if (refParameters) {
+          currentDistance = (refParameters->position() - distParameters->position()).mag();
+        } else {
+          // (B) distance solution to surface
+          Trk::DistanceSolution newDistSol = sf.straightLineDistanceEstimate(
+            distParameters->position(), dir * distParameters->momentum().normalized());
+          currentDistance = newDistSol.numberOfSolutions() > 0
+                              ? newDistSol.absClosest()
+                              : fabs(newDistSol.toPointOfClosestApproach());
+        }
+      }
     }
     ATH_MSG_VERBOSE("  [+] New 3D-distance to destination     - d3 = "
                     << currentDistance << " (from "
@@ -2673,17 +2718,21 @@ Trk::Extrapolator::extrapolateImpl(
                           : "last parameters within volume ")
                     << ")");
 
-    // -------------------------------------------------------------------------------------------------------
+    // --------------------------------------------------------------------------------
     // (1) NAVIGATION BREAK : next Volume is identical to last volume -- LOOP
     if (nextVolume == lastVolume && nextVolume) {
-      // ST false when crossing beam pipe : additional check on step distance    
-      if (nextParameters && lastParameters && 
-          (nextParameters->position()-lastParameters->position()).dot(lastParameters->momentum().normalized())*dir > 0.001 ) { 
+      // ST false when crossing beam pipe : additional check on step distance
+      if (nextParameters && lastParameters &&
+          (nextParameters->position() - lastParameters->position())
+                .dot(lastParameters->momentum().normalized()) *
+              dir >
+            0.001) {
       } else {
         // output
-        ATH_MSG_DEBUG( "  [X] Navigation break [X]"  );
+        ATH_MSG_DEBUG("  [X] Navigation break [X]");
         if (nextParameters && lastParameters) {
-          ATH_MSG_DEBUG("last step:" << (nextParameters->position() - lastParameters->position()).mag());
+          ATH_MSG_DEBUG(
+            "last step:" << (nextParameters->position() - lastParameters->position()).mag());
         }
         ATH_MSG_DEBUG("- Reason      : Loop detected in TrackingVolume '"
                       << nextVolume->volumeName() << "'");
@@ -2717,7 +2766,8 @@ Trk::Extrapolator::extrapolateImpl(
     }
     // ------------------- the output interpretationn of the extrapolateToVolumeBoundary
     // (3) NAVIGATION BREAK : no nextVolume found - but not in extrapolateBlindly() mode
-    else if (!nextVolume && !cache.m_parametersOnDetElements && lastVolume && !m_stopWithUpdateZero) {
+    else if (!nextVolume && !cache.m_parametersOnDetElements && lastVolume &&
+             !m_stopWithUpdateZero) {
       // output
       ATH_MSG_VERBOSE("  [X] Navigation break [X]");
       ATH_MSG_VERBOSE("- Reason      : No next volume found of TrackingVolume '"
@@ -2732,17 +2782,13 @@ Trk::Extrapolator::extrapolateImpl(
     }
     // ------------------- the output interpretationn of the extrapolateToVolumeBoundary
     // (4) NAVIGATION BREAK : // nextParameters found but distance to surface increases
-    else if (nextParameters
-             && !cache.m_parametersOnDetElements
-             && navParameters
-             && nextVolume
-             && currentDistance > s_distIncreaseTolerance + previousDistance) {
+    else if (nextParameters && !cache.m_parametersOnDetElements && navParameters && nextVolume &&
+             currentDistance > s_distIncreaseTolerance + previousDistance) {
       // output
       ATH_MSG_DEBUG("  [X] Navigation break [X]");
-      ATH_MSG_DEBUG("          - Reason      : Distance increase [ " << previousDistance << " to "
-                    << currentDistance
-                    << "] in TrackingVolume '" << nextVolume->volumeName() <<
-                    "'");
+      ATH_MSG_DEBUG("          - Reason      : Distance increase [ "
+                    << previousDistance << " to " << currentDistance << "] in TrackingVolume '"
+                    << nextVolume->volumeName() << "'");
       // statistics
       ++navigationBreakDistIncrease;
       // record the "dist increase" volume -- increase the counter for the volume
@@ -2759,10 +2805,10 @@ Trk::Extrapolator::extrapolateImpl(
     }
     // ------------------- the output interpretationn of the extrapolateToVolumeBoundary
     // (+) end of extrapolate blindly(volume*)
-    else if (cache.m_boundaryVolume
-             && navParameters
-             && !(cache.m_boundaryVolume->inside(navParameters->position()))) {
-      ATH_MSG_DEBUG("  [+] Navigation stop : next navigation step would lead outside given boundary volume");
+    else if (cache.m_boundaryVolume && navParameters &&
+             !(cache.m_boundaryVolume->inside(navParameters->position()))) {
+      ATH_MSG_DEBUG(
+        "  [+] Navigation stop : next navigation step would lead outside given boundary volume");
       return ManagedTrackParmPtr();
     }
     // ------------------- the output interpretationn of the extrapolateToVolumeBoundary
@@ -2770,25 +2816,24 @@ Trk::Extrapolator::extrapolateImpl(
     else if (nextVolume) {
       ATH_MSG_DEBUG("  [+] next Tracking Volume = " << nextVolume->volumeName());
     }
-    // set validity of last parameters to cache -----------------------------------------------------------------
-    updateLastValid = !(nextParameters
-        && !cache.m_parametersOnDetElements
-        && navParameters
-        && nextVolume
-        && currentDistance > previousDistance);
+    // set validity of last parameters to cache ------------------------------------------
+    updateLastValid = !(nextParameters && !cache.m_parametersOnDetElements && navParameters &&
+                        nextVolume && currentDistance > previousDistance);
     // reset
     if (!nextParameters) {
-       nextParameters = std::move(lastParameters);
+      nextParameters = std::move(lastParameters);
     }
     // one volume step invalidates the nextLayer information
     nextLayer = nullptr;
   }
 
-  // ------------------- fallback was triggered in volume to volume loop --------------------------------------
+  // ------------------- fallback was triggered in volume to volume loop
+  // --------------------------------------
   if (fallback) {
     // continue with the output
-    ATH_MSG_DEBUG("          - Consequence : "
-                  << (m_stopWithNavigationBreak ? "return 0 (configured) " : "switch to extrapolateDirectly() "));
+    ATH_MSG_DEBUG("          - Consequence : " << (m_stopWithNavigationBreak
+                                                     ? "return 0 (configured) "
+                                                     : "switch to extrapolateDirectly() "));
     // stop with navigaiton break or zero update
     if (m_stopWithNavigationBreak || m_stopWithUpdateZero) {
       return ManagedTrackParmPtr();
@@ -2800,43 +2845,37 @@ Trk::Extrapolator::extrapolateImpl(
       return ManagedTrackParmPtr();
     }
     // create the result now
-    ManagedTrackParmPtr resultParameters(ManagedTrackParmPtr::recapture(
-      cache.m_lastValidParameters,
-      currentPropagator->propagate(ctx,
-                                   *cache.m_lastValidParameters,
-                                   sf,
-                                   Trk::anyDirection,
-                                   bcheck,
-                                   m_fieldProperties,
-                                   particle,
-                                   false,
-                                   lastVolume)));
+    ManagedTrackParmPtr resultParameters(
+      ManagedTrackParmPtr::recapture(cache.m_lastValidParameters,
+                                     currentPropagator->propagate(ctx,
+                                                                  *cache.m_lastValidParameters,
+                                                                  sf,
+                                                                  Trk::anyDirection,
+                                                                  bcheck,
+                                                                  m_fieldProperties,
+                                                                  particle,
+                                                                  false,
+                                                                  lastVolume)));
     // desperate try
     if (!resultParameters) {
       resultParameters = ManagedTrackParmPtr::recapture(
         parm,
-        currentPropagator->propagate(ctx,
-                                     *parm,
-                                     sf,
-                                     dir,
-                                     bcheck,
-                                     m_fieldProperties,
-                                     particle,
-                                     false,
-                                     startVolume));
+        currentPropagator->propagate(
+          ctx, *parm, sf, dir, bcheck, m_fieldProperties, particle, false, startVolume));
     }
     return resultParameters;
   }
 
-  // ----------------- this is the exit of the extrapolateBlindly() call --------------------------------------
+  // ----------------- this is the exit of the extrapolateBlindly() call
+  // --------------------------------------
   if ((&sf) == (m_referenceSurface)) {
-     return ManagedTrackParmPtr();
+    return ManagedTrackParmPtr();
   }
 
-  // ---------------- extrapolation inside the Volume ----------------------------------------------------------
+  // ---------------- extrapolation inside the Volume -----------------------------------
   //  ManagedTrackParmPtr finalNextParameters(cache.trackParmContainer(),nextParameters);
-  ManagedTrackParmPtr finalNextParameters=nextParameters;
-  ATH_MSG_DEBUG("create finalNextParameters "<<*finalNextParameters.get());
+  ManagedTrackParmPtr finalNextParameters = nextParameters;
+  ATH_MSG_DEBUG("create finalNextParameters " << *finalNextParameters.get());
   ManagedTrackParmPtr resultParameters(cache.trackParmContainer());
   if (nextVolume) {
     // chose the propagator fromt he geometry signature
@@ -2856,88 +2895,88 @@ Trk::Extrapolator::extrapolateImpl(
                                                  matupmode);
     }
   }
-  // ------------------------------------------------------------------------------------------------------------
+  // -------------------------------------------------------------------------------------
   // the final - desperate backup --- just try to hit the surface
   if (!resultParameters && !m_stopWithNavigationBreak && !m_stopWithUpdateZero) {
-    if(finalNextParameters) ATH_MSG_DEBUG("propagate using parameters "<<*finalNextParameters.get());
-    else{
+    if (finalNextParameters)
+      ATH_MSG_DEBUG("propagate using parameters " << *finalNextParameters.get());
+    else {
       ATH_MSG_DEBUG("no finalNextParameters, bailing out of extrapolateDirectly");
       return ManagedTrackParmPtr();
     }
     ATH_MSG_DEBUG("  [-] Fallback to extrapolateDirectly triggered ! ");
-    resultParameters =
-      ManagedTrackParmPtr::recapture(finalNextParameters,
-                                     prop.propagate(ctx,
-                                                    *finalNextParameters,
-                                                    sf,
-                                                    dir,
-                                                    bcheck,
-                                                    // *startVolume,
-                                                    m_fieldProperties,
-                                                    particle,
-                                                    false,
-                                                    startVolume));
+    resultParameters = ManagedTrackParmPtr::recapture(finalNextParameters,
+                                                      prop.propagate(ctx,
+                                                                     *finalNextParameters,
+                                                                     sf,
+                                                                     dir,
+                                                                     bcheck,
+                                                                     // *startVolume,
+                                                                     m_fieldProperties,
+                                                                     particle,
+                                                                     false,
+                                                                     startVolume));
   }
   // return whatever you have
   return resultParameters;
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateImpl(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm,
-  const std::vector<MaterialEffectsOnTrack>& sfMeff,
-  const TrackingVolume& tvol,
-  PropDirection dir,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateImpl(const EventContext& ctx,
+                                   Cache& cache,
+                                   const IPropagator& prop,
+                                   TrackParmPtr parm,
+                                   const std::vector<MaterialEffectsOnTrack>& sfMeff,
+                                   const TrackingVolume& tvol,
+                                   PropDirection dir,
+                                   ParticleHypothesis particle,
+                                   MaterialUpdateMode matupmode) const
 {
   // statistics && sequence output ----------------------------------------
   if (cache.m_methodSequence) {
-     ++cache.m_methodSequence;
+    ++cache.m_methodSequence;
   }
-  ATH_MSG_DEBUG(
-    "D-[" << cache.m_methodSequence << "] extrapolate with given MaterialEffectsOnTrack in Volume '" << tvol.volumeName() <<
-    "'.");
+  ATH_MSG_DEBUG("D-[" << cache.m_methodSequence
+                      << "] extrapolate with given MaterialEffectsOnTrack in Volume '"
+                      << tvol.volumeName() << "'.");
 
   ManagedTrackParmPtr currPar(cache.manage(parm));
 
   // loop over the provided material effects on track
-  for (const MaterialEffectsOnTrack &a_sfMeff : sfMeff ) {
+  for (const MaterialEffectsOnTrack& a_sfMeff : sfMeff) {
     // first propagate to the given surface
-    // nextParameters = prop.propagate(*nextParameters, sfMeffI->associatedSurface(),dir,true,tvol, particle);
-    ManagedTrackParmPtr nextPar(ManagedTrackParmPtr::recapture(
-      currPar,
-      prop.propagate(ctx,
-                     *currPar,
-                     a_sfMeff.associatedSurface(),
-                     dir,
-                     true,
-                     m_fieldProperties,
-                     particle,
-                     false,
-                     &tvol)));
+    // nextParameters = prop.propagate(*nextParameters, sfMeffI->associatedSurface(),dir,true,tvol,
+    // particle);
+    ManagedTrackParmPtr nextPar(
+      ManagedTrackParmPtr::recapture(currPar,
+                                     prop.propagate(ctx,
+                                                    *currPar,
+                                                    a_sfMeff.associatedSurface(),
+                                                    dir,
+                                                    true,
+                                                    m_fieldProperties,
+                                                    particle,
+                                                    false,
+                                                    &tvol)));
     // user might have not calculated well which surfaces are intersected ... break if break
     if (!nextPar) {
-      return (currPar.index() != parm) ? currPar : ManagedTrackParmPtr(); // only return track parameters if at
-                                                                                        // least one iteration was successful
+      return (currPar.index() != parm)
+               ? currPar
+               : ManagedTrackParmPtr(); // only return track parameters if at
+                                        // least one iteration was successful
     }
     currPar = std::move(nextPar);
     // then update
-    
-    const IMaterialEffectsUpdator* currentUpdator =
-      subMaterialEffectsUpdator(tvol);
+
+    const IMaterialEffectsUpdator* currentUpdator = subMaterialEffectsUpdator(tvol);
     IMaterialEffectsUpdator::ICache& currentUpdatorCache =
       subMaterialEffectsUpdatorCache(cache, tvol);
-    
+
     ManagedTrackParmPtr upNext;
     if (currentUpdator) {
       upNext = ManagedTrackParmPtr::recapture(
         currPar,
-        currentUpdator->update(
-          currentUpdatorCache, currPar.get(), a_sfMeff, particle, matupmode));
+        currentUpdator->update(currentUpdatorCache, currPar.get(), a_sfMeff, particle, matupmode));
     }
     if (!upNext) {
       // update killed the track or config problem. Return
@@ -2950,41 +2989,35 @@ Trk::Extrapolator::extrapolateImpl(
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateImpl(
-  const EventContext& ctx,
-  Cache& cache,
-  TrackParmPtr parm,
-  const Surface& sf,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode,
-  Trk::ExtrapolationCache* extrapolationCache) const
+Trk::Extrapolator::extrapolateImpl(const EventContext& ctx,
+                                   Cache& cache,
+                                   TrackParmPtr parm,
+                                   const Surface& sf,
+                                   PropDirection dir,
+                                   const BoundaryCheck& bcheck,
+                                   ParticleHypothesis particle,
+                                   MaterialUpdateMode matupmode,
+                                   Trk::ExtrapolationCache* extrapolationCache) const
 {
   cache.m_extrapolationCache = extrapolationCache;
   cache.m_cacheEloss = extrapolationCache ? extrapolationCache->eloss() : nullptr;
 
   if (extrapolationCache && m_dumpCache) {
-    ATH_MSG_DEBUG("  In extrapolate cache pointer input: " << extrapolationCache << " cache.m_extrapolationCache " <<
-      cache.m_extrapolationCache);
+    ATH_MSG_DEBUG("  In extrapolate cache pointer input: " << extrapolationCache
+                                                           << " cache.m_extrapolationCache "
+                                                           << cache.m_extrapolationCache);
     if (cache.m_extrapolationCache) {
-      dumpCache(cache," In extrapolate ");
+      dumpCache(cache, " In extrapolate ");
     }
   }
 
   if (m_configurationLevel < 10) {
     // chose the propagator fromt he geometry signature -- start with default
-    const IPropagator *currentPropagator = !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
+    const IPropagator* currentPropagator =
+      !m_subPropagators.empty() ? m_subPropagators[Trk::Global] : nullptr;
     if (currentPropagator) {
-      return extrapolateImpl(ctx,
-                             cache,
-                             (*currentPropagator),
-                             parm,
-                             sf,
-                             dir,
-                             bcheck,
-                             particle,
-                             matupmode);
+      return extrapolateImpl(
+        ctx, cache, (*currentPropagator), parm, sf, dir, bcheck, particle, matupmode);
     }
   }
   ATH_MSG_ERROR("  [!] No default Propagator is configured ! Please check jobOptions.");
@@ -3010,23 +3043,23 @@ Trk::Extrapolator::extrapolateBlindlyImpl(const EventContext& ctx,
   // initialize the return parameters vector
   // create a new internal helper vector
   Trk::TrackParametersVector tmp;
-  cache.m_parametersOnDetElements    = &tmp;
+  cache.m_parametersOnDetElements = &tmp;
   cache.m_ownParametersOnDetElements = true;
   // run the extrapolation
   {
-    ManagedTrackParmPtr parameterOnSf(extrapolateImpl(
-      ctx, cache, prop, parm, *m_referenceSurface, dir, bcheck, particle));
+    ManagedTrackParmPtr parameterOnSf(
+      extrapolateImpl(ctx, cache, prop, parm, *m_referenceSurface, dir, bcheck, particle));
   }
   // assign the return parameter and set cache.m_parametersOnDetElements = 0;
-  cache.m_parametersOnDetElements    = nullptr;
+  cache.m_parametersOnDetElements = nullptr;
   cache.m_ownParametersOnDetElements = false;
   // reset the boundary Volume
   cache.m_boundaryVolume = nullptr;
   // return what you have
-  return Trk::TrackParametersUVector (tmp.begin(), tmp.end());
+  return Trk::TrackParametersUVector(tmp.begin(), tmp.end());
 }
 
-// ----------------------- The private Volume extrapolation methods -------------------------------------------------
+// ----------------------- The private Volume extrapolation methods --------------------------
 Trk::ManagedTrackParmPtr
 Trk::Extrapolator::extrapolateInsideVolume(const EventContext& ctx,
                                            Cache& cache,
@@ -3046,31 +3079,21 @@ Trk::Extrapolator::extrapolateInsideVolume(const EventContext& ctx,
       ctx, cache, prop, parm, sf, tvol, dir, bcheck, particle, matupmode);
   }
   // ---> A) static layers exist
-  return insideVolumeStaticLayers(ctx,
-                                  cache,
-                                  false,
-                                  prop,
-                                  parm,
-                                  assLayer,
-                                  tvol,
-                                  dir,
-                                  bcheck,
-                                  particle,
-                                  matupmode);
+  return insideVolumeStaticLayers(
+    ctx, cache, false, prop, parm, assLayer, tvol, dir, bcheck, particle, matupmode);
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateWithinDetachedVolumes(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm,
-  const Surface& sf,
-  const TrackingVolume& tvol,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
+                                                    Cache& cache,
+                                                    const IPropagator& prop,
+                                                    TrackParmPtr parm,
+                                                    const Surface& sf,
+                                                    const TrackingVolume& tvol,
+                                                    PropDirection dir,
+                                                    const BoundaryCheck& bcheck,
+                                                    ParticleHypothesis particle,
+                                                    MaterialUpdateMode matupmode) const
 {
   // method sequence output ---------------------------------
   ++cache.m_methodSequence;
@@ -3082,12 +3105,13 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
 
   // initialization
   ManagedTrackParmPtr nextParameters(cache.manage(parm));
-  const Trk::TrackingVolume *currVol = &tvol;
+  const Trk::TrackingVolume* currVol = &tvol;
   // ============================================================
 
   // arbitrary surface or destination layer ?
   // bool loopOverLayers = false;
-  const Trk::Layer *destinationLayer = m_navigator->trackingGeometry()->associatedLayer(sf.center());
+  const Trk::Layer* destinationLayer =
+    m_navigator->trackingGeometry()->associatedLayer(sf.center());
   // if ( destinationLayer ) loopOverLayers = true;
 
   // initial distance to surface
@@ -3103,34 +3127,23 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
   if (destinationLayer && destinationLayer->isOnLayer(nextParameters->position())) {
     ATH_MSG_DEBUG("  [-] Already at destination layer, distance:" << dist);
     // if ( dist >= 0 ) return prop.propagate(*nextParameters,sf, dir,bcheck,*currVol,particle);
-    // const Trk::TrackParameters* fwd = prop.propagate(*nextParameters,sf, dir,bcheck,*currVol,particle);
-    ManagedTrackParmPtr fwd(
-      ManagedTrackParmPtr::recapture(nextParameters,
-                                     prop.propagate(ctx,
-                                                    *nextParameters,
-                                                    sf,
-                                                    dir,
-                                                    bcheck,
-                                                    m_fieldProperties,
-                                                    particle,
-                                                    false,
-                                                    currVol)));
+    // const Trk::TrackParameters* fwd = prop.propagate(*nextParameters,sf,
+    // dir,bcheck,*currVol,particle);
+    ManagedTrackParmPtr fwd(ManagedTrackParmPtr::recapture(
+      nextParameters,
+      prop.propagate(
+        ctx, *nextParameters, sf, dir, bcheck, m_fieldProperties, particle, false, currVol)));
 
     if (fwd) {
       return fwd;
     } else {
-      Trk::PropDirection oppDir = (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
+      Trk::PropDirection oppDir =
+        (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
       // return prop.propagate(*nextParameters,sf,oppDir,bcheck,*currVol,particle);
-      return ManagedTrackParmPtr::recapture(nextParameters,
-                                            prop.propagate(ctx,
-                                                           *nextParameters,
-                                                           sf,
-                                                           oppDir,
-                                                           bcheck,
-                                                           m_fieldProperties,
-                                                           particle,
-                                                           false,
-                                                           currVol));
+      return ManagedTrackParmPtr::recapture(
+        nextParameters,
+        prop.propagate(
+          ctx, *nextParameters, sf, oppDir, bcheck, m_fieldProperties, particle, false, currVol));
     }
   }
 
@@ -3139,32 +3152,22 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
 
     // if (dist >= 0.) return prop.propagate(*nextParameters,sf,dir,bcheck,*currVol,particle);
     if (dist >= 0.) {
-      return ManagedTrackParmPtr::recapture(nextParameters,
-                                            prop.propagate(ctx,
-                                                           *nextParameters,
-                                                           sf,
-                                                           dir,
-                                                           bcheck,
-                                                           m_fieldProperties,
-                                                           particle,
-                                                           false,
-                                                           currVol));
+      return ManagedTrackParmPtr::recapture(
+        nextParameters,
+        prop.propagate(
+          ctx, *nextParameters, sf, dir, bcheck, m_fieldProperties, particle, false, currVol));
     } else {
-      Trk::PropDirection oppDir = (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
+      Trk::PropDirection oppDir =
+        (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
       // return prop.propagate(*nextParameters,sf,oppDir,bcheck,*currVol,particle);
-      return ManagedTrackParmPtr::recapture(nextParameters,
-                                            prop.propagate(ctx,
-                                                           *nextParameters,
-                                                           sf,
-                                                           oppDir,
-                                                           bcheck,
-                                                           m_fieldProperties,
-                                                           particle,
-                                                           false,
-                                                           currVol));
+      return ManagedTrackParmPtr::recapture(
+        nextParameters,
+        prop.propagate(
+          ctx, *nextParameters, sf, oppDir, bcheck, m_fieldProperties, particle, false, currVol));
     }
   } else if (dist < 0.) {
-    ATH_MSG_DEBUG("  [!] Initial 3D-distance to the surface negative (" << dist << ") -> skip extrapolation.");
+    ATH_MSG_DEBUG("  [!] Initial 3D-distance to the surface negative ("
+                  << dist << ") -> skip extrapolation.");
     cache.m_parametersAtBoundary.resetBoundaryInformation();
     return ManagedTrackParmPtr();
   }
@@ -3180,42 +3183,28 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
   ManagedTrackParmPtr last_boundary_parameters; // used only to check whether parametersAtBoundary
 
   while (nextParameters) {
-    const Trk::BoundaryCheck&  bchk = false;
-    ManagedTrackParmPtr onNextLayer(
-      extrapolateToNextMaterialLayer(ctx,
-                                     cache,
-                                     prop,
-                                     nextParameters.index(),
-                                     &sf,
-                                     currVol,
-                                     dir,
-                                     bchk,
-                                     particle,
-                                     matupmode));
-    if (onNextLayer) {      // solution with the destination surface ?
+    const Trk::BoundaryCheck& bchk = false;
+    ManagedTrackParmPtr onNextLayer(extrapolateToNextMaterialLayer(
+      ctx, cache, prop, nextParameters.index(), &sf, currVol, dir, bchk, particle, matupmode));
+    if (onNextLayer) { // solution with the destination surface ?
       // isOnSurface dummy for Perigee, use straightline distance estimate instead
       // if ( sf.isOnSurface(onNextLayer->position(),bchk,m_tolerance,m_tolerance) ) {
       Trk::DistanceSolution distSol = sf.straightLineDistanceEstimate(
         onNextLayer->position(), dir * onNextLayer->momentum().normalized());
-      double currentDistance = (distSol.numberOfSolutions() > 0) ?  distSol.absClosest() : fabs(
-        distSol.toPointOfClosestApproach());
-      if (currentDistance <= m_tolerance && sf.isOnSurface(onNextLayer->position(), bchk, m_tolerance, m_tolerance)) {
-         cache.m_parametersAtBoundary.resetBoundaryInformation();
+      double currentDistance = (distSol.numberOfSolutions() > 0)
+                                 ? distSol.absClosest()
+                                 : fabs(distSol.toPointOfClosestApproach());
+      if (currentDistance <= m_tolerance &&
+          sf.isOnSurface(onNextLayer->position(), bchk, m_tolerance, m_tolerance)) {
+        cache.m_parametersAtBoundary.resetBoundaryInformation();
         if (!bcheck || sf.isOnSurface(onNextLayer->position(), bcheck, m_tolerance, m_tolerance)) {
           if (sf.type() != onNextLayer->associatedSurface().type()) {
-            ATH_MSG_DEBUG(
-              "mismatch in destination surface type:" << sf.type() << "," << onNextLayer->associatedSurface().type()
-                                                      << ":distance to the destination surface:" <<
-              currentDistance);
-            ManagedTrackParmPtr cParms(
-              ManagedTrackParmPtr::recapture(onNextLayer,
-                                             prop.propagate(ctx,
-                                                            *onNextLayer,
-                                                            sf,
-                                                            dir,
-                                                            bchk,
-                                                            m_fieldProperties,
-                                                            particle)));
+            ATH_MSG_DEBUG("mismatch in destination surface type:"
+                          << sf.type() << "," << onNextLayer->associatedSurface().type()
+                          << ":distance to the destination surface:" << currentDistance);
+            ManagedTrackParmPtr cParms(ManagedTrackParmPtr::recapture(
+              onNextLayer,
+              prop.propagate(ctx, *onNextLayer, sf, dir, bchk, m_fieldProperties, particle)));
             return cParms;
           }
           return onNextLayer;
@@ -3223,8 +3212,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
           return ManagedTrackParmPtr();
         }
       }
-    }
-    else {
+    } else {
       // world boundary ?
       if (cache.m_parametersAtBoundary.nextParameters && !cache.m_parametersAtBoundary.nextVolume) {
         nextParameters = std::move(onNextLayer);
@@ -3237,8 +3225,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
       // static volume boundary:  check distance to destination
       Trk::DistanceSolution distSol = sf.straightLineDistanceEstimate(
         cache.m_parametersAtBoundary.nextParameters->position(),
-        dir *
-        cache.m_parametersAtBoundary.nextParameters->momentum().normalized());
+        dir * cache.m_parametersAtBoundary.nextParameters->momentum().normalized());
       if (distSol.numberOfSolutions() > 0) {
         dist = distSol.first();
       } else {
@@ -3247,70 +3234,66 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(
       if (dist < 0.) {
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         return ManagedTrackParmPtr();
-      }
-      else if (cache.m_parametersAtBoundary.nextVolume && (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::MS ||
-                                                (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo &&
-                                                 m_useDenseVolumeDescription))) {
+      } else if (cache.m_parametersAtBoundary.nextVolume &&
+                 (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::MS ||
+                  (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo &&
+                   m_useDenseVolumeDescription))) {
         // @TODO compare and store position rather than comparing pointers
         if (cache.m_parametersAtBoundary.nextParameters) {
-          if (last_boundary_parameters && last_boundary_parameters.get() == cache.m_parametersAtBoundary.nextParameters.get()) {
-            ATH_MSG_WARNING( "  [!] Already tried parameters at boundary -> exit: pos="
-			    << positionOutput(cache.m_parametersAtBoundary.nextParameters->position())
-			    << " momentum=" << momentumOutput(cache.m_parametersAtBoundary.nextParameters->momentum()));
-	    cache.m_parametersAtBoundary.resetBoundaryInformation();
+          if (last_boundary_parameters &&
+              last_boundary_parameters.get() == cache.m_parametersAtBoundary.nextParameters.get()) {
+            ATH_MSG_WARNING(
+              "  [!] Already tried parameters at boundary -> exit: pos="
+              << positionOutput(cache.m_parametersAtBoundary.nextParameters->position())
+              << " momentum="
+              << momentumOutput(cache.m_parametersAtBoundary.nextParameters->momentum()));
+            cache.m_parametersAtBoundary.resetBoundaryInformation();
             return ManagedTrackParmPtr();
           }
           onNextLayer = cache.m_parametersAtBoundary.nextParameters;
-          last_boundary_parameters=cache.m_parametersAtBoundary.nextParameters;
-          ATH_MSG_DEBUG( "  [+] Try parameters at boundary: pos="
-			<< positionOutput(cache.m_parametersAtBoundary.nextParameters->position())
-			<< " momentum=" << momentumOutput(cache.m_parametersAtBoundary.nextParameters->momentum()));
+          last_boundary_parameters = cache.m_parametersAtBoundary.nextParameters;
+          ATH_MSG_DEBUG("  [+] Try parameters at boundary: pos="
+                        << positionOutput(cache.m_parametersAtBoundary.nextParameters->position())
+                        << " momentum="
+                        << momentumOutput(cache.m_parametersAtBoundary.nextParameters->momentum()));
         }
         currVol = cache.m_parametersAtBoundary.nextVolume;
       }
     }
     nextParameters = std::move(onNextLayer);
-  }  // end loop over material layers
+  } // end loop over material layers
 
   // boundary reached , return to the main loop
-  ATH_MSG_DEBUG("  [+] extrapolateWithinDetachedVolumes(...) reached static boundary, return to the main loop.");
+  ATH_MSG_DEBUG("  [+] extrapolateWithinDetachedVolumes(...) reached static boundary, return to "
+                "the main loop.");
   return nextParameters;
 }
 
 void
-Trk::Extrapolator::extrapolateToVolumeBoundary(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm,
-  const Layer* assLayer,
-  const TrackingVolume& tvol,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateToVolumeBoundary(const EventContext& ctx,
+                                               Cache& cache,
+                                               const IPropagator& prop,
+                                               TrackParmPtr parm,
+                                               const Layer* assLayer,
+                                               const TrackingVolume& tvol,
+                                               PropDirection dir,
+                                               const BoundaryCheck& bcheck,
+                                               ParticleHypothesis particle,
+                                               MaterialUpdateMode matupmode) const
 {
   // ---> C) detached volumes exist
   if (tvol.confinedDetachedVolumes()) {
-    ATH_MSG_WARNING("  [!] toVolumeBoundaryDetachedVolumes(...) with confined detached volumes? This should not happen ! volume name and signature: "
-                    <<tvol.volumeName()  <<":"<<tvol.geometrySignature() ); 
+    ATH_MSG_WARNING(
+      "  [!] toVolumeBoundaryDetachedVolumes(...) with confined detached volumes? This should "
+      "not happen ! volume name and signature: "
+      << tvol.volumeName() << ":" << tvol.geometrySignature());
   }
   // ---> A) static layers exist
-  ManagedTrackParmPtr inside_volume_static_layer(
-    insideVolumeStaticLayers(ctx,
-                             cache,
-                             true,
-                             prop,
-                             parm,
-                             assLayer,
-                             tvol,
-                             dir,
-                             bcheck,
-                             particle,
-                             matupmode));
-  if ( inside_volume_static_layer && cache.m_parametersAtBoundary.navParameters) {
-    ATH_MSG_VERBOSE("  [+] Boundary intersection      -   at " <<
-      positionOutput(cache.m_parametersAtBoundary.navParameters->position()));
+  ManagedTrackParmPtr inside_volume_static_layer(insideVolumeStaticLayers(
+    ctx, cache, true, prop, parm, assLayer, tvol, dir, bcheck, particle, matupmode));
+  if (inside_volume_static_layer && cache.m_parametersAtBoundary.navParameters) {
+    ATH_MSG_VERBOSE("  [+] Boundary intersection      -   at "
+                    << positionOutput(cache.m_parametersAtBoundary.navParameters->position()));
   }
 }
 
@@ -3330,14 +3313,16 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
   // method sequence output ---------------------------------
   ++cache.m_methodSequence;
   // the next volume as given from the navigator
-  const Trk::TrackingVolume *nextVolume = nullptr;
+  const Trk::TrackingVolume* nextVolume = nullptr;
   // initialization
   // nextParameters : parameters to be used for the extrapolation stream
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   ManagedTrackParmPtr nextParameters(parm);
-  // navParameters : parameters to be used for the navigation stream (if possible, start from boundary parameters)
-  ManagedTrackParmPtr navParameters( cache.m_parametersAtBoundary.navParameters ?
-                                     cache.m_parametersAtBoundary.navParameters : nextParameters);
+  // navParameters : parameters to be used for the navigation stream (if possible, start from
+  // boundary parameters)
+  ManagedTrackParmPtr navParameters(cache.m_parametersAtBoundary.navParameters
+                                      ? cache.m_parametersAtBoundary.navParameters
+                                      : nextParameters);
 
   // adjust the radial scaling for the layer search, this is for inwards vs. outwards moving
   double rPos = parm->position().perp();
@@ -3345,62 +3330,60 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
   // numerical stability
   rComponent = rComponent < 10e-5 ? 10e-5 : rComponent;
   // a special case for closed cylinders, check if rScalor is not below numerical tolerance
-  double rScalor =
-    (toBoundary && tvol.boundarySurfaces().size() == 3) ? 2. * rPos / rComponent : 0.5 * rPos / rComponent;
+  double rScalor = (toBoundary && tvol.boundarySurfaces().size() == 3) ? 2. * rPos / rComponent
+                                                                       : 0.5 * rPos / rComponent;
   rScalor = rScalor * rScalor < 10e-10 ? 0.1 : rScalor;
 
   // output and fast exit if the volume does not have confined layers
   if (toBoundary) {
-    ATH_MSG_VERBOSE("S-[" << cache.m_methodSequence << "] insideVolumeStaticLayers(...) to volume boundary of '"
+    ATH_MSG_VERBOSE("S-[" << cache.m_methodSequence
+                          << "] insideVolumeStaticLayers(...) to volume boundary of '"
                           << tvol.volumeName() << "'");
-  } else {  // to destination surface
-    ATH_MSG_VERBOSE("S-[" << cache.m_methodSequence << "] insideVolumeStaticLayers(...) to destination surface in '"
+  } else { // to destination surface
+    ATH_MSG_VERBOSE("S-[" << cache.m_methodSequence
+                          << "] insideVolumeStaticLayers(...) to destination surface in '"
                           << tvol.volumeName() << "'");
     // no layer case - just do the extrapolation to the destination surface
     if (!tvol.confinedLayers()) {
-      ATH_MSG_VERBOSE("  [+] Volume does not contain layers, just propagate to destination surface.");
+      ATH_MSG_VERBOSE(
+        "  [+] Volume does not contain layers, just propagate to destination surface.");
       // the final extrapolation to the destinationLayer
       nextParameters = ManagedTrackParmPtr::recapture(
         parm,
-        prop.propagate(ctx,
-                       *parm,
-                       *cache.m_destinationSurface,
-                       dir,
-                       bcheck,
-                       m_fieldProperties,
-                       particle));
+        prop.propagate(
+          ctx, *parm, *cache.m_destinationSurface, dir, bcheck, m_fieldProperties, particle));
       if (!nextParameters) {
-        nextParameters = ManagedTrackParmPtr::recapture(
-          parm,
-          prop.propagate(ctx,
-                         *parm,
-                         *cache.m_destinationSurface,
-                         Trk::anyDirection,
-                         bcheck,
-                         m_fieldProperties,
-                         particle));
+        nextParameters = ManagedTrackParmPtr::recapture(parm,
+                                                        prop.propagate(ctx,
+                                                                       *parm,
+                                                                       *cache.m_destinationSurface,
+                                                                       Trk::anyDirection,
+                                                                       bcheck,
+                                                                       m_fieldProperties,
+                                                                       particle));
       }
       return nextParameters;
     }
   }
 
   // print out the perpendicular direction best guess parameters
-  ATH_MSG_VERBOSE("  [+] Perpendicular direction of the track   : " << radialDirection(*navParameters, dir));
+  ATH_MSG_VERBOSE(
+    "  [+] Perpendicular direction of the track   : " << radialDirection(*navParameters, dir));
   // check whether to do a postupdate with the assoicated Layer
-  const Trk::Layer *associatedLayer = assLayer;
+  const Trk::Layer* associatedLayer = assLayer;
   // chache the assLayer given, because this may be needed for the destination layer
-  const Trk::Layer *assLayerReference = assLayer;
+  const Trk::Layer* assLayerReference = assLayer;
 
   // the exit face of the last volume
   Trk::BoundarySurfaceFace exitFace = Trk::undefinedFace;
 
   // ============================ RESOLVE DESTINATION / STARTPOINT ============================
   // (1) ASSOCIATION
-  const Trk::Layer *destinationLayer = nullptr;
+  const Trk::Layer* destinationLayer = nullptr;
   // will be only executed if directive is not to go to the boundary
   if (!toBoundary) {
     destinationLayer = cache.m_destinationSurface->associatedLayer();
-    if (!destinationLayer) {   // (2) RECALL (very unlikely) // (3) GLOBAL SEARCH
+    if (!destinationLayer) { // (2) RECALL (very unlikely) // (3) GLOBAL SEARCH
       destinationLayer =
         (cache.m_recallSurface == cache.m_destinationSurface &&
          cache.m_destinationSurface->associatedDetectorElement())
@@ -3408,35 +3391,31 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
           : tvol.associatedLayer(cache.m_destinationSurface->globalReferencePoint());
     }
     if (destinationLayer) {
-      ATH_MSG_VERBOSE("  [+] Destination layer found    - with " << layerRZoutput(*destinationLayer));
+      ATH_MSG_VERBOSE("  [+] Destination layer found    - with "
+                      << layerRZoutput(*destinationLayer));
     }
   } // destination layer only gather if extrapolation does not go to boundary
 
-  // The update on the starting layer if necessary ---------------------------------------------------------
+  // The update on the starting layer if necessary ----------------------------------
   //    - only done in static volume setup
   //    - only done if required
   //    - only done if the parameter is on the layer
   //    - only if no volume skip has been done
   //    - only if associated layer is not destination layer (and both exist)
-  if (!m_skipInitialLayerUpdate
-      && associatedLayer
-      && associatedLayer != destinationLayer
-      && associatedLayer->layerMaterialProperties()
-      && tvol.confinedLayers()) {
-    ATH_MSG_VERBOSE("  [+] In starting volume: check for eventual necessary postUpdate and overlapSearch.");
+  if (!m_skipInitialLayerUpdate && associatedLayer && associatedLayer != destinationLayer &&
+      associatedLayer->layerMaterialProperties() && tvol.confinedLayers()) {
+    ATH_MSG_VERBOSE(
+      "  [+] In starting volume: check for eventual necessary postUpdate and overlapSearch.");
 
     // check if the parameter is on the layer
-    const Trk::Layer *parsLayer = 
-      nextParameters->associatedSurface().associatedLayer();
-    if ((parsLayer && parsLayer == associatedLayer)
-        || associatedLayer->surfaceRepresentation().isOnSurface(parm->position(),
-                                                                false,
-                                                                0.5 * associatedLayer->thickness(),
-                                                                0.5 * associatedLayer->thickness())) {
+    const Trk::Layer* parsLayer = nextParameters->associatedSurface().associatedLayer();
+    if ((parsLayer && parsLayer == associatedLayer) ||
+        associatedLayer->surfaceRepresentation().isOnSurface(parm->position(),
+                                                             false,
+                                                             0.5 * associatedLayer->thickness(),
+                                                             0.5 * associatedLayer->thickness())) {
       // call the overlap search for the starting layer if asked for
-      if (cache.m_parametersOnDetElements
-          && associatedLayer->surfaceArray()
-          && m_subSurfaceLevel) {
+      if (cache.m_parametersOnDetElements && associatedLayer->surfaceArray() && m_subSurfaceLevel) {
         ATH_MSG_VERBOSE("  [o] Calling overlapSearch() on start layer.");
         overlapSearch(ctx,
                       cache,
@@ -3455,29 +3434,25 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
       ATH_MSG_VERBOSE("  [+] Calling postUpdate on inital track parameters.");
       // do the post-update according to the associated Layer - parameters are
       // either (&parm) or newly created ones chose current updator
-      
-      const IMaterialEffectsUpdator* currentUpdator =
-        subMaterialEffectsUpdator(tvol);
+
+      const IMaterialEffectsUpdator* currentUpdator = subMaterialEffectsUpdator(tvol);
       IMaterialEffectsUpdator::ICache& currentUpdatorCache =
         subMaterialEffectsUpdatorCache(cache, tvol);
-      
+
       if (currentUpdator) {
         nextParameters = ManagedTrackParmPtr::recapture(
           nextParameters,
-          currentUpdator->postUpdate(currentUpdatorCache,
-                                     *nextParameters,
-                                     *associatedLayer,
-                                     dir,
-                                     particle,
-                                     matupmode));
+          currentUpdator->postUpdate(
+            currentUpdatorCache, *nextParameters, *associatedLayer, dir, particle, matupmode));
       }
       // collect the material : either for extrapolateM or for the valdiation
       if (nextParameters && (cache.m_matstates || m_materialEffectsOnTrackValidation)) {
-        addMaterialEffectsOnTrack(ctx, cache,prop, nextParameters.index(), *associatedLayer, tvol, dir, particle);
+        addMaterialEffectsOnTrack(
+          ctx, cache, prop, nextParameters.index(), *associatedLayer, tvol, dir, particle);
       }
       if (nextParameters && nextParameters.get() != parm.get()) {
-      } else if (!m_stopWithUpdateZero) {         // re-assign the start parameters
-         // @TODO condition correct ?
+      } else if (!m_stopWithUpdateZero) { // re-assign the start parameters
+                                          // @TODO condition correct ?
         nextParameters = parm;
       } else {
         ATH_MSG_VERBOSE("  [-] Initial postUpdate killed track.");
@@ -3487,7 +3462,8 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
       }
     }
   } else {
-    assLayer = nullptr; // reset the provided Layer in case no postUpdate happened: search a new one for layer2layer start
+    assLayer = nullptr; // reset the provided Layer in case no postUpdate happened: search a new one
+                        // for layer2layer start
   }
   // ============================ RESOLVE STARTPOINT  =============================
   // only if you do not have an input associated Layer
@@ -3497,65 +3473,63 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
     ATH_MSG_VERBOSE("  [+] Volume switch has happened, searching for entry layers.");
     // reset the exitFace
     exitFace = cache.m_parametersAtBoundary.exitFace;
-    // Step [1] Check for entry layers -------------------------------------------------
+    // Step [1] Check for entry layers --------------------------
     associatedLayer = tvol.associatedLayer(navParameters->position());
     if (associatedLayer && associatedLayer->layerMaterialProperties()) {
-      // -------------------------------------------------------------------------------
-      ATH_MSG_VERBOSE("  [+] Entry layer to volume found  with " << layerRZoutput(*associatedLayer));
-      // try to go to the entry Layer first - do not delete the parameters (garbage collection done by method) - set
-      // entry flag
-      auto [new_track_parm, killed] =
-        extrapolateToIntermediateLayer(ctx,
-                                       cache,
-                                       prop,
-                                       parm.index(),
-                                       *associatedLayer,
-                                       tvol,
-                                       dir,
-                                       bcheck,
-                                       particle,
-                                       matupmode);
-      nextParameters=std::move(new_track_parm);
-      // ------------------------------------------------------------------------------
+      // --------------------------------------------------------
+      ATH_MSG_VERBOSE("  [+] Entry layer to volume found  with "
+                      << layerRZoutput(*associatedLayer));
+      // try to go to the entry Layer first - do not delete the parameters (garbage collection done
+      // by method)
+      // - set entry flag
+      auto [new_track_parm, killed] = extrapolateToIntermediateLayer(
+        ctx, cache, prop, parm.index(), *associatedLayer, tvol, dir, bcheck, particle, matupmode);
+      nextParameters = std::move(new_track_parm);
+      // -------------------------------------------------------
       if (m_stopWithUpdateZero && killed) {
         ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
         // set the new boundary information
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         resetRecallInformation(cache);
         return ManagedTrackParmPtr();
-      } else if (cache.m_boundaryVolume && nextParameters && !cache.m_boundaryVolume->inside(nextParameters->position())) {
+      } else if (cache.m_boundaryVolume && nextParameters &&
+                 !cache.m_boundaryVolume->inside(nextParameters->position())) {
         ATH_MSG_VERBOSE("  [+] Parameter outside the given boundary/world stopping loop.");
         // set the new boundary information
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         resetRecallInformation(cache);
         return ManagedTrackParmPtr();
       }
-      // -------------------------------------------------------------------------------
+      // --------------------------------------------------------
       if (nextParameters) {
-        ATH_MSG_VERBOSE("  [+] Entry layer successfully hit - at " << positionOutput(nextParameters->position()));
+        ATH_MSG_VERBOSE("  [+] Entry layer successfully hit - at "
+                        << positionOutput(nextParameters->position()));
       }
-      // -------------------------------------------------------------------------------
+      // --------------------------------------------------------
       // check whether it worked or not
       if (!nextParameters) {
-         nextParameters = parm;
+        nextParameters = parm;
       }
     }
   }
 
   // Step [2] Associate the starting point to the layer ------------------------------------------
-  // if an action has been taken, the nextParameters are not identical with the provided parameters anymore
+  // if an action has been taken, the nextParameters are not identical with the provided parameters
+  // anymore
   if (nextParameters.get() != parm.get()) {
-     navParameters = nextParameters;
+    navParameters = nextParameters;
   }
   // only associate the layer if the  destination layer is not the assigned reference
   if (destinationLayer != assLayerReference || toBoundary) {
     // get the starting layer for the layer - layer loop
     associatedLayer = assLayer ? assLayer : tvol.associatedLayer(navParameters->position());
-    // ignore closest material layer if it is equal to the initially given layer (has been handled by the post update )
-    associatedLayer = (associatedLayer && associatedLayer == assLayerReference) ?
-                      associatedLayer->nextLayer(navParameters->position(),
-                                                 dir * rScalor *
-                                                 navParameters->momentum().normalized()) : associatedLayer;
+    // ignore closest material layer if it is equal to the initially given layer (has been handled
+    // by the post update )
+    associatedLayer =
+      (associatedLayer && associatedLayer == assLayerReference)
+        ? associatedLayer->nextLayer(navParameters->position(),
+                                     dir * rScalor * navParameters->momentum().normalized())
+        : associatedLayer;
   }
 
   if (associatedLayer) {
@@ -3567,30 +3541,31 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
     // the layer to layer step only makes sense here
     if (associatedLayer && associatedLayer != destinationLayer) {
       // screen output
-      ATH_MSG_VERBOSE("  [+] First layer for layer2layer  with " << layerRZoutput(*associatedLayer));
+      ATH_MSG_VERBOSE("  [+] First layer for layer2layer  with "
+                      << layerRZoutput(*associatedLayer));
 
       // now do the loop from the associatedLayer to one before the destinationLayer
-      ManagedTrackParmPtr updateNext(
-        extrapolateFromLayerToLayer(ctx,
-                                    cache,
-                                    prop,
-                                    nextParameters.index(),
-                                    tvol,
-                                    associatedLayer,
-                                    destinationLayer,
-                                    navParameters.index(),
-                                    dir,
-                                    bcheck,
-                                    particle,
-                                    matupmode));
-      // kill the track when the update ---------------------------------------------
+      ManagedTrackParmPtr updateNext(extrapolateFromLayerToLayer(ctx,
+                                                                 cache,
+                                                                 prop,
+                                                                 nextParameters.index(),
+                                                                 tvol,
+                                                                 associatedLayer,
+                                                                 destinationLayer,
+                                                                 navParameters.index(),
+                                                                 dir,
+                                                                 bcheck,
+                                                                 particle,
+                                                                 matupmode));
+      // kill the track when the update ----------------------
       if (m_stopWithUpdateZero && !updateNext) {
         ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
         // set the new boundary information
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         resetRecallInformation(cache);
         return ManagedTrackParmPtr();
-      } else if (cache.m_boundaryVolume && updateNext && !cache.m_boundaryVolume->inside(updateNext->position())) {
+      } else if (cache.m_boundaryVolume && updateNext &&
+                 !cache.m_boundaryVolume->inside(updateNext->position())) {
         ATH_MSG_VERBOSE("  [+] Parameter outside the given boundary/world stopping loop.");
         // set the new boundary information
         cache.m_parametersAtBoundary.resetBoundaryInformation();
@@ -3599,44 +3574,43 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
       }
       // the fallback if only one step was done - solve cleaner
       if (updateNext) {
-         nextParameters = std::move(updateNext);
+        nextParameters = std::move(updateNext);
       }
     }
     // Case Ia: To Destination after LayerToLayer sequence
     if (!toBoundary) {
       // the final extrapolation to the destinationLayer
-      nextParameters =
-        extrapolateToDestinationLayer(ctx,
-                                      cache,
-                                      prop,
-                                      nextParameters.index(),
-                                      *cache.m_destinationSurface,
-                                      *destinationLayer,
-                                      tvol,
-                                      assLayerReference,
-                                      dir,
-                                      bcheck,
-                                      particle,
-                                      matupmode);
+      nextParameters = extrapolateToDestinationLayer(ctx,
+                                                     cache,
+                                                     prop,
+                                                     nextParameters.index(),
+                                                     *cache.m_destinationSurface,
+                                                     *destinationLayer,
+                                                     tvol,
+                                                     assLayerReference,
+                                                     dir,
+                                                     bcheck,
+                                                     particle,
+                                                     matupmode);
 
       // set the recallInformation <- everything went fine
-      setRecallInformation(cache,*cache.m_destinationSurface, *destinationLayer, tvol);
+      setRecallInformation(cache, *cache.m_destinationSurface, *destinationLayer, tvol);
       // done
       return nextParameters;
     }
-    // ----------------------------------------------------------------------------------------------------------
+    // -----------------------------------------------------------------------------------
     // Case Ib: To Destination directly since no destination layer has been found
   } else if (!toBoundary) {
-    // nextParameters = prop.propagate(*nextParameters,*cache.m_destinationSurface,dir,bcheck,tvol,particle);
-    nextParameters =
-      ManagedTrackParmPtr::recapture(nextParameters,
-                                     prop.propagate(ctx,
-                                                    *nextParameters,
-                                                    *cache.m_destinationSurface,
-                                                    dir,
-                                                    bcheck,
-                                                    m_fieldProperties,
-                                                    particle));
+    // nextParameters =
+    // prop.propagate(*nextParameters,*cache.m_destinationSurface,dir,bcheck,tvol,particle);
+    nextParameters = ManagedTrackParmPtr::recapture(nextParameters,
+                                                    prop.propagate(ctx,
+                                                                   *nextParameters,
+                                                                   *cache.m_destinationSurface,
+                                                                   dir,
+                                                                   bcheck,
+                                                                   m_fieldProperties,
+                                                                   particle));
     // job done: cleanup and go home
     // reset the recallInformation
     resetRecallInformation(cache);
@@ -3646,7 +3620,7 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
 
   // the reset to the initial in case the extrapolationFromLayerToLayer
   if (!nextParameters) {
-     nextParameters = parm;
+    nextParameters = parm;
   }
 
   // start the search with the simplest possible propagator
@@ -3660,8 +3634,7 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
       const IPropagator* navPropagator = &(*m_propagators[navprop]);
 
       // we veto the navigaiton parameters for calo-volumes with calo dynamic
-      bool vetoNavParameters =
-        false; // (tvol.geometrySignature() == Trk::Calo && m_doCaloDynamic);
+      bool vetoNavParameters = false; // (tvol.geometrySignature() == Trk::Calo && m_doCaloDynamic);
       // the next Parameters are usually better, because they're closer to the
       // boundary
       //  --- in the initial volume (assLayerReference!=0), the parm are good if
@@ -3669,10 +3642,9 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
       if (nextParameters.get() != parm.get() || assLayerReference) {
         navParameters = nextParameters;
       } else {
-        navParameters =
-          (cache.m_parametersAtBoundary.navParameters && !vetoNavParameters)
-            ? cache.m_parametersAtBoundary.navParameters
-            : nextParameters;
+        navParameters = (cache.m_parametersAtBoundary.navParameters && !vetoNavParameters)
+                          ? cache.m_parametersAtBoundary.navParameters
+                          : nextParameters;
       }
 
       ATH_MSG_VERBOSE("  [+] Starting next boundary search from "
@@ -3681,13 +3653,13 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
                       << momentumOutput(navParameters->momentum()));
 
       // get the new navigaiton cell from the Navigator
-      Trk::NavigationCell nextNavCell = m_navigator->nextTrackingVolume(
-        ctx, *navPropagator, *navParameters, dir, tvol);
+      Trk::NavigationCell nextNavCell =
+        m_navigator->nextTrackingVolume(ctx, *navPropagator, *navParameters, dir, tvol);
       nextVolume = nextNavCell.nextVolume;
 
-      navParameters = ManagedTrackParmPtr::recapture(
-        navParameters, nextNavCell.parametersOnBoundary);
-      
+      navParameters =
+        ManagedTrackParmPtr::recapture(navParameters, nextNavCell.parametersOnBoundary);
+
       bParameters = navParameters;
       // set the new exit Cell
       exitFace = nextNavCell.exitFace;
@@ -3699,11 +3671,10 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
   } else {
     Trk::NavigationCell nextNavCell =
       m_navigator->nextTrackingVolume(ctx, prop, *navParameters, dir, tvol);
-   
+
     nextVolume = nextNavCell.nextVolume;
-    
-    navParameters = ManagedTrackParmPtr::recapture(
-      navParameters, nextNavCell.parametersOnBoundary);
+
+    navParameters = ManagedTrackParmPtr::recapture(navParameters, nextNavCell.parametersOnBoundary);
     bParameters = navParameters;
     // set the new exit Cell
     exitFace = nextNavCell.exitFace;
@@ -3723,34 +3694,31 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
   if (bParameters && bParameters->associatedSurface().materialLayer()) {
     ATH_MSG_VERBOSE(" [+] parameters on BoundarySurface with material.");
     if (m_includeMaterialEffects) {
-      
-      const IMaterialEffectsUpdator* currentUpdator =
-        m_subupdaters[tvol.geometrySignature()];
+
+      const IMaterialEffectsUpdator* currentUpdator = m_subupdaters[tvol.geometrySignature()];
       IMaterialEffectsUpdator::ICache& currentUpdatorCache =
         subMaterialEffectsUpdatorCache(cache, tvol);
-      
+
       if (currentUpdator) {
         bParameters = ManagedTrackParmPtr::recapture(
           bParameters,
-          currentUpdator->update(
-            currentUpdatorCache,
-            bParameters.get(),
-            *(bParameters->associatedSurface().materialLayer()),
-            dir,
-            particle,
-            matupmode));
+          currentUpdator->update(currentUpdatorCache,
+                                 bParameters.get(),
+                                 *(bParameters->associatedSurface().materialLayer()),
+                                 dir,
+                                 particle,
+                                 matupmode));
       }
       // collect the material
       if (bParameters && (cache.m_matstates || m_materialEffectsOnTrackValidation)) {
-        addMaterialEffectsOnTrack(
-          ctx,
-          cache,
-          prop,
-          bParameters.index(),
-          *(bParameters->associatedSurface().materialLayer()),
-          tvol,
-          dir,
-          particle);
+        addMaterialEffectsOnTrack(ctx,
+                                  cache,
+                                  prop,
+                                  bParameters.index(),
+                                  *(bParameters->associatedSurface().materialLayer()),
+                                  tvol,
+                                  dir,
+                                  particle);
       }
 
       // the bParameters need to be put into the gargabe bin if they differ from the navParmaeters
@@ -3766,35 +3734,35 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
   return navParameters;
 }
 
-// ----------------------- The private Layer extrapolation methods -------------------------------------------------
+// ----------------------- The private Layer extrapolation methods --------------------------
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateFromLayerToLayer(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm,
-  const TrackingVolume& tvol,
-  const Layer* startLayer,
-  const Layer* destinationLayer,
-  TrackParmPtr navParm,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateFromLayerToLayer(const EventContext& ctx,
+                                               Cache& cache,
+                                               const IPropagator& prop,
+                                               TrackParmPtr parm,
+                                               const TrackingVolume& tvol,
+                                               const Layer* startLayer,
+                                               const Layer* destinationLayer,
+                                               TrackParmPtr navParm,
+                                               PropDirection dir,
+                                               const BoundaryCheck& bcheck,
+                                               ParticleHypothesis particle,
+                                               MaterialUpdateMode matupmode) const
 {
   // method sequence output ---------------------------------
   ++cache.m_methodSequence;
-  ATH_MSG_DEBUG("S-[" << cache.m_methodSequence << "] extrapolateFromLayerToLayer(...) in '" << tvol.volumeName() << "'. ");
+  ATH_MSG_DEBUG("S-[" << cache.m_methodSequence << "] extrapolateFromLayerToLayer(...) in '"
+                      << tvol.volumeName() << "'. ");
 
   // initialize the loop
-  const Trk::Layer *nextLayer = startLayer;
+  const Trk::Layer* nextLayer = startLayer;
   // avoiding straight loops and oszillations
-  const Trk::Layer *lastLayer = nullptr;
-  const Trk::Layer *previousLayer = nullptr;
+  const Trk::Layer* lastLayer = nullptr;
+  const Trk::Layer* previousLayer = nullptr;
   // pars & fallback
-  ManagedTrackParmPtr  currPar(cache.manage(parm));
-  ManagedTrackParmPtr  navParameters( cache.manage(navParm) );
+  ManagedTrackParmPtr currPar(cache.manage(parm));
+  ManagedTrackParmPtr navParameters(cache.manage(navParm));
   // avoid initial perpendicular check if:
   // -  navParameters and currPar have different perpendicular direction (resolved in navigaiton)
   bool perpCheck = radialDirection(*currPar, dir) * radialDirection(*navParameters, dir) > 0;
@@ -3804,9 +3772,11 @@ Trk::Extrapolator::extrapolateFromLayerToLayer(
 
   // get the max attempts from the volume : only for Fatras - for reco take the maximum number
   Trk::BoundarySurfaceFace lastExitFace = cache.m_parametersAtBoundary.exitFace;
-  unsigned int layersInVolume = tvol.confinedLayers() ? tvol.confinedLayers()->arrayObjects().size() : 0;
-  unsigned int maxAttempts = (!cache.m_parametersOnDetElements && !m_extendedLayerSearch) ?
-                             tvol.layerAttempts(lastExitFace) : int(layersInVolume * 0.5);
+  unsigned int layersInVolume =
+    tvol.confinedLayers() ? tvol.confinedLayers()->arrayObjects().size() : 0;
+  unsigned int maxAttempts = (!cache.m_parametersOnDetElements && !m_extendedLayerSearch)
+                               ? tvol.layerAttempts(lastExitFace)
+                               : int(layersInVolume * 0.5);
 
   // set the maximal attempts to at least m_initialLayerAttempts
   maxAttempts = (maxAttempts < m_initialLayerAttempts) ? m_initialLayerAttempts : maxAttempts;
@@ -3820,43 +3790,40 @@ Trk::Extrapolator::extrapolateFromLayerToLayer(
   //    - nextLayer is not the destination layer
   //    - the number of attempts does not exceed a set maximum
 
-  while (nextLayer &&
-         nextLayer != previousLayer &&
-         nextLayer != lastLayer &&
-         nextLayer != destinationLayer &&
-         failedAttempts < maxAttempts) {
+  while (nextLayer && nextLayer != previousLayer && nextLayer != lastLayer &&
+         nextLayer != destinationLayer && failedAttempts < maxAttempts) {
     // screen output
     ATH_MSG_VERBOSE("  [+] Found next "
-                    << ((nextLayer->layerMaterialProperties() ? "material layer  - with " : "navigation layer  with "))
+                    << ((nextLayer->layerMaterialProperties() ? "material layer  - with "
+                                                              : "navigation layer  with "))
                     << layerRZoutput(*nextLayer));
 
     // skip the navigation layers
-    if (nextLayer->layerMaterialProperties() || (cache.m_parametersOnDetElements && nextLayer->surfaceArray())) {
+    if (nextLayer->layerMaterialProperties() ||
+        (cache.m_parametersOnDetElements && nextLayer->surfaceArray())) {
       // the next step - do not delete the parameters (garbage collection done by method)
-      auto [new_track_parm, killed] =
-        extrapolateToIntermediateLayer(ctx,
-                                       cache,
-                                       prop,
-                                       currPar.index(),
-                                       *nextLayer,
-                                       tvol,
-                                       dir,
-                                       bcheck,
-                                       particle,
-                                       matupmode,
-                                       perpCheck);
+      auto [new_track_parm, killed] = extrapolateToIntermediateLayer(ctx,
+                                                                     cache,
+                                                                     prop,
+                                                                     currPar.index(),
+                                                                     *nextLayer,
+                                                                     tvol,
+                                                                     dir,
+                                                                     bcheck,
+                                                                     particle,
+                                                                     matupmode,
+                                                                     perpCheck);
       ManagedTrackParmPtr nextPar(std::move(new_track_parm));
       // previous and last layer setting for loop and oscillation protection
       previousLayer = lastLayer;
       lastLayer = nextLayer;
-      // the breaking condition -----------------------------------------------------------
+      // the breaking condition ------------------------------------
       // check killed first because if killed is true nexPar will be invalid.
       if (killed) {
         ATH_MSG_VERBOSE("  [+] Material update killed the track parameters - return 0");
         // kill the track - Fatras case
         return ManagedTrackParmPtr();
-      }
-      else if (!nextPar) {
+      } else if (!nextPar) {
         ++failedAttempts;
         ++m_layerSwitched; // record for statistics output
         // reset until break condition is fullfilled
@@ -3865,20 +3832,21 @@ Trk::Extrapolator::extrapolateFromLayerToLayer(
         // set the new boundary information
         return nextPar;
       } else { // reset the failed attempts
-        ATH_MSG_VERBOSE("  [+] Intersection successful: allowing for " << maxAttempts << " more failed attempt.");
+        ATH_MSG_VERBOSE("  [+] Intersection successful: allowing for " << maxAttempts
+                                                                       << " more failed attempt.");
         failedAttempts = 0;
-        // but a hit sets the max attempts to m_successiveLayerAttempts => navigation machine started !
-        // maxAttempts = m_successiveLayerAttempts;
-        // new navParameters are currPar
+        // but a hit sets the max attempts to m_successiveLayerAttempts => navigation machine
+        // started ! maxAttempts = m_successiveLayerAttempts; new navParameters are currPar
         navParameters = nextPar;
-        currPar=std::move(nextPar);
+        currPar = std::move(nextPar);
         // enforce the perpendicular check
         perpCheck = true;
       }
     }
 
     // cache of radiatl direction and next layer request
-    nextLayer = nextLayer->nextLayer(navParameters->position(), dir * navParameters->momentum().normalized());
+    nextLayer =
+      nextLayer->nextLayer(navParameters->position(), dir * navParameters->momentum().normalized());
 
     // screen output
     if (!nextLayer) {
@@ -3894,73 +3862,59 @@ Trk::Extrapolator::extrapolateFromLayerToLayer(
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateToDestinationLayer(
-  const EventContext& ctx,
-  Cache& cache,
-  const IPropagator& prop,
-  TrackParmPtr parm_ref,
-  const Surface& sf,
-  const Layer& lay,
-  const TrackingVolume& tvol,
-  const Layer* startLayer,
-  PropDirection dir,
-  const BoundaryCheck& bcheck,
-  ParticleHypothesis particle,
-  MaterialUpdateMode matupmode) const
+Trk::Extrapolator::extrapolateToDestinationLayer(const EventContext& ctx,
+                                                 Cache& cache,
+                                                 const IPropagator& prop,
+                                                 TrackParmPtr parm_ref,
+                                                 const Surface& sf,
+                                                 const Layer& lay,
+                                                 const TrackingVolume& tvol,
+                                                 const Layer* startLayer,
+                                                 PropDirection dir,
+                                                 const BoundaryCheck& bcheck,
+                                                 ParticleHypothesis particle,
+                                                 MaterialUpdateMode matupmode) const
 {
   // method sequence output ---------------------------------
   ++cache.m_methodSequence;
-  ATH_MSG_DEBUG("S-[" << cache.m_methodSequence << "] extrapolateToDestinationLayer(...) in '" << tvol.volumeName() <<
-    "'.");
+  ATH_MSG_DEBUG("S-[" << cache.m_methodSequence << "] extrapolateToDestinationLayer(...) in '"
+                      << tvol.volumeName() << "'.");
   // start is destination layer -> on layer navigation, take care
   bool startIsDestLayer = startLayer == (&lay);
 
-  Trk::TransportJacobian *jac = nullptr;
+  Trk::TransportJacobian* jac = nullptr;
   // get the Parameters on the destination surface
   double pathLimit = -1.;
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   ManagedTrackParmPtr destParameters(ManagedTrackParmPtr::recapture(
     parm,
     cache.m_jacs
-      ? prop.propagate(ctx,
-                       *parm,
-                       sf,
-                       dir,
-                       bcheck,
-                       MagneticFieldProperties(),
-                       jac,
-                       pathLimit,
-                       particle)
-      : prop.propagate(
-          ctx, *parm, sf, dir, bcheck, MagneticFieldProperties(), particle)));
+      ? prop.propagate(
+          ctx, *parm, sf, dir, bcheck, MagneticFieldProperties(), jac, pathLimit, particle)
+      : prop.propagate(ctx, *parm, sf, dir, bcheck, MagneticFieldProperties(), particle)));
 
   // fallback to anyDirection
-  // destParameters = destParameters ?  destParameters : ( cache.m_jacs ? prop.propagate(parm, sf, Trk::anyDirection, bcheck,
-  // tvol, jac, particle) : prop.propagate(parm, sf, Trk::anyDirection, bcheck, tvol, particle));
+  // destParameters = destParameters ?  destParameters : ( cache.m_jacs ? prop.propagate(parm, sf,
+  // Trk::anyDirection, bcheck, tvol, jac, particle) : prop.propagate(parm, sf, Trk::anyDirection,
+  // bcheck, tvol, particle));
   if (!destParameters) {
     destParameters = ManagedTrackParmPtr::recapture(
       parm,
-      (cache.m_jacs ? prop.propagate(ctx,
-                                     *parm,
-                                     sf,
-                                     Trk::anyDirection,
-                                     bcheck,
-                                     MagneticFieldProperties(),
-                                     jac,
-                                     pathLimit,
-                                     particle)
-                    : prop.propagate(ctx,
-                                     *parm,
-                                     sf,
-                                     Trk::anyDirection,
-                                     bcheck,
-                                     m_fieldProperties,
-                                     particle)));
+      (cache.m_jacs
+         ? prop.propagate(ctx,
+                          *parm,
+                          sf,
+                          Trk::anyDirection,
+                          bcheck,
+                          MagneticFieldProperties(),
+                          jac,
+                          pathLimit,
+                          particle)
+         : prop.propagate(ctx, *parm, sf, Trk::anyDirection, bcheck, m_fieldProperties, particle)));
   }
 
   // return the pre-updated ones
-  const IMaterialEffectsUpdator* currentUpdator =
-    subMaterialEffectsUpdator(tvol);
+  const IMaterialEffectsUpdator* currentUpdator = subMaterialEffectsUpdator(tvol);
   IMaterialEffectsUpdator::ICache& currentUpdatorCache =
     subMaterialEffectsUpdatorCache(cache, tvol);
 
@@ -3968,28 +3922,23 @@ Trk::Extrapolator::extrapolateToDestinationLayer(
   if (currentUpdator && destParameters && !startIsDestLayer) {
     preUpdatedParameters = ManagedTrackParmPtr::recapture(
       destParameters,
-      currentUpdator->preUpdate(currentUpdatorCache,
-                                destParameters.get(),
-                                lay,
-                                dir,
-                                particle,
-                                matupmode));
-  }
-  else {
-     preUpdatedParameters = destParameters;
+      currentUpdator->preUpdate(
+        currentUpdatorCache, destParameters.get(), lay, dir, particle, matupmode));
+  } else {
+    preUpdatedParameters = destParameters;
   }
 
   // collect the material : either for extrapolateM or for the valdiation
-  if ((cache.m_matstates || m_materialEffectsOnTrackValidation) && preUpdatedParameters && currentUpdator &&
-      !startIsDestLayer && lay.preUpdateMaterialFactor(*destParameters, dir) >= 0.01) {
-    addMaterialEffectsOnTrack(ctx, cache,prop, preUpdatedParameters.index(), lay, tvol, dir, particle);
+  if ((cache.m_matstates || m_materialEffectsOnTrackValidation) && preUpdatedParameters &&
+      currentUpdator && !startIsDestLayer &&
+      lay.preUpdateMaterialFactor(*destParameters, dir) >= 0.01) {
+    addMaterialEffectsOnTrack(
+      ctx, cache, prop, preUpdatedParameters.index(), lay, tvol, dir, particle);
   }
 
   // call the overlap search on the destination parameters - we are at the surface already
-  if (cache.m_parametersOnDetElements
-      && preUpdatedParameters
-      && lay.surfaceArray()
-      && m_subSurfaceLevel) {
+  if (cache.m_parametersOnDetElements && preUpdatedParameters && lay.surfaceArray() &&
+      m_subSurfaceLevel) {
     ATH_MSG_VERBOSE("  [o] Calling overlapSearch() on destination layer.");
     // start is destination layer
     overlapSearch(ctx,
@@ -4028,13 +3977,11 @@ Trk::Extrapolator::extrapolateToIntermediateLayer(const EventContext& ctx,
 {
   // method sequence output ---------------------------------
   ++cache.m_methodSequence;
-  ATH_MSG_DEBUG(
-    "S-[" << cache.m_methodSequence << "] to extrapolateToIntermediateLayer(...) layer " << lay.layerIndex() << " in '"
-          << tvol.volumeName() << "'.");
+  ATH_MSG_DEBUG("S-[" << cache.m_methodSequence << "] to extrapolateToIntermediateLayer(...) layer "
+                      << lay.layerIndex() << " in '" << tvol.volumeName() << "'.");
 
   // chose the current updator
-  const IMaterialEffectsUpdator* currentUpdator =
-    subMaterialEffectsUpdator(tvol);
+  const IMaterialEffectsUpdator* currentUpdator = subMaterialEffectsUpdator(tvol);
   IMaterialEffectsUpdator::ICache& currentUpdatorCache =
     subMaterialEffectsUpdatorCache(cache, tvol);
   // then go onto the Layer
@@ -4042,15 +3989,13 @@ Trk::Extrapolator::extrapolateToIntermediateLayer(const EventContext& ctx,
   ManagedTrackParmPtr parsOnLayer(cache.trackParmContainer());
 
   if (m_checkForCompundLayers) {
-    const Trk::CompoundLayer *cl = dynamic_cast<const Trk::CompoundLayer *>(&lay);
+    const Trk::CompoundLayer* cl = dynamic_cast<const Trk::CompoundLayer*>(&lay);
     if (cl) {
       // try each surface in turn
-      const std::vector<const Surface *> cs = cl->constituentSurfaces();
+      const std::vector<const Surface*> cs = cl->constituentSurfaces();
       for (unsigned int i = 0; i < cs.size(); ++i) {
         parsOnLayer = ManagedTrackParmPtr::recapture(
-          parm,
-          prop.propagate(
-            ctx, *parm, *(cs[i]), dir, true, m_fieldProperties, particle));
+          parm, prop.propagate(ctx, *parm, *(cs[i]), dir, true, m_fieldProperties, particle));
         if (parsOnLayer) {
           break;
         }
@@ -4058,32 +4003,22 @@ Trk::Extrapolator::extrapolateToIntermediateLayer(const EventContext& ctx,
     } else {
       parsOnLayer = ManagedTrackParmPtr::recapture(
         parm,
-        prop.propagate(ctx,
-                       *parm,
-                       lay.surfaceRepresentation(),
-                       dir,
-                       true,
-                       m_fieldProperties,
-                       particle));
+        prop.propagate(
+          ctx, *parm, lay.surfaceRepresentation(), dir, true, m_fieldProperties, particle));
     }
   } else {
-    parsOnLayer =
-      ManagedTrackParmPtr::recapture(parm,
-                                     prop.propagate(ctx,
-                                                    *parm,
-                                                    lay.surfaceRepresentation(),
-                                                    dir,
-                                                    true,
-                                                    m_fieldProperties,
-                                                    particle));
+    parsOnLayer = ManagedTrackParmPtr::recapture(
+      parm,
+      prop.propagate(
+        ctx, *parm, lay.surfaceRepresentation(), dir, true, m_fieldProperties, particle));
   }
 
   // return if there is nothing to do
   if (!parsOnLayer) {
-    return std::make_pair(ManagedTrackParmPtr(),false);
+    return std::make_pair(ManagedTrackParmPtr(), false);
   }
-  // the layer has been intersected ----------------------------------------------------------------------------
-  // check for radial direction change ---------------------------------------------------------------------
+  // the layer has been intersected -----------------------------------------------------
+  // check for radial direction change ----------------------------------------------
   int rDirection = radialDirection(*parm, dir);
   int newrDirection = radialDirection(*parsOnLayer, dir);
   if (newrDirection != rDirection && doPerpCheck) {
@@ -4093,49 +4028,41 @@ Trk::Extrapolator::extrapolateToIntermediateLayer(const EventContext& ctx,
     //  resetting is ok - since the parameters are in the garbage bin already
     if (!radialDirectionCheck(ctx, prop, *parm, *parsOnLayer, tvol, dir, particle)) {
       ATH_MSG_DEBUG("  [+] Perpendicular direction check cancelled this layer intersection.");
-      return std::make_pair(ManagedTrackParmPtr(),false);
+      return std::make_pair(ManagedTrackParmPtr(), false);
     }
   }
-  // ---------------------------------------------------------------------------------------------------------
-  ATH_MSG_VERBOSE("  [+] Layer intersection successful  at " << positionOutput(parsOnLayer->position()));
-  ATH_MSG_VERBOSE("  [+] Layer intersection successful  with " << momentumOutput(parsOnLayer->momentum()));
+  // ----------------------------------------------------------------------------------
+  ATH_MSG_VERBOSE("  [+] Layer intersection successful  at "
+                  << positionOutput(parsOnLayer->position()));
+  ATH_MSG_VERBOSE("  [+] Layer intersection successful  with "
+                  << momentumOutput(parsOnLayer->momentum()));
 
-  // Fatras mode ----------------------------------------------------------------------------------------------
-  if (cache.m_parametersOnDetElements
-      && lay.surfaceArray()
-      && m_subSurfaceLevel) {
+  // Fatras mode -----------------------------------------------------------------------
+  if (cache.m_parametersOnDetElements && lay.surfaceArray() && m_subSurfaceLevel) {
     // ceck the parameters size before the search
     size_t sizeBeforeSearch = cache.m_parametersOnDetElements->size();
     // perform the overlap Search on this layer
     ATH_MSG_VERBOSE("  [o] Calling overlapSearch() on intermediate layer.");
-    overlapSearch(ctx,
-                  cache,
-                  prop,
-                  parm.index(),
-                  parsOnLayer.index(),
-                  lay,
-                  tvol,
-                  dir,
-                  bcheck,
-                  particle);
+    overlapSearch(
+      ctx, cache, prop, parm.index(), parsOnLayer.index(), lay, tvol, dir, bcheck, particle);
     size_t sizeAfterSearch = cache.m_parametersOnDetElements->size();
     // the Fatras mode was successful -> postUpdate and garbage collection
-    int lastElement = (int) cache.m_parametersOnDetElements->size() - 1;
+    int lastElement = (int)cache.m_parametersOnDetElements->size() - 1;
     // we have created hits in the vector
     if (lastElement >= 0 && sizeBeforeSearch < sizeAfterSearch) {
       // get the last element
-      // it's ok to reassign parOnLayer as the pointer to the first one is in the garbage bin already
-      // get the latest Fatras hit to start from this one
+      // it's ok to reassign parOnLayer as the pointer to the first one is in the garbage bin
+      // already get the latest Fatras hit to start from this one
       if (!(*cache.m_parametersOnDetElements)[lastElement]) {
-         throw std::logic_error("Invalid track parameters on det elements (lastElement)");
+        throw std::logic_error("Invalid track parameters on det elements (lastElement)");
       }
       parsOnLayer = ((*cache.m_parametersOnDetElements)[lastElement]
-                     ? cache.manage(*((*cache.m_parametersOnDetElements)[lastElement]))
-                     : cache.manage());
+                       ? cache.manage(*((*cache.m_parametersOnDetElements)[lastElement]))
+                       : cache.manage());
       ATH_MSG_DEBUG("  [+] Detector element & overlapSearch successful,"
                     << " call update on last parameter on this layer.");
     }
-  } // ------------------------------------------------- Fatras mode off -----------------------------------
+  } // -------------------------- Fatras mode off -----------------------------------
 
   // return the full-updated ones - may create a new object
   if (lay.layerMaterialProperties() && currentUpdator) {
@@ -4145,18 +4072,18 @@ Trk::Extrapolator::extrapolateToIntermediateLayer(const EventContext& ctx,
         currentUpdatorCache, parsOnLayer.get(), lay, dir, particle, matupmode));
   }
   // there are layers that have a surfaceArray but no material properties
-  if (parsOnLayer
-      && lay.layerMaterialProperties()
-      && (cache.m_matstates || m_materialEffectsOnTrackValidation)) {
-    addMaterialEffectsOnTrack(ctx, cache,prop, parsOnLayer.index(), lay, tvol, dir, particle);
+  if (parsOnLayer && lay.layerMaterialProperties() &&
+      (cache.m_matstates || m_materialEffectsOnTrackValidation)) {
+    addMaterialEffectsOnTrack(ctx, cache, prop, parsOnLayer.index(), lay, tvol, dir, particle);
   }
   // kill the track if the update killed the track
-  // -----------------------------------------------------------------------
+  // ------------------------------------------------
   if (!parsOnLayer && m_stopWithUpdateZero) {
-     return std::make_pair(ManagedTrackParmPtr(),true); // the indicator to kill the loopfrom material update
+    return std::make_pair(ManagedTrackParmPtr(),
+                          true); // the indicator to kill the loopfrom material update
   }
   // ------------ the return of the parsOnLayer --- they're in the garbage bin already
-  return std::make_pair(parsOnLayer,false);
+  return std::make_pair(parsOnLayer, false);
 }
 
 void
@@ -4178,21 +4105,26 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
   bool isDestinationLayer = (&parsOnLayer->associatedSurface() == cache.m_destinationSurface);
   // start and end surface for on-layer navigation
   //  -> take the start surface if ther parameter surface is owned by detector element
-  const Trk::Surface *startSurface = ((parm->associatedSurface()).associatedDetectorElement() && startingLayer) ?
-                                      &(parm->associatedSurface()) : nullptr;
-  const Trk::Surface *endSurface = isDestinationLayer ? cache.m_destinationSurface : nullptr;
+  const Trk::Surface* startSurface =
+    ((parm->associatedSurface()).associatedDetectorElement() && startingLayer)
+      ? &(parm->associatedSurface())
+      : nullptr;
+  const Trk::Surface* endSurface = isDestinationLayer ? cache.m_destinationSurface : nullptr;
   // - the best detSurface to start from is the one associated to the detector element
-  const Trk::Surface *detSurface = (parsOnLayer->associatedSurface()).associatedDetectorElement() ?
-                                   &parsOnLayer->associatedSurface() : nullptr;
+  const Trk::Surface* detSurface = (parsOnLayer->associatedSurface()).associatedDetectorElement()
+                                     ? &parsOnLayer->associatedSurface()
+                                     : nullptr;
 
   ATH_MSG_VERBOSE("  [o] OverlapSearch called " << (startSurface ? "with " : "w/o ") << "start, "
-                                                << (endSurface ? "with " : "w/o ") << "end surface.");
+                                                << (endSurface ? "with " : "w/o ")
+                                                << "end surface.");
 
   if (!detSurface) {
-    // of parsOnLayer are different from parm, then local position is safe, because the extrapolation
+    // of parsOnLayer are different from parm, then local position is safe, because the
+    // extrapolation
     //   to the detector surface has been done !
-    detSurface = isDestinationLayer ? lay.subSurface(parsOnLayer->localPosition()) : lay.subSurface(
-      parsOnLayer->position());
+    detSurface = isDestinationLayer ? lay.subSurface(parsOnLayer->localPosition())
+                                    : lay.subSurface(parsOnLayer->position());
     if (detSurface) {
       ATH_MSG_VERBOSE("  [o] Detector surface found through subSurface() call");
     } else {
@@ -4206,7 +4138,7 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
   bool isStartLayer = (detSurface && detSurface == startSurface);
 
   // the temporary vector (might have to be ordered)
-  std::vector<const Trk::TrackParameters *> detParametersOnLayer;
+  std::vector<const Trk::TrackParameters*> detParametersOnLayer;
   bool reorderDetParametersOnLayer = false;
   // the first test for the detector surface to be hit (false test)
   // - only do this if the parameters aren't on the surface
@@ -4218,9 +4150,7 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
     detParameters = parm;
   } else if (detSurface) {
     detParameters = ManagedTrackParmPtr::recapture(
-      parm,
-      prop.propagate(
-        ctx, *parm, *detSurface, dir, false, m_fieldProperties, particle));
+      parm, prop.propagate(ctx, *parm, *detSurface, dir, false, m_fieldProperties, particle));
   }
 
   // set the surface hit to true, it is anyway overruled
@@ -4231,13 +4161,14 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
   if (detParameters && !isStartLayer && !isDestinationLayer) {
     ATH_MSG_VERBOSE("  [o] First intersection with Detector surface: " << *detParameters);
     // for the later use in the overlapSearch
-    surfaceHit = detParameters && detSurface
-                   ? detSurface->isOnSurface(detParameters->position())
-                   : 0; // ,bcheck) -creates problems on start layer;
+    surfaceHit = detParameters && detSurface ? detSurface->isOnSurface(detParameters->position())
+                                             : 0; // ,bcheck) -creates problems on start layer;
     // check also for start/endSurface on this level
-    surfaceHit = (surfaceHit && startSurface) ?
-                 ((detParameters->position() - parm->position()).dot(dir * parm->momentum().normalized()) >
-                  0) : surfaceHit;
+    surfaceHit =
+      (surfaceHit && startSurface)
+        ? ((detParameters->position() - parm->position()).dot(dir * parm->momentum().normalized()) >
+           0)
+        : surfaceHit;
     surfaceHit = (surfaceHit && endSurface)
                    ? ((detParameters->position() - parsOnLayer->position())
                         .dot(dir * parsOnLayer->momentum().normalized()) < 0)
@@ -4248,60 +4179,53 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
     // Convention for Fatras: always apply the full update on the last parameters
     //                        of the gathered vector (no pre/post schema)
     // don't record a hit on the destination surface
-    if (surfaceHit &&
-        detSurface != startSurface &&
-        detSurface != cache.m_destinationSurface) {
+    if (surfaceHit && detSurface != startSurface && detSurface != cache.m_destinationSurface) {
       ATH_MSG_VERBOSE("  [H] Hit with detector surface recorded ! ");
       // push into the temporary vector
-      detParametersOnLayer.push_back(detParameters.release()); // after this line detParameters == nullptr;
+      detParametersOnLayer.push_back(
+        detParameters.release()); // after this line detParameters == nullptr;
       //      track_parm_for_overlap=TrackParmPtr(*(detParametersOnLayer.back()));
     } else if (detParameters) {
       // no hit -> fill into the garbage bin
-      ATH_MSG_VERBOSE("  [-] Detector surface hit cancelled through bounds check or start/end surface check.");
+      ATH_MSG_VERBOSE(
+        "  [-] Detector surface hit cancelled through bounds check or start/end surface check.");
     }
   }
 
-  // search for the overlap ------------------------------------------------------------------------
+  // search for the overlap -------------------------------------------------
   if (track_parm_for_overlap) {
     // retrive compatible subsurfaces
     std::vector<Trk::SurfaceIntersection> cSurfaces;
-    size_t ncSurfaces = lay.compatibleSurfaces(
-      cSurfaces, *track_parm_for_overlap, Trk::anyDirection, bcheck, false);
+    size_t ncSurfaces =
+      lay.compatibleSurfaces(cSurfaces, *track_parm_for_overlap, Trk::anyDirection, bcheck, false);
 
     // import from StaticEngine.icc
     if (ncSurfaces) {
       ATH_MSG_VERBOSE("found " << ncSurfaces << " candidate sensitive surfaces to test.");
       // now loop over the surfaces:
       // the surfaces will be sorted @TODO integrate pathLength propagation into this
-   
-      auto overlapSurfaceHit=m_overlapSurfaceHit.buffer();
-      for (auto &csf : cSurfaces) {
-        // propagate to the compatible surface, return types are (pathLimit 
+
+      auto overlapSurfaceHit = m_overlapSurfaceHit.buffer();
+      for (auto& csf : cSurfaces) {
+        // propagate to the compatible surface, return types are (pathLimit
         // failure is excluded by Trk::anyDirection for the moment):
-        ManagedTrackParmPtr overlapParameters(
-          ManagedTrackParmPtr::recapture(parm,
-                                         prop.propagate(ctx,
-                                                        *parm,
-                                                        *(csf.object),
-                                                        Trk::anyDirection,
-                                                        true,
-                                                        m_fieldProperties,
-                                                        particle)));
+        ManagedTrackParmPtr overlapParameters(ManagedTrackParmPtr::recapture(
+          parm,
+          prop.propagate(
+            ctx, *parm, *(csf.object), Trk::anyDirection, true, m_fieldProperties, particle)));
 
         if (overlapParameters) {
           ATH_MSG_VERBOSE("  [+] Overlap surface was hit, checking start/end surface condition.");
           // check on start / end surface for on-layer navigaiton action
-          
-          surfaceHit = (startSurface)
-                         ? ((overlapParameters->position() - parm->position())
-                              .dot(dir * parm->momentum().normalized()) > 0)
-                         : true;
-          
-          surfaceHit =
-            (surfaceHit && endSurface)
-              ? ((overlapParameters->position() - parsOnLayer->position())
-                   .dot(dir * parsOnLayer->momentum().normalized()) < 0)
-              : surfaceHit;
+
+          surfaceHit = (startSurface) ? ((overlapParameters->position() - parm->position())
+                                           .dot(dir * parm->momentum().normalized()) > 0)
+                                      : true;
+
+          surfaceHit = (surfaceHit && endSurface)
+                         ? ((overlapParameters->position() - parsOnLayer->position())
+                              .dot(dir * parsOnLayer->momentum().normalized()) < 0)
+                         : surfaceHit;
 
           if (surfaceHit) {
             ATH_MSG_VERBOSE("  [H] Hit with detector surface recorded !");
@@ -4313,14 +4237,16 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
             detParametersOnLayer.push_back(overlapParameters.release());
           } else { // the parameters have been cancelled by start/end surface
             // no hit -> fill into the garbage bin
-            ATH_MSG_VERBOSE("  [-] Detector surface hit cancelled through start/end surface check.");
+            ATH_MSG_VERBOSE(
+              "  [-] Detector surface hit cancelled through start/end surface check.");
           }
         }
       } // loop over test surfaces done
-    } // there are compatible surfaces
-  }  // ---------------------------------------------------------------------------------------------
+    }   // there are compatible surfaces
+  }     // ----------------------------------------------------------------------
 
-  // reorder the track parameters if neccessary, the overlap descriptor did not provide the ordered surfaces
+  // reorder the track parameters if neccessary, the overlap descriptor did not provide the ordered
+  // surfaces
   if (reorderDetParametersOnLayer) {
     // sort to reference of incoming parameters
     Trk::TrkParametersComparisonFunction parameterSorter(parm->position());
@@ -4328,66 +4254,67 @@ Trk::Extrapolator::overlapSearch(const EventContext& ctx,
   }
   assert(cache.m_parametersOnDetElements);
   if (cache.m_parametersOnDetElements->empty()) {
-     *(cache.m_parametersOnDetElements) = std::move(detParametersOnLayer);
-  }
-  else {
-     std::copy (detParametersOnLayer.begin(),detParametersOnLayer.end(),back_inserter(*(cache.m_parametersOnDetElements)));
+    *(cache.m_parametersOnDetElements) = std::move(detParametersOnLayer);
+  } else {
+    std::copy(detParametersOnLayer.begin(),
+              detParametersOnLayer.end(),
+              back_inserter(*(cache.m_parametersOnDetElements)));
   }
 }
 
 unsigned int
-Trk::Extrapolator::propagatorType(const Trk::TrackingVolume &tvol) const {
+Trk::Extrapolator::propagatorType(const Trk::TrackingVolume& tvol) const
+{
   return tvol.geometrySignature();
 }
 
-// ----------------------- The Initialization -------------------------------------------------
+// ----------------------- The Initialization --------------------------
 Trk::PropDirection
-Trk::Extrapolator::initializeNavigation(
-    const EventContext& ctx,
-    Cache& cache,
-    const IPropagator& prop,
-    TrackParmPtr parm_ref,
-    const Surface& sf,
-    PropDirection dir,
-    ParticleHypothesis particle,
-    ManagedTrackParmPtr& refParameters,
-    const Layer*& associatedLayer,
-    const TrackingVolume*& associatedVolume,
-    const TrackingVolume*& destVolume) const
+Trk::Extrapolator::initializeNavigation(const EventContext& ctx,
+                                        Cache& cache,
+                                        const IPropagator& prop,
+                                        TrackParmPtr parm_ref,
+                                        const Surface& sf,
+                                        PropDirection dir,
+                                        ParticleHypothesis particle,
+                                        ManagedTrackParmPtr& refParameters,
+                                        const Layer*& associatedLayer,
+                                        const TrackingVolume*& associatedVolume,
+                                        const TrackingVolume*& destVolume) const
 {
 
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
-   // @TODO parm shared ?
+  // @TODO parm shared ?
   // output for initializeNavigation should be an eye-catcher
   if (!cache.m_destinationSurface) {
-    ATH_MSG_DEBUG("  [I] initializeNaviagtion() ------------------------------------------------- ");
-    cache.m_methodSequence=0;
+    ATH_MSG_DEBUG("  [I] initializeNaviagtion() -------------------------- ");
+    cache.m_methodSequence = 0;
   } else {
-    ATH_MSG_DEBUG("  [I] (re)initializeNaviagtion() --------------------------------------------- ");
+    ATH_MSG_DEBUG("  [I] (re)initializeNaviagtion() ---------------------- ");
   }
 
   Trk::PropDirection navigationDirection = dir;
   // only for the initial and not for the redoNavigation - give back the navigation direction
   if (!cache.m_destinationSurface) {
-    ATH_MSG_VERBOSE("  [I] Starting with Start Layer/Volume search: ------------------------------");
+    ATH_MSG_VERBOSE(
+      "  [I] Starting with Start Layer/Volume search: ------------------------------");
     ATH_MSG_VERBOSE("  [I] Destination surface : " << sf);
     // reset the boundary information
     cache.m_parametersAtBoundary.resetBoundaryInformation();
     // and set the destination surface
     cache.m_destinationSurface = (&sf);
     // prepare for screen output
-    const char *startSearchType = "association";
+    const char* startSearchType = "association";
 
     // ---------------------------------- ASSOCIATED VOLUME ----------------------------------
     // 1 - TRY the association method
-    const Trk::Surface *associatedSurface = &parm->associatedSurface();
+    const Trk::Surface* associatedSurface = &parm->associatedSurface();
     associatedLayer = (associatedSurface) ? associatedSurface->associatedLayer() : associatedLayer;
-    associatedVolume = associatedLayer ? associatedLayer->enclosingTrackingVolume() : associatedVolume;
+    associatedVolume =
+      associatedLayer ? associatedLayer->enclosingTrackingVolume() : associatedVolume;
     // 2 - TRY the recall method -> only if association method didn't work
     // only if associated detector element exists to protect against dynamic surfaces
-    if (!associatedVolume &&
-        associatedSurface &&
-        associatedSurface == cache.m_recallSurface &&
+    if (!associatedVolume && associatedSurface && associatedSurface == cache.m_recallSurface &&
         associatedSurface->associatedDetectorElement()) {
       // statistics output
       ++m_startThroughRecall;
@@ -4401,55 +4328,49 @@ Trk::Extrapolator::initializeNavigation(
       // non-perigee surface
       resetRecallInformation(cache);
       associatedVolume = m_navigator->volume(parm->position());
-      associatedLayer = (associatedVolume) ? associatedVolume->associatedLayer(parm->position()) : nullptr;
+      associatedLayer =
+        (associatedVolume) ? associatedVolume->associatedLayer(parm->position()) : nullptr;
 
       // change the association type
       startSearchType = "global search";
 
-      // ---------------------------------- ASSOCIATED STATIC VOLUME --------------------------------------
-      // this is not necessary for ( association & recall )
-      const Trk::TrackingVolume *lowestStaticVol =
+      // ---------------------------------- ASSOCIATED STATIC VOLUME
+      // -------------------------------------- this is not necessary for ( association & recall )
+      const Trk::TrackingVolume* lowestStaticVol =
         m_navigator->trackingGeometry()->lowestStaticTrackingVolume(parm->position());
 
       if (lowestStaticVol && lowestStaticVol != associatedVolume) {
         associatedVolume = lowestStaticVol;
       }
-      // --------------------------------------------------------------------------------------------------
+      // ---------------------------------------------------------------------------
     } else {
       ++m_startThroughAssociation;
     }
 
     // verify if not exit point from associated volume
     if (associatedVolume && navigationDirection != Trk::anyDirection) {
-      const Trk::TrackingVolume *nextAssVol = nullptr;
-      if (m_navigator->atVolumeBoundary(parm.get(),
-                                        associatedVolume,
-                                        dir, nextAssVol,
-                                        m_tolerance) && nextAssVol != associatedVolume) {
+      const Trk::TrackingVolume* nextAssVol = nullptr;
+      if (m_navigator->atVolumeBoundary(
+            parm.get(), associatedVolume, dir, nextAssVol, m_tolerance) &&
+          nextAssVol != associatedVolume) {
         if (nextAssVol) {
           associatedVolume = nextAssVol;
         } else {
-          ATH_MSG_WARNING(
-            "  [X] Navigation break occurs in volume " << associatedVolume->volumeName() << " no action taken");
+          ATH_MSG_WARNING("  [X] Navigation break occurs in volume "
+                          << associatedVolume->volumeName() << " no action taken");
         }
       }
     }
     // ---------------- anyDirection given : navigation direction has to be estimated ---------
     if (navigationDirection == Trk::anyDirection) {
-      ATH_MSG_VERBOSE("  [I] 'AnyDirection' has been chosen: approaching direction must be determined.");
+      ATH_MSG_VERBOSE(
+        "  [I] 'AnyDirection' has been chosen: approaching direction must be determined.");
 
       // refParameters = prop.propagateParameters(parm,sf,dir,false,*associatedVolume);
       refParameters = ManagedTrackParmPtr::recapture(
         parm,
-        prop.propagateParameters(ctx,
-                                 *parm,
-                                 sf,
-                                 dir,
-                                 false,
-                                 m_fieldProperties,
-                                 particle,
-                                 false,
-                                 associatedVolume));
+        prop.propagateParameters(
+          ctx, *parm, sf, dir, false, m_fieldProperties, particle, false, associatedVolume));
       // chose on projective method
       if (refParameters) {
         // check the direction on basis of a vector projection
@@ -4462,14 +4383,15 @@ Trk::Extrapolator::initializeNavigation(
 
         // really verbose statement, but needed for debugging
         ATH_MSG_VERBOSE("  [+] Approaching direction determined as: "
-                        << ((navigationDirection < 0) ?  "oppositeMomentum." : "alongMomentum"));
+                        << ((navigationDirection < 0) ? "oppositeMomentum." : "alongMomentum"));
       } else {
-        ATH_MSG_VERBOSE("  [+] Approaching direction could not be determined, they remain: anyDirection.");
+        ATH_MSG_VERBOSE(
+          "  [+] Approaching direction could not be determined, they remain: anyDirection.");
       }
     }
     ATH_MSG_VERBOSE("  [I] Starting Information gathered through : " << startSearchType << ".");
   }
-  // ----------------------------------------------------------------------------------------
+  // -----------------------------------------------------------------
 
   // ---------------------------------- DESTINATION VOLUME ----------------------------------
   // only do it if sf is not the reference Surface
@@ -4499,96 +4421,99 @@ Trk::Extrapolator::initializeNavigation(
       if (!refParameters && associatedVolume) {
         refParameters = ManagedTrackParmPtr::recapture(
           parm,
-          prop.propagateParameters(ctx,
-                                   *parm,
-                                   sf,
-                                   dir,
-                                   false,
-                                   m_fieldProperties,
-                                   particle,
-                                   false,
-                                   associatedVolume));
+          prop.propagateParameters(
+            ctx, *parm, sf, dir, false, m_fieldProperties, particle, false, associatedVolume));
       }
       // get the destination Volume
       if (refParameters) {
         destVolume = m_navigator->volume(refParameters->position());
       }
       // ------ the last chance : associate to the globalReferencePoint
-      // std::cout << "destVolume: " << destVolume << " ref par: " << refParameters << " associatedVolume: " <<
-      // associatedVolume << std::endl;
+      // std::cout << "destVolume: " << destVolume << " ref par: " << refParameters << "
+      // associatedVolume: "
+      // << associatedVolume << std::endl;
       if (!destVolume) {
         destVolume = m_navigator->volume(sf.globalReferencePoint());
       }
     }
-    ATH_MSG_VERBOSE("  [I] Destination Information gathered through : " << destinationSearchType << ".");
+    ATH_MSG_VERBOSE("  [I] Destination Information gathered through : " << destinationSearchType
+                                                                        << ".");
   }
-  // screen output summary ----------------------------------------------------------------------------------
+  // screen output summary -----------------------------------------------------------
   if (msgLvl(MSG::VERBOSE)) {
-    ATH_MSG_VERBOSE("  [+] Association Volume search ...... " << (associatedVolume ? "ok." : "failed."));
-    ATH_MSG_VERBOSE("  [+] Association Layer  search ...... " << (associatedLayer ? "ok." : "failed."));
+    ATH_MSG_VERBOSE("  [+] Association Volume search ...... "
+                    << (associatedVolume ? "ok." : "failed."));
+    ATH_MSG_VERBOSE("  [+] Association Layer  search ...... "
+                    << (associatedLayer ? "ok." : "failed."));
     ATH_MSG_VERBOSE("  [+] Destinaiton Volume search ...... " << (destVolume ? "ok." : "failed."));
     // give a line of output when start volume is destination volume
     if (destVolume == associatedVolume) {
       ATH_MSG_VERBOSE("  [+] Start volume is destination volume.");
     }
     std::string navDirString =
-      ((navigationDirection < 0) ? "oppositeMomentum" : (navigationDirection > 0) ? "alongMomentum" : "undefined");
+      ((navigationDirection < 0) ? "oppositeMomentum"
+                                 : (navigationDirection > 0) ? "alongMomentum" : "undefined");
     ATH_MSG_VERBOSE("  [+] NavigationDirection is         : " << navDirString);
-    ATH_MSG_VERBOSE("  [I] initializeNaviagtion() end --------------------------------------------- ");
+    ATH_MSG_VERBOSE("  [I] initializeNaviagtion() end ---------------------- ");
   }
 
-  // ---------------------------------------------------------------------------------------------------
+  // ----------------------------------------------------------------------------
   return navigationDirection;
 }
 
 int
-Trk::Extrapolator::radialDirection(const Trk::TrackParameters &pars, PropDirection dir) const {
+Trk::Extrapolator::radialDirection(const Trk::TrackParameters& pars, PropDirection dir) const
+{
   // safe inbound/outbound estimation
   double prePositionR = pars.position().perp();
 
-  return (prePositionR > (pars.position() + dir * 0.5 * prePositionR * pars.momentum().normalized()).perp()) ? -1 : 1;
+  return (prePositionR >
+          (pars.position() + dir * 0.5 * prePositionR * pars.momentum().normalized()).perp())
+           ? -1
+           : 1;
 }
 
 bool
-Trk::Extrapolator::radialDirectionCheck(
-    const EventContext& ctx,
-    const IPropagator& prop,
-    const TrackParameters& startParm,
-    const TrackParameters& parsOnLayer,
-    const TrackingVolume& tvol,
-    PropDirection dir,
-    ParticleHypothesis particle) const
+Trk::Extrapolator::radialDirectionCheck(const EventContext& ctx,
+                                        const IPropagator& prop,
+                                        const TrackParameters& startParm,
+                                        const TrackParameters& parsOnLayer,
+                                        const TrackingVolume& tvol,
+                                        PropDirection dir,
+                                        ParticleHypothesis particle) const
 {
-   
-  const Amg::Vector3D &startPosition = startParm.position();
-  const Amg::Vector3D &onLayerPosition = parsOnLayer.position();
+
+  const Amg::Vector3D& startPosition = startParm.position();
+  const Amg::Vector3D& onLayerPosition = parsOnLayer.position();
 
   // the 3D distance to the layer intersection
   double distToLayer = (startPosition - onLayerPosition).mag();
   // get the innermost contained surface for crosscheck
-  const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &boundarySurfaces = tvol.boundarySurfaces();
+  const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& boundarySurfaces =
+    tvol.boundarySurfaces();
 
   // only for tubes the crossing makes sense to check for validity
   if (boundarySurfaces.size() == 4) {
     // it can be either the next layer from the initial point, or the inner tube boundary surface
-    const Trk::Surface &insideSurface = (boundarySurfaces[Trk::tubeInnerCover].get())->surfaceRepresentation();
+    const Trk::Surface& insideSurface =
+      (boundarySurfaces[Trk::tubeInnerCover].get())->surfaceRepresentation();
     // const Trk::TrackParameters* parsOnInsideSurface =
-    std::unique_ptr<const Trk::TrackParameters> parsOnInsideSurface(
-      prop.propagateParameters(
-        ctx, startParm, insideSurface, dir, true, m_fieldProperties, particle));
-   
+    std::unique_ptr<const Trk::TrackParameters> parsOnInsideSurface(prop.propagateParameters(
+      ctx, startParm, insideSurface, dir, true, m_fieldProperties, particle));
+
     double distToInsideSurface =
       parsOnInsideSurface ? (startPosition - (parsOnInsideSurface->position())).mag() : 10e10;
 
     ATH_MSG_VERBOSE("  [+] Radial direction check start - at " << positionOutput(startPosition));
     ATH_MSG_VERBOSE("  [+] Radial direction check layer - at " << positionOutput(onLayerPosition));
     if (parsOnInsideSurface) {
-      ATH_MSG_VERBOSE("  [+] Radial direction check inner - at " << positionOutput(parsOnInsideSurface->position()));
+      ATH_MSG_VERBOSE("  [+] Radial direction check inner - at "
+                      << positionOutput(parsOnInsideSurface->position()));
     }
 
     // memory cleanup (no garbage bin, this is faster)
-    ATH_MSG_VERBOSE(
-      "  [+] Check radial direction: distance layer / boundary = " << distToLayer << " / " << distToInsideSurface);
+    ATH_MSG_VERBOSE("  [+] Check radial direction: distance layer / boundary = "
+                    << distToLayer << " / " << distToInsideSurface);
     // the intersection with the original layer is valid if it is before the inside surface
     return distToLayer < distToInsideSurface;
   }
@@ -4596,17 +4521,19 @@ Trk::Extrapolator::radialDirectionCheck(
 }
 
 std::string
-Trk::Extrapolator::layerRZoutput(const Trk::Layer &lay) const {
+Trk::Extrapolator::layerRZoutput(const Trk::Layer& lay) const
+{
   std::stringstream outStream;
 
-  outStream << "[r,z] = [ " << lay.surfaceRepresentation().bounds().r()
-            << ", " << lay.surfaceRepresentation().center().z() << " ] - Index ";
+  outStream << "[r,z] = [ " << lay.surfaceRepresentation().bounds().r() << ", "
+            << lay.surfaceRepresentation().center().z() << " ] - Index ";
   outStream << lay.layerIndex().value();
   return outStream.str();
 }
 
 std::string
-Trk::Extrapolator::positionOutput(const Amg::Vector3D &pos) const {
+Trk::Extrapolator::positionOutput(const Amg::Vector3D& pos) const
+{
   std::stringstream outStream;
 
   if (m_printRzOutput) {
@@ -4618,7 +4545,8 @@ Trk::Extrapolator::positionOutput(const Amg::Vector3D &pos) const {
 }
 
 std::string
-Trk::Extrapolator::momentumOutput(const Amg::Vector3D &mom) const {
+Trk::Extrapolator::momentumOutput(const Amg::Vector3D& mom) const
+{
   std::stringstream outStream;
 
   outStream << "[eta,phi] = [ " << mom.eta() << ", " << mom.phi() << " ]";
@@ -4626,15 +4554,14 @@ Trk::Extrapolator::momentumOutput(const Amg::Vector3D &mom) const {
 }
 
 void
-Trk::Extrapolator::addMaterialEffectsOnTrack(
-    const EventContext& ctx,
-    Cache& cache,
-    const Trk::IPropagator& prop,
-    TrackParmPtr parm_ref,
-    const Trk::Layer& lay,
-    const Trk::TrackingVolume& /*tvol*/,
-    Trk::PropDirection propDir,
-    Trk::ParticleHypothesis particle) const
+Trk::Extrapolator::addMaterialEffectsOnTrack(const EventContext& ctx,
+                                             Cache& cache,
+                                             const Trk::IPropagator& prop,
+                                             TrackParmPtr parm_ref,
+                                             const Trk::Layer& lay,
+                                             const Trk::TrackingVolume& /*tvol*/,
+                                             Trk::PropDirection propDir,
+                                             Trk::ParticleHypothesis particle) const
 {
 
   ManagedTrackParmPtr parms(cache.manage(parm_ref));
@@ -4646,25 +4573,21 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
     ++m_meotSearchCallsBw;
   }
   // preparation for the material effects on track
-  const Trk::MaterialProperties *materialProperties = nullptr;
+  const Trk::MaterialProperties* materialProperties = nullptr;
   double pathCorrection = 0.;
   ManagedTrackParmPtr parsOnLayer;
   // make sure the parameters are on surface
   if (parms->associatedSurface() != lay.surfaceRepresentation()) {
     if (m_checkForCompundLayers) {
-      const Trk::CompoundLayer *cl = dynamic_cast<const Trk::CompoundLayer *>(&lay);
+      const Trk::CompoundLayer* cl = dynamic_cast<const Trk::CompoundLayer*>(&lay);
       if (cl) {
         // try each surface in turn
-        const std::vector<const Surface *> cs = cl->constituentSurfaces();
+        const std::vector<const Surface*> cs = cl->constituentSurfaces();
         for (unsigned int i = 0; i < cs.size(); ++i) {
           parsOnLayer = ManagedTrackParmPtr::recapture(
             parms,
-            prop.propagateParameters(ctx,
-                                     *parms,
-                                     *(cs[i]),
-                                     Trk::anyDirection,
-                                     false,
-                                     m_fieldProperties));
+            prop.propagateParameters(
+              ctx, *parms, *(cs[i]), Trk::anyDirection, false, m_fieldProperties));
           if (parsOnLayer) {
             break;
           }
@@ -4672,22 +4595,14 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
       } else {
         parsOnLayer = ManagedTrackParmPtr::recapture(
           parms,
-          prop.propagateParameters(ctx,
-                                   *parms,
-                                   lay.surfaceRepresentation(),
-                                   Trk::anyDirection,
-                                   false,
-                                   m_fieldProperties));
+          prop.propagateParameters(
+            ctx, *parms, lay.surfaceRepresentation(), Trk::anyDirection, false, m_fieldProperties));
       }
     } else {
       parsOnLayer = ManagedTrackParmPtr::recapture(
         parms,
-        prop.propagateParameters(ctx,
-                                 *parms,
-                                 lay.surfaceRepresentation(),
-                                 Trk::anyDirection,
-                                 false,
-                                 m_fieldProperties));
+        prop.propagateParameters(
+          ctx, *parms, lay.surfaceRepresentation(), Trk::anyDirection, false, m_fieldProperties));
     }
   } else {
     parsOnLayer = parms;
@@ -4697,8 +4612,9 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
     return;
   }
   // reference material section:
-  pathCorrection = pathCorrection > 0. ? pathCorrection :
-                   lay.surfaceRepresentation().pathCorrection(parsOnLayer->position(), parsOnLayer->momentum());
+  pathCorrection = pathCorrection > 0. ? pathCorrection
+                                       : lay.surfaceRepresentation().pathCorrection(
+                                           parsOnLayer->position(), parsOnLayer->momentum());
 
   // material properties are not given by the reference material, get them from the layer
   if (!materialProperties) {
@@ -4720,17 +4636,18 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
     if (cache.m_extrapolationCache) {
       double tInX0 = pathCorrection * materialProperties->thicknessInX0();
       if (m_dumpCache) {
-        dumpCache(cache," addMaterialEffectsOnTrack");
+        dumpCache(cache, " addMaterialEffectsOnTrack");
       }
       cache.m_extrapolationCache->updateX0(tInX0);
       double currentQoP = parsOnLayer->parameters()[Trk::qOverP];
-      std::unique_ptr<Trk::EnergyLoss> 
-         energyLoss( m_elossupdaters[0]->energyLoss(*materialProperties,std::abs(1. / currentQoP),
-                                                    pathCorrection, propDir,particle));
-      cache.m_extrapolationCache->updateEloss(energyLoss->meanIoni(), energyLoss->sigmaIoni(),
-                                        energyLoss->meanRad(), energyLoss->sigmaRad());
+      std::unique_ptr<Trk::EnergyLoss> energyLoss(m_elossupdaters[0]->energyLoss(
+        *materialProperties, std::abs(1. / currentQoP), pathCorrection, propDir, particle));
+      cache.m_extrapolationCache->updateEloss(energyLoss->meanIoni(),
+                                              energyLoss->sigmaIoni(),
+                                              energyLoss->meanRad(),
+                                              energyLoss->sigmaRad());
       if (m_dumpCache) {
-        dumpCache(cache," After");
+        dumpCache(cache, " After");
       }
     }
     ATH_MSG_VERBOSE("  [V] Validation mode: MaterialProperties found on this layer.");
@@ -4739,20 +4656,19 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
     double tInX0 = pathCorrection * materialProperties->thicknessInX0();
     // get the q/p for the energyLoss object
     double currentQoP = parsOnLayer->parameters()[Trk::qOverP];
-    Trk::EnergyLoss *energyLoss = m_elossupdaters[0]->energyLoss(*materialProperties, fabs(
-                                                  1. / currentQoP), pathCorrection, propDir, particle);
+    Trk::EnergyLoss* energyLoss = m_elossupdaters[0]->energyLoss(
+      *materialProperties, fabs(1. / currentQoP), pathCorrection, propDir, particle);
     // get the scattering angle
     double sigmaMS = sqrt(m_msupdaters[0]->sigmaSquare(
       *materialProperties, fabs(1. / currentQoP), pathCorrection, particle));
-    Trk::ScatteringAngles* scatAngles = new ScatteringAngles(
-      0, 0, sigmaMS / sin(parsOnLayer->parameters()[Trk::theta]), sigmaMS);
+    Trk::ScatteringAngles* scatAngles =
+      new ScatteringAngles(0, 0, sigmaMS / sin(parsOnLayer->parameters()[Trk::theta]), sigmaMS);
 
-    Trk::MaterialEffectsOnTrack* meot = new Trk::MaterialEffectsOnTrack(tInX0,
-                                                                        scatAngles,
-                                                                        energyLoss,
-                                                                        *lay.surfaceRepresentation().baseSurface());
+    Trk::MaterialEffectsOnTrack* meot = new Trk::MaterialEffectsOnTrack(
+      tInX0, scatAngles, energyLoss, *lay.surfaceRepresentation().baseSurface());
     // push it to the material states
-    cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, parsOnLayer.release(), nullptr, meot));
+    cache.m_matstates->push_back(
+      new TrackStateOnSurface(nullptr, parsOnLayer.release(), nullptr, meot));
     // update cache
     if (cache.m_extrapolationCache) {
       if (energyLoss->meanIoni() == 0. && tInX0 > 0.) {
@@ -4761,7 +4677,7 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
                         "switch joboption DetailedEloss on ");
       }
       if (m_dumpCache) {
-        dumpCache(cache," addMaterialEffectsOnTrack");
+        dumpCache(cache, " addMaterialEffectsOnTrack");
       }
       cache.m_extrapolationCache->updateX0(tInX0);
       cache.m_extrapolationCache->updateEloss(energyLoss->meanIoni(),
@@ -4769,37 +4685,37 @@ Trk::Extrapolator::addMaterialEffectsOnTrack(
                                               energyLoss->meanRad(),
                                               energyLoss->sigmaRad());
       if (m_dumpCache) {
-        dumpCache(cache," After");
+        dumpCache(cache, " After");
       }
     }
   }
 }
 
 void
-Trk::Extrapolator::dumpCache(Cache& cache, const std::string& txt) const {
+Trk::Extrapolator::dumpCache(Cache& cache, const std::string& txt) const
+{
   if (cache.m_cacheEloss != nullptr && cache.m_cacheEloss != cache.m_extrapolationCache->eloss()) {
-    ATH_MSG_DEBUG(
-      " NO dumpCache: Eloss cache pointer overwritten " << cache.m_cacheEloss << " from extrapolationCache " <<
-      cache.m_extrapolationCache->eloss());
+    ATH_MSG_DEBUG(" NO dumpCache: Eloss cache pointer overwritten "
+                  << cache.m_cacheEloss << " from extrapolationCache "
+                  << cache.m_extrapolationCache->eloss());
     return;
   }
 
-  ATH_MSG_DEBUG(
-    txt << " X0 " << cache.m_extrapolationCache->x0tot() << " Eloss deltaE "
-        << cache.m_extrapolationCache->eloss()->deltaE() << " Eloss sigma "
-        << cache.m_extrapolationCache->eloss()->sigmaDeltaE() << " meanIoni "
-        << cache.m_extrapolationCache->eloss()->meanIoni() << " sigmaIoni "
-        << cache.m_extrapolationCache->eloss()->sigmaIoni() << " meanRad "
-        << cache.m_extrapolationCache->eloss()->meanRad() << " sigmaRad "
-        << cache.m_extrapolationCache->eloss()->sigmaRad());
+  ATH_MSG_DEBUG(txt << " X0 " << cache.m_extrapolationCache->x0tot() << " Eloss deltaE "
+                    << cache.m_extrapolationCache->eloss()->deltaE() << " Eloss sigma "
+                    << cache.m_extrapolationCache->eloss()->sigmaDeltaE() << " meanIoni "
+                    << cache.m_extrapolationCache->eloss()->meanIoni() << " sigmaIoni "
+                    << cache.m_extrapolationCache->eloss()->sigmaIoni() << " meanRad "
+                    << cache.m_extrapolationCache->eloss()->meanRad() << " sigmaRad "
+                    << cache.m_extrapolationCache->eloss()->sigmaRad());
 }
 
 bool
-Trk::Extrapolator::checkCache(Cache& cache,const std:: string& txt) const {
+Trk::Extrapolator::checkCache(Cache& cache, const std::string& txt) const
+{
   if (cache.m_cacheEloss != nullptr && cache.m_cacheEloss != cache.m_extrapolationCache->eloss()) {
-    ATH_MSG_DEBUG(
-      txt << " PROBLEM Eloss cache pointer overwritten " << cache.m_cacheEloss << " from extrapolationCache " <<
-      cache.m_extrapolationCache->eloss());
+    ATH_MSG_DEBUG(txt << " PROBLEM Eloss cache pointer overwritten " << cache.m_cacheEloss
+                      << " from extrapolationCache " << cache.m_extrapolationCache->eloss());
     return false;
   } else {
     return true;
@@ -4807,21 +4723,20 @@ Trk::Extrapolator::checkCache(Cache& cache,const std:: string& txt) const {
 }
 
 const std::vector<std::pair<const Trk::TrackParameters*, int>>*
-Trk::Extrapolator::extrapolate(
-    const EventContext& ctx,
-    const Trk::TrackParameters& parm,
-    Trk::PropDirection dir,
-    Trk::ParticleHypothesis particle,
-    std::vector<const Trk::TrackStateOnSurface*>*& material,
-    int destination) const
+Trk::Extrapolator::extrapolate(const EventContext& ctx,
+                               const Trk::TrackParameters& parm,
+                               Trk::PropDirection dir,
+                               Trk::ParticleHypothesis particle,
+                               std::vector<const Trk::TrackStateOnSurface*>*& material,
+                               int destination) const
 {
 
-
   // extrapolation method intended for collection of intersections with active layers/volumes
   // extrapolation stops at indicated geoID subdetector exit
   Cache cache{};
   ++cache.m_methodSequence;
-  ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolate(through active volumes), from " << parm.position());
+  ATH_MSG_DEBUG("M-[" << cache.m_methodSequence << "] extrapolate(through active volumes), from "
+                      << parm.position());
   // reset the path
   cache.m_path = 0.;
   // initialize parameters vector
@@ -4830,27 +4745,28 @@ Trk::Extrapolator::extrapolate(
   cache.m_matstates = material;
   // dummy input
   cache.m_currentStatic = nullptr;
-  const Trk::TrackingVolume *boundaryVol = nullptr;
+  const Trk::TrackingVolume* boundaryVol = nullptr;
   // cleanup
   cache.m_parametersAtBoundary.resetBoundaryInformation();
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
   // extrapolate to subdetector boundary
   ManagedTrackParmPtr subDetBounds(extrapolateToVolumeWithPathLimit(
     ctx, cache, cache.manage(parm).index(), -1., dir, particle, boundaryVol));
 
   while (subDetBounds) {
-    ATH_MSG_DEBUG("  Identified subdetector boundary crossing saved " << positionOutput(subDetBounds->position()));
+    ATH_MSG_DEBUG("  Identified subdetector boundary crossing saved "
+                  << positionOutput(subDetBounds->position()));
     ManagedTrackParmPtr nextPar(subDetBounds);
-    cache.m_identifiedParameters->push_back(std::pair<const Trk::TrackParameters *, int>
-                                            (subDetBounds.release(), 
-                                             cache.m_currentStatic ? cache.m_currentStatic->geometrySignature() : 0));
+    cache.m_identifiedParameters->push_back(std::pair<const Trk::TrackParameters*, int>(
+      subDetBounds.release(),
+      cache.m_currentStatic ? cache.m_currentStatic->geometrySignature() : 0));
     if (cache.m_currentStatic && cache.m_currentStatic->geometrySignature() == destination) {
       break;
     }
 
     if (!cache.m_parametersAtBoundary.nextVolume) {
-      break;               // world boundary
+      break; // world boundary
     }
     subDetBounds = extrapolateToVolumeWithPathLimit(
       ctx, cache, nextPar.index(), -1., dir, particle, boundaryVol);
@@ -4859,16 +4775,15 @@ Trk::Extrapolator::extrapolate(
 }
 
 const Trk::TrackParameters*
-Trk::Extrapolator::extrapolateWithPathLimit(
-    const EventContext& ctx,
-    const Trk::TrackParameters& parm,
-    double& pathLim,
-    Trk::PropDirection dir,
-    Trk::ParticleHypothesis particle,
-    std::vector<const Trk::TrackParameters*>*& parmOnSf,
-    std::vector<const Trk::TrackStateOnSurface*>*& material,
-    const Trk::TrackingVolume* boundaryVol,
-    MaterialUpdateMode matupmod) const
+Trk::Extrapolator::extrapolateWithPathLimit(const EventContext& ctx,
+                                            const Trk::TrackParameters& parm,
+                                            double& pathLim,
+                                            Trk::PropDirection dir,
+                                            Trk::ParticleHypothesis particle,
+                                            std::vector<const Trk::TrackParameters*>*& parmOnSf,
+                                            std::vector<const Trk::TrackStateOnSurface*>*& material,
+                                            const Trk::TrackingVolume* boundaryVol,
+                                            MaterialUpdateMode matupmod) const
 {
   // extrapolation method intended for simulation of particle decay; collects
   // intersections with active layers possible outcomes:1/ returns curvilinear
@@ -4876,19 +4791,17 @@ Trk::Extrapolator::extrapolateWithPathLimit(
   //                   2/ returns parameters at destination volume boundary
   //                   3/ returns 0 ( particle stopped ) but keeps vector of
   //                   hits
-  ATH_MSG_DEBUG(
-    "M-["
-    << 1 /* should be ++cache.m_methodSequence but cache not yet created */
-    << "] extrapolateWithPathLimit(...) " << pathLim << ", from "
-    << parm.position());
+  ATH_MSG_DEBUG("M-[" << 1 /* should be ++cache.m_methodSequence but cache not yet created */
+                      << "] extrapolateWithPathLimit(...) " << pathLim << ", from "
+                      << parm.position());
 
   if (!m_stepPropagator) {
     // Get the STEP_Propagator AlgTool
     if (m_stepPropagator.retrieve().isFailure()) {
-       ATH_MSG_ERROR("Failed to retrieve tool " << m_stepPropagator);
-       ATH_MSG_ERROR("Configure STEP Propagator for extrapolation with path limit");
-       return nullptr;
-     }
+      ATH_MSG_ERROR("Failed to retrieve tool " << m_stepPropagator);
+      ATH_MSG_ERROR("Configure STEP Propagator for extrapolation with path limit");
+      return nullptr;
+    }
   }
   Cache cache{};
   // reset the path
@@ -4896,19 +4809,20 @@ Trk::Extrapolator::extrapolateWithPathLimit(
   ++cache.m_methodSequence;
   // initialize parameters vector
   if (parmOnSf && !parmOnSf->empty()) {
-     throw std::logic_error("Output track paramters vector not empty as supposed to be.");
+    throw std::logic_error("Output track paramters vector not empty as supposed to be.");
   }
-  cache.m_parametersOnDetElements    = parmOnSf;
+  cache.m_parametersOnDetElements = parmOnSf;
   cache.m_ownParametersOnDetElements = false;
   // initialize material collection
   cache.m_matstates = material;
   // cleanup
   cache.m_parametersAtBoundary.resetBoundaryInformation();
-  //Material effect updator cache
+  // Material effect updator cache
   populateMatEffUpdatorCache(cache);
- 
+
   // if no input volume, define as highest volume
-  // const Trk::TrackingVolume* destVolume = boundaryVol ? boundaryVol : m_navigator->highestVolume();
+  // const Trk::TrackingVolume* destVolume = boundaryVol ? boundaryVol :
+  // m_navigator->highestVolume();
   cache.m_currentStatic = nullptr;
   if (boundaryVol && !boundaryVol->inside(parm.position(), m_tolerance)) {
     return nullptr;
@@ -4923,15 +4837,8 @@ Trk::Extrapolator::extrapolateWithPathLimit(
   }
 
   // extrapolate to destination volume boundary with path limit
-  ManagedTrackParmPtr returnParms(
-    extrapolateToVolumeWithPathLimit(ctx,
-                                     cache,
-                                     cache.manage(parm).index(),
-                                     pathLim,
-                                     dir,
-                                     particle,
-                                     boundaryVol,
-                                     matupmod));
+  ManagedTrackParmPtr returnParms(extrapolateToVolumeWithPathLimit(
+    ctx, cache, cache.manage(parm).index(), pathLim, dir, particle, boundaryVol, matupmod));
 
   // folr debugging
   cache.m_robustSampling = m_robustSampling;
@@ -4943,15 +4850,14 @@ Trk::Extrapolator::extrapolateWithPathLimit(
 }
 
 Trk::ManagedTrackParmPtr
-Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
-  const EventContext& ctx,
-  Cache& cache,
-  TrackParmPtr parm_ref,
-  double pathLim,
-  Trk::PropDirection dir,
-  Trk::ParticleHypothesis particle,
-  const Trk::TrackingVolume* destVol,
-  MaterialUpdateMode matupmod) const
+Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
+                                                    Cache& cache,
+                                                    TrackParmPtr parm_ref,
+                                                    double pathLim,
+                                                    Trk::PropDirection dir,
+                                                    Trk::ParticleHypothesis particle,
+                                                    const Trk::TrackingVolume* destVol,
+                                                    MaterialUpdateMode matupmod) const
 {
 
   // returns:
@@ -4961,23 +4867,20 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
   ManagedTrackParmPtr parm(cache.manage(parm_ref));
   ManagedTrackParmPtr currPar(parm);
   const Trk::TrackingVolume* currVol = nullptr;
-  const Trk::TrackingVolume *nextVol = nullptr;
+  const Trk::TrackingVolume* nextVol = nullptr;
   std::vector<unsigned int> solutions;
-  const Trk::TrackingVolume *assocVol = nullptr;
+  const Trk::TrackingVolume* assocVol = nullptr;
   unsigned int iDest = 0;
 
   // destination volume boundary ?
-  if (destVol &&
-      m_navigator->atVolumeBoundary(
-        currPar.get(), destVol, dir, nextVol, m_tolerance) &&
+  if (destVol && m_navigator->atVolumeBoundary(currPar.get(), destVol, dir, nextVol, m_tolerance) &&
       nextVol != destVol) {
     pathLim = cache.m_path;
     return currPar;
   }
 
   bool resolveActive = true;
-  if (cache.m_lastMaterialLayer &&
-      !cache.m_lastMaterialLayer->isOnLayer(parm->position())) {
+  if (cache.m_lastMaterialLayer && !cache.m_lastMaterialLayer->isOnLayer(parm->position())) {
     cache.m_lastMaterialLayer = nullptr;
   }
   if (!cache.m_highestVolume) {
@@ -4992,11 +4895,13 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
 
   // target volume may not be part of tracking geometry
   if (destVol) {
-    const Trk::TrackingVolume *tgVol = m_navigator->trackingGeometry()->trackingVolume(destVol->volumeName());
+    const Trk::TrackingVolume* tgVol =
+      m_navigator->trackingGeometry()->trackingVolume(destVol->volumeName());
     if (!tgVol || tgVol != destVol) {
-      const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > >& bounds = destVol->boundarySurfaces();
+      const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+        destVol->boundarySurfaces();
       for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-        const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+        const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
         cache.m_navigSurfs.emplace_back(&surf, true);
       }
       iDest = bounds.size();
@@ -5015,7 +4920,8 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
 
   bool navigDone = false;
   if (cache.m_parametersAtBoundary.nextParameters && cache.m_parametersAtBoundary.nextVolume) {
-    if ((cache.m_parametersAtBoundary.nextParameters->position() - currPar->position()).mag() < 0.001 &&
+    if ((cache.m_parametersAtBoundary.nextParameters->position() - currPar->position()).mag() <
+          0.001 &&
         cache.m_parametersAtBoundary.nextParameters->momentum().dot(currPar->momentum()) > 0.001) {
       nextVol = cache.m_parametersAtBoundary.nextVolume;
       navigDone = true;
@@ -5027,11 +4933,13 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
   }
 
   if (!navigDone &&
-      m_navigator->atVolumeBoundary(currPar.get(), cache.m_currentStatic, dir, nextVol,
-                                    m_tolerance) && nextVol != cache.m_currentStatic) {
+      m_navigator->atVolumeBoundary(
+        currPar.get(), cache.m_currentStatic, dir, nextVol, m_tolerance) &&
+      nextVol != cache.m_currentStatic) {
     // no next volume found --- end of the world
     if (!nextVol) {
-      ATH_MSG_DEBUG("  [+] Word boundary reached        - at " << positionOutput(currPar->position()));
+      ATH_MSG_DEBUG("  [+] Word boundary reached        - at "
+                    << positionOutput(currPar->position()));
       if (!destVol) {
         pathLim = cache.m_path;
       }
@@ -5044,39 +4952,27 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
 
   // alignable volume ?
   if (cache.m_currentStatic && cache.m_currentStatic->geometrySignature() == Trk::Calo) {
-    if(cache.m_currentStatic->isAlignable()){
+    if (cache.m_currentStatic->isAlignable()) {
       const Trk::AlignableTrackingVolume* alignTV =
         static_cast<const Trk::AlignableTrackingVolume*>(cache.m_currentStatic);
-      ManagedTrackParmPtr nextPar(extrapolateInAlignableTV(ctx,
-                                                           cache,
-                                                           *m_stepPropagator,
-                                                           currPar.index(),
-                                                           nullptr,
-                                                           alignTV,
-                                                           dir,
-                                                           particle));
+      ManagedTrackParmPtr nextPar(extrapolateInAlignableTV(
+        ctx, cache, *m_stepPropagator, currPar.index(), nullptr, alignTV, dir, particle));
       if (nextPar) {
-        return extrapolateToVolumeWithPathLimit(ctx,
-                                                cache,
-                                                nextPar.index(),
-                                                pathLim,
-                                                dir,
-                                                particle,
-                                                destVol,
-                                                matupmod);
-      }else {
+        return extrapolateToVolumeWithPathLimit(
+          ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
+      } else {
         return ManagedTrackParmPtr();
       }
     }
   }
 
   // update if new static volume
-  if (updateStatic) {    // retrieve boundaries
+  if (updateStatic) { // retrieve boundaries
     cache.m_staticBoundaries.clear();
-    const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds =
+    const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
       cache.m_currentStatic->boundarySurfaces();
     for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-      const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+      const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
       cache.m_staticBoundaries.emplace_back(&surf, true);
     }
 
@@ -5088,67 +4984,71 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
     cache.m_navigLays.clear();
 
     // detached volume boundaries
-    const std::vector<const Trk::DetachedTrackingVolume *> *detVols = cache.m_currentStatic->confinedDetachedVolumes();
+    const std::vector<const Trk::DetachedTrackingVolume*>* detVols =
+      cache.m_currentStatic->confinedDetachedVolumes();
     if (detVols) {
-      std::vector<const Trk::DetachedTrackingVolume *>::const_iterator iTer = detVols->begin();
+      std::vector<const Trk::DetachedTrackingVolume*>::const_iterator iTer = detVols->begin();
       for (; iTer != detVols->end(); iTer++) {
         // active station ?
-        const Trk::Layer *layR = (*iTer)->layerRepresentation();
+        const Trk::Layer* layR = (*iTer)->layerRepresentation();
         bool active = layR && layR->layerType();
-        const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > >  &detBounds =
+        const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& detBounds =
           (*iTer)->trackingVolume()->boundarySurfaces();
         if (active) {
           cache.m_detachedVols.emplace_back(*iTer, detBounds.size());
           for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-            const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+            const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
             cache.m_detachedBoundaries.emplace_back(&surf, true);
           }
-        } else if (cache.m_currentStatic->geometrySignature() != Trk::MS ||
-                   !m_useMuonMatApprox || (*iTer)->name().substr((*iTer)->name().size() - 4, 4) == "PERM") {  
+        } else if (cache.m_currentStatic->geometrySignature() != Trk::MS || !m_useMuonMatApprox ||
+                   (*iTer)->name().substr((*iTer)->name().size() - 4, 4) == "PERM") {
           // retrieve inert detached
           // objects only if needed
           if ((*iTer)->trackingVolume()->zOverAtimesRho() != 0. &&
               (!(*iTer)->trackingVolume()->confinedDenseVolumes() ||
-               (*iTer)->trackingVolume()->confinedDenseVolumes()->empty())
-              && (!(*iTer)->trackingVolume()->confinedArbitraryLayers() ||
-                  (*iTer)->trackingVolume()->confinedArbitraryLayers()->empty())) {
+               (*iTer)->trackingVolume()->confinedDenseVolumes()->empty()) &&
+              (!(*iTer)->trackingVolume()->confinedArbitraryLayers() ||
+               (*iTer)->trackingVolume()->confinedArbitraryLayers()->empty())) {
             cache.m_denseVols.emplace_back((*iTer)->trackingVolume(), detBounds.size());
             for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-              const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+              const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
               cache.m_denseBoundaries.emplace_back(&surf, true);
             }
           }
-          const std::vector<const Trk::Layer *> *confLays = (*iTer)->trackingVolume()->confinedArbitraryLayers();
-          if ((*iTer)->trackingVolume()->confinedDenseVolumes() || (confLays && confLays->size() > detBounds.size())) {
+          const std::vector<const Trk::Layer*>* confLays =
+            (*iTer)->trackingVolume()->confinedArbitraryLayers();
+          if ((*iTer)->trackingVolume()->confinedDenseVolumes() ||
+              (confLays && confLays->size() > detBounds.size())) {
             cache.m_detachedVols.emplace_back(*iTer, detBounds.size());
             for (unsigned int ibb = 0; ibb < detBounds.size(); ibb++) {
-              const Trk::Surface &surf = (detBounds[ibb].get())->surfaceRepresentation();
+              const Trk::Surface& surf = (detBounds[ibb].get())->surfaceRepresentation();
               cache.m_detachedBoundaries.emplace_back(&surf, true);
             }
           } else if (confLays) {
-            std::vector<const Trk::Layer *>::const_iterator lIt = confLays->begin();
+            std::vector<const Trk::Layer*>::const_iterator lIt = confLays->begin();
             for (; lIt != confLays->end(); lIt++) {
-              cache.m_layers.emplace_back(&((*lIt)->surfaceRepresentation()),
-                                          true);
+              cache.m_layers.emplace_back(&((*lIt)->surfaceRepresentation()), true);
               cache.m_navigLays.emplace_back((*iTer)->trackingVolume(), *lIt);
             }
           }
         }
       }
     }
-    cache.m_denseResolved = std::pair<unsigned int, unsigned int>(
-      cache.m_denseVols.size(), cache.m_denseBoundaries.size());
+    cache.m_denseResolved = std::pair<unsigned int, unsigned int>(cache.m_denseVols.size(),
+                                                                  cache.m_denseBoundaries.size());
     cache.m_layerResolved = cache.m_layers.size();
   }
 
-  cache.m_navigSurfs.insert(cache.m_navigSurfs.end(), cache.m_staticBoundaries.begin(), cache.m_staticBoundaries.end());
+  cache.m_navigSurfs.insert(
+    cache.m_navigSurfs.end(), cache.m_staticBoundaries.begin(), cache.m_staticBoundaries.end());
 
   // resolve the use of dense volumes
-  cache.m_dense = (cache.m_currentStatic->geometrySignature() == Trk::MS && m_useMuonMatApprox) ||
-            (cache.m_currentStatic->geometrySignature() != Trk::MS && m_useDenseVolumeDescription);
+  cache.m_dense =
+    (cache.m_currentStatic->geometrySignature() == Trk::MS && m_useMuonMatApprox) ||
+    (cache.m_currentStatic->geometrySignature() != Trk::MS && m_useDenseVolumeDescription);
 
   // reset remaining counters
-  cache.m_currentDense = cache.m_dense ?  cache.m_currentStatic : cache.m_highestVolume;
+  cache.m_currentDense = cache.m_dense ? cache.m_currentStatic : cache.m_highestVolume;
   cache.m_navigBoundaries.clear();
   if (cache.m_denseVols.size() > cache.m_denseResolved.first) {
     cache.m_denseVols.resize(cache.m_denseResolved.first);
@@ -5168,54 +5068,56 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
   // collect : subvolume boundaries, ordered/unordered layers, confined dense volumes
   //////////////////////////////////////////////////////
   // const Trk::DetachedTrackingVolume* currentActive = 0;
-  std::vector<std::pair<const Trk::TrackingVolume *, unsigned int> > navigVols;
+  std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>> navigVols;
 
   gp = currPar->position();
-  std::vector<const Trk::DetachedTrackingVolume *> *detVols =
+  std::vector<const Trk::DetachedTrackingVolume*>* detVols =
     m_navigator->trackingGeometry()->lowestDetachedTrackingVolumes(gp);
-  std::vector<const Trk::DetachedTrackingVolume *>::iterator dIter = detVols->begin();
+  std::vector<const Trk::DetachedTrackingVolume*>::iterator dIter = detVols->begin();
   for (; dIter != detVols->end(); dIter++) {
-    const Trk::Layer *layR = (*dIter)->layerRepresentation();
+    const Trk::Layer* layR = (*dIter)->layerRepresentation();
     bool active = layR && layR->layerType();
     if (active && !resolveActive) {
       continue;
     }
-    if (!active && cache.m_currentStatic->geometrySignature() == Trk::MS && m_useMuonMatApprox
-        && (*dIter)->name().substr((*dIter)->name().size() - 4, 4) != "PERM") {
+    if (!active && cache.m_currentStatic->geometrySignature() == Trk::MS && m_useMuonMatApprox &&
+        (*dIter)->name().substr((*dIter)->name().size() - 4, 4) != "PERM") {
       continue;
     }
-    const Trk::TrackingVolume *dVol = (*dIter)->trackingVolume();
+    const Trk::TrackingVolume* dVol = (*dIter)->trackingVolume();
     // detached volume exit ?
-    bool dExit = m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) && !nextVol;
+    bool dExit =
+      m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) && !nextVol;
     if (dExit) {
       continue;
     }
     // inert material
-    const std::vector<const Trk::TrackingVolume *> *confinedDense = dVol->confinedDenseVolumes();
-    const std::vector<const Trk::Layer *> *confinedLays = dVol->confinedArbitraryLayers();
+    const std::vector<const Trk::TrackingVolume*>* confinedDense = dVol->confinedDenseVolumes();
+    const std::vector<const Trk::Layer*>* confinedLays = dVol->confinedArbitraryLayers();
 
     if (!active && !confinedDense && !confinedLays) {
       continue;
     }
-    const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds = dVol->boundarySurfaces();
+    const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+      dVol->boundarySurfaces();
     if (!active && !confinedDense && confinedLays->size() <= bounds.size()) {
       continue;
     }
     if (confinedDense || confinedLays) {
       navigVols.emplace_back(dVol, bounds.size());
       for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-        const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+        const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
         cache.m_navigBoundaries.emplace_back(&surf, true);
       }
       // collect dense volume boundary
       if (confinedDense) {
-        std::vector<const Trk::TrackingVolume *>::const_iterator vIter = confinedDense->begin();
+        std::vector<const Trk::TrackingVolume*>::const_iterator vIter = confinedDense->begin();
         for (; vIter != confinedDense->end(); vIter++) {
-          const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds =
+          const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
             (*vIter)->boundarySurfaces();
           cache.m_denseVols.emplace_back(*vIter, bounds.size());
           for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-            const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+            const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
             cache.m_denseBoundaries.emplace_back(&surf, true);
           }
         }
@@ -5227,10 +5129,10 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
           cache.m_navigLays.emplace_back(dVol, (*confinedLays)[il]);
         }
       }
-    } else {   // active material
-      const Trk::TrackingVolume *detVol = dVol->associatedSubVolume(gp);
+    } else { // active material
+      const Trk::TrackingVolume* detVol = dVol->associatedSubVolume(gp);
       if (!detVol && dVol->confinedVolumes()) {
-        std::vector<const Trk::TrackingVolume *> subvols = dVol->confinedVolumes()->arrayObjects();
+        std::vector<const Trk::TrackingVolume*> subvols = dVol->confinedVolumes()->arrayObjects();
         for (unsigned int iv = 0; iv < subvols.size(); iv++) {
           if (subvols[iv]->inside(gp, m_tolerance)) {
             detVol = subvols[iv];
@@ -5242,54 +5144,55 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
       if (!detVol) {
         detVol = dVol;
       }
-      bool vExit = m_navigator->atVolumeBoundary(currPar.get(), detVol, dir, nextVol, m_tolerance) && nextVol != detVol;
+      bool vExit =
+        m_navigator->atVolumeBoundary(currPar.get(), detVol, dir, nextVol, m_tolerance) &&
+        nextVol != detVol;
       if (vExit && nextVol && nextVol->inside(gp, m_tolerance)) {
         detVol = nextVol;
         vExit = false;
       }
       if (!vExit) {
-        const std::vector< SharedObject<const BoundarySurface<TrackingVolume> > > &bounds = detVol->boundarySurfaces();
+        const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& bounds =
+          detVol->boundarySurfaces();
         navigVols.emplace_back(detVol, bounds.size());
         for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-          const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+          const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
           cache.m_navigBoundaries.emplace_back(&surf, true);
         }
         if (detVol->zOverAtimesRho() != 0.) {
           cache.m_denseVols.emplace_back(detVol, bounds.size());
           for (unsigned int ib = 0; ib < bounds.size(); ib++) {
-            const Trk::Surface &surf = (bounds[ib].get())->surfaceRepresentation();
+            const Trk::Surface& surf = (bounds[ib].get())->surfaceRepresentation();
             cache.m_denseBoundaries.emplace_back(&surf, true);
           }
         }
         // layers ?
         if (detVol->confinedLayers()) {
           if (cache.m_robustSampling) {
-            std::vector<const Trk::Layer *> cLays = detVol->confinedLayers()->arrayObjects();
+            std::vector<const Trk::Layer*> cLays = detVol->confinedLayers()->arrayObjects();
             for (unsigned int i = 0; i < cLays.size(); i++) {
               if (cLays[i]->layerType() > 0 || cLays[i]->layerMaterialProperties()) {
                 cache.m_layers.emplace_back(&(cLays[i]->surfaceRepresentation()), true);
-                cache.m_navigLays.emplace_back(cache.m_currentStatic,
-                                                                                                  cLays[i]);
+                cache.m_navigLays.emplace_back(cache.m_currentStatic, cLays[i]);
               }
             }
           } else {
-            const Trk::Layer *lay = detVol->associatedLayer(gp);
+            const Trk::Layer* lay = detVol->associatedLayer(gp);
             // if (lay && ( (*dIter)->layerRepresentation()
             //     &&(*dIter)->layerRepresentation()->layerType()>0 ) ) currentActive=(*dIter);
             if (lay) {
-              cache.m_layers.emplace_back(&(lay->surfaceRepresentation()),
-                                                                                     true);
+              cache.m_layers.emplace_back(&(lay->surfaceRepresentation()), true);
               cache.m_navigLays.emplace_back(detVol, lay);
             }
-            const Trk::Layer *nextLayer = detVol->nextLayer(currPar->position(),
-                                                            dir * currPar->momentum().normalized(), true);
+            const Trk::Layer* nextLayer =
+              detVol->nextLayer(currPar->position(), dir * currPar->momentum().normalized(), true);
             if (nextLayer && nextLayer != lay) {
               cache.m_layers.emplace_back(&(nextLayer->surfaceRepresentation()), true);
               cache.m_navigLays.emplace_back(detVol, nextLayer);
             }
           }
         } else if (detVol->confinedArbitraryLayers()) {
-          const std::vector<const Trk::Layer *> *layers = detVol->confinedArbitraryLayers();
+          const std::vector<const Trk::Layer*>* layers = detVol->confinedArbitraryLayers();
           for (unsigned int il = 0; il < layers->size(); il++) {
             cache.m_layers.emplace_back(&((*layers)[il]->surfaceRepresentation()), true);
             cache.m_navigLays.emplace_back(detVol, (*layers)[il]);
@@ -5304,52 +5207,47 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
   if (cache.m_currentStatic->confinedLayers() && updateStatic) {
     // if ( cache.m_currentStatic->confinedLayers() ) {
     if (cache.m_robustSampling) {
-      std::vector<const Trk::Layer *> cLays = cache.m_currentStatic->confinedLayers()->arrayObjects();
+      std::vector<const Trk::Layer*> cLays =
+        cache.m_currentStatic->confinedLayers()->arrayObjects();
       for (unsigned int i = 0; i < cLays.size(); i++) {
         if (cLays[i]->layerType() > 0 || cLays[i]->layerMaterialProperties()) {
-          cache.m_layers.emplace_back(&(cLays[i]->surfaceRepresentation()),
-                                                                                 true);
+          cache.m_layers.emplace_back(&(cLays[i]->surfaceRepresentation()), true);
           cache.m_navigLays.emplace_back(cache.m_currentStatic, cLays[i]);
         }
       }
     } else {
       // * this does not work - debug !
-      const Trk::Layer *lay = cache.m_currentStatic->associatedLayer(gp);
+      const Trk::Layer* lay = cache.m_currentStatic->associatedLayer(gp);
       if (lay) {
         cache.m_layers.emplace_back(&(lay->surfaceRepresentation()), false);
         cache.m_navigLays.emplace_back(cache.m_currentStatic, lay);
-        const Trk::Layer* nextLayer = lay->nextLayer(
-          currPar->position(), dir * currPar->momentum().normalized());
+        const Trk::Layer* nextLayer =
+          lay->nextLayer(currPar->position(), dir * currPar->momentum().normalized());
         if (nextLayer && nextLayer != lay) {
-          cache.m_layers.emplace_back(&(nextLayer->surfaceRepresentation()),
-                                      false);
+          cache.m_layers.emplace_back(&(nextLayer->surfaceRepresentation()), false);
           cache.m_navigLays.emplace_back(cache.m_currentStatic, nextLayer);
         }
-        const Trk::Layer* backLayer = lay->nextLayer(
-          currPar->position(), -dir * currPar->momentum().normalized());
+        const Trk::Layer* backLayer =
+          lay->nextLayer(currPar->position(), -dir * currPar->momentum().normalized());
         if (backLayer && backLayer != lay) {
-          cache.m_layers.emplace_back(&(backLayer->surfaceRepresentation()),
-                                      false);
+          cache.m_layers.emplace_back(&(backLayer->surfaceRepresentation()), false);
           cache.m_navigLays.emplace_back(cache.m_currentStatic, backLayer);
         }
       }
     }
   }
 
-
   if (!cache.m_layers.empty()) {
     cache.m_navigSurfs.insert(
       cache.m_navigSurfs.end(), cache.m_layers.begin(), cache.m_layers.end());
   }
   if (!cache.m_denseBoundaries.empty()) {
-    cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                              cache.m_denseBoundaries.begin(),
-                              cache.m_denseBoundaries.end());
+    cache.m_navigSurfs.insert(
+      cache.m_navigSurfs.end(), cache.m_denseBoundaries.begin(), cache.m_denseBoundaries.end());
   }
   if (!cache.m_navigBoundaries.empty()) {
-    cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
-                              cache.m_navigBoundaries.begin(),
-                              cache.m_navigBoundaries.end());
+    cache.m_navigSurfs.insert(
+      cache.m_navigSurfs.end(), cache.m_navigBoundaries.begin(), cache.m_navigBoundaries.end());
   }
   if (!cache.m_detachedBoundaries.empty()) {
     cache.m_navigSurfs.insert(cache.m_navigSurfs.end(),
@@ -5357,16 +5255,16 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
                               cache.m_detachedBoundaries.end());
   }
 
-
   // current dense
   cache.m_currentDense = cache.m_highestVolume;
   if (cache.m_dense && cache.m_denseVols.empty()) {
     cache.m_currentDense = cache.m_currentStatic;
   } else {
     for (unsigned int i = 0; i < cache.m_denseVols.size(); i++) {
-      const Trk::TrackingVolume *dVol = cache.m_denseVols[i].first;
+      const Trk::TrackingVolume* dVol = cache.m_denseVols[i].first;
       if (dVol->inside(currPar->position(), m_tolerance) && dVol->zOverAtimesRho() != 0.) {
-        if (!m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) || nextVol == dVol) {
+        if (!m_navigator->atVolumeBoundary(currPar.get(), dVol, dir, nextVol, m_tolerance) ||
+            nextVol == dVol) {
           cache.m_currentDense = dVol;
         }
       }
@@ -5387,32 +5285,36 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
     std::vector<unsigned int> solutions;
     ATH_MSG_DEBUG("  [+] Starting propagation at position  "
                   << positionOutput(currPar->position())
-                  << " (current momentum: " << currPar->momentum().mag()
-                  << ")");
-    ATH_MSG_DEBUG(
-      "  [+] " << cache.m_navigSurfs.size() << " target surfaces in '"
-               << cache.m_currentDense->volumeName() << "'."); // verify that  material input  makes sense
-    ATH_MSG_DEBUG("  [+] " << " with path limit" << pathLim << ",");  // verify that material input makes sense
-    ATH_MSG_DEBUG("  [+] " << " in the direction" << dir << ".");     // verify that material input makes sense
-    if (!(cache.m_currentDense->inside(currPar->position(), m_tolerance)
-          || m_navigator->atVolumeBoundary(currPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
+                  << " (current momentum: " << currPar->momentum().mag() << ")");
+    ATH_MSG_DEBUG("  [+] " << cache.m_navigSurfs.size() << " target surfaces in '"
+                           << cache.m_currentDense->volumeName()
+                           << "'."); // verify that  material input  makes sense
+    ATH_MSG_DEBUG("  [+] "
+                  << " with path limit" << pathLim
+                  << ","); // verify that material input makes sense
+    ATH_MSG_DEBUG("  [+] "
+                  << " in the direction" << dir << "."); // verify that material input makes sense
+    if (!(cache.m_currentDense->inside(currPar->position(), m_tolerance) ||
+          m_navigator->atVolumeBoundary(
+            currPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
       cache.m_currentDense = cache.m_highestVolume;
     }
-    ManagedTrackParmPtr nextPar(ManagedTrackParmPtr::recapture(
-      currPar,
-      m_stepPropagator->propagate(ctx,
-                                  *currPar,
-                                  cache.m_navigSurfs,
-                                  dir,
-                                  m_fieldProperties,
-                                  particle,
-                                  solutions,
-                                  path,
-                                  true,
-                                  false,
-                                  cache.m_currentDense)));
+    ManagedTrackParmPtr nextPar(
+      ManagedTrackParmPtr::recapture(currPar,
+                                     m_stepPropagator->propagate(ctx,
+                                                                 *currPar,
+                                                                 cache.m_navigSurfs,
+                                                                 dir,
+                                                                 m_fieldProperties,
+                                                                 particle,
+                                                                 solutions,
+                                                                 path,
+                                                                 true,
+                                                                 false,
+                                                                 cache.m_currentDense)));
     if (nextPar) {
-      ATH_MSG_DEBUG("  [+] Position after propagation -   at " << positionOutput(nextPar->position()));
+      ATH_MSG_DEBUG("  [+] Position after propagation -   at "
+                    << positionOutput(nextPar->position()));
       ATH_MSG_DEBUG("  [+] Momentum after propagation - " << nextPar->momentum());
     }
 
@@ -5421,13 +5323,14 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
       return nextPar;
     }
     // check missing volume boundary
-    if (nextPar &&
-        !(cache.m_currentDense->inside(nextPar->position(), m_tolerance) ||
-          m_navigator->atVolumeBoundary(nextPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
-      ATH_MSG_DEBUG("  [!] ERROR: missing volume boundary for volume" << cache.m_currentDense->volumeName());
+    if (nextPar && !(cache.m_currentDense->inside(nextPar->position(), m_tolerance) ||
+                     m_navigator->atVolumeBoundary(
+                       nextPar.get(), cache.m_currentDense, dir, assocVol, m_tolerance))) {
+      ATH_MSG_DEBUG("  [!] ERROR: missing volume boundary for volume"
+                    << cache.m_currentDense->volumeName());
       if (cache.m_currentDense->zOverAtimesRho() != 0.) {
-        ATH_MSG_DEBUG("  [!] ERROR: trying to recover: repeat the propagation step in" <<
-          cache.m_highestVolume->volumeName());
+        ATH_MSG_DEBUG("  [!] ERROR: trying to recover: repeat the propagation step in"
+                      << cache.m_highestVolume->volumeName());
         cache.m_currentDense = cache.m_highestVolume;
         continue;
       }
@@ -5444,61 +5347,60 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
     }
     ATH_MSG_DEBUG("  [+] Number of intersection solutions: " << solutions.size());
     // collect material
-    if (cache.m_currentDense->zOverAtimesRho() != 0. && !cache.m_matstates && cache.m_extrapolationCache) {
+    if (cache.m_currentDense->zOverAtimesRho() != 0. && !cache.m_matstates &&
+        cache.m_extrapolationCache) {
       double dInX0 = fabs(path) / cache.m_currentDense->x0();
       double currentqoverp = nextPar->parameters()[Trk::qOverP];
       MaterialProperties materialProperties(*cache.m_currentDense, fabs(path));
-      Trk::EnergyLoss *eloss = m_elossupdaters[0]->energyLoss(materialProperties, fabs(
-                                                                1. / currentqoverp), 1., dir, particle);
+      Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
+        materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
       if (m_dumpCache) {
-        dumpCache(cache," extrapolateToVolumeWithPathLimit");
+        dumpCache(cache, " extrapolateToVolumeWithPathLimit");
       }
       cache.m_extrapolationCache->updateX0(dInX0);
-      cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                              eloss->sigmaIoni(),
-                                              eloss->meanRad(),
-                                              eloss->sigmaRad());
+      cache.m_extrapolationCache->updateEloss(
+        eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
       if (m_dumpCache) {
-        dumpCache(cache," After");
+        dumpCache(cache, " After");
       }
       delete eloss;
     }
     if (cache.m_currentDense->zOverAtimesRho() != 0. && cache.m_matstates) {
       double dInX0 = fabs(path) / cache.m_currentDense->x0();
       MaterialProperties materialProperties(*cache.m_currentDense, fabs(path));
-      double scatsigma =
-        sqrt(m_msupdaters[0]->sigmaSquare(materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
-      Trk::ScatteringAngles *newsa = new Trk::ScatteringAngles(0, 0, scatsigma / sin(
-                                                                 nextPar->parameters()[Trk::theta]), scatsigma);
+      double scatsigma = sqrt(m_msupdaters[0]->sigmaSquare(
+        materialProperties, 1. / fabs(nextPar->parameters()[qOverP]), 1., particle));
+      Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+        0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
       // energy loss
       double currentqoverp = nextPar->parameters()[Trk::qOverP];
       Trk::EnergyLoss* eloss = m_elossupdaters[0]->energyLoss(
         materialProperties, fabs(1. / currentqoverp), 1., dir, particle);
       // compare energy loss
       ATH_MSG_DEBUG(" [M] Energy loss: STEP , EnergyLossUpdator:"
-                    << nextPar->momentum().mag() - currPar->momentum().mag() << "," << eloss->deltaE());
+                    << nextPar->momentum().mag() - currPar->momentum().mag() << ","
+                    << eloss->deltaE());
       // adjust energy loss ?
-      // double adj = (particle!=nonInteracting && particle!=nonInteractingMuon && fabs(eloss0->deltaE())>0) ?
+      // double adj = (particle!=nonInteracting && particle!=nonInteractingMuon &&
+      // fabs(eloss0->deltaE())>0) ?
       // (nextPar->momentum().mag()-currPar->momentum().mag())/eloss0->deltaE() : 1;
-      // Trk::EnergyLoss* eloss = new Trk::EnergyLoss(adj*eloss0->deltaE(),adj*eloss0->sigmaDeltaE());
-      // delete eloss0;
+      // Trk::EnergyLoss* eloss = new
+      // Trk::EnergyLoss(adj*eloss0->deltaE(),adj*eloss0->sigmaDeltaE()); delete eloss0;
 
       Trk::MaterialEffectsOnTrack* mefot = new Trk::MaterialEffectsOnTrack(
         dInX0, newsa, eloss, *((nextPar->associatedSurface()).baseSurface()));
 
-      cache.m_matstates->push_back(new TrackStateOnSurface(
-        nullptr, ManagedTrackParmPtr(nextPar).release(), nullptr, mefot));
+      cache.m_matstates->push_back(
+        new TrackStateOnSurface(nullptr, ManagedTrackParmPtr(nextPar).release(), nullptr, mefot));
       if (cache.m_extrapolationCache) {
         if (m_dumpCache) {
-          dumpCache(cache," extrapolateToVolumeWithPathLimit");
+          dumpCache(cache, " extrapolateToVolumeWithPathLimit");
         }
         cache.m_extrapolationCache->updateX0(dInX0);
-        cache.m_extrapolationCache->updateEloss(eloss->meanIoni(),
-                                                eloss->sigmaIoni(),
-                                                eloss->meanRad(),
-                                                eloss->sigmaRad());
+        cache.m_extrapolationCache->updateEloss(
+          eloss->meanIoni(), eloss->sigmaIoni(), eloss->meanRad(), eloss->sigmaRad());
         if (m_dumpCache) {
-          dumpCache(cache," After");
+          dumpCache(cache, " After");
         }
       }
       ATH_MSG_DEBUG("  [M] Collecting material from dense volume '"
@@ -5510,12 +5412,12 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
     while (iSol < solutions.size()) {
       if (solutions[iSol] < iDest) {
         return nextPar;
-      }
-      else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
+      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
         // material attached ?
-        const Trk::Layer *mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
+        const Trk::Layer* mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
         if (mb) {
-          if (mb->layerMaterialProperties() && mb->layerMaterialProperties()->fullMaterial(nextPar->position())) {
+          if (mb->layerMaterialProperties() &&
+              mb->layerMaterialProperties()->fullMaterial(nextPar->position())) {
             double pIn = nextPar->momentum().mag();
             const IMaterialEffectsUpdator* currentUpdator =
               subMaterialEffectsUpdator(*cache.m_currentStatic);
@@ -5524,20 +5426,16 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
             if (currentUpdator) {
               nextPar = ManagedTrackParmPtr::recapture(
                 nextPar,
-                currentUpdator->update(currentUpdatorCache,
-                                       nextPar.get(),
-                                       *mb,
-                                       dir,
-                                       particle,
-                                       matupmod));
+                currentUpdator->update(
+                  currentUpdatorCache, nextPar.get(), *mb, dir, particle, matupmod));
             }
             if (!nextPar) {
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
               cache.m_parametersAtBoundary.resetBoundaryInformation();
               return ManagedTrackParmPtr();
-            } else {   // the MEOT will be saved at the end
-              ATH_MSG_VERBOSE(
-                " Update energy loss:" << nextPar->momentum().mag() - pIn << "at position:" << nextPar->position());
+            } else { // the MEOT will be saved at the end
+              ATH_MSG_VERBOSE(" Update energy loss:" << nextPar->momentum().mag() - pIn
+                                                     << "at position:" << nextPar->position());
               if (cache.m_matstates) {
                 addMaterialEffectsOnTrack(ctx,
                                           cache,
@@ -5560,16 +5458,18 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
         if (nextVol != cache.m_currentStatic) {
           cache.m_parametersAtBoundary.boundaryInformation(nextVol, nextPar, nextPar);
           ATH_MSG_DEBUG("  [+] StaticVol boundary reached of '"
-                        << cache.m_currentStatic->volumeName() << "', geoID: "
-                        << cache.m_currentStatic->geometrySignature());
-         
-          if (m_navigator->atVolumeBoundary(nextPar.get(), cache.m_currentStatic, dir, assocVol,
-                                            m_tolerance) && assocVol != cache.m_currentStatic) {
+                        << cache.m_currentStatic->volumeName()
+                        << "', geoID: " << cache.m_currentStatic->geometrySignature());
+
+          if (m_navigator->atVolumeBoundary(
+                nextPar.get(), cache.m_currentStatic, dir, assocVol, m_tolerance) &&
+              assocVol != cache.m_currentStatic) {
             cache.m_currentDense = cache.m_dense ? nextVol : cache.m_highestVolume;
           }
           // no next volume found --- end of the world
           if (!nextVol) {
-            ATH_MSG_DEBUG("  [+] World boundary reached        - at " << positionOutput(nextPar->position()));
+            ATH_MSG_DEBUG("  [+] World boundary reached        - at "
+                          << positionOutput(nextPar->position()));
             if (!destVol) {
               pathLim = cache.m_path;
               return nextPar;
@@ -5577,34 +5477,30 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
           }
           // next volume found and parameters are at boundary
           if (nextVol /*&& nextPar nextPar is dereferenced after*/) {
-            ATH_MSG_DEBUG(
-              "  [+] Crossing to next volume '" << nextVol->volumeName() << "', next geoID: " <<
-              nextVol->geometrySignature());
-            ATH_MSG_DEBUG("  [+] Crossing position is         - at " << positionOutput(nextPar->position()));
-            if (!destVol && cache.m_currentStatic->geometrySignature() != nextVol->geometrySignature()) {
+            ATH_MSG_DEBUG("  [+] Crossing to next volume '"
+                          << nextVol->volumeName()
+                          << "', next geoID: " << nextVol->geometrySignature());
+            ATH_MSG_DEBUG("  [+] Crossing position is         - at "
+                          << positionOutput(nextPar->position()));
+            if (!destVol &&
+                cache.m_currentStatic->geometrySignature() != nextVol->geometrySignature()) {
               pathLim = cache.m_path;
               return nextPar;
             }
           }
-          return extrapolateToVolumeWithPathLimit(ctx,
-                                                  cache,
-                                                  nextPar.index(),
-                                                  pathLim,
-                                                  dir,
-                                                  particle,
-                                                  destVol,
-                                                  matupmod);
+          return extrapolateToVolumeWithPathLimit(
+            ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
         }
-      }
-      else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() + cache.m_layers.size()) {
+      } else if (solutions[iSol] <
+                 iDest + cache.m_staticBoundaries.size() + cache.m_layers.size()) {
         // next layer; don't return passive material layers unless required
         unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size();
-        const Trk::Layer *nextLayer = cache.m_navigLays[index].second;
+        const Trk::Layer* nextLayer = cache.m_navigLays[index].second;
         // material update ?
         // bool matUp = nextLayer->layerMaterialProperties() && m_includeMaterialEffects &&
         // nextLayer->isOnLayer(nextPar->position());
-        bool matUp = nextLayer->fullUpdateMaterialProperties(*nextPar) && m_includeMaterialEffects &&
-                     nextLayer->isOnLayer(nextPar->position());
+        bool matUp = nextLayer->fullUpdateMaterialProperties(*nextPar) &&
+                     m_includeMaterialEffects && nextLayer->isOnLayer(nextPar->position());
         // identical to last material layer ?
         if (matUp && nextLayer == cache.m_lastMaterialLayer &&
             nextLayer->surfaceRepresentation().type() != Trk::Surface::Cylinder) {
@@ -5616,28 +5512,23 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
           subMaterialEffectsUpdator(*cache.m_currentStatic);
         IMaterialEffectsUpdator::ICache& currentUpdatorCache =
           subMaterialEffectsUpdatorCache(cache, *cache.m_currentStatic);
-       
+
         if (matUp && nextLayer->surfaceArray()) {
           double pIn = nextPar->momentum().mag();
           if (currentUpdator) {
             nextPar = ManagedTrackParmPtr::recapture(
               nextPar,
-              currentUpdator->preUpdate(currentUpdatorCache,
-                                        nextPar.get(),
-                                        *nextLayer,
-                                        dir,
-                                        particle,
-                                        matupmod));
+              currentUpdator->preUpdate(
+                currentUpdatorCache, nextPar.get(), *nextLayer, dir, particle, matupmod));
           }
           if (!nextPar) {
             ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
             cache.m_parametersAtBoundary.resetBoundaryInformation();
             return ManagedTrackParmPtr();
-          } else {   // the MEOT will be saved at the end
+          } else { // the MEOT will be saved at the end
             ATH_MSG_VERBOSE(" Pre-update energy loss:"
-                            << nextPar->momentum().mag() - pIn
-                            << "at position:" << nextPar->position()
-                            << ", current momentum:" << nextPar->momentum());
+                            << nextPar->momentum().mag() - pIn << "at position:"
+                            << nextPar->position() << ", current momentum:" << nextPar->momentum());
           }
         }
         // active surface intersections ( Fatras hits ...)
@@ -5658,8 +5549,7 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
             ATH_MSG_VERBOSE("  [o] Collecting intersection with active layer.");
             cache.m_parametersOnDetElements->push_back(nextPar->clone());
           }
-        } // ------------------------------------------------- Fatras mode off -----------------------------------
-
+        } // -------------------------- Fatras mode off -----------------------------------
 
         if (matUp) {
           if (nextLayer->surfaceArray()) {
@@ -5668,37 +5558,36 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
             if (postFactor > 0.1) {
               double pIn = nextPar->momentum().mag();
               if (currentUpdator) {
-                 nextPar = ManagedTrackParmPtr::recapture(
-                             nextPar,
-                             currentUpdator->postUpdate(*nextPar, *nextLayer,dir, particle, matupmod));
+                nextPar = ManagedTrackParmPtr::recapture(
+                  nextPar,
+                  currentUpdator->postUpdate(*nextPar, *nextLayer, dir, particle, matupmod));
               }
               if (!nextPar) {
-                ATH_MSG_VERBOSE(
-                  "postUpdate failed for input parameters:" << nextPar->position() << "," << nextPar->momentum());
+                ATH_MSG_VERBOSE("postUpdate failed for input parameters:"
+                                << nextPar->position() << "," << nextPar->momentum());
                 ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
                 cache.m_parametersAtBoundary.resetBoundaryInformation();
                 return ManagedTrackParmPtr();
-              } else {   // the MEOT will be saved at the end
-                ATH_MSG_VERBOSE(
-                  " Post-update energy loss:" << nextPar->momentum().mag() - pIn << "at position:" <<
-                  nextPar->position());
+              } else { // the MEOT will be saved at the end
+                ATH_MSG_VERBOSE(" Post-update energy loss:" << nextPar->momentum().mag() - pIn
+                                                            << "at position:"
+                                                            << nextPar->position());
               }
             }
           } else {
             double pIn = nextPar->momentum().mag();
             if (currentUpdator) {
-               nextPar = ManagedTrackParmPtr::recapture(
-                              nextPar,
-                              currentUpdator->update(nextPar.get(), *nextLayer, dir, particle, matupmod) );
+              nextPar = ManagedTrackParmPtr::recapture(
+                nextPar,
+                currentUpdator->update(nextPar.get(), *nextLayer, dir, particle, matupmod));
             }
             if (!nextPar) {
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
               cache.m_parametersAtBoundary.resetBoundaryInformation();
               return ManagedTrackParmPtr();
-            } else {   // the MEOT will be saved at the end
-              ATH_MSG_VERBOSE(" Update energy loss:"
-                              << nextPar->momentum().mag() - pIn
-                              << "at position:" << nextPar->position());
+            } else { // the MEOT will be saved at the end
+              ATH_MSG_VERBOSE(" Update energy loss:" << nextPar->momentum().mag() - pIn
+                                                     << "at position:" << nextPar->position());
             }
           }
           if (cache.m_matstates) {
@@ -5718,8 +5607,8 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
 
         if (!cache.m_robustSampling) {
           if (cache.m_navigLays[index].first && cache.m_navigLays[index].first->confinedLayers()) {
-            const Trk::Layer* newLayer = nextLayer->nextLayer(
-              nextPar->position(), dir * nextPar->momentum().normalized());
+            const Trk::Layer* newLayer =
+              nextLayer->nextLayer(nextPar->position(), dir * nextPar->momentum().normalized());
             if (newLayer && newLayer != nextLayer) {
               bool found = false;
               int replace = -1;
@@ -5735,109 +5624,108 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
               if (!found) {
                 if (replace > -1) {
                   cache.m_navigLays[replace].second = newLayer;
-                  cache.m_navigSurfs[solutions[iSol] + replace - index].first = &(newLayer->surfaceRepresentation());
+                  cache.m_navigSurfs[solutions[iSol] + replace - index].first =
+                    &(newLayer->surfaceRepresentation());
                 } else {
                   // can't insert a surface in middle
-                  return extrapolateToVolumeWithPathLimit(ctx,
-                                                          cache,
-                                                          nextPar.index(),
-                                                          pathLim,
-                                                          dir,
-                                                          particle,
-                                                          destVol,
-                                                          matupmod);
+                  return extrapolateToVolumeWithPathLimit(
+                    ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
                 }
               }
             }
           }
         }
         currPar = nextPar;
-      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                     cache.m_layers.size() +
+      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() + cache.m_layers.size() +
                                      cache.m_denseBoundaries.size()) {
         // dense volume boundary
-        unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size();
-        std::vector< std::pair<const Trk::TrackingVolume *, unsigned int> >::iterator dIter = cache.m_denseVols.begin();
+        unsigned int index =
+          solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size();
+        std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>>::iterator dIter =
+          cache.m_denseVols.begin();
         while (index >= (*dIter).second && dIter != cache.m_denseVols.end()) {
           index -= (*dIter).second;
           dIter++;
         }
         if (dIter != cache.m_denseVols.end()) {
           currVol = (*dIter).first;
-          nextVol = ((*dIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
+          nextVol =
+            ((*dIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
           // the boundary orientation is not reliable
-          Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+          Amg::Vector3D tp =
+            nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
           if (currVol->inside(tp, 0.)) {
             cache.m_currentDense = currVol;
-          } else if (!nextVol || !nextVol->inside(tp, 0.)) {   // search for dense volumes
+          } else if (!nextVol || !nextVol->inside(tp, 0.)) { // search for dense volumes
             cache.m_currentDense = cache.m_highestVolume;
             if (cache.m_dense && cache.m_denseVols.empty()) {
               cache.m_currentDense = cache.m_currentStatic;
             } else {
               for (unsigned int i = 0; i < cache.m_denseVols.size(); i++) {
-                const Trk::TrackingVolume *dVol = cache.m_denseVols[i].first;
+                const Trk::TrackingVolume* dVol = cache.m_denseVols[i].first;
                 if (dVol->inside(tp, 0.) && dVol->zOverAtimesRho() != 0.) {
                   cache.m_currentDense = dVol;
-                  ATH_MSG_DEBUG("  [+] Next dense volume found: '" << cache.m_currentDense->volumeName() << "'.");
+                  ATH_MSG_DEBUG("  [+] Next dense volume found: '"
+                                << cache.m_currentDense->volumeName() << "'.");
                   break;
                 }
               } // loop over dense volumes
             }
           } else {
             cache.m_currentDense = nextVol;
-            ATH_MSG_DEBUG("  [+] Next dense volume: '" << cache.m_currentDense->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Next dense volume: '" << cache.m_currentDense->volumeName()
+                                                       << "'.");
           }
         }
-      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                     cache.m_layers.size() +
+      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() + cache.m_layers.size() +
                                      cache.m_denseBoundaries.size() +
                                      cache.m_navigBoundaries.size()) {
         // navig volume boundary
-        unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size() -
-                             cache.m_denseBoundaries.size();
-        std::vector< std::pair<const Trk::TrackingVolume *, unsigned int> >::iterator nIter = navigVols.begin();
+        unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() -
+                             cache.m_layers.size() - cache.m_denseBoundaries.size();
+        std::vector<std::pair<const Trk::TrackingVolume*, unsigned int>>::iterator nIter =
+          navigVols.begin();
         while (index >= (*nIter).second && nIter != navigVols.end()) {
           index -= (*nIter).second;
           nIter++;
         }
         if (nIter != navigVols.end()) {
           currVol = (*nIter).first;
-          nextVol = ((*nIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
+          nextVol =
+            ((*nIter).first->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
           // the boundary orientation is not reliable
-          Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+          Amg::Vector3D tp =
+            nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
           if (nextVol && nextVol->inside(tp, 0.)) {
-            ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '"
+                          << nextVol->volumeName() << "'.");
           } else if (currVol->inside(tp, 0.)) {
             nextVol = currVol;
-            ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Navigation volume boundary, entering volume '"
+                          << nextVol->volumeName() << "'.");
           } else {
             nextVol = nullptr;
-            ATH_MSG_DEBUG("  [+] Navigation volume boundary, leaving volume '" << currVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Navigation volume boundary, leaving volume '"
+                          << currVol->volumeName() << "'.");
           }
           // return only if detached volume boundaries not collected
           // if ( nextVol || !detachedBoundariesIncluded )
           if (nextVol) {
-            return extrapolateToVolumeWithPathLimit(ctx,
-                                                    cache,
-                                                    nextPar.index(),
-                                                    pathLim,
-                                                    dir,
-                                                    particle,
-                                                    destVol,
-                                                    matupmod);
+            return extrapolateToVolumeWithPathLimit(
+              ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
           }
           currPar = nextPar;
         }
-      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() +
-                                     cache.m_layers.size() +
+      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size() + cache.m_layers.size() +
                                      cache.m_denseBoundaries.size() +
                                      cache.m_navigBoundaries.size() +
                                      cache.m_detachedBoundaries.size()) {
         // detached volume boundary
-        unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() - cache.m_layers.size()
-                             - cache.m_denseBoundaries.size() - cache.m_navigBoundaries.size();
-        std::vector< std::pair<const Trk::DetachedTrackingVolume *,
-                               unsigned int> >::iterator dIter = cache.m_detachedVols.begin();
+        unsigned int index = solutions[iSol] - iDest - cache.m_staticBoundaries.size() -
+                             cache.m_layers.size() - cache.m_denseBoundaries.size() -
+                             cache.m_navigBoundaries.size();
+        std::vector<std::pair<const Trk::DetachedTrackingVolume*, unsigned int>>::iterator dIter =
+          cache.m_detachedVols.begin();
         while (index >= (*dIter).second && dIter != cache.m_detachedVols.end()) {
           index -= (*dIter).second;
           dIter++;
@@ -5845,28 +5733,27 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(
         if (dIter != cache.m_detachedVols.end()) {
           currVol = (*dIter).first->trackingVolume();
           nextVol =
-            ((*dIter).first->trackingVolume()->boundarySurfaces())[index].get()->attachedVolume(*nextPar, dir);
+            ((*dIter).first->trackingVolume()->boundarySurfaces())[index].get()->attachedVolume(
+              *nextPar, dir);
           // the boundary orientation is not reliable
-          Amg::Vector3D tp = nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
+          Amg::Vector3D tp =
+            nextPar->position() + 2 * m_tolerance * dir * nextPar->momentum().normalized();
           if (nextVol && nextVol->inside(tp, 0.)) {
-            ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '"
+                          << nextVol->volumeName() << "'.");
           } else if (currVol->inside(tp, 0.)) {
             nextVol = currVol;
-            ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '" << nextVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Detached volume boundary, entering volume '"
+                          << nextVol->volumeName() << "'.");
           } else {
             nextVol = nullptr;
-            ATH_MSG_DEBUG("  [+] Detached volume boundary, leaving volume '" << currVol->volumeName() << "'.");
+            ATH_MSG_DEBUG("  [+] Detached volume boundary, leaving volume '"
+                          << currVol->volumeName() << "'.");
           }
           // if ( nextVol || !detachedBoundariesIncluded)
           if (nextVol) {
-            return extrapolateToVolumeWithPathLimit(ctx,
-                                                    cache,
-                                                    nextPar.index(),
-                                                    pathLim,
-                                                    dir,
-                                                    particle,
-                                                    destVol,
-                                                    matupmod);
+            return extrapolateToVolumeWithPathLimit(
+              ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
           }
           currPar = nextPar; // cannot move both currPar and nextPar are used and may be different.
         }
-- 
GitLab


From 1707fc83f21e2ca6300e3c1d2963261f5eb8f2ef Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus713.cern.ch>
Date: Wed, 10 Jun 2020 18:10:22 +0200
Subject: [PATCH 125/266] Fix clients incl trigger for removed GhostScale
 property

---
 Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py      | 6 ++----
 .../python/HLTMenuConfig/Jet/JetTrackingConfig.py           | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
index 6e6b4644279c..0c4d4ae3659c 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
@@ -374,8 +374,7 @@ def getConstitPJGAlg(basedef):
         InputContainer = basedef.inputname,
         OutputContainer = "PseudoJet"+full_label,
         Label = full_label,
-        SkipNegativeEnergy=True,
-        GhostScale=0.
+        SkipNegativeEnergy=True
         )
     return pjgalg
 
@@ -384,8 +383,7 @@ def getGhostPJGAlg(ghostdef):
     kwargs = {
         "OutputContainer":    "PseudoJet"+label,
         "Label":              label,
-        "SkipNegativeEnergy": True,
-        "GhostScale":         1e-40
+        "SkipNegativeEnergy": True
         }
 
     pjaclass = CompFactory.PseudoJetAlgorithm
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
index 6ba1e551e8f5..23a12bd0493f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
@@ -61,8 +61,7 @@ def JetTrackingSequence(dummyFlags,trkopt,RoIs):
         InputContainer=tracksname,
         OutputContainer=ghosttracksname,
         Label=label,
-        SkipNegativeEnergy=True,
-        GhostScale=1e-40
+        SkipNegativeEnergy=True
         )
     jetTrkSeq += conf2toConfigurable( pjgalg )
 
-- 
GitLab


From c9fafe83b5225c411efa1c542de60356b3b2b7bd Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Wed, 10 Jun 2020 18:26:11 +0200
Subject: [PATCH 126/266] TileConditions: Configure Tile conditions for online

Tile conditions have been auto configured for online
the same way as for offline using additional flags.
---
 .../TileConditions/share/TileConditions_jobOptions.py      | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
index d2a1e1b6f570..83b62e933e58 100644
--- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
+++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
@@ -97,12 +97,7 @@ msg.info("Adjusting TileInfo for %s samples" % TileFrameLength )
 tileInfoConfigurator.NSamples = TileFrameLength
 tileInfoConfigurator.TrigSample = (TileFrameLength-1)//2 # Floor division
 
-if athenaCommonFlags.isOnline():
-    #=== setup reading from COOL DB
-    msg.info("setting up COOL for TileCal online conditions data")
-    tileInfoConfigurator.setupCOOL()
-    tileInfoConfigurator.setupCOOLOFC()
-elif TileUseCOOL:
+if TileUseCOOL or athenaCommonFlags.isOnline():
     #=== setup reading from COOL DB
     msg.info("setting up COOL for TileCal conditions data")
     TileGapTiming=""
-- 
GitLab


From c51df4203d3e577301a46e12609018e38931c1a6 Mon Sep 17 00:00:00 2001
From: Marcin Nowak <marcin.nowak@cern.ch>
Date: Wed, 10 Jun 2020 16:31:52 +0000
Subject: [PATCH 127/266] EventStreamInfo using MetaCont

---
 AtlasTest/TestTools/share/post.sh             |   3 +
 .../AthenaKernel/AthenaKernel/IMetaDataSvc.h  | 116 ++++++++++++++++++
 .../AthenaKernel/IMetadataTransition.h        |  48 --------
 Control/AthenaKernel/AthenaKernel/MetaCont.h  |  29 ++++-
 .../AthenaServices/src/AthenaOutputStream.cxx |  55 ++++++---
 Control/AthenaServices/src/MetaDataSvc.cxx    |  27 +++-
 Control/AthenaServices/src/MetaDataSvc.h      |  25 ++--
 .../src/OutputStreamSequencerSvc.cxx          |  99 ++++++++++-----
 .../src/OutputStreamSequencerSvc.h            |  23 ++--
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx |  10 +-
 .../src/MakeEventStreamInfo.cxx               |  40 +++---
 .../src/MakeEventStreamInfo.h                 |   7 +-
 12 files changed, 329 insertions(+), 153 deletions(-)
 create mode 100644 Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
 delete mode 100644 Control/AthenaKernel/AthenaKernel/IMetadataTransition.h

diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh
index ecb60552395b..c457699ac1f8 100755
--- a/AtlasTest/TestTools/share/post.sh
+++ b/AtlasTest/TestTools/share/post.sh
@@ -260,6 +260,9 @@ PP="$PP"'|filling address for'
 # MetaInputLoader addresses and SIDs
 PP="$PP"'|MetaInputLoader *INFO ( address|.*is still valid for|.*and sid)'
 
+# Message useless for judging test success
+PP="$PP"'|^FileMgr +DEBUG Successfully registered handler for tech'
+
 ########################################### END #####################################################
 
 # Always use default ignore list
diff --git a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
new file mode 100644
index 000000000000..ec82de1182d4
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
@@ -0,0 +1,116 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ATHENAKERNEL_IMETADATASVC_H
+#define ATHENAKERNEL_IMETADATASVC_H
+
+/** @file IMetaDataSvc.h
+ *  @brief This file contains the class definition for the IMetaDataSvc class.
+ *  @author Marcin Nowak
+ **/
+
+#include "GaudiKernel/INamedInterface.h"
+#include "AthenaKernel/MetaCont.h"
+
+#include <string>
+#include <mutex>
+
+/** @class IMetaDataSvc
+ *  @brief This class provides the interface for MetaDataSvc
+ **/
+class IMetaDataSvc : virtual public ::INamedInterface {
+
+public: // Non-static members
+
+   
+   /// used by AthenaPoolCnvSvc
+   virtual StatusCode shmProxy(const std::string& filename) = 0;
+
+
+   // =======  Methods for handling metadata objects stored in MetaContainers (EventService)
+   template <typename T, class TKEY>
+   T* tryRetrieve (const TKEY& key) const;
+
+   template <typename T, class TKEY>
+   const T* tryConstRetrieve(const TKEY& key) const;
+
+   /// Record an object with a key.
+   template <typename T, typename TKEY> 
+   StatusCode record(T* p2BRegistered, const TKEY& key);
+
+   /// Remove object with this type+key
+   template <typename T, typename TKEY> 
+   StatusCode remove(const TKEY& key, bool ignoreIfAbsent=false);
+
+   /// The output MetaData Store
+   virtual StoreGateSvc* outputDataStore() const = 0;
+
+   /// rangeID for the current EventContext - used to index MetaContainrs - 
+   virtual const std::string currentRangeID() const = 0;
+
+   /// Gaudi boilerplate
+   static const InterfaceID& interfaceID();
+
+private: // Data
+   std::mutex    m_mutex;
+};
+
+ 
+inline const InterfaceID& IMetaDataSvc::interfaceID() {
+   static const InterfaceID IID("IMetaDataSvc", 1, 0);
+   return(IID);
+}
+
+/**
+ * @brief Retrieve an object of type @c T from MetaDataStore 
+ *        Return 0 if not found. Don't print any WARNINGs
+ * @param key The key to use for the lookup.
+ **/
+template <typename T, class TKEY>
+T* IMetaDataSvc::tryRetrieve (const TKEY& key) const
+{
+   const MetaCont<T>* container = outputDataStore()->tryRetrieve< MetaCont<T> >(key);
+   if( container ) {
+      return container->get( currentRangeID() );
+   }
+   return nullptr;
+}
+
+template <typename T, class TKEY>
+const T* IMetaDataSvc::tryConstRetrieve (const TKEY& key) const
+{
+   const MetaCont<T>* container = outputDataStore()->tryRetrieve< MetaCont<T> >(key);
+   if( container ) {
+      return container->get( currentRangeID() );
+   }
+   return nullptr;
+}
+
+template <typename T, typename TKEY> 
+StatusCode IMetaDataSvc::record(T* pObject, const TKEY& key)
+{
+   std::lock_guard lock(m_mutex);
+   MetaCont<T>* container = outputDataStore()->tryRetrieve< MetaCont<T> >(key);
+   if( !container ) {
+      auto cont_uptr = std::make_unique< MetaCont<T> >();
+      if( cont_uptr->insert( currentRangeID() , pObject) ) {
+         return outputDataStore()->record( std::move(cont_uptr), key );
+      }
+      return StatusCode::FAILURE;
+   }
+   if( container->insert( currentRangeID() , pObject) )  return StatusCode::SUCCESS;
+   return StatusCode::FAILURE;
+}
+
+template <typename T, class TKEY>
+StatusCode IMetaDataSvc::remove(const TKEY& key, bool ignoreIfAbsent)
+{
+   std::lock_guard lock(m_mutex);
+   // change erase to setting nullptr?
+   MetaCont<T>* container = outputDataStore()->tryRetrieve< MetaCont<T> >(key);
+   if( container and container->erase( currentRangeID() ) )  return StatusCode::SUCCESS;
+   return ignoreIfAbsent? StatusCode::SUCCESS : StatusCode::FAILURE;
+}
+
+#endif
diff --git a/Control/AthenaKernel/AthenaKernel/IMetadataTransition.h b/Control/AthenaKernel/AthenaKernel/IMetadataTransition.h
deleted file mode 100644
index b0e6f49c5bac..000000000000
--- a/Control/AthenaKernel/AthenaKernel/IMetadataTransition.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ATHENAKERNEL_IMETADATATRANSITION_H
-#define ATHENAKERNEL_IMETADATATRANSITION_H
-
-/** @file IMetadataTransition.h
- *  @brief This file contains the class definition for the IMetadataTransition class.
- *  @author Peter van Gemmeren <gemmeren@anl.gov>
- *  $Id: IMetadataTransition.h,v 1.2 2007-07-30 19:06:50 gemmeren Exp $
- **/
-
-#include "GaudiKernel/INamedInterface.h"
-#include "GaudiKernel/Incident.h"
-#include <string>
-
-/** @class IMetadataTransition
- *  @brief This class provides the interface for MetadataTransitions.
- **/
-class IMetadataTransition : virtual public ::INamedInterface {
-
-public: // Non-static members
-
-  /// Function called when a new input file is opened
-  virtual StatusCode newMetadataSource(const Incident&) = 0;
-
-  /// Function called when the currently open input file got completely
-  /// processed
-  virtual StatusCode retireMetadataSource(const Incident&) = 0;
-
-  /// Function called when the tool should write out its metadata
-  virtual StatusCode prepareOutput() = 0;
-
-  virtual StatusCode shmProxy(const std::string& filename) = 0;
-
-  /// Gaudi boilerplate
-   static const InterfaceID& interfaceID();
-private: // Data
-};
-
-inline const InterfaceID& IMetadataTransition::interfaceID() {
-   static const InterfaceID IID("IMetadataTransition", 1, 0);
-   return(IID);
-}
-
-#endif
-
diff --git a/Control/AthenaKernel/AthenaKernel/MetaCont.h b/Control/AthenaKernel/AthenaKernel/MetaCont.h
index ff6fea20ef1e..e7618ae8b606 100644
--- a/Control/AthenaKernel/AthenaKernel/MetaCont.h
+++ b/Control/AthenaKernel/AthenaKernel/MetaCont.h
@@ -28,6 +28,7 @@ class MetaContBase {
   virtual ~MetaContBase(){};
 
   virtual bool insert(const SourceID& sid, void* obj) = 0;
+  virtual size_t erase(const SourceID& sid) = 0;
 
   virtual int entries() const { return 0; }
   virtual bool valid(const SourceID& sid) const = 0;
@@ -36,6 +37,8 @@ class MetaContBase {
 
   virtual void list(std::ostringstream& stream) const = 0;
 
+  virtual void* getAsVoid(const SourceID& sid) const = 0;
+
  private:
 };
 
@@ -51,19 +54,25 @@ class MetaCont: public MetaContBase {
   ~MetaCont();
 
   // Virtual functions
-  virtual bool insert(const SourceID& sid, void* obj) override;
+  virtual bool insert(const SourceID& sid, void* obj) override final;
+  virtual size_t erase(const SourceID& sid) override final;
+
 
   virtual int entries() const override;
-  virtual bool valid(const SourceID& sid) const override;
+  virtual bool valid(const SourceID& sid) const override final;
 
-  virtual std::vector<SourceID> sources() const override;
+  virtual std::vector<SourceID> sources() const override final;
 
-  virtual void list(std::ostringstream& stream) const override;
+  virtual void list(std::ostringstream& stream) const override final;
 
   // Non-virtual functions
   bool insert(const SourceID& sid, T* t);
+
+   /// various Get methods
   bool find(const SourceID& sid, T*& t) const;
-  const T* get(const SourceID& sid) const;
+  T* get(const SourceID& sid) const;
+
+  void* getAsVoid(const SourceID& sid) const override final { return get(sid); }
 
  private:
 
@@ -112,6 +121,14 @@ bool MetaCont<T>::insert(const SourceID& sid, void* obj) {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
+template <typename T>
+size_t MetaCont<T>::erase(const SourceID& sid) {
+  std::lock_guard<std::mutex> lock(m_mut);
+  return m_metaSet.erase(sid);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
 template <typename T>
 bool MetaCont<T>::insert(const SourceID& sid, T* t) {
   std::lock_guard<std::mutex> lock(m_mut);
@@ -145,7 +162,7 @@ bool MetaCont<T>::find(const SourceID& sid, T*& t) const {
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 template <typename T>
-const T* MetaCont<T>::get(const SourceID& sid) const {
+T* MetaCont<T>::get(const SourceID& sid) const {
   std::lock_guard<std::mutex> lock(m_mut);
 
   typename MetaContSet::const_iterator itr = m_metaSet.find(sid);
diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx
index ec733590e946..cadbc700470d 100644
--- a/Control/AthenaServices/src/AthenaOutputStream.cxx
+++ b/Control/AthenaServices/src/AthenaOutputStream.cxx
@@ -700,7 +700,8 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
    } else {
       item_key = item.key();
    }
-   ATH_MSG_DEBUG("addItemObjects(" << item.id() << ",\"" << item.key() << "\") called");
+   CLID item_id = item.id();
+   ATH_MSG_DEBUG("addItemObjects(" << item_id << ",\"" << item_key << "\") called");
    ATH_MSG_DEBUG("           Key:" << item_key );
    if( aux_attr.size() ) {
    ATH_MSG_DEBUG("      Aux Attr:" << aux_attr );
@@ -709,7 +710,7 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
    std::set<std::string> clidKeys;
    for (SG::IFolder::const_iterator iter = m_decoder->begin(), iterEnd = m_decoder->end();
            iter != iterEnd; iter++) {
-      if (iter->id() == item.id()) {
+      if (iter->id() == item_id) {
          clidKeys.insert(iter->key());
       }
    }
@@ -727,7 +728,7 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
      for (SG::IFolder::const_iterator iter = m_compressionDecoderHigh->begin(), iterEnd = m_compressionDecoderHigh->end();
             iter != iterEnd; iter++) {
        // First match the IDs for early rejection.
-       if (iter->id() != item.id()) {
+       if (iter->id() != item_id) {
          continue;
        }
        // Then find the compression item key and the compression list string
@@ -754,7 +755,7 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
      for (SG::IFolder::const_iterator iter = m_compressionDecoderLow->begin(), iterEnd = m_compressionDecoderLow->end();
             iter != iterEnd; iter++) {
        // First match the IDs for early rejection.
-       if (iter->id() != item.id()) {
+       if (iter->id() != item_id) {
          continue;
        }
        // Then find the compression item key and the compression list string
@@ -790,9 +791,11 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
      }
    }
 
+   // For MetaData objects of type T that are kept in MetaContainers get the MetaCont<T> ID
+   const CLID remapped_item_id = m_metaDataSvc->remapMetaContCLID( item_id );
    SG::ConstProxyIterator iter, end;
    // Look for the clid in storegate
-   if (((*m_currentStore)->proxyRange(item.id(), iter, end)).isSuccess()) {
+   if (((*m_currentStore)->proxyRange(remapped_item_id, iter, end)).isSuccess()) {
       bool added = false, removed = false;
       // For item list entry
       // Check for wildcard within string, i.e. 'xxx*yyy', and save the matching parts
@@ -841,27 +844,45 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
          if (keyMatch && !xkeyMatch) {
             if (m_forceRead && itemProxy->isValid()) {
                if (nullptr == itemProxy->accessData()) {
-                  ATH_MSG_ERROR(" Could not get data object for id " << item.id() << ",\"" << itemProxy->name());
+                  ATH_MSG_ERROR(" Could not get data object for id " << remapped_item_id << ",\"" << itemProxy->name());
                }
             }
             if (nullptr != itemProxy->object()) {
                if( std::find(m_objects.begin(), m_objects.end(), itemProxy->object()) == m_objects.end() &&
                    std::find(m_altObjects.begin(), m_altObjects.end(), itemProxy->object()) == m_altObjects.end() )
                {
-                 if (item.exact()) {
+                  if( item_id != remapped_item_id ) {
+                     // For MetaCont<T>: - 
+                     // create a temporary DataObject for an entry in the  container to pass to CnvSvc
+                     DataBucketBase* dbb = static_cast<DataBucketBase*>( itemProxy->object() );
+                     const MetaContBase* metaCont = static_cast<MetaContBase*>( dbb->cast( ClassID_traits<MetaContBase>::ID() ) );
+                     ATH_MSG_INFO("MN: metaCont after cast=" << metaCont );
+                     if( metaCont ) {
+                        void* obj = metaCont->getAsVoid( m_outSeqSvc->currentRangeID() );
+                        ATH_MSG_INFO("MN:    got object" << obj );
+                        auto altbucket = std::make_unique<AltDataBucket>(
+                           obj, item_id, *CLIDRegistry::CLIDToTypeinfo(item_id), *itemProxy );
+                        m_objects.push_back( altbucket.get() );
+                        m_ownedObjects.push_back( std::move(altbucket) );
+                        m_altObjects.push_back( itemProxy->object() ); // only for duplicate prevention
+                     } else {
+                        ATH_MSG_ERROR("Failed to retrieve object from MetaCont with key=" << item_key << " for EventRangeID=" << m_outSeqSvc->currentRangeID() );
+                        return;
+                     }
+                  } else if (item.exact()) {
                    // If the exact flag is set, make a new DataObject
                    // holding the object as the requested type.
                    DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (itemProxy->object());
                    if (!dbb) std::abort();
-                   void* ptr = dbb->cast (item.id());
+                   void* ptr = dbb->cast (item_id);
                    if (!ptr) {
                      // Hard cast
                      ptr = dbb->object();
                    }
                    auto altbucket =
                      std::make_unique<AltDataBucket>
-                       (ptr, item.id(),
-                        *CLIDRegistry::CLIDToTypeinfo (item.id()),
+                       (ptr, item_id,
+                        *CLIDRegistry::CLIDToTypeinfo (item_id),
                         *itemProxy);
                    m_objects.push_back(altbucket.get());
                    m_ownedObjects.push_back (std::move(altbucket));
@@ -869,16 +890,16 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
                  }
                  else
                    m_objects.push_back(itemProxy->object());
-                 ATH_MSG_DEBUG(" Added object " << item.id() << ",\"" << itemProxy->name() << "\"");
+                 ATH_MSG_DEBUG(" Added object " << item_id << ",\"" << itemProxy->name() << "\"");
                }
 
                // Build ItemListSvc string
                std::string tn;
                std::stringstream tns;
-               if (!m_pCLIDSvc->getTypeNameOfID(item.id(), tn).isSuccess()) {
+               if (!m_pCLIDSvc->getTypeNameOfID(item_id, tn).isSuccess()) {
                   ATH_MSG_ERROR(" Could not get type name for id "
-                         << item.id() << ",\"" << itemProxy->name());
-                  tns << item.id() << '_' << itemProxy->name();
+                         << item_id << ",\"" << itemProxy->name());
+                  tns << item_id << '_' << itemProxy->name();
                } else {
                   tn += '_' + itemProxy->name();
                   tns << tn;
@@ -960,14 +981,14 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
          }
       } // proxy loop
       if (!added && !removed) {
-         ATH_MSG_DEBUG(" No object matching " << item.id() << ",\"" << item_key  << "\" found");
+         ATH_MSG_DEBUG(" No object matching " << item_id << ",\"" << item_key  << "\" found");
       } else if (removed) {
          ATH_MSG_DEBUG(" Object being excluded based on property setting "
-                 << item.id() << ",\"" << item_key  << "\". Skipping");
+                 << item_id << ",\"" << item_key  << "\". Skipping");
       }
    } else {
       ATH_MSG_DEBUG(" Failed to receive proxy iterators from StoreGate for "
-              << item.id() << ",\"" << item_key  << "\". Skipping");
+              << item_id << ",\"" << item_key  << "\". Skipping");
    }
 }
 
diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx
index 186e6f9797c6..3a9655610605 100644
--- a/Control/AthenaServices/src/MetaDataSvc.cxx
+++ b/Control/AthenaServices/src/MetaDataSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /** @file MetaDataSvc.cxx
@@ -24,6 +24,8 @@
 #include "SGTools/SGVersionedKey.h"
 #include "PersistentDataModel/DataHeader.h"
 
+#include "OutputStreamSequencerSvc.h"
+
 #include <vector>
 #include <sstream>
 
@@ -34,6 +36,7 @@ MetaDataSvc::MetaDataSvc(const std::string& name, ISvcLocator* pSvcLocator) : ::
 	m_addrCrtr("AthenaPoolCnvSvc", name),
 	m_fileMgr("FileMgr", name),
 	m_incSvc("IncidentSvc", name),
+        m_outSeqSvc("OutputStreamSequencerSvc", name),
 	m_storageType(0L),
 	m_clearedInputDataStore(true),
 	m_clearedOutputDataStore(false),
@@ -157,6 +160,9 @@ StatusCode MetaDataSvc::initialize() {
          }
       }
    }
+   // retrieve the output sequences service (EventService) if available
+   m_outSeqSvc.retrieve().ignore();
+
    return(StatusCode::SUCCESS);
 }
 //__________________________________________________________________________
@@ -197,8 +203,8 @@ StatusCode MetaDataSvc::stop() {
 StatusCode MetaDataSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
    if (riid == this->interfaceID()) {
       *ppvInterface = this;
-   } else if (riid == IMetadataTransition::interfaceID()) {
-     *ppvInterface = dynamic_cast<IMetadataTransition*>(this);
+   } else if (riid == IMetaDataSvc::interfaceID()) {
+     *ppvInterface = dynamic_cast<IMetaDataSvc*>(this);
    } else {
       // Interface is not directly available: try out a base class
       return(::AthService::queryInterface(riid, ppvInterface));
@@ -603,3 +609,18 @@ StatusCode MetaDataSvc::initInputMetaDataStore(const std::string& fileName) {
    return(StatusCode::SUCCESS);
 }
 
+
+const std::string MetaDataSvc::currentRangeID() const
+{
+   return m_outSeqSvc.isValid()? m_outSeqSvc->currentRangeID() : "";
+}
+
+
+CLID MetaDataSvc::remapMetaContCLID( const CLID& item_id ) const
+{
+   // for now just a simple dumb if
+   if( item_id == 167728019 ) {
+      return 167729019;   //  MetaCont<EventStreamInfo> CLID
+   }
+   return item_id;
+}
diff --git a/Control/AthenaServices/src/MetaDataSvc.h b/Control/AthenaServices/src/MetaDataSvc.h
index 24dbc206eb3a..2809547d1192 100644
--- a/Control/AthenaServices/src/MetaDataSvc.h
+++ b/Control/AthenaServices/src/MetaDataSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ATHENASERVICES_METADATASVC_H
@@ -19,7 +19,7 @@
 #include "AthenaKernel/IAddressProvider.h"
 #include "AthenaBaseComps/AthService.h"
 #include "AthenaKernel/IMetaDataTool.h"
-#include "AthenaKernel/IMetadataTransition.h"
+#include "AthenaKernel/IMetaDataSvc.h"
 
 #include "boost/bind.hpp"
 
@@ -29,6 +29,7 @@
 class IAddressCreator;
 class StoreGateSvc;
 class IAlgTool;
+class OutputStreamSequencerSvc;
 
 namespace Io {
    class FileAttr;
@@ -44,7 +45,7 @@ template <class TYPE> class SvcFactory;
 class ATLAS_CHECK_THREAD_SAFETY MetaDataSvc : public ::AthService,
 	virtual public IAddressProvider,
 	virtual public IIncidentListener,
-        virtual public IMetadataTransition,
+        virtual public IMetaDataSvc,
 	virtual public IIoComponent {
    // Allow the factory class access to the constructor
    friend class SvcFactory<MetaDataSvc>;
@@ -68,14 +69,14 @@ public: // Non-static members
    /// Required of all Gaudi services:  see Gaudi documentation for details
 
    /// Function called when a new metadata source becomes available
-   virtual StatusCode newMetadataSource(const Incident&) override;
+   virtual StatusCode newMetadataSource(const Incident&);
 
    /// Function called when a metadata source is closed
-   virtual StatusCode retireMetadataSource(const Incident&) override;
+   virtual StatusCode retireMetadataSource(const Incident&);
 
    /// Function called when the current state of metadata must be made 
    /// ready for output
-   virtual StatusCode prepareOutput() override;
+   virtual StatusCode prepareOutput();
 
    /// version of prepareOutput() for parallel streams
    virtual StatusCode prepareOutput(const std::string& outputName);
@@ -108,6 +109,12 @@ public: // Non-static members
 
    StatusCode rootOpenAction(FILEMGR_CALLBACK_ARGS);
 
+   virtual StoreGateSvc* outputDataStore() const override final { return &*m_outputDataStore; }
+
+   virtual const std::string currentRangeID() const override final;
+
+   CLID remapMetaContCLID( const CLID& item_id ) const;
+
 private:
    /// Add proxy to input metadata store - can be called directly or via BeginInputFile incident
    StatusCode addProxyToInputMetaDataStore(const std::string& tokenStr);
@@ -120,7 +127,8 @@ private: // data
    ServiceHandle<IAddressCreator> m_addrCrtr;
    ServiceHandle<IFileMgr> m_fileMgr;
    ServiceHandle<IIncidentSvc> m_incSvc;
-
+   ServiceHandle<OutputStreamSequencerSvc>  m_outSeqSvc;
+ 
    long m_storageType;
    bool m_clearedInputDataStore;
    bool m_clearedOutputDataStore;
@@ -136,6 +144,5 @@ private: // properties
    /// MetaDataTools, vector with the MetaData tools.
    ToolHandleArray<IMetaDataTool> m_metaDataTools;
 };
-
+ 
 #endif
-
diff --git a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
index f678820a9a39..d9a6e189fa6f 100644
--- a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
+++ b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /** @file OutputStreamSequencerSvc.cxx
@@ -34,12 +34,6 @@ StatusCode OutputStreamSequencerSvc::initialize() {
       ATH_MSG_FATAL("Cannot initialize AthService base class.");
       return(StatusCode::FAILURE);
    }
-
-   // Retrieve MetaDataSvc
-   if (!m_metaDataSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get MetaDataSvc.");
-      return(StatusCode::FAILURE);
-   }
    // Set to be listener for end of event
    ServiceHandle<IIncidentSvc> incsvc("IncidentSvc", this->name());
    if (!incsvc.retrieve().isSuccess()) {
@@ -48,6 +42,7 @@ StatusCode OutputStreamSequencerSvc::initialize() {
    }
    if( !incidentName().empty() ) {
       incsvc->addListener(this, incidentName(), 100);
+      incsvc->addListener(this, IncidentType::BeginProcessing, 100);
    }
    if( inConcurrentEventsMode() ) {
       ATH_MSG_DEBUG("Concurrent events mode");
@@ -55,6 +50,8 @@ StatusCode OutputStreamSequencerSvc::initialize() {
       ATH_MSG_VERBOSE("Sequential events mode");
    }
 
+   // Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() not set yet
+   // m_rangeIDinSlot.resize( );
    m_finishedRange = m_fnToRangeId.end();
 
    return(StatusCode::SUCCESS);
@@ -92,32 +89,56 @@ bool    OutputStreamSequencerSvc::inUse() const {
 //__________________________________________________________________________
 void OutputStreamSequencerSvc::handle(const Incident& inc)
 {
-   // process NextEventRange 
    ATH_MSG_INFO("handle incident type " << inc.type());
 
-   // finish the old range if needed
-   if( m_fileSequenceNumber >= 0 and !inConcurrentEventsMode() ) {
-      // When processing events sequentially (threads<2) write metadata on the NextRange incident
-      // but ignore the first incident because it only starts the first sequence
-      ATH_MSG_DEBUG("MetaData transition");
-      if (!m_metaDataSvc->transitionMetaDataFile().isSuccess()) {
-         ATH_MSG_FATAL("Cannot transition MetaDataSvc.");
+   auto slot = Gaudi::Hive::currentContext().slot();
+   ATH_MSG_INFO("MN: SLOT in seq handle=" << slot);
+   if( slot == EventContext::INVALID_CONTEXT_ID )  slot = 0;
+
+   if( inc.type() == incidentName() ) {  // NextEventRange 
+      // finish the old range if needed
+      if( m_fileSequenceNumber >= 0 and !inConcurrentEventsMode() ) {
+         // When processing events sequentially (threads<2) write metadata on the NextRange incident
+         // but ignore the first incident because it only starts the first sequence
+         ATH_MSG_DEBUG("MetaData transition");
+         // Retrieve MetaDataSvc
+         if( !m_metaDataSvc.isValid() and !m_metaDataSvc.retrieve().isSuccess() ) {
+            throw GaudiException("Cannot get MetaDataSvc", name(), StatusCode::FAILURE);
+         }
+         if( !m_metaDataSvc->transitionMetaDataFile().isSuccess() ) {
+            throw GaudiException("Cannot transition MetaData", name(), StatusCode::FAILURE);
+         }
       }
+      // start a new range
+      std::lock_guard lockg( m_mutex );
+      std::string rangeID;
+      m_fileSequenceNumber++;
+      const FileIncident* fileInc  = dynamic_cast<const FileIncident*>(&inc);
+      if (fileInc != nullptr) {
+         rangeID = fileInc->fileName();
+         ATH_MSG_DEBUG("Requested (through incident) next event range filename extension: " << rangeID);
+      }
+      if( rangeID.empty() ) {
+         std::ostringstream n;
+         n << "_" << std::setw(4) << std::setfill('0') << m_fileSequenceNumber;
+         rangeID = n.str();
+         ATH_MSG_DEBUG("Default next event range filename extension: " << rangeID);
+      } 
+      if( slot >= m_rangeIDinSlot.size() ) {
+         // MN - late resize, is there a better place for it?
+         m_rangeIDinSlot.resize( std::max(slot+1, Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents()) );
+      }
+      m_rangeIDinSlot[ slot ] = rangeID;
+      // remember range ID for next events in the same range
+      m_currentRangeID = rangeID;
    }
-   // start a new range
-   m_currentRangeID.clear();
-   m_fileSequenceNumber++;
-   const FileIncident* fileInc  = dynamic_cast<const FileIncident*>(&inc);
-   if (fileInc != nullptr) {
-      m_currentRangeID = fileInc->fileName();
-      ATH_MSG_DEBUG("Requested (through incident) next event range filename extension: " << m_currentRangeID);
-   }
-   if( m_currentRangeID.empty() ) {
-      std::ostringstream n;
-      n << "_" << std::setw(4) << std::setfill('0') << m_fileSequenceNumber;
-      m_currentRangeID = n.str();
-      ATH_MSG_DEBUG("Default next event range filename extension: " << m_currentRangeID);
+   else if( inc.type() == IncidentType::BeginProcessing ) {
+      // new event start - assing current rangeId to its slot
+      ATH_MSG_INFO("MN: assigne rangeID = " << m_currentRangeID << " to slot " << slot);
+      std::lock_guard lockg( m_mutex );
+      m_rangeIDinSlot[ slot ] = m_currentRangeID;
    }
+
 }
 
 //__________________________________________________________________________
@@ -127,6 +148,8 @@ std::string OutputStreamSequencerSvc::buildSequenceFileName(const std::string& o
       // Event sequences not in use, just return the original filename
       return orgFileName;
    }
+   std::string rangeID = currentRangeID();
+   std::lock_guard lockg( m_mutex );
    // build the full output file name for this event range
    std::string fileNameCore = orgFileName, fileNameExt;
    std::size_t sepPos = orgFileName.find("[");
@@ -135,20 +158,34 @@ std::string OutputStreamSequencerSvc::buildSequenceFileName(const std::string& o
       fileNameExt = orgFileName.substr(sepPos);
    }
    std::ostringstream n;
-   n << fileNameCore << "." << m_currentRangeID << fileNameExt;
-   m_fnToRangeId.insert(std::pair<std::string,std::string>(n.str(),m_currentRangeID));
+   n << fileNameCore << "." << rangeID << fileNameExt;
+   m_fnToRangeId.insert( std::pair(n.str(), rangeID) );
 
    return n.str();
 }
 
+
+std::string OutputStreamSequencerSvc::currentRangeID() const
+{
+   if( !inUse() )  return "";
+   auto slot = Gaudi::Hive::currentContext().slot();
+   if( slot == EventContext::INVALID_CONTEXT_ID )  slot = 0; 
+   std::lock_guard lockg( m_mutex );
+   if( slot >= m_rangeIDinSlot.size() ) return "";
+   return m_rangeIDinSlot[ slot ];
+}
+
+
 void OutputStreamSequencerSvc::publishRangeReport(const std::string& outputFile)
 {
-  m_finishedRange = m_fnToRangeId.find(outputFile);
+   std::lock_guard lockg( m_mutex );
+   m_finishedRange = m_fnToRangeId.find(outputFile);
 }
 
 OutputStreamSequencerSvc::RangeReport_ptr OutputStreamSequencerSvc::getRangeReport()
 {
   RangeReport_ptr report;
+  std::lock_guard lockg( m_mutex );
   if(m_finishedRange!=m_fnToRangeId.end()) {
     report = std::make_unique<RangeReport_t>(m_finishedRange->second,m_finishedRange->first);
     m_fnToRangeId.erase(m_finishedRange);
diff --git a/Control/AthenaServices/src/OutputStreamSequencerSvc.h b/Control/AthenaServices/src/OutputStreamSequencerSvc.h
index 0b43715ba4d5..893bd27b04cf 100644
--- a/Control/AthenaServices/src/OutputStreamSequencerSvc.h
+++ b/Control/AthenaServices/src/OutputStreamSequencerSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef OUTPUTSTREAMSEQUENCERSVC_H
@@ -17,6 +17,7 @@
 
 #include <memory>
 #include <map>
+#include <mutex>
 
 // Forward declarations
 class MetaDataSvc;
@@ -46,14 +47,14 @@ public: // Constructor and Destructor
 
 public: // Non-static members
    /// Required of all Gaudi services:
-   StatusCode initialize();
+   virtual StatusCode initialize() override final;
    /// Required of all Gaudi services:
-   StatusCode finalize();
+   virtual StatusCode finalize() override final;
    /// Required of all Gaudi services:  see Gaudi documentation for details
-   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
+   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override final;
 
    /// Incident service handle
-   void handle(const Incident& /*inc*/);
+   virtual void handle(const Incident& /*inc*/) override final;
 
    /// Returns sequenced file name for output stream
    std::string buildSequenceFileName(const std::string&);
@@ -62,7 +63,10 @@ public: // Non-static members
 
    /// The name of the incident that starts a new event sequence
    std::string  incidentName() const            { return m_incidentName.value(); }
-  
+
+   /// The current Event Range ID (only one range is 
+   std::string  currentRangeID() const;
+
    /// Is the service in active use? (true after the first range incident is handled)
    bool         inUse() const;
   
@@ -75,8 +79,11 @@ private: // data
    /// The event sequence number
    int m_fileSequenceNumber;
 
-   /// Current EventRange ID constructed on the NextRange incident
+   /// Current EventRange ID constructed on the last NextRange incident
    std::string  m_currentRangeID;
+   
+   /// EventRange ID for all slots
+   std::vector<std::string>   m_rangeIDinSlot;
 
 private: // properties
    /// SequenceIncidentName, incident name for triggering file sequencing.
@@ -84,6 +91,8 @@ private: // properties
 
    std::map<std::string,std::string> m_fnToRangeId;
    std::map<std::string,std::string>::iterator m_finishedRange;
+
+   mutable std::mutex         m_mutex;
 };
 
 #endif
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index e4d1fc2b680e..081a7b67d03d 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -19,7 +19,7 @@
 
 #include "AthenaKernel/IAthenaSerializeSvc.h"
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
-#include "AthenaKernel/IMetadataTransition.h"
+#include "AthenaKernel/IMetaDataSvc.h"
 #include "PersistentDataModel/Placement.h"
 #include "PersistentDataModel/Token.h"
 #include "PersistentDataModel/TokenAddress.h"
@@ -447,10 +447,10 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpe
                   m_metadataClient = num;
                }
  	       // Retrieve MetaDataSvc
-	       ServiceHandle<IMetadataTransition> metadataTransition("MetaDataSvc", name());
-	       ATH_CHECK(metadataTransition.retrieve());
-	       if(!metadataTransition->shmProxy(std::string(placementStr) + "[NUM=" + oss2.str() + "]").isSuccess()) {
-                  ATH_MSG_FATAL("IMetadataTransition::shmProxy() failed!");
+	       ServiceHandle<IMetaDataSvc> metadataSvc("MetaDataSvc", name());
+	       ATH_CHECK(metadataSvc.retrieve());
+	       if(!metadataSvc->shmProxy(std::string(placementStr) + "[NUM=" + oss2.str() + "]").isSuccess()) {
+                  ATH_MSG_FATAL("MetaDataSvc::shmProxy() failed!");
                   return abortSharedWrClients(num);
 	       }
             } else {
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
index f6220d92acb5..462cecda784e 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
@@ -24,7 +24,7 @@
 MakeEventStreamInfo::MakeEventStreamInfo(const std::string& type,
 	const std::string& name,
 	const IInterface* parent) : ::AthAlgTool(type, name, parent),
-		m_metaDataStore("StoreGateSvc/MetaDataStore", name),
+		m_metaDataSvc("MetaDataSvc", name),
                 m_eventStore("StoreGateSvc", name)
 {
    // Declare IAthenaOutputStreamTool interface
@@ -42,8 +42,8 @@ MakeEventStreamInfo::~MakeEventStreamInfo() {
 StatusCode MakeEventStreamInfo::initialize() {
    ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION);
    // Locate the MetaDataStore
-   if (!m_metaDataStore.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Could not find MetaDataStore");
+   if (!m_metaDataSvc.retrieve().isSuccess()) {
+      ATH_MSG_FATAL("Could not find MetaDataSvc");
       return(StatusCode::FAILURE);
    }
    if (!m_eventStore.retrieve().isSuccess()) {
@@ -56,16 +56,10 @@ StatusCode MakeEventStreamInfo::initialize() {
 //___________________________________________________________________________
 StatusCode MakeEventStreamInfo::postInitialize() {
    // Remove EventStreamInfo with same key if it exists
-   if (m_metaDataStore->contains<EventStreamInfo>(m_key.value())) {
-      const EventStreamInfo* pEventStream = nullptr;
-      if (!m_metaDataStore->retrieve(pEventStream, m_key.value()).isSuccess()) {
-         ATH_MSG_ERROR("Unable to retrieve EventStreamInfo object");
-         return(StatusCode::FAILURE);
-      }
-      if (!m_metaDataStore->removeDataAndProxy(pEventStream).isSuccess()) {
-         ATH_MSG_ERROR("Unable to remove proxy for EventStreamInfo object");
-         return(StatusCode::FAILURE);
-      }
+   bool ignoreIfAbsent = true;
+   if( !m_metaDataSvc->remove<EventStreamInfo>(m_key.value(), ignoreIfAbsent).isSuccess() ) {
+      ATH_MSG_ERROR("Unable to remove EventStreamInfo with key " << m_key.value());
+      return StatusCode::FAILURE;
    }
    return(StatusCode::SUCCESS);
 }
@@ -105,18 +99,16 @@ StatusCode MakeEventStreamInfo::postExecute() {
          return(StatusCode::FAILURE);
       }
    }
-   if (!m_metaDataStore->contains<EventStreamInfo>(m_key.value())) {
-      EventStreamInfo* pEventStream = new EventStreamInfo();
-      if (m_metaDataStore->record(pEventStream, m_key.value()).isFailure()) {
+
+   EventStreamInfo* pEventStream = m_metaDataSvc->tryRetrieve<EventStreamInfo>(m_key.value());
+   if( !pEventStream ) {
+      pEventStream = new EventStreamInfo();
+      if( m_metaDataSvc->record(pEventStream, m_key.value() ).isFailure()) {
          ATH_MSG_ERROR("Could not register EventStreamInfo object");
+         delete pEventStream;
          return(StatusCode::FAILURE);
       }
    }
-   EventStreamInfo* pEventStream = nullptr;
-   if (!m_metaDataStore->retrieve(pEventStream, m_key.value()).isSuccess()) {
-      ATH_MSG_ERROR("Unable to retrieve EventStreamInfo object");
-      return(StatusCode::FAILURE);
-   }
    pEventStream->addEvent();
    pEventStream->insertProcessingTag(dataHeader->getProcessTag());
    pEventStream->insertLumiBlockNumber( lumiN );
@@ -130,9 +122,9 @@ StatusCode MakeEventStreamInfo::postExecute() {
 }
 //___________________________________________________________________________
 StatusCode MakeEventStreamInfo::preFinalize() {
-   if (!m_metaDataStore->contains<EventStreamInfo>(m_key.value())) {
+   if( !m_metaDataSvc->tryRetrieve<EventStreamInfo>(m_key.value()) ) {
       EventStreamInfo* pEventStream = new EventStreamInfo();
-      if (m_metaDataStore->record(pEventStream, m_key.value()).isFailure()) {
+      if( m_metaDataSvc->record(pEventStream, m_key.value()).isFailure() ) {
          ATH_MSG_ERROR("Could not register EventStreamInfo object");
          return(StatusCode::FAILURE);
       }
@@ -143,7 +135,7 @@ StatusCode MakeEventStreamInfo::preFinalize() {
 StatusCode MakeEventStreamInfo::finalize() {
    ATH_MSG_DEBUG("in finalize()");
    // release the MetaDataStore
-   if (!m_metaDataStore.release().isSuccess()) {
+   if (!m_metaDataSvc.release().isSuccess()) {
       ATH_MSG_WARNING("Could not release MetaDataStore");
    }
    if (!m_eventStore.release().isSuccess()) {
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h
index e8af0a5cbdbb..d8dda11f4ae2 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MAKEEVENTSTREAMINFO_H
@@ -14,6 +14,7 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "AthenaKernel/IMetaDataSvc.h"
 
 #include <string>
 
@@ -53,7 +54,7 @@ private:
    StringProperty m_oEventInfoKey;
 
    /// Pointer to the data stores
-   ServiceHandle<StoreGateSvc> m_metaDataStore;
-   ServiceHandle<StoreGateSvc> m_eventStore;
+   ServiceHandle<IMetaDataSvc>  m_metaDataSvc;
+   ServiceHandle<StoreGateSvc>  m_eventStore;
 };
 #endif
-- 
GitLab


From 4b5bda2a432964a6a8cbe47aec5869a9f749d064 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Wed, 10 Jun 2020 16:51:12 +0000
Subject: [PATCH 128/266] Run clant-tidy for Reconstruction/egammma

---
 .../src/egammaSuperClusterBuilder.cxx         |  4 +--
 .../src/egDetailContainerCnv.cxx              |  2 +-
 .../egammaCaloTools/src/egammaShowerShape.cxx |  6 ++--
 .../src/EMClusterErrorsMatrix.cxx             |  2 +-
 .../egammaConditions/src/EMDatabaseID.cxx     | 34 +++++++++---------
 .../egamma/egammaEvent/src/EMBremFit.cxx      | 10 +++---
 .../egamma/egammaEvent/src/EMConvert.cxx      |  6 ++--
 .../egamma/egammaEvent/src/EMErrorDetail.cxx  | 36 +++++++++----------
 .../egamma/egammaEvent/src/EMTrackFit.cxx     | 22 ++++++------
 .../egamma/egammaEvent/src/EMTrackMatch.cxx   |  2 +-
 .../egammaEvent/src/ElectronAssociation.cxx   |  2 +-
 .../egammaEvent/src/ElectronConstituent.cxx   |  2 +-
 .../egammaEvent/src/PhotonAssociation.cxx     |  2 +-
 .../egamma/egammaEvent/src/egamma.cxx         | 16 ++++-----
 .../Root/egammaMVAFunctions.cxx               | 10 +++---
 .../egammaMVACalib/src/egammaMVACalibTool.cxx |  8 ++---
 .../src/MonitorPhotonAlgorithm.cxx            |  8 ++---
 .../src/egammaMonToolBase.cxx                 |  4 +--
 .../egamma/egammaTools/src/EMClusterTool.cxx  |  8 ++---
 .../egammaTools/src/EMConversionBuilder.cxx   |  4 +--
 .../egamma/egammaTools/src/EMPIDBuilder.cxx   |  6 ++--
 .../egammaTools/src/EMShowerBuilder.cxx       |  8 ++---
 .../egamma/egammaTools/src/egammaSwTool.cxx   |  4 +--
 .../src/CaloCluster_OnTrackBuilder.cxx        |  4 +--
 .../src/EMExtrapolationTools.cxx              |  4 +--
 .../src/egammaTrkRefitterTool.cxx             |  8 ++---
 .../Root/egammaEnergyPositionAllSamples.cxx   |  2 +-
 .../egamma/egammaUtils/Root/egammaqweta1c.cxx |  4 +--
 .../egamma/egammaUtils/Root/egammaqweta2c.cxx |  8 ++---
 29 files changed, 118 insertions(+), 118 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
index ba468e06acc0..d38f58395d36 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
@@ -183,11 +183,11 @@ egammaSuperClusterBuilder::matchesInWindow(const xAOD::CaloCluster* ref,
     float dEta(fabs(ref->eta() - clus->eta()));
     float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
     return (dEta < m_searchWindowEtaBarrel && dPhi < m_searchWindowPhiBarrel);
-  } else {
+  } 
     float dEta(fabs(ref->eta() - clus->eta()));
     float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
     return (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap);
-  }
+  
 }
 
 std::unique_ptr<xAOD::CaloCluster>
diff --git a/Reconstruction/egamma/egammaAthenaPool/src/egDetailContainerCnv.cxx b/Reconstruction/egamma/egammaAthenaPool/src/egDetailContainerCnv.cxx
index 14a148cae8c7..e30abe32a73c 100644
--- a/Reconstruction/egamma/egammaAthenaPool/src/egDetailContainerCnv.cxx
+++ b/Reconstruction/egamma/egammaAthenaPool/src/egDetailContainerCnv.cxx
@@ -63,7 +63,7 @@ egDetailContainer* egDetailContainerCnv::createTransient()
     // regular object from before the T/P separation
     return poolReadObject<egDetailContainer>();
 
-  } else if ( compareClassGuid(p1_guid) ) {
+  } if ( compareClassGuid(p1_guid) ) {
 
     // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<egDetailContainer_p1> persObj( poolReadObject<egDetailContainer_p1>() );
diff --git a/Reconstruction/egamma/egammaCaloTools/src/egammaShowerShape.cxx b/Reconstruction/egamma/egammaCaloTools/src/egammaShowerShape.cxx
index 6aca421763ec..5c36f46b6e74 100755
--- a/Reconstruction/egamma/egammaCaloTools/src/egammaShowerShape.cxx
+++ b/Reconstruction/egamma/egammaCaloTools/src/egammaShowerShape.cxx
@@ -28,13 +28,13 @@ StatusCode egammaShowerShape::initialize(){
         ATH_MSG_FATAL("Unable to retrieve "<<m_egammaPreSamplerShape);
         return StatusCode::FAILURE;
     } 
-    else ATH_MSG_DEBUG("Tool " << m_egammaPreSamplerShape << " retrieved"); 
+    ATH_MSG_DEBUG("Tool " << m_egammaPreSamplerShape << " retrieved"); 
 
     if(m_egammaStripsShape.retrieve().isFailure()) {
         ATH_MSG_FATAL("Unable to retrieve "<<m_egammaStripsShape);
         return StatusCode::FAILURE;
     } 
-    else ATH_MSG_DEBUG("Tool " << m_egammaStripsShape << " retrieved"); 
+    ATH_MSG_DEBUG("Tool " << m_egammaStripsShape << " retrieved"); 
 
     if(m_egammaMiddleShape.retrieve().isFailure()) {
         ATH_MSG_FATAL("Unable to retrieve "<<m_egammaMiddleShape);
@@ -45,7 +45,7 @@ StatusCode egammaShowerShape::initialize(){
         ATH_MSG_FATAL("Unable to retrieve "<<m_egammaBackShape);
         return StatusCode::FAILURE;
     } 
-    else ATH_MSG_DEBUG("Tool " << m_egammaBackShape << " retrieved"); 
+    ATH_MSG_DEBUG("Tool " << m_egammaBackShape << " retrieved"); 
 
     return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
index 021fa6b5c0c5..3e6755c8b033 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
@@ -15,7 +15,7 @@ EMClusterErrorsMatrix::EMClusterErrorsMatrix()
 
 EMClusterErrorsMatrix::EMClusterErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
 					     std::string textDescription)
-  :  EMAPMatrix<EMClusterErrorsEntry>(axes, std::move(textDescription))
+  :  EMAPMatrix<EMClusterErrorsEntry>(axes, textDescription)
 {
 }
 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx b/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
index 53c01aac593d..403df233607c 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
@@ -23,7 +23,7 @@ EMDatabaseID::EMDatabaseID(const EMDatabaseID& ob)
 EMDatabaseID::EMDatabaseID(std::string s)
 {
   //  clear();
-  setUniqueID(std::move(s));
+  setUniqueID(s);
 }
 
 /** Constructor via unique id-string*/
@@ -96,13 +96,13 @@ void EMDatabaseID::set(const EMDatabaseID& ob)
 
 void EMDatabaseID::set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, long start, long end)
 {
-  m_idDes.Object	= beautify(std::move(Object));
-  m_idDes.Container	= beautify(std::move(Container));
-  m_idDes.Type		= beautify(std::move(Type));
-  m_idDes.Channel	= beautify(std::move(Channel));
-  m_idDes.Author	= beautify(std::move(Author));
-  m_idDes.RecoSWV	= beautify(std::move(RecoSWV));
-  m_idDes.Tag	= beautify(std::move(Tag));
+  m_idDes.Object	= beautify(Object);
+  m_idDes.Container	= beautify(Container);
+  m_idDes.Type		= beautify(Type);
+  m_idDes.Channel	= beautify(Channel);
+  m_idDes.Author	= beautify(Author);
+  m_idDes.RecoSWV	= beautify(RecoSWV);
+  m_idDes.Tag	= beautify(Tag);
   m_idDes.runStart	= start;
   m_idDes.runEnd	= end;
   m_idDes.SimSWV	= "";
@@ -110,16 +110,16 @@ void EMDatabaseID::set(std::string Object, std::string Container, std::string Ty
 
 void EMDatabaseID::set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, std::string SimSWV)
 {
-  m_idDes.Object	= beautify(std::move(Object));
-  m_idDes.Container	= beautify(std::move(Container));
-  m_idDes.Type		= beautify(std::move(Type));
-  m_idDes.Channel	= beautify(std::move(Channel));
-  m_idDes.Author	= beautify(std::move(Author));
-  m_idDes.RecoSWV	= beautify(std::move(RecoSWV));
-  m_idDes.Tag	= beautify(std::move(Tag));
+  m_idDes.Object	= beautify(Object);
+  m_idDes.Container	= beautify(Container);
+  m_idDes.Type		= beautify(Type);
+  m_idDes.Channel	= beautify(Channel);
+  m_idDes.Author	= beautify(Author);
+  m_idDes.RecoSWV	= beautify(RecoSWV);
+  m_idDes.Tag	= beautify(Tag);
   m_idDes.runStart	= 0;
   m_idDes.runEnd	= 0;
-  m_idDes.SimSWV	= beautify(std::move(SimSWV));
+  m_idDes.SimSWV	= beautify(SimSWV);
 }
 
 // for object retrieval
@@ -144,7 +144,7 @@ void EMDatabaseID::clear()
 
 bool EMDatabaseID::isMCData() const	
 {
-  return m_idDes.SimSWV != "";
+  return !m_idDes.SimSWV.empty();
 }
 
 bool EMDatabaseID::isComplete() const
diff --git a/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx b/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
index e7a974bf1f62..ae8d317507a3 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
@@ -16,13 +16,13 @@ PURPOSE:  object containing information about Bremstrahlung fit
 
 // INCLUDE HEADER FILES:
 
-#include <math.h>
-#include <iomanip>
-#include <iostream>
 #include "egammaEvent/EMBremFit.h"
-#include "GaudiKernel/GaudiException.h"
-#include "AthenaKernel/ClassName.h"
 #include "AthenaKernel/BaseInfo.h"
+#include "AthenaKernel/ClassName.h"
+#include "GaudiKernel/GaudiException.h"
+#include <cmath>
+#include <iomanip>
+#include <iostream>
 
 //  END OF HEADER FILES INCLUDE
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
index 9d6b02d1388d..7fb02ef21c59 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
@@ -17,7 +17,7 @@ UPDATED:  Jul 30, 2010 (JM) Add ambiguity result
 
 // INCLUDE HEADER FILES:
 
-#include <math.h>
+#include <cmath>
 
 #include "egammaEvent/EMConvert.h"
 
@@ -993,11 +993,11 @@ Trk::VxCandidate* EMConvert::getVxCandidate() const
     evxCand = new Trk::ExtendedVxCandidate(*vx, vxTrkAtVx, getVxErrorMatrix());
     delete vx;
     return evxCand;
-  }else{//single track conversion -> VxCandidate
+  }//single track conversion -> VxCandidate
     vxCand = new Trk::VxCandidate(*vx, vxTrkAtVx);
     delete vx;
     return vxCand;
-  }
+  
 }
 
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx b/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
index a431b9003c61..79a8caced8c8 100644
--- a/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
@@ -151,17 +151,17 @@ double EMErrorDetail::getClusterEtaPosError(const egamma* eg,
   }
   if (!pars) {
     return 0.30e-3*sqrt(100./(clusterE*0.001));
-  } else {
+  } 
     const EMClusterEtaPosErrorsMatrix& mat = pars->getEtaPosMatrix(tp);
     const double err = mat.getError(eta, clusterE);
     if (err != -1.0) {
       return err;
-    } else {
+    } 
       // it actually was not found
       // use old parametrization.
       return 0.30e-3*sqrt(100./(clusterE*0.001));
-    }
-  }
+    
+  
 }
 
 
@@ -233,9 +233,9 @@ double EMErrorDetail::caloEta(const egamma* eg, double clusterEta) const {
   const double etaPointing = eg->detailValue(egammaParameters::etap);
   if ( fabs(etaPointing - clusterEta ) < 0.15 ) {
     return etaPointing;
-  } else {
+  } 
     return clusterEta;
-  }
+  
 }
 
 
@@ -267,9 +267,9 @@ Amg::MatrixX EMErrorDetail::getCombinedErrorMatrix() const
   // matrix.
   if (EMtrack_comb_CovPP() == egammaParameters::EgParamUndefined) {
     return getEMPhotonErrorMatrix();
-  } else {
+  } 
     return getEMTrackCombinedErrorMatrix();
-  }
+  
 }
 
 // ====================================================================
@@ -278,9 +278,9 @@ Amg::MatrixX EMErrorDetail::getUncombinedErrorMatrix() const
   // this still looks for combined matrix to make the decision
   if (EMtrack_comb_CovPP() == egammaParameters::EgParamUndefined) {
     return getEMPhotonErrorMatrix();
-  } else {
+  } 
     return getEMTrackUncombinedErrorMatrix();
-  }
+  
 }
 
 // ====================================================================
@@ -291,9 +291,9 @@ AmgSymMatrix(4) EMErrorDetail::get4x4CombinedErrorMatrix() const
   // matrix.
   if (EMtrack_comb_CovPP() == egammaParameters::EgParamUndefined) {
     return get4x4EMPhotonErrorMatrix();
-  } else {
+  } 
     return get4x4EMTrackCombinedErrorMatrix();
-  }
+  
 }
 
 // ====================================================================
@@ -302,9 +302,9 @@ AmgSymMatrix(4) EMErrorDetail::get4x4UncombinedErrorMatrix() const
   // this still looks for combined matrix to make the decision
   if (EMtrack_comb_CovPP() == egammaParameters::EgParamUndefined) {
     return get4x4EMPhotonErrorMatrix();
-  } else {
+  } 
     return get4x4EMTrackUncombinedErrorMatrix();
-  }
+  
 }
 
 // ====================================================================
@@ -370,7 +370,7 @@ AmgSymMatrix(5) EMErrorDetail::getEMTrackUncombinedErrorMatrix() const {
     //similarity
     return  jacob*hepSymMatrix*jacob.transpose();
     
-  } else {
+  } 
     AmgSymMatrix(5) hepSymMatrix;
     hepSymMatrix.setIdentity();
     // use cluster for energy and eta
@@ -392,7 +392,7 @@ AmgSymMatrix(5) EMErrorDetail::getEMTrackUncombinedErrorMatrix() const {
     hepSymMatrix.fillSymmetric(3,4,EMphoton_CovetaEclus());
 
     return hepSymMatrix;
-  }
+  
 
 }
 
@@ -434,7 +434,7 @@ AmgSymMatrix(4) EMErrorDetail::get4x4EMTrackUncombinedErrorMatrix() const {
     jacob(1,1) = (-1./sin(EMtrack_perigee_theta()));     // deta/dtheta
     //similarity
     return  jacob*hepSymMatrix*jacob.transpose();  
-  } else {
+  } 
     
     AmgSymMatrix(4) hepSymMatrix;
     hepSymMatrix.setZero();
@@ -446,7 +446,7 @@ AmgSymMatrix(4) EMErrorDetail::get4x4EMTrackUncombinedErrorMatrix() const {
     hepSymMatrix.fillSymmetric(0,1, EMphoton_CovetaEclus());
   
     return hepSymMatrix;
-  }
+  
 
 }
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx b/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
index ad83c59c473d..bc65a903f064 100644
--- a/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
@@ -19,15 +19,15 @@ MODIFIED:
 
 // INCLUDE HEADER FILES:
 
-#include <math.h>
 #include "egammaEvent/EMTrackFit.h"
-#include "GaudiKernel/GaudiException.h"
+#include "AthenaKernel/BaseInfo.h"
 #include "AthenaKernel/ClassName.h"
-#include "TrkTrack/Track.h" 
+#include "GaudiKernel/GaudiException.h"
 #include "TrkMaterialOnTrack/EstimatedBremOnTrack.h"
-#include "TrkSurfaces/Surface.h"
 #include "TrkSurfaces/PerigeeSurface.h"
-#include "AthenaKernel/BaseInfo.h"
+#include "TrkSurfaces/Surface.h"
+#include "TrkTrack/Track.h" 
+#include <cmath>
 
 
 
@@ -183,7 +183,7 @@ void EMTrackFit::fillBrems(Trk::Track *track){
     bremRadius(0);
     bremDeltaZ(0);
     return;
-  } else {
+  } 
     // The energy loss weighted average position  of the brem.
     std::vector<const Trk::EstimatedBremOnTrack*>::iterator brems = estimatedBremOnTrack.begin();
     std::vector<const Trk::TrackStateOnSurface*>::iterator tsos = trkStateOnSurfaceWithBrem.begin();
@@ -210,7 +210,7 @@ void EMTrackFit::fillBrems(Trk::Track *track){
     bremDeltaZ(Z);
     //Clearly this is poorly defined for multiple brems a better way of doing this need to be found
 		bremDeltaZerr(sigmaRetainedEnFraction);
-  }
+  
   }
 
 // ======================================================================
@@ -278,9 +278,9 @@ bool EMTrackFit::fillPerigeeParamters(const Trk::Perigee *trackParameters){
    }
    
    return true;
-  } else {
+  } 
     return false;
-  }
+  
   return true;
 }
 
@@ -359,7 +359,7 @@ const Trk::Perigee* EMTrackFit::getMeasuredPerigee () const
 // =====================================================================
 bool EMTrackFit::hasParameter(egammaParameters::ParamDef key) const {
   if ( hasIntParameter(key) )                                   return true;
-  else if ( key == egammaParameters::refittedTrack_d0 )         return true;
+  if ( key == egammaParameters::refittedTrack_d0 )         return true;
   else if ( key == egammaParameters::refittedTrack_phi0 )       return true;
   else if ( key == egammaParameters::refittedTrack_qOverP )     return true;
   else if ( key == egammaParameters::refittedTrack_z0 )         return true;
@@ -396,7 +396,7 @@ bool EMTrackFit::hasParameter(egammaParameters::ParamDef key) const {
 // =====================================================================
 bool EMTrackFit::hasIntParameter(egammaParameters::ParamDef key) const {
   if (key == egammaParameters::hasBrem)                       return true;
-  else if (key == egammaParameters::bremTrackAuthor )         return true;
+  if (key == egammaParameters::bremTrackAuthor )         return true;
   else if (key == egammaParameters::bremFitStatus )         return true;
   else if (key == egammaParameters::linkIndex )               return true;
   
diff --git a/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx b/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
index 99fc6665619a..7110197d7b7d 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
@@ -37,11 +37,11 @@ Updated:  Jan, 2004 (FD+AK)
 ********************************************************************/
 
 // INCLUDE HEADER FILES:
-#include <math.h>
 #include "egammaEvent/EMTrackMatch.h"
 #include "AthenaKernel/BaseInfo.h"
 #include "AthenaKernel/ClassName.h"
 #include "GaudiKernel/GaudiException.h"
+#include <cmath>
 
 //  END OF HEADER FILES INCLUDE
 
diff --git a/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx b/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
index b9c2211b7b87..f823b2dfd541 100755
--- a/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
@@ -25,7 +25,7 @@ namespace Analysis
     //get electron from Navigable
     if (this->size() ==0) 
       return nullptr;
-    else if (this->size() > 1)
+    if (this->size() > 1)
       return nullptr;
     // this shouldn't happen
     else 
diff --git a/Reconstruction/egamma/egammaEvent/src/ElectronConstituent.cxx b/Reconstruction/egamma/egammaEvent/src/ElectronConstituent.cxx
index 365e147ece56..ee2cd8323433 100755
--- a/Reconstruction/egamma/egammaEvent/src/ElectronConstituent.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/ElectronConstituent.cxx
@@ -38,7 +38,7 @@ namespace Analysis
     //get electron from Navigable
     if (this->size() ==0) 
       return nullptr;
-    else if (this->size() > 1)
+    if (this->size() > 1)
       return nullptr;
     // this shouldn't happen
     else 
diff --git a/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx b/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
index 69d0ed48202c..7c0b9b681a46 100755
--- a/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
@@ -25,7 +25,7 @@ namespace Analysis
     //get photon from Navigable
     if (this->size() ==0) 
       return nullptr;
-    else if (this->size() > 1)
+    if (this->size() > 1)
       return nullptr;
     // this shouldn't happen
     else 
diff --git a/Reconstruction/egamma/egammaEvent/src/egamma.cxx b/Reconstruction/egamma/egammaEvent/src/egamma.cxx
index 9c16f91e9391..7d44601e7d88 100755
--- a/Reconstruction/egamma/egammaEvent/src/egamma.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/egamma.cxx
@@ -396,9 +396,9 @@ const Rec::TrackParticle* egamma::trackParticle (unsigned int index) const
 
   if(index < m_trackParticle.size()){
     return ((m_trackParticle.at(index)).isValid()) ? *(m_trackParticle.at(index)) : nullptr;
-  }else{
-    return nullptr;
   }
+    return nullptr;
+  
 }   
 
 // ==========================================================
@@ -412,9 +412,9 @@ const Trk::VxCandidate* egamma::conversion (unsigned int index) const
 { 
   if(index < m_conversion.size()){
     return ((m_conversion.at(index)).isValid()) ? *(m_conversion.at(index)) : nullptr;
-  }else{
-    return nullptr;
   }
+    return nullptr;
+  
 }   
 
 // ==========================================================
@@ -434,9 +434,9 @@ ElementLink<Rec::TrackParticleContainer> egamma::trackParticleElementLink(unsign
 { 
   if(index < m_trackParticle.size()){
     return m_trackParticle.at(index);
-  }else{
-    return ElementLink<Rec::TrackParticleContainer>();
   }
+    return ElementLink<Rec::TrackParticleContainer>();
+  
 }
 
 // ==========================================================
@@ -451,9 +451,9 @@ ElementLink<VxContainer> egamma::conversionElementLink(unsigned int index) const
 { 
   if(index < m_conversion.size()){
     return m_conversion.at(index);
-  }else{
-    return ElementLink<VxContainer>();
   }
+    return ElementLink<VxContainer>();
+  
 }
 
 // ==========================================================
diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
index e0dc5ba248a8..ba163a48625d 100644
--- a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
+++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -82,9 +82,9 @@ namespace egammaMVAFunctions
 	auto ph = static_cast<const xAOD::Photon*>(eg);
 	if (compute_ptconv(ph) > 3*GeV) { 
 	  return xAOD::EgammaHelpers::conversionRadius(ph);
-	} else {
+	} 
 	  return 799.0;
-	}
+	
       };
     funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
       { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); };
@@ -102,9 +102,9 @@ namespace egammaMVAFunctions
 	  auto pt1 = compute_pt1conv(ph);
 	  auto pt2 = compute_pt2conv(ph);
 	  return std::max(pt1, pt2)/(pt1+pt2);
-	} else {
+	} 
 	  return 1.0f;
-	}
+	
       };
     
     if (useLayerCorrected) {
diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
index eb8e39475db1..b0a60265175d 100644
--- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
+++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
@@ -258,9 +258,9 @@ float egammaMVACalibTool::getEnergy(const xAOD::CaloCluster& clus,
   if (mvaOutput == 0.) {
     if (m_clusterEif0) {
       return clus.e();
-    } else {
+    } 
       return 0.;
-    }
+    
   }
 
   // calcluate the unshifted energy
@@ -282,8 +282,8 @@ float egammaMVACalibTool::getEnergy(const xAOD::CaloCluster& clus,
   ATH_MSG_DEBUG("shift = " << shift);
   if (shift > 0.5) {
     return energy / shift;
-  } else {
+  } 
     ATH_MSG_WARNING("Shift value too small: " << shift << "; not applying shift");
     return energy;
-  }
+  
 }
diff --git a/Reconstruction/egamma/egammaPerformance/src/MonitorPhotonAlgorithm.cxx b/Reconstruction/egamma/egammaPerformance/src/MonitorPhotonAlgorithm.cxx
index 77ed7c5d1efa..00341330b049 100755
--- a/Reconstruction/egamma/egammaPerformance/src/MonitorPhotonAlgorithm.cxx
+++ b/Reconstruction/egamma/egammaPerformance/src/MonitorPhotonAlgorithm.cxx
@@ -132,19 +132,19 @@ StatusCode MonitorPhotonAlgorithm::fillHistograms( const EventContext& ctx ) con
     // BARREL
 
     auto rconv_barrel = Monitored::Scalar<Float_t>("RConvinBARREL",0.0);
-    auto convtype_barrel = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinBARREL",0);
+    auto convtype_barrel = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinBARREL",nullptr);
     auto contrkmatch1_barrel = Monitored::Scalar<u_int8_t>("ConvTrkmatch1inBARREL",0);
     auto contrkmatch2_barrel = Monitored::Scalar<u_int8_t>("ConvTrkmatch2inBARREL",0);
 
     // ENDCAP
     auto rconv_endcap = Monitored::Scalar<Float_t>("RConvinENDCAP",0.0);
-    auto convtype_endcap = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinENDCAP",0);
+    auto convtype_endcap = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinENDCAP",nullptr);
     auto contrkmatch1_endcap = Monitored::Scalar<u_int8_t>("ConvTrkmatch1inENDCAP",0);
     auto contrkmatch2_endcap = Monitored::Scalar<u_int8_t>("ConvTrkmatch2inENDCAP",0);
 
     // CRACK
     auto rconv_crack = Monitored::Scalar<Float_t>("RConvinCRACK",0.0);
-    auto convtype_crack = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinCRACK",0);
+    auto convtype_crack = Monitored::Scalar<xAOD::EgammaParameters::ConversionType>("ConvTypeinCRACK",nullptr);
     auto contrkmatch1_crack = Monitored::Scalar<u_int8_t>("ConvTrkmatch1inCRACK",0);
     auto contrkmatch2_crack = Monitored::Scalar<u_int8_t>("ConvTrkmatch2inCRACK",0);
 
@@ -226,7 +226,7 @@ StatusCode MonitorPhotonAlgorithm::fillHistograms( const EventContext& ctx ) con
 
       // Conversion details
       xAOD::EgammaParameters::ConversionType myconvtype = xAOD::EgammaHelpers::conversionType(p_iter);
-      bool isUnconverted = (myconvtype==xAOD::EgammaParameters::ConversionType::unconverted ? true : false) ;
+      bool isUnconverted = (myconvtype==xAOD::EgammaParameters::ConversionType::unconverted) ;
 
       is_pt_gt_2_5gevandconv = myis_pt_gt_2_5gev && !isUnconverted ;
       is_pt_gt_2_5gevandunconv = myis_pt_gt_2_5gev && isUnconverted ;
diff --git a/Reconstruction/egamma/egammaPerformance/src/egammaMonToolBase.cxx b/Reconstruction/egamma/egammaPerformance/src/egammaMonToolBase.cxx
index f4ebbe1d87d9..e67952a1ce35 100644
--- a/Reconstruction/egamma/egammaPerformance/src/egammaMonToolBase.cxx
+++ b/Reconstruction/egamma/egammaPerformance/src/egammaMonToolBase.cxx
@@ -90,10 +90,10 @@ unsigned int egammaMonToolBase::getCurrentLB()
   SG::ReadHandle<xAOD::EventInfo> evtInfo{m_EventInfoKey};
   if (evtInfo.isValid()) {
     return evtInfo->lumiBlock();
-  } else {
+  } 
     ATH_MSG_ERROR("couldn't retrieve event info");
     return -1;
-  }
+  
 }
 
 StatusCode egammaMonToolBase::bookHistograms()
diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
index d5d5bf503244..c02121ec6624 100644
--- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
@@ -54,9 +54,9 @@ StatusCode EMClusterTool::initialize() {
     ATH_MSG_ERROR("Failed to retrieve " << m_clusterCorrectionTool);
     return StatusCode::SUCCESS;
   } 
-  else {
+  
     ATH_MSG_DEBUG("Retrieved tool " << m_clusterCorrectionTool);   
-  }
+  
 
 
   // Get the cluster correction tool
@@ -64,9 +64,9 @@ StatusCode EMClusterTool::initialize() {
     ATH_MSG_ERROR("Failed to retrieve " << m_MVACalibSvc);
     return StatusCode::SUCCESS;
   } 
-  else {
+  
     ATH_MSG_DEBUG("Retrieved tool " << m_MVACalibSvc);   
-  }
+  
 
   ATH_MSG_DEBUG("Initialization successful");
 
diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
index cb34165b9b73..0cf3483e0dec 100644
--- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
@@ -102,9 +102,9 @@ StatusCode EMConversionBuilder::initialize()
   if(m_extrapolationTool.retrieve().isFailure()){
     ATH_MSG_ERROR("Cannot retrieve extrapolationTool " << m_extrapolationTool);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_DEBUG("Retrieved extrapolationTool " << m_extrapolationTool);
-  }
+  
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.cxx
index 47293e26ebba..f54cf8b8de99 100644
--- a/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 // INCLUDE HEADER FILES:
@@ -61,9 +61,9 @@ StatusCode EMPIDBuilder::initialize()
        if (m_lumiBlockMuTool.retrieve().isFailure()) {
             ATH_MSG_FATAL("Unable to retrieve Luminosity Tool");
             return StatusCode::FAILURE;
-        } else {
+        } 
             ATH_MSG_DEBUG("Successfully retrieved Luminosity Tool");
-        }
+        
     } else {
        std::cout << "disabling lumiBlockMuTool" <<std::endl; 
         m_lumiBlockMuTool.disable();
diff --git a/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.cxx
index 7f81413dd78f..d56fd53301af 100644
--- a/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.cxx
@@ -43,9 +43,9 @@ StatusCode EMShowerBuilder::initialize() {
   if (m_UseShowerShapeTool) {
     if ((RetrieveShowerShapeTool()).isFailure()) {
       return StatusCode::FAILURE;
-    } else {
+    } 
       m_ShowerShapeTool.disable();
-    }
+    
   }
   //
   // call calorimeter isolation tool only if needed
@@ -53,9 +53,9 @@ StatusCode EMShowerBuilder::initialize() {
   if (m_UseCaloIsoTool) {
     if ((RetrieveHadronicLeakageTool()).isFailure()) {
       return StatusCode::FAILURE;
-    } else {
+    } 
       m_HadronicLeakageTool.disable();
-    }
+    
   }
   // for measuring the timing
 
diff --git a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
index fb6deb88f7bb..229edeee86e9 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
+++ b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -13,7 +13,7 @@
 #include "GaudiKernel/ListItem.h"
 
 #include <algorithm> 
-#include <math.h>
+#include <cmath>
 
 //  END OF HEADER FILES INCLUDE
 
diff --git a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
index d909b4a8f0bd..0251fed90a19 100755
--- a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
@@ -259,7 +259,7 @@ double CaloCluster_OnTrackBuilder::electronPhiResoA(double eta) const
   if ( eta < 0.30 )
     return 0.000191492 ;
   
-  else if ( eta < 0.60) 
+  if ( eta < 0.60) 
     return 9.35047e-05 + 0.000392766 * eta;
   
   else if ( eta < 0.80) 
@@ -291,7 +291,7 @@ double CaloCluster_OnTrackBuilder::electronPhiResoB(double eta) const
   if ( eta < 0.65 )
     return 0.0285262  + 0.00985529 * eta;
   
-  else if ( eta < 1.04 )
+  if ( eta < 1.04 )
     return -0.0690774 + 0.166424   * eta; 
   
   else if ( eta < 1.25 )
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
index f5c50f4e237b..a959de829e3b 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
@@ -396,11 +396,11 @@ EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, bool reuse
     // Already decorated with parameters at vertex
     ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata");
     return Amg::Vector3D(accPx(vertex), accPy(vertex), accPz(vertex));
-  } else {
+  } 
     for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) {
       momentum += getMomentumAtVertex(vertex, i);
     }
-  }
+  
   return momentum;
 }
 /*
diff --git a/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx b/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
index 053c0291cc56..1c45a6ffbb02 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
@@ -124,10 +124,10 @@ StatusCode egammaTrkRefitterTool::refitTrackParticle(const EventContext& ctx,
   if ( trackParticle->trackLink().isValid()) {      
     // retrieve and refit original track
     return refitTrack( ctx,trackParticle->track() , cache);
-  } else {
+  } 
     ATH_MSG_WARNING("Could not get TrackElementLink of the TrackParticle");
     return StatusCode::FAILURE;
-  }  
+   
   return StatusCode::SUCCESS;
 }
 
@@ -200,10 +200,10 @@ StatusCode  egammaTrkRefitterTool::refitTrack(const EventContext& ctx,
       return StatusCode::FAILURE;
     }
     return StatusCode::SUCCESS;
-  } else {
+  } 
     ATH_MSG_DEBUG("Refit Failed");
     return StatusCode::FAILURE;
-  }
+  
 }
 
 const Trk::TrackParameters* egammaTrkRefitterTool::lastTrackParameters(const Trk::Track* track) const
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
index f3ba92e9ec7d..eac40899c8c3 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
@@ -60,7 +60,7 @@ bool egammaEnergyPositionAllSamples::inBarrel(const xAOD::CaloCluster &cluster,
   //
   if (cluster.inBarrel() && !cluster.inEndcap()) {
     return true; // barrel
-  } else if (!cluster.inBarrel() && cluster.inEndcap()) {
+  } if (!cluster.inBarrel() && cluster.inEndcap()) {
     return false; // endcap
   } else if (cluster.inBarrel() && cluster.inEndcap()) {
     switch (sampling) {
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
index c822b6b3663d..ca63ff25ab39 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
@@ -13,7 +13,7 @@ float egammaqweta1c::Correct(const float eta, const float etacell, const float w
   const float etarel = RelPosition(eta, etacell);
   if (aeta < 1.0) {
     return (width - 0.76 * pow(etarel, 2));
-  } else if (aeta < 1.45) {
+  } if (aeta < 1.45) {
     return (width - 0.85 * pow(etarel, 2) + 1.9 * pow(etarel, 4));
   } else if (aeta < 1.5) {
     return width;
@@ -38,7 +38,7 @@ double egammaqweta1c::RelPosition(const float eta, const float etacell) {
     const double dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
     return (fmod(etapos, dgra) / dgra - 0.5);
-  } else if (aeta < 2.0) {
+  } if (aeta < 2.0) {
     const float ngra = 6.;
     const float dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
index 6bd36932785d..2585f08aa56d 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
@@ -5,7 +5,7 @@
 #include "egammaUtils/egammaqweta2c.h"
 #include "xAODCaloEvent/CaloCluster.h"
 
-#include <math.h>
+#include <cmath>
 
 namespace {
 const float P0A[3] = {0.0045, 0.005375, -0.0562};
@@ -29,7 +29,7 @@ float egammaqweta2c::Correct(const float eta, const float etacell, const float w
   if (aeta < 0.8) {
     if (etarel < 0.1) {
       return (weta2 - (P0A[0] + P1A[0] * etarel + P2A[0] * etarel * etarel));
-    } else if (etarel < 0.9) {
+    } if (etarel < 0.9) {
       return (weta2 - (P0A[1] + P1A[1] * etarel + P2A[1] * etarel * etarel));
     } else {
       return (weta2 - (P0A[2] + P1A[2] * etarel + P2A[2] * etarel * etarel));
@@ -37,7 +37,7 @@ float egammaqweta2c::Correct(const float eta, const float etacell, const float w
   } else if (aeta < 1.5) {
     if (etarel < 0.1) {
       return (weta2 - (P0B[0] + P1B[0] * etarel + P2B[0] * etarel * etarel));
-    } else if (etarel < 0.9) {
+    } if (etarel < 0.9) {
       return (weta2 - (P0B[1] + P1B[1] * etarel + P2B[1] * etarel * etarel));
     } else {
       return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
@@ -46,7 +46,7 @@ float egammaqweta2c::Correct(const float eta, const float etacell, const float w
   } else if (aeta < 1.8) {
     if (etarel < 0.1) {
       return (weta2 - (P0B[0] + P1B[0] * etarel + P2B[0] * etarel * etarel));
-    } else if (etarel < 0.9) {
+    } if (etarel < 0.9) {
       return (weta2 - (P0B[1] + P1B[1] * etarel + P2B[1] * etarel * etarel));
     } else {
       return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
-- 
GitLab


From 2cc6c2ebaff1e73ec8c03af4fcbb2d702a002385 Mon Sep 17 00:00:00 2001
From: adbailey <adam.bailey@cern.ch>
Date: Wed, 10 Jun 2020 19:07:38 +0200
Subject: [PATCH 129/266] Switched tau trig algorithms to use new track finder
 execute

---
 .../TrigTauRec/src/TrigTauRecMerged.cxx       | 20 +------------------
 .../TrigTauRec/src/TrigTauRecMergedMT.cxx     | 19 +-----------------
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMerged.cxx b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMerged.cxx
index 1a1d50b4f7bb..9dcb15f6f226 100755
--- a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMerged.cxx
+++ b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMerged.cxx
@@ -691,10 +691,6 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
   p_tau->setROIWord(roiDescriptor->roiWord());
   p_tau->setJet(theJetCollection, p_seed);
 
-  // This sets one track and link. Need to have at least 1 track linked to retrieve track container
-  // can't we instead implement in the EDM a function to retrieve the track container of a tau?
-  setEmptyTauTrack(p_tau, pTrackContainer);
-
   if(p_seed->e()<=0) {
     ATH_MSG_DEBUG( "Roi: changing eta due to energy " << p_seed->e() );
     p_tau->setP4(p_tau->pt(), roiDescriptor->eta(), roiDescriptor->phi(), p_tau->m());
@@ -724,7 +720,7 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
       processStatus = (*firstTool)->executeVertexFinder(*p_tau, RoIVxContainer ,RoITrackContainer);
     }
     else if ( (*firstTool)->type() == "TauTrackFinder") {
-      processStatus = (*firstTool)->executeTrackFinder(*p_tau, RoITrackContainer);
+      processStatus = (*firstTool)->executeTrackFinder(*p_tau, *pTrackContainer, RoITrackContainer);
     }
     else if ( (*firstTool)->type() == "TauVertexVariables" ) {
       processStatus = (*firstTool)->executeVertexVariables(*p_tau, *dummyVxCont);
@@ -1017,17 +1013,3 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
   // set status of TE to always true for FE algorithms
   return HLT::OK;
 }
-
-void TrigTauRecMerged::setEmptyTauTrack(xAOD::TauJet* &pTau,
-					xAOD::TauTrackContainer* &tauTrackContainer)
-{
-  // Make a new tau track, add to container
-  xAOD::TauTrack* pTrack = new xAOD::TauTrack();
-  tauTrackContainer->push_back(pTrack);
-
-  // Create an element link for that track
-  ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-  linkToTauTrack.toContainedElement(*tauTrackContainer, pTrack);
-  pTau->addTauTrackLink(linkToTauTrack);
-}
-
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
index b36eccbc2dd2..11021919d78c 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
@@ -414,10 +414,6 @@ StatusCode TrigTauRecMergedMT::execute()
     }
   }
 
-  // This sets one track and link. Need to have at least 1 track linked to retrieve track container
-  // Can't we instead implement in the EDM a function to retrieve the track container of a tau?
-  if(!m_clustersKey.key().empty() || pTrackContainer->size()==0) setEmptyTauTrack(p_tau, pTrackContainer);
-
   ATH_MSG_DEBUG(" roidescriptor roiword " << roiDescriptor->roiWord() << " saved " << p_tau->ROIWord() );
 
   StatusCode processStatus    = StatusCode::SUCCESS;
@@ -459,7 +455,7 @@ StatusCode TrigTauRecMergedMT::execute()
       processStatus = (*firstTool)->executeVertexFinder(*p_tau);
     }
     else if ( (*firstTool)->type() == "TauTrackFinder") {
-      processStatus = (*firstTool)->executeTrackFinder(*p_tau);
+      processStatus = (*firstTool)->executeTrackFinder(*p_tau, *pTrackContainer);
     }
     else if ( (*firstTool)->type() == "TauVertexVariables" ) {
       processStatus = (*firstTool)->executeVertexVariables(*p_tau, dummyVxCont);
@@ -616,16 +612,3 @@ StatusCode TrigTauRecMergedMT::execute()
   return StatusCode::SUCCESS;
 }
 
-void TrigTauRecMergedMT::setEmptyTauTrack(xAOD::TauJet*pTau,
-					  xAOD::TauTrackContainer* tauTrackContainer)
-{
-  // Make a new tau track, add to container
-  xAOD::TauTrack* pTrack = new xAOD::TauTrack();
-  tauTrackContainer->push_back(pTrack);
-
-  // Create an element link for that track
-  ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
-  linkToTauTrack.toContainedElement(*tauTrackContainer, pTrack);
-  pTau->addTauTrackLink(linkToTauTrack);
-}
-
-- 
GitLab


From 6d5cfeecab3400ad1769a5996000539bbc3a25ad Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Wed, 10 Jun 2020 17:08:04 +0000
Subject: [PATCH 130/266] ATEAM-564 Inform user if no differences are found

Emit an information message if no differences are found. Also handle
exceptional circumstance of one of the input files not existing.
---
 Tools/PyUtils/bin/meta-diff.py   | 119 ++++++++++++++++++------------
 Tools/PyUtils/python/MetaDiff.py | 123 ++++++++++++++++++++-----------
 2 files changed, 155 insertions(+), 87 deletions(-)

diff --git a/Tools/PyUtils/bin/meta-diff.py b/Tools/PyUtils/bin/meta-diff.py
index bee8a42dcfa6..5a8d12e74691 100755
--- a/Tools/PyUtils/bin/meta-diff.py
+++ b/Tools/PyUtils/bin/meta-diff.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-# This script reads metadata from a given file
+"""This script reads metadata from a given file"""
 
 from __future__ import print_function
 
@@ -13,102 +13,129 @@ from PyUtils.MetaDiff import meta_diff
 
 # escape sequence [?1034h which appear on several runs due to smm capability
 # (Meta Mode On) for xterm.
-if 'TERM' in os.environ:
-    del os.environ['TERM']
+if "TERM" in os.environ:
+    del os.environ["TERM"]
 
 
 def main():
     """Handle command line arguments and call meta_diff"""
 
     parser = argparse.ArgumentParser(
-        description='Compare the metadata content fo two files')
+        description="Compare the metadata content of two files"
+    )
 
     parser.add_argument(
-        'files',
+        "files",
         nargs=2,
-        metavar='FILE',
-        help='The names of two files to compare')
+        metavar="FILE",
+        help="The names of two files to compare",
+    )
 
     parser.add_argument(
-        '-v', '--verbose',
-        action='store_true',
-        help='print detailed output on screen')
+        "-v",
+        "--verbose",
+        action="store_true",
+        help="print detailed output on screen",
+    )
 
     parser.add_argument(
-        '-s', '--ordered',
-        action='store_true',
-        help='When comparing lists, check the element order too.')
+        "-s",
+        "--ordered",
+        action="store_true",
+        help="When comparing lists, check the element order too.",
+    )
 
     parser.add_argument(
-        '-d', '--drop',
-        nargs='*',
+        "-d",
+        "--drop",
+        nargs="*",
         default=None,
-        metavar='KEY',
-        help='Keys to drop from metadata retrieved from file')
+        metavar="KEY",
+        help="Keys to drop from metadata retrieved from file",
+    )
 
     parser.add_argument(
-        '-m', '--mode',
-        default='lite',
-        metavar='MODE',
+        "-m",
+        "--mode",
+        default="lite",
+        metavar="MODE",
         type=str,
-        choices=['tiny', 'lite', 'full', 'peeker'],
-        help='''\
+        choices=["tiny", "lite", "full", "peeker"],
+        help="""\
              This flag provides the user capability to select the amount of
              metadata retrieved. There three options:
                          tiny (only those values used in PyJobTransforms),
                          lite (same output as dump-athfile)
                          and full ( all  available data found)
-             ''')
+             """,
+    )
 
     parser.add_argument(
-        '-t', '--type',
+        "-t",
+        "--type",
         default=None,
-        metavar='TYPE',
+        metavar="TYPE",
         type=str,
-        choices=['POOL', 'BS'],
-        help='''\
+        choices=["POOL", "BS"],
+        help="""\
              The file type of the input filename. By default, it tries to
              determine itself the file type of the input.
-             ''')
+             """,
+    )
 
     parser.add_argument(
-        '-f', '--filter',
+        "-f",
+        "--filter",
         default=[],
-        metavar='FILTER',
-        nargs='+',
+        metavar="FILTER",
+        nargs="+",
         type=str,
-        help="Expression to select specific metadata fields to retrieve.")
-        
+        help="Expression to select specific metadata fields to retrieve.",
+    )
+
     parser.add_argument(
-		'-x', '--diff-format',
-		default= 'simple',
-		type=str,
-		choices=['simple', 'diff'],
-		help="Switch between 'simple' or 'diff' style differences ")
-                        
+        "-x",
+        "--diff-format",
+        default="simple",
+        type=str,
+        choices=["simple", "diff"],
+        help="Switch between 'simple' or 'diff' style differences ",
+    )
+
     parser.add_argument(
-        '--promote',
+        "--promote",
         default=None,
         type=bool,
-        help="Force promotion or not of the metadata keys ")
+        help="Force promotion or not of the metadata keys ",
+    )
 
     args = parser.parse_args()
 
     try:
         diff = meta_diff(
-            args.files, verbose=args.verbose, ordered=args.ordered,
-            drop=args.drop, mode=args.mode, meta_key_filter=args.filter,
-            file_type=args.type, promote=args.promote, diff_format=args.diff_format)
+            args.files,
+            verbose=args.verbose,
+            ordered=args.ordered,
+            drop=args.drop,
+            mode=args.mode,
+            meta_key_filter=args.filter,
+            file_type=args.type,
+            promote=args.promote,
+            diff_format=args.diff_format,
+        )
     except (ValueError, IndexError):
         print("you must supply two files to compare")
         sys.exit(1)
+    except ReferenceError:
+        print("no such file")
+        sys.exit(1)
 
     if diff:
-        print('\n'.join(diff))
+        print("\n".join(diff))
         sys.exit(1)
 
     sys.exit(0)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     main()
diff --git a/Tools/PyUtils/python/MetaDiff.py b/Tools/PyUtils/python/MetaDiff.py
index a6766a3f3468..c21c9756afcb 100644
--- a/Tools/PyUtils/python/MetaDiff.py
+++ b/Tools/PyUtils/python/MetaDiff.py
@@ -11,48 +11,57 @@ from PyUtils.MetaReader import read_metadata
 
 def print_diff(parent_key, obj1, obj2, diff_format):
     """build comparison string for two non-dictionary objects"""
-    result = '\n'
-    
-    if diff_format == 'simple':
+    result = "\n"
+
+    if diff_format == "simple":
         if obj1 is None:
-            result += '{} has been inserted'.format(parent_key)
+            result += "{} has been inserted".format(parent_key)
         elif obj2 is None:
-            result += '{} has been deleted'.format(parent_key)
+            result += "{} has been deleted".format(parent_key)
         else:
-            result += '{} has changed from \'{}\' to \'{}\''.format(parent_key, obj1, obj2)
-        result += '\n'
+            result += "{} has changed from '{}' to '{}'".format(
+                parent_key, obj1, obj2
+            )
+        result += "\n"
     else:
         if parent_key is not None:
-            result += '{}:\n'.format(parent_key)
-        result += '''\
+            result += "{}:\n".format(parent_key)
+        result += """\
         > {}
         ----------
         < {}
-        '''.format(obj1, obj2)
+        """.format(
+            obj1, obj2
+        )
 
     return result
 
 
 def print_diff_type(parent_key, obj1, obj2, diff_format):
     """Build diff string for objet of different type"""
-    result = '\n'
+    result = "\n"
 
-    if diff_format == 'simple':
+    if diff_format == "simple":
         if obj1 is None:
-            result += '{} has been inserted'.format(parent_key)
+            result += "{} has been inserted".format(parent_key)
         elif obj2 is None:
-            result += '{} has been deleted'.format(parent_key)
+            result += "{} has been deleted".format(parent_key)
         else:
-            result += '{} has changed changed type from {} (value: \'{}\') to {} (value: \'{}\')'.format(parent_key, type(obj1), obj1,  type(obj2), obj2)
-        result += '\n'
+            result += (
+                "{} has changed changed type from {} (value: '{}') to "
+                "{} (value: '{}')"
+            ).format(parent_key, type(obj1), obj1, type(obj2), obj2)
+        result += "\n"
     else:
         if parent_key is not None:
-            result += '{}:\n'.format(parent_key)
-        result += '''\
+            result += "{}:\n".format(parent_key)
+        result += """\
         > {} (type: {})
         ----------
         < {} (type: {})
-        '''.format(obj1, type(obj1), obj2, type(obj2))
+        """.format(
+            obj1, type(obj1), obj2, type(obj2)
+        )
 
     return result
 
@@ -68,30 +77,32 @@ def print_diff_dict_keys(parent_key, obj1, obj2, diff_format):
     
     if diff_format == 'simple':
         if obj1 is None:
-            result += '{} has been inserted'.format(parent_key)
+            result += "{} has been inserted".format(parent_key)
         elif obj2 is None:
-            result += '{} has been deleted'.format(parent_key)
+            result += "{} has been deleted".format(parent_key)
         else:
-            result += '{} has changed from \'{}\' to \'{}\''.format(parent_key, value1, value2)
+            result += "{} has changed from '{}' to '{}'".format(
+                parent_key, value1, value2
+            )
     else:
         if parent_key is not None:
-            result += '{}:\n'.format(parent_key)
-        result += '> ' + value1
-        result += '\n----------\n'
-        result += '< ' + value2
-    
-    result += '\n'
+            result += "{}:\n".format(parent_key)
+        result += "> " + value1
+        result += "\n----------\n"
+        result += "< " + value2
+
+    result += "\n"
 
     return result
 
 
-def compare(obj1, obj2, parent_key=None, ordered=False, diff_format='simple'):
+def compare(obj1, obj2, parent_key=None, ordered=False, diff_format="simple"):
     """Caclulate difference between two objects
 
     Keyword arguments:
     obj1       -- first object in comparision
     obj2       -- second object in comparision
-    parent_key -- the key for in objects in the parent objects, used in recursion
+    parent_key -- the key of the objects in the parent, used in recursion
     ordered    -- whether to check order of list content
     """
     result = list()
@@ -110,14 +121,18 @@ def compare(obj1, obj2, parent_key=None, ordered=False, diff_format='simple'):
         if isinstance(obj1, dict):
 
             if sorted(obj1.keys()) != sorted(obj2.keys()):
-                result += [print_diff_dict_keys(parent_key, obj1, obj2, diff_format)]
+                result += [
+                    print_diff_dict_keys(parent_key, obj1, obj2, diff_format)
+                ]
             else:
                 for key in sorted(set(obj1.keys() + obj2.keys())):
                     if parent_key:
-                        child_key = '{}/{}'.format(parent_key, key)
+                        child_key = "{}/{}".format(parent_key, key)
                     else:
                         child_key = key
-                    result += compare(obj1[key], obj2[key], child_key, ordered, diff_format)
+                    result += compare(
+                        obj1[key], obj2[key], child_key, ordered, diff_format
+                    )
 
         else:
             result += [print_diff(parent_key, obj1, obj2, diff_format)]
@@ -128,8 +143,17 @@ def compare(obj1, obj2, parent_key=None, ordered=False, diff_format='simple'):
     return result
 
 
-def meta_diff(files, verbose=False, ordered=False, drop=None, mode='lite',
-              meta_key_filter=None, file_type=None, promote=False, diff_format='simple'):
+def meta_diff(
+    files,
+    verbose=False,
+    ordered=False,
+    drop=None,
+    mode="lite",
+    meta_key_filter=None,
+    file_type=None,
+    promote=False,
+    diff_format="simple",
+):
     """
     Compare the in-file metadata in two given files. Uses PyUtils.MetaReader
     to obtain file content. Generates list of string that show difference.
@@ -146,17 +170,24 @@ def meta_diff(files, verbose=False, ordered=False, drop=None, mode='lite',
                        get all)
     file_type    -- Type of files, POOL or BS (default: auto-configure)
     promote      -- MetaReader argument (default: False)
-    diff_format  -- Show 'simple' or 'diff' style differences (default: 'simple')
+    diff_format  -- Return 'simple' or 'diff' style string (default: 'simple')
     """
     if len(files) != 2:
         raise ValueError("Wrong number of files passes, need two")
 
-    msg = logging.getLogger('MetaReader')
-    msg.setLevel(logging.INFO if verbose else logging.WARNING)
+    reader_msg = logging.getLogger("MetaReader")
+    reader_msg.setLevel(logging.INFO if verbose else logging.WARNING)
+
+    msg = logging.getLogger("MetaDiff")
+    msg.setLevel(logging.DEBUG if verbose else logging.INFO)
 
     metadata = read_metadata(
-        files, file_type, mode=mode,
-        meta_key_filter=meta_key_filter, promote=promote)
+        files,
+        file_type,
+        mode=mode,
+        meta_key_filter=meta_key_filter,
+        promote=promote,
+    )
 
     try:
         for key in drop:
@@ -165,4 +196,14 @@ def meta_diff(files, verbose=False, ordered=False, drop=None, mode='lite',
     except TypeError:
         pass
 
-    return compare(metadata[files[0]], metadata[files[1]], ordered=ordered, diff_format=diff_format)
+    result = compare(
+        metadata[files[0]],
+        metadata[files[1]],
+        ordered=ordered,
+        diff_format=diff_format,
+    )
+
+    if not result:
+        msg.info("No differences found")
+
+    return result
-- 
GitLab


From d90810b68bbd5e5db800e9fbe169febe5ecb302c Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 10 Jun 2020 18:53:05 +0100
Subject: [PATCH 131/266] egammaValidation , string by const ref&

---
 .../EMClusterEnergyErrorsMatrix.h             |  2 +-
 .../egammaConditions/EMClusterErrorsMatrix.h  |  2 +-
 .../EMClusterEtaErrorsMatrix.h                |  2 +-
 .../EMClusterEtaPosErrorsMatrix.h             |  2 +-
 .../EMClusterPhiErrorsMatrix.h                |  2 +-
 .../egammaConditions/EMDatabaseID.h           | 14 ++++++------
 .../src/EMClusterEnergyErrorsMatrix.cxx       |  4 ++--
 .../src/EMClusterErrorsMatrix.cxx             |  2 +-
 .../src/EMClusterEtaErrorsMatrix.cxx          |  4 ++--
 .../src/EMClusterEtaPosErrorsMatrix.cxx       |  4 ++--
 .../src/EMClusterPhiErrorsMatrix.cxx          |  4 ++--
 .../egammaConditions/src/EMDatabaseID.cxx     | 22 +++++++++----------
 12 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEnergyErrorsMatrix.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEnergyErrorsMatrix.h
index fa34a457d3ff..cbc742da9fd6 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEnergyErrorsMatrix.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEnergyErrorsMatrix.h
@@ -22,7 +22,7 @@ public :
   // Constructors
   EMClusterEnergyErrorsMatrix(); // for use when afterwards read from db
   EMClusterEnergyErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-			      std::string textDescription = "");
+			      const std::string& textDescription = "");
   /** Default destructor*/
   ~EMClusterEnergyErrorsMatrix() {};
   
diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterErrorsMatrix.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterErrorsMatrix.h
index 98fc24a765bf..42260c0b7ba0 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterErrorsMatrix.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterErrorsMatrix.h
@@ -33,7 +33,7 @@ public:
   /** Constructor with std::vector of axes to define dimensions and binnging of this matrix
       @param axes: std::vector of APMatrixAxis objects
   */
-  EMClusterErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, std::string textDescription);
+  EMClusterErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, const std::string& textDescription);
   /** Default destructor*/
   ~EMClusterErrorsMatrix() {};
 
diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaErrorsMatrix.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaErrorsMatrix.h
index 9c7c2a038e5e..8504ad3e9824 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaErrorsMatrix.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaErrorsMatrix.h
@@ -22,7 +22,7 @@ public :
   // Constructors
   EMClusterEtaErrorsMatrix(); // for use when afterwards read from db
   EMClusterEtaErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-			   std::string textDescription = "");
+			   const std::string& textDescription = "");
   /** Default destructor*/
   ~EMClusterEtaErrorsMatrix() {};
   
diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaPosErrorsMatrix.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaPosErrorsMatrix.h
index e3aade4e6bb5..52a9b794da2a 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaPosErrorsMatrix.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterEtaPosErrorsMatrix.h
@@ -22,7 +22,7 @@ public :
   // Constructors
   EMClusterEtaPosErrorsMatrix(); // for use when afterwards read from db
   EMClusterEtaPosErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-			   std::string textDescription = "");
+			   const std::string& textDescription = "");
   /** Default destructor*/
   ~EMClusterEtaPosErrorsMatrix() {};
   
diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterPhiErrorsMatrix.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterPhiErrorsMatrix.h
index 2e55e7859c3f..6db500ed3d08 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterPhiErrorsMatrix.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMClusterPhiErrorsMatrix.h
@@ -22,7 +22,7 @@ public :
   // Constructors
   EMClusterPhiErrorsMatrix(); // for use when afterwards read from db
   EMClusterPhiErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-			   std::string textDescription = "");
+			   const std::string& textDescription = "");
   /** Default destructor*/
   ~EMClusterPhiErrorsMatrix() {};
 
diff --git a/Reconstruction/egamma/egammaConditions/egammaConditions/EMDatabaseID.h b/Reconstruction/egamma/egammaConditions/egammaConditions/EMDatabaseID.h
index b3fd90ff8b0c..ffc2e31989b5 100644
--- a/Reconstruction/egamma/egammaConditions/egammaConditions/EMDatabaseID.h
+++ b/Reconstruction/egamma/egammaConditions/egammaConditions/EMDatabaseID.h
@@ -43,16 +43,16 @@ public:
   /** Copy constructor */
   EMDatabaseID(const EMDatabaseID& ob);
   /** Constructor via unique id-string*/
-  EMDatabaseID(std::string id);
+  EMDatabaseID(const std::string& id);
   /** Constructor via unique id-string*/
   EMDatabaseID(EMDatabaseIDDescriptor &id);
   /** Constructor via 8 Identifiers for performance parameters which have been determined in a specific run*/
-  EMDatabaseID(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, long start, long end);
+  EMDatabaseID(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, long start, long end);
   /** Constructor via 7 Identifiers for performance parameters which have been determined in Monte Carlo Simulation*/
-  EMDatabaseID(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, std::string SimSWV);
+  EMDatabaseID(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, const std::string& SimSWV);
   
   // this constructor is used for object retrieval; it only contains the subset that is needed
-  EMDatabaseID(std::string Object, std::string Type, std::string Tag);
+  EMDatabaseID(const std::string& Object, const std::string& Type, const std::string& Tag);
 
   /** Destructor*/
   ~EMDatabaseID();
@@ -67,12 +67,12 @@ public:
   /** Set given ID to this object*/
   void set(const EMDatabaseID& ob);
   /** Set ID of this object via 8 Identifiers which describe a specific data-run*/
-  void set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, long start, long end);
+  void set(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, long start, long end);
   /** Set ID of this object via 7 Identifiers which describe a Monte Carlo sample*/
-  void set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, std::string SimSWV);
+  void set(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, const std::string& SimSWV);
 
   // this constructor is used for object retrieval; it only contains the subset that is needed
- void set(std::string Object, std::string Type, std::string Tag);
+ void set(const std::string& Object, const std::string& Type, const std::string& Tag);
 
   /** Clear all ID-informations*/
   void clear();
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterEnergyErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterEnergyErrorsMatrix.cxx
index 9e206d097064..cf2e136392ad 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterEnergyErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterEnergyErrorsMatrix.cxx
@@ -14,8 +14,8 @@ EMClusterEnergyErrorsMatrix::EMClusterEnergyErrorsMatrix() :
 
 
 EMClusterEnergyErrorsMatrix::EMClusterEnergyErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-							 std::string textDescription) : 
-  EMClusterErrorsMatrix(axes, std::move(textDescription))
+							 const std::string& textDescription) : 
+  EMClusterErrorsMatrix(axes, textDescription)
 {
 }
 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
index 3e6755c8b033..62904141fb25 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterErrorsMatrix.cxx
@@ -14,7 +14,7 @@ EMClusterErrorsMatrix::EMClusterErrorsMatrix()
 
 
 EMClusterErrorsMatrix::EMClusterErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-					     std::string textDescription)
+					     const std::string& textDescription)
   :  EMAPMatrix<EMClusterErrorsEntry>(axes, textDescription)
 {
 }
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
index a8aa6f13eaa7..d33999fce88d 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
@@ -17,8 +17,8 @@ EMClusterEtaErrorsMatrix::EMClusterEtaErrorsMatrix() :
 
 
 EMClusterEtaErrorsMatrix::EMClusterEtaErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-						   std::string textDescription) : 
-  EMClusterErrorsMatrix(axes, std::move(textDescription))
+						   const std::string& textDescription) : 
+  EMClusterErrorsMatrix(axes, textDescription)
 {
 }
 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
index b457b4ec7622..314fa24bfb84 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
@@ -17,8 +17,8 @@ EMClusterEtaPosErrorsMatrix::EMClusterEtaPosErrorsMatrix() :
 
 
 EMClusterEtaPosErrorsMatrix::EMClusterEtaPosErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-						   std::string textDescription) : 
-  EMClusterErrorsMatrix(axes, std::move(textDescription))
+						   const std::string& textDescription) : 
+  EMClusterErrorsMatrix(axes, textDescription)
 {
 }
 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
index d2710b43d1f1..3e2ebea20aa0 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
@@ -17,8 +17,8 @@ EMClusterPhiErrorsMatrix::EMClusterPhiErrorsMatrix() :
 
 
 EMClusterPhiErrorsMatrix::EMClusterPhiErrorsMatrix(const std::vector<EMAPMatrixAxis> &axes, 
-						   std::string textDescription) : 
-  EMClusterErrorsMatrix(axes, std::move(textDescription))
+						   const std::string& textDescription) : 
+  EMClusterErrorsMatrix(axes, textDescription)
 {
 }
 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx b/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
index 403df233607c..d7c1f8107b7c 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMDatabaseID.cxx
@@ -20,7 +20,7 @@ EMDatabaseID::EMDatabaseID(const EMDatabaseID& ob)
   set(ob);
 }
 	
-EMDatabaseID::EMDatabaseID(std::string s)
+EMDatabaseID::EMDatabaseID(const std::string& s)
 {
   //  clear();
   setUniqueID(s);
@@ -33,22 +33,22 @@ EMDatabaseID::EMDatabaseID(EMDatabaseIDDescriptor &id)
   else			set(id.Object, id.Container, id.Type, id.Channel, id.Author, id.RecoSWV, id.Tag, id.SimSWV);
 }
 
-EMDatabaseID::EMDatabaseID(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, long start, long end)
+EMDatabaseID::EMDatabaseID(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, long start, long end)
 {
   //  clear(); // not needed; set overwrites everything
-  set(std::move(Object), std::move(Container), std::move(Type), std::move(Channel), std::move(Author), std::move(RecoSWV), std::move(Tag), start, end);
+  set(Object, Container, Type, Channel, Author, RecoSWV, Tag, start, end);
 }
 	
-EMDatabaseID::EMDatabaseID(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, std::string SimSWV)
+EMDatabaseID::EMDatabaseID(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, const std::string& SimSWV)
 {
   //  clear();
-  set(std::move(Object), std::move(Container), std::move(Type), std::move(Channel), std::move(Author), std::move(RecoSWV), std::move(Tag), std::move(SimSWV));
+  set(Object, Container, Type, Channel, Author, RecoSWV, Tag, SimSWV);
 }
 
-EMDatabaseID::EMDatabaseID(std::string Object, std::string Type, std::string Tag)
+EMDatabaseID::EMDatabaseID(const std::string& Object, const std::string& Type, const std::string& Tag)
 {
   //  clear();
-  set(std::move(Object), "", std::move(Type), "", "", "", std::move(Tag), "");
+  set(Object, "", Type, "", "", "", Tag, "");
 }
 	
 EMDatabaseID::~EMDatabaseID()
@@ -94,7 +94,7 @@ void EMDatabaseID::set(const EMDatabaseID& ob)
   m_idDes	= ob.m_idDes;
 }
 
-void EMDatabaseID::set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, long start, long end)
+void EMDatabaseID::set(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, long start, long end)
 {
   m_idDes.Object	= beautify(Object);
   m_idDes.Container	= beautify(Container);
@@ -108,7 +108,7 @@ void EMDatabaseID::set(std::string Object, std::string Container, std::string Ty
   m_idDes.SimSWV	= "";
 }
 
-void EMDatabaseID::set(std::string Object, std::string Container, std::string Type, std::string Channel, std::string Author, std::string RecoSWV, std::string Tag, std::string SimSWV)
+void EMDatabaseID::set(const std::string& Object, const std::string& Container, const std::string& Type, const std::string& Channel, const std::string& Author, const std::string& RecoSWV, const std::string& Tag, const std::string& SimSWV)
 {
   m_idDes.Object	= beautify(Object);
   m_idDes.Container	= beautify(Container);
@@ -123,9 +123,9 @@ void EMDatabaseID::set(std::string Object, std::string Container, std::string Ty
 }
 
 // for object retrieval
-void EMDatabaseID::set(std::string Object, std::string Type, std::string Tag)
+void EMDatabaseID::set(const std::string& Object, const std::string& Type, const std::string& Tag)
 {
-  set(std::move(Object), "", std::move(Type), "", "", "", std::move(Tag), "");
+  set(Object, "", Type, "", "", "", Tag, "");
 }
 
 void EMDatabaseID::clear()
-- 
GitLab


From 4209670d45561f0830a94fa9f46063ecf2f36250 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 20:27:04 +0200
Subject: [PATCH 132/266] add WriteCondHandle::addDependency(EventIDRange)

---
 Control/StoreGate/StoreGate/WriteCondHandle.h | 21 +++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/Control/StoreGate/StoreGate/WriteCondHandle.h b/Control/StoreGate/StoreGate/WriteCondHandle.h
index 546d2edda15e..336a68ff882e 100644
--- a/Control/StoreGate/StoreGate/WriteCondHandle.h
+++ b/Control/StoreGate/StoreGate/WriteCondHandle.h
@@ -46,12 +46,16 @@ namespace SG {
     bool isValid(EventIDRange& range) const;
     bool isValid(const EventIDBase& t, EventIDRange& range) const;
 
+    void addDependency(const EventIDRange& range);
+
     template <typename R>
     void addDependency(SG::ReadCondHandle<R>& rch);
 
     template <typename R, typename... Args>
     void addDependency(ReadCondHandle<R>& rch, Args... args);
     
+
+
     /**
      * @brief record handle, with explicit range   DEPRECATED
      * @param range IOVRange of handle
@@ -272,19 +276,24 @@ namespace SG {
 
   //---------------------------------------------------------------------------
 
-  // Can't take a const RCH, as RCH.range() can load the ptr.
   template <typename T>
-  template< typename R>
-  void
-  WriteCondHandle<T>::addDependency(SG::ReadCondHandle<R>& rch) {
+  void WriteCondHandle<T>::addDependency(const EventIDRange& range) {
     if ( !m_rangeSet ) {
-      m_range = rch.getRange();
+      m_range = range;
     } else {
-      m_range = EventIDRange::intersect(m_range, rch.getRange());
+      m_range = EventIDRange::intersect(m_range, range);
     }
     m_rangeSet = true;
   }
 
+  // Can't take a const RCH, as RCH.range() can load the ptr.
+  template <typename T>
+  template< typename R>
+  void
+  WriteCondHandle<T>::addDependency(SG::ReadCondHandle<R>& rch) {
+    return addDependency(rch.getRange());
+  }
+
   template< typename T>
   template <typename R, typename... Args>
   void
-- 
GitLab


From a43621ec674cd61edad7e594255bd8e710232221 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 10 Jun 2020 20:27:36 +0200
Subject: [PATCH 133/266] LArBadFebCondAlg: Record empty lists with infinite
 range if no database input

---
 LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
index b75582b525ef..a7e4c43a8eef 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
@@ -6,7 +6,7 @@
 #include "LArBadChannelTool/LArBadChanBlobUtils.h"
 #include "LArIdentifier/LArOnlineID.h"
 #include "LArBadChannelTool/LArBadChannelDecoder.h"
-
+#include "AthenaKernel/IOVInfiniteRange.h"
 
 StatusCode LArBadFebCondAlg::initialize() {
 
@@ -61,6 +61,10 @@ StatusCode LArBadFebCondAlg::execute() {
       badFebCont->add(idBC.first,idBC.second);
     }
   }
+  else {
+    //No input data from DB, set infinte range
+    writeHandle.addDependency(IOVInfiniteRange::infiniteRunLB());
+  }
 
   if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
      
-- 
GitLab


From dd37b4e1444281bbe6437b417036bee11453dfae Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 10 Jun 2020 19:31:12 +0100
Subject: [PATCH 134/266] egamma tidy

---
 .../src/CaloCluster_OnTrackBuilder.cxx        | 84 +++++++++----------
 .../Root/egammaEnergyPositionAllSamples.cxx   |  2 +-
 .../egamma/egammaUtils/Root/egammaqweta1c.cxx | 32 ++++---
 .../egamma/egammaUtils/Root/egammaqweta2c.cxx | 51 ++++++-----
 4 files changed, 92 insertions(+), 77 deletions(-)

diff --git a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
index 0251fed90a19..64f6097886e8 100755
--- a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
@@ -256,62 +256,58 @@ double CaloCluster_OnTrackBuilder::electronPhiResolution(double eta, double ener
 double CaloCluster_OnTrackBuilder::electronPhiResoA(double eta) const
 {
 
-  if ( eta < 0.30 )
-    return 0.000191492 ;
-  
-  if ( eta < 0.60) 
+  if (eta < 0.30)
+    return 0.000191492;
+
+  if (eta < 0.60)
     return 9.35047e-05 + 0.000392766 * eta;
-  
-  else if ( eta < 0.80) 
-    return 0.000327201;   
-    
-  else if ( eta < 1.05)
+
+  if (eta < 0.80)
+    return 0.000327201;
+
+  if (eta < 1.05)
     return 0.000141755;
-  
-  else if ( eta < 1.35)
-    return (-1.07475  + 1.15372*eta)*1e-3;
 
-  else if ( eta < 1.55)
-    return (-15.2133 + 11.2163*eta)*1e-3 ;
-  
-  else if ( eta < 1.85)
+  if (eta < 1.35)
+    return (-1.07475 + 1.15372 * eta) * 1e-3;
+
+  if (eta < 1.55)
+    return (-15.2133 + 11.2163 * eta) * 1e-3;
+
+  if (eta < 1.85)
     return 0.00128452 - 0.00053016 * eta;
 
-  else if ( eta < 2.30)
+  if (eta < 2.30)
     return -0.000665622 + 0.00052136 * eta;
 
-  else
-    return 0.000327754;
-
+  return 0.000327754;
 }
 
 double CaloCluster_OnTrackBuilder::electronPhiResoB(double eta) const
 {
 
-  if ( eta < 0.65 )
-    return 0.0285262  + 0.00985529 * eta;
-  
-  if ( eta < 1.04 )
-    return -0.0690774 + 0.166424   * eta; 
-  
-  else if ( eta < 1.25 )
-    return 0.0769113  + 0.0149434  * eta;   
-  
-  else if ( eta < 1.55 )
-    return -0.407594  + 0.393218   * eta;     
-  
-  else if ( eta < 1.95 )
-    return 0.415602   - 0.172824   * eta;     
-  
-  else if ( eta < 2.05 )
-    return 0.0840844;     
-  
-  else if ( eta < 2.40 )
-    return 0.187563   - 0.0472463  * eta;
-    
-  else 
-    return 0.0693652;
-  
+  if (eta < 0.65)
+    return 0.0285262 + 0.00985529 * eta;
+
+  if (eta < 1.04)
+    return -0.0690774 + 0.166424 * eta;
+
+  if (eta < 1.25)
+    return 0.0769113 + 0.0149434 * eta;
+
+  if (eta < 1.55)
+    return -0.407594 + 0.393218 * eta;
+
+  if (eta < 1.95)
+    return 0.415602 - 0.172824 * eta;
+
+  if (eta < 2.05)
+    return 0.0840844;
+
+  if (eta < 2.40)
+    return 0.187563 - 0.0472463 * eta;
+
+  return 0.0693652;
 }
 
 
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
index eac40899c8c3..12f5866ee597 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaEnergyPositionAllSamples.cxx
@@ -62,7 +62,7 @@ bool egammaEnergyPositionAllSamples::inBarrel(const xAOD::CaloCluster &cluster,
     return true; // barrel
   } if (!cluster.inBarrel() && cluster.inEndcap()) {
     return false; // endcap
-  } else if (cluster.inBarrel() && cluster.inEndcap()) {
+  } if (cluster.inBarrel() && cluster.inEndcap()) {
     switch (sampling) {
       case 0: {
         return isCrackBarrel(cluster, CaloSampling::PreSamplerB, CaloSampling::PreSamplerE);
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
index ca63ff25ab39..d8cd28905d0c 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaqweta1c.cxx
@@ -6,28 +6,37 @@
 #include "xAODCaloEvent/CaloCluster.h"
 #include <cmath>
 
-float egammaqweta1c::Correct(const float eta, const float etacell, const float width) {
+float
+egammaqweta1c::Correct(const float eta, const float etacell, const float width)
+{
 
   //Make correction to the width of the cluster shower in sampling 1
   const float aeta = fabs(eta);
   const float etarel = RelPosition(eta, etacell);
   if (aeta < 1.0) {
     return (width - 0.76 * pow(etarel, 2));
-  } if (aeta < 1.45) {
+  }
+  if (aeta < 1.45) {
     return (width - 0.85 * pow(etarel, 2) + 1.9 * pow(etarel, 4));
-  } else if (aeta < 1.5) {
+  }
+  if (aeta < 1.5) {
     return width;
-  } else if (aeta < 1.8) {
+  }
+  if (aeta < 1.8) {
     return (width - 0.85 * pow(etarel, 2) + 1.9 * pow(etarel, 4));
-  } else if (aeta < 2.0) {
+  }
+  if (aeta < 2.0) {
     return (width - 0.84 * pow(etarel, 2));
-  } else if (aeta < 2.5) {
+  }
+  if (aeta < 2.5) {
     return (width - 0.40 * pow(etarel, 2) - 2.1 * pow(etarel, 4));
   }
   return width;
 }
 
-double egammaqweta1c::RelPosition(const float eta, const float etacell) {
+double
+egammaqweta1c::RelPosition(const float eta, const float etacell)
+{
   /*
    * get relative position within cell in eta of the cluster
    * shower in sampling 1
@@ -38,17 +47,20 @@ double egammaqweta1c::RelPosition(const float eta, const float etacell) {
     const double dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
     return (fmod(etapos, dgra) / dgra - 0.5);
-  } if (aeta < 2.0) {
+  }
+  if (aeta < 2.0) {
     const float ngra = 6.;
     const float dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
     return (fmod(etapos, dgra) / dgra - 0.5);
-  } else if (aeta < 2.4) {
+  }
+  if (aeta < 2.4) {
     const float ngra = 4.;
     const float dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
     return (fmod(etapos, dgra) / dgra - 0.5);
-  } else if (aeta < 2.5) {
+  }
+  if (aeta < 2.5) {
     const float ngra = 1.;
     const float dgra = 0.025 / ngra;
     const double etapos = fabs(eta - etacell - dgra / 2.);
diff --git a/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx b/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
index 2585f08aa56d..836dec03375e 100755
--- a/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
+++ b/Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
@@ -8,17 +8,17 @@
 #include <cmath>
 
 namespace {
-const float P0A[3] = {0.0045, 0.005375, -0.0562};
-const float P1A[3] = {-0.0016, -0.0215, 0.114};
-const float P2A[3] = {-0.0866, 0.0215, -0.053};
+constexpr float P0A[3] = {0.0045, 0.005375, -0.0562};
+constexpr float P1A[3] = {-0.0016, -0.0215, 0.114};
+constexpr float P2A[3] = {-0.0866, 0.0215, -0.053};
 
-const float P0B[3] = {0.0039, 0.005075, -0.0324};
-const float P1B[3] = {0.00816, -0.0203, 0.0653};
-const float P2B[3] = {-0.145, 0.0203, -0.0286};
+constexpr float P0B[3] = {0.0039, 0.005075, -0.0324};
+constexpr float P1B[3] = {0.00816, -0.0203, 0.0653};
+constexpr float P2B[3] = {-0.145, 0.0203, -0.0286};
 
-const float P0C[3] = {0.0047, 0.0035, 0.0};
-const float P1C[3] = {-0.0184, -0.0139, 0.0};
-const float P2C[3] = {0.0180, 0.0137, 0.0};
+constexpr float P0C[3] = {0.0047, 0.0035, 0.0};
+constexpr float P1C[3] = {-0.0184, -0.0139, 0.0};
+constexpr float P2C[3] = {0.0180, 0.0137, 0.0};
 } // namespace
 
 float egammaqweta2c::Correct(const float eta, const float etacell, const float weta2) {
@@ -29,31 +29,38 @@ float egammaqweta2c::Correct(const float eta, const float etacell, const float w
   if (aeta < 0.8) {
     if (etarel < 0.1) {
       return (weta2 - (P0A[0] + P1A[0] * etarel + P2A[0] * etarel * etarel));
-    } if (etarel < 0.9) {
+    }
+    if (etarel < 0.9) {
       return (weta2 - (P0A[1] + P1A[1] * etarel + P2A[1] * etarel * etarel));
-    } else {
-      return (weta2 - (P0A[2] + P1A[2] * etarel + P2A[2] * etarel * etarel));
     }
-  } else if (aeta < 1.5) {
+    return (weta2 - (P0A[2] + P1A[2] * etarel + P2A[2] * etarel * etarel));
+  }
+
+  if (aeta < 1.5) {
     if (etarel < 0.1) {
       return (weta2 - (P0B[0] + P1B[0] * etarel + P2B[0] * etarel * etarel));
-    } if (etarel < 0.9) {
+    }
+    if (etarel < 0.9) {
       return (weta2 - (P0B[1] + P1B[1] * etarel + P2B[1] * etarel * etarel));
-    } else {
-      return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
     }
+    return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
+  }
 
-  } else if (aeta < 1.8) {
+  if (aeta < 1.8) {
     if (etarel < 0.1) {
       return (weta2 - (P0B[0] + P1B[0] * etarel + P2B[0] * etarel * etarel));
-    } if (etarel < 0.9) {
+    }
+    if (etarel < 0.9) {
       return (weta2 - (P0B[1] + P1B[1] * etarel + P2B[1] * etarel * etarel));
-    } else {
-      return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
     }
-  } else if (aeta < 2.0) {
+    return (weta2 - (P0B[2] + P1B[2] * etarel + P2B[2] * etarel * etarel));
+  }
+
+  if (aeta < 2.0) {
     return (weta2 - (P0C[0] + P1C[0] * etarel + P2C[0] * etarel * etarel));
-  } else if (aeta < 2.5) {
+  }
+
+  if (aeta < 2.5) {
     return (weta2 - (P0C[1] + P1C[1] * etarel + P2C[1] * etarel * etarel));
   }
   return weta2;
-- 
GitLab


From d415d396c2f71a63aa73ca9f5e7497564d7f895b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 12:34:08 +0200
Subject: [PATCH 135/266] FlowAfterburner: Delete copy of checkSG.py script

---
 Generators/FlowAfterburner/share/checkSG.py | 105 --------------------
 1 file changed, 105 deletions(-)
 delete mode 100755 Generators/FlowAfterburner/share/checkSG.py

diff --git a/Generators/FlowAfterburner/share/checkSG.py b/Generators/FlowAfterburner/share/checkSG.py
deleted file mode 100755
index 002540d649db..000000000000
--- a/Generators/FlowAfterburner/share/checkSG.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-
-# @file:    checkSG.py
-# @purpose: read a POOL file and dump the DataHeader's content
-# @author:  Sebastien Binet <binet@cern.ch>
-# @date:    May 2008
-#
-# @example:
-# @code
-# checkSG aod.pool.root
-# checkSG /castor/cern.ch/user/j/johndoe/aod.pool.root
-# checkSG somedir/*/*.pool
-# @endcode
-#
-
-__version__ = "$Revision: 443273 $"
-__author__  = "Sebastien Binet <binet@cern.ch>"
-
-import sys
-import os
-
-from optparse import OptionParser
-
-if __name__ == "__main__":
-
-    parser = OptionParser(usage="usage: %prog [options] [-f] my.file.pool")
-    parser.add_option( "-f",
-                       "--file",
-                       dest = "fileName",
-                       help = "The path to the POOL file to analyze" )
-    parser.add_option( "-o",
-                       "--output",
-                       dest = "outFileName",
-                       default = None,
-                       help = "Name of the output file which will contain the informations gathered during checkSG processing. These informations will be stored into a python-shelve or an ASCII/py file (depending on the extension: .pkl,.dat -> shelve; everything else -> ASCII/py)" )
-    
-    (options, args) = parser.parse_args()
-
-    fileNames = []
-    
-    if len(args) > 0:
-        fileNames = [ arg for arg in args if arg[0] != "-" ]
-        pass
-
-    if options.fileName == None and len(fileNames) == 0:
-        str(parser.print_help() or "")
-        sys.exit(1)
-
-    if not (options.fileName is None):
-        fileName = os.path.expandvars(os.path.expanduser(options.fileName))
-        fileNames.append(fileName)
-
-    fileNames = set( fileNames )
-    sc = 0
-    for fileName in fileNames:
-        try:
-            from AthenaCommon.KeyStore import loadKeyStoreFromPoolFile
-            print "## checking [%s]..."%fileName
-            ks = loadKeyStoreFromPoolFile(keyStore=os.path.basename(fileName),
-                                          pool_file=fileName,
-                                          label='inputFile')
-            print "="*80
-            print "%40s%s%-40s" % ("Container type", " | ","StoreGate keys")
-            print "%40s%s%-40s" % ("-"*40, "-+-", "-"*(40-3))
-            for name,sgkeys in ks.inputFile.dict().items():
-                print "%40s%s%-40s" % (name, " | ", ', '.join(sgkeys))
-            print "="*80
-            if options.outFileName:
-                osp = os.path
-                outFileName = options.outFileName
-                outFileName = osp.expanduser(outFileName)
-                outFileName = osp.expandvars(outFileName)
-                print "## saving checkSG report into [%s]..." % outFileName
-                if os.path.splitext(outFileName)[1] in ('.pkl', '.dat'):
-                    # we explicitely import 'bsddb' to try to always
-                    # get that particular backend for the shelve...
-                    import bsddb
-                    import shelve
-                    if os.path.exists(outFileName):
-                        os.remove(outFileName)
-                    db = shelve.open(outFileName)
-                    db['eventdata_items'] = ks.inputFile.dict()
-                    db.close()
-                else:
-                    ks.write(outFileName, label='inputFile')
-        except Exception, e:
-            print "## Caught exception [%s] !!" % str(e.__class__)
-            print "## What:",e
-            print sys.exc_info()[0]
-            print sys.exc_info()[1]
-            sc = 1
-            pass
-
-        except :
-            print "## Caught something !! (don't know what)"
-            print sys.exc_info()[0]
-            print sys.exc_info()[1]
-            sc = 10
-            pass
-        if len(fileNames) > 1:
-            print ""
-        pass # loop over fileNames
-    
-    print "## Bye."
-    sys.exit(sc)
-- 
GitLab


From 5259022c4aaf67b2ac0bf0407d547d4f59b5eb4e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 14:18:42 +0200
Subject: [PATCH 136/266] PyUtils: Make checkFile/checkSG scripts aliases to
 acmd

The content of the checkFile.py and checkSG.py scripts was identical to
the corresponding acmd sub-commands. For backwards compatibility make
those scripts simply an alias.
---
 Tools/PyUtils/bin/checkFile.py | 121 +--------------------------------
 Tools/PyUtils/bin/checkSG.py   | 107 +----------------------------
 2 files changed, 6 insertions(+), 222 deletions(-)

diff --git a/Tools/PyUtils/bin/checkFile.py b/Tools/PyUtils/bin/checkFile.py
index 563a18373425..140da8a8eeec 100755
--- a/Tools/PyUtils/bin/checkFile.py
+++ b/Tools/PyUtils/bin/checkFile.py
@@ -1,120 +1,5 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env bash
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# flake8: noqa
 
-# @file:    checkFile.py
-# @purpose: read a POOL file and dump its content.
-#           Inspired from CheckESD.C ROOT macro from Fredrik Akesson.
-# @author:  Sebastien Binet <binet@cern.ch>
-# @date:    August 2005
-#
-# @example:
-# @code
-# checkFile aod.pool.root
-# checkFile /castor/cern.ch/user/j/johndoe/aod.pool.root
-# checkFile somedir/*/*.pool
-# @endcode
-#
-
-from __future__ import print_function
-
-__version__ = "$Revision: 1.5 $"
-__author__  = "Sebastien Binet <binet@cern.ch>"
-
-import sys
-import os
-
-from optparse import OptionParser
-
-if __name__ == "__main__":
-
-    parser = OptionParser(usage="usage: %prog [options] [-f] my.file.pool")
-    p = parser.add_option
-    p( "-f",
-       "--file",
-       dest = "fileName",
-       help = "The path to the POOL file to analyze" )
-    p( "-d",
-       "--detailed-dump",
-       action  = "store_true",
-       dest    = "doDetailedDump",
-       default = False,
-       help = "Switch to activate or not a detailed dump of each TTree in the POOL file" )
-    p( "--sort-fct",
-       dest    = "sortFctName",
-       default = "diskSize",
-       help = "Sorting function used to list containers (allowed are: diskSize, memSize, name)" )
-    p( "-o",
-       "--output",
-       dest = "outFileName",
-       default = None,
-       help = "Name of the output file which will contain the informations gathered during checkFile processing. These informations will be stored into a python-shelve file." )
-    p( "--fast",
-       dest = "fastMode",
-       default = False,
-       action  = "store_true",
-       help = "Switch to enable the fast mode of checkFile.py (memory size will not be accurate -AT ALL-)"
-       )
-    p( "--detailed-branch-size",
-       dest = "super_detailed_branch_sz",
-       default = False,
-       action  = "store_true",
-       help = "Switch to enable a very detailed computation of the branch sizes (computed from the basket length) [SLOW]"
-       )
-    (options, args) = parser.parse_args()
-
-    fileNames = []
-    
-    if len(args) > 0:
-        fileNames = [ arg for arg in args if arg[0] != "-" ]
-        pass
-
-    if options.fileName == None and len(fileNames) == 0:
-        str(parser.print_help() or "")
-        sys.exit(1)
-
-    if options.fileName != None:
-        fileName = os.path.expandvars(os.path.expanduser(options.fileName))
-        fileNames.append(fileName)
-
-    fileNames = set( fileNames )
-    sc = 0
-    for fileName in fileNames:
-        try:
-            import PyUtils.PoolFile as PF
-            PF.PoolOpts.FAST_MODE = options.fastMode
-            PF.PoolOpts.SUPER_DETAILED_BRANCH_SZ = options.super_detailed_branch_sz
-            poolFile = PF.PoolFile( fileName )
-            poolFile.checkFile( sorting = options.sortFctName )
-            if options.doDetailedDump:
-                dumpFile = os.path.basename(fileName)+ ".txt"
-                print ("## dumping details into [%s]" % dumpFile)
-                poolFile.detailedDump( dumpFile )
-            if options.outFileName:
-                outFileName = options.outFileName
-                print ("## saving checkFile report into [%s]..." % outFileName)
-                poolFile.saveReport( outFileName )
-        except Exception as e:
-            print ("## Caught exception [%s] !!" % str(e.__class__))
-            print ("## What:",e)
-            print (sys.exc_info()[0])
-            print (sys.exc_info()[1])
-            import traceback
-            print (traceback.print_exc())
-            sc = 1
-            pass
-
-        except :
-            print ("## Caught something !! (don't know what)")
-            print (sys.exc_info()[0])
-            print (sys.exc_info()[1])
-            import traceback
-            print (traceback.print_exc())
-            sc = 10
-            pass
-        if len(fileNames) > 1:
-            print ("")
-        pass # loop over fileNames
-    
-    print ("## Bye.")
-    sys.exit(sc)
+exec acmd.py chk-file $@
diff --git a/Tools/PyUtils/bin/checkSG.py b/Tools/PyUtils/bin/checkSG.py
index a0987c783337..50739a1f2e71 100755
--- a/Tools/PyUtils/bin/checkSG.py
+++ b/Tools/PyUtils/bin/checkSG.py
@@ -1,106 +1,5 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env bash
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# flake8: noqa
 
-# @file:    checkSG.py
-# @purpose: read a POOL file and dump the DataHeader's content
-# @author:  Sebastien Binet <binet@cern.ch>
-# @date:    May 2008
-#
-# @example:
-# @code
-# checkSG aod.pool.root
-# checkSG /castor/cern.ch/user/j/johndoe/aod.pool.root
-# checkSG somedir/*/*.pool
-# @endcode
-#
-
-from __future__ import print_function
-
-__version__ = "$Revision: 1.1 $"
-__author__  = "Sebastien Binet <binet@cern.ch>"
-
-import sys
-import os
-
-from optparse import OptionParser
-
-if __name__ == "__main__":
-
-    parser = OptionParser(usage="usage: %prog [options] [-f] my.file.pool")
-    parser.add_option( "-f",
-                       "--file",
-                       dest = "fileName",
-                       help = "The path to the POOL file to analyze" )
-    parser.add_option( "-o",
-                       "--output",
-                       dest = "outFileName",
-                       default = None,
-                       help = "Name of the output file which will contain the informations gathered during checkSG processing. These informations will be stored into a python-shelve or an ASCII/py file (depending on the extension: .pkl,.dat -> shelve; everything else -> ASCII/py)" )
-    
-    (options, args) = parser.parse_args()
-
-    fileNames = []
-    
-    if len(args) > 0:
-        fileNames = [ arg for arg in args if arg[0] != "-" ]
-        pass
-
-    if options.fileName == None and len(fileNames) == 0:
-        str(parser.print_help() or "")
-        sys.exit(1)
-
-    if not (options.fileName is None):
-        fileName = os.path.expandvars(os.path.expanduser(options.fileName))
-        fileNames.append(fileName)
-
-    fileNames = set( fileNames )
-    sc = 0
-    for fileName in fileNames:
-        try:
-            from AthenaCommon.KeyStore import loadKeyStoreFromPoolFile
-            print ("## checking [%s]..."%fileName)
-            ks = loadKeyStoreFromPoolFile(keyStore=os.path.basename(fileName),
-                                          pool_file=fileName,
-                                          label='inputFile')
-            print ("="*80)
-            print ("%40s%s%-40s" % ("Container type", " | ","StoreGate keys"))
-            print ("%40s%s%-40s" % ("-"*40, "-+-", "-"*(40-3)))
-            for name,sgkeys in ks.inputFile.dict().items():
-                print ("%40s%s%-40s" % (name, " | ", ', '.join(sgkeys)))
-            print ("="*80)
-            if options.outFileName:
-                osp = os.path
-                outFileName = options.outFileName
-                outFileName = osp.expanduser(outFileName)
-                outFileName = osp.expandvars(outFileName)
-                print ("## saving checkSG report into [%s]..." % outFileName)
-                if os.path.splitext(outFileName)[1] in ('.pkl', '.dat'):
-                    import shelve
-                    if os.path.exists(outFileName):
-                        os.remove(outFileName)
-                    db = shelve.open(outFileName)
-                    db['eventdata_items'] = ks.inputFile.dict()
-                    db.close()
-                else:
-                    ks.write(outFileName, label='inputFile')
-        except Exception as e:
-            print ("## Caught exception [%s] !!" % str(e.__class__))
-            print ("## What:",e)
-            print (sys.exc_info()[0])
-            print (sys.exc_info()[1])
-            sc = 1
-            pass
-
-        except :
-            print ("## Caught something !! (don't know what)")
-            print (sys.exc_info()[0])
-            print (sys.exc_info()[1])
-            sc = 10
-            pass
-        if len(fileNames) > 1:
-            print ("")
-        pass # loop over fileNames
-    
-    print ("## Bye.")
-    sys.exit(sc)
+exec acmd.py chk-sg $@
-- 
GitLab


From 29a97a6079d95d7b31d9b4ea46b6fe234667dedd Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 9 Jun 2020 14:25:31 +0200
Subject: [PATCH 137/266] PyUtils: Enable flake8 for scripts and make them
 compliant

---
 Tools/PyUtils/CMakeLists.txt                  |  3 +-
 Tools/PyUtils/bin/checkMetaSG.py              |  4 +-
 Tools/PyUtils/bin/checkPlugins.py             |  5 +-
 Tools/PyUtils/bin/checkxAOD.py                | 12 ++--
 Tools/PyUtils/bin/diff-athfile                | 35 +++++-----
 Tools/PyUtils/bin/diff-jobo-cfg.py            | 12 +---
 Tools/PyUtils/bin/diffConfigs.py              |  4 +-
 Tools/PyUtils/bin/diffPoolFiles.py            |  6 +-
 Tools/PyUtils/bin/dlldep.py                   |  4 +-
 Tools/PyUtils/bin/dump-athfile.py             | 12 ++--
 Tools/PyUtils/bin/dumpAthfilelite.py          |  2 -
 Tools/PyUtils/bin/filter-and-merge-d3pd.py    | 19 ++----
 Tools/PyUtils/bin/getMetadata.py              | 66 ++++++++++---------
 Tools/PyUtils/bin/gprof2dot                   |  2 +
 Tools/PyUtils/bin/issues                      |  3 +-
 Tools/PyUtils/bin/magnifyPoolFile.py          |  4 +-
 Tools/PyUtils/bin/merge-poolfiles.py          |  6 +-
 Tools/PyUtils/bin/meta-reader.py              | 10 +--
 .../PyUtils/bin/pool_extractFileIdentifier.py |  2 +-
 Tools/PyUtils/bin/pool_insertFileToCatalog.py |  2 +-
 Tools/PyUtils/bin/print_auditor_callgraph.py  |  2 +-
 Tools/PyUtils/bin/pyroot.py                   | 17 ++---
 Tools/PyUtils/bin/vmem-sz.py                  |  8 +--
 Tools/PyUtils/python/scripts/check_file.py    |  2 +-
 24 files changed, 103 insertions(+), 139 deletions(-)

diff --git a/Tools/PyUtils/CMakeLists.txt b/Tools/PyUtils/CMakeLists.txt
index 54be94b7b7d1..c5dfb6602852 100644
--- a/Tools/PyUtils/CMakeLists.txt
+++ b/Tools/PyUtils/CMakeLists.txt
@@ -19,7 +19,8 @@ atlas_install_scripts( bin/acmd.py bin/checkFile.py bin/checkPlugins.py
    bin/gprof2dot bin/issues bin/magnifyPoolFile.py bin/merge-poolfiles.py
    bin/pool_extractFileIdentifier.py
    bin/pool_insertFileToCatalog.py bin/print_auditor_callgraph.py bin/pyroot.py
-   bin/vmem-sz.py bin/meta-reader.py bin/meta-diff.py bin/tree-orderer.py )
+   bin/vmem-sz.py bin/meta-reader.py bin/meta-diff.py bin/tree-orderer.py
+   POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
 # Aliases:
 atlas_add_alias( checkFile "checkFile.py" )
diff --git a/Tools/PyUtils/bin/checkMetaSG.py b/Tools/PyUtils/bin/checkMetaSG.py
index 8b0ef1401847..26211f16f569 100755
--- a/Tools/PyUtils/bin/checkMetaSG.py
+++ b/Tools/PyUtils/bin/checkMetaSG.py
@@ -44,7 +44,7 @@ if __name__ == "__main__":
         fileNames = [ arg for arg in args if arg[0] != "-" ]
         pass
 
-    if options.fileName == None and len(fileNames) == 0:
+    if options.fileName is None and len(fileNames) == 0:
         str(parser.print_help() or "")
         sys.exit(1)
 
@@ -114,7 +114,7 @@ if __name__ == "__main__":
             sc = 1
             pass
 
-        except :
+        except Exception:
             print ("## Caught something !! (don't know what)")
             print (sys.exc_info()[0])
             print (sys.exc_info()[1])
diff --git a/Tools/PyUtils/bin/checkPlugins.py b/Tools/PyUtils/bin/checkPlugins.py
index 33da4cb8cf9b..d4935cbcda7f 100755
--- a/Tools/PyUtils/bin/checkPlugins.py
+++ b/Tools/PyUtils/bin/checkPlugins.py
@@ -9,7 +9,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 1.3 $"
 __author__  = "Sebastien Binet"
 
 import os
@@ -146,7 +145,7 @@ if __name__ == "__main__":
             capabilities = dsoDb.capabilities(libName)
             print ("::: capabilities of [%s]" % libName)
             print (os.linesep.join( [ "  "+str(c) for c in capabilities ] ))
-        except ValueError as err:
+        except ValueError:
             sc = 1
             pass
 
@@ -159,7 +158,7 @@ if __name__ == "__main__":
                 print (" -",k)
                 print (os.linesep.join( [ "  "+str(v) for v in dups[k] ] ))
             if len(dups.keys())>0: sc = 1
-        except ValueError as err:
+        except ValueError:
             sc = 1
             pass
         
diff --git a/Tools/PyUtils/bin/checkxAOD.py b/Tools/PyUtils/bin/checkxAOD.py
index 520ca8113d27..cd09a7b28653 100755
--- a/Tools/PyUtils/bin/checkxAOD.py
+++ b/Tools/PyUtils/bin/checkxAOD.py
@@ -2,7 +2,6 @@
 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
-# $Id: checkxAOD.py 776263 2016-10-03 14:46:39Z wlampl $
 #
 # This is a modified version of PyUtils/bin/checkFile.py. It has been taught
 # how to sum up the sizes of all the branches belonging to a single xAOD
@@ -20,6 +19,7 @@ import sys
 import os
 import re
 import six
+import operator
 
 from optparse import OptionParser
 
@@ -62,11 +62,11 @@ if __name__ == "__main__":
         fileNames = [ arg for arg in args if arg[ 0 ] != "-" ]
         pass
 
-    if options.fileName == None and len( fileNames ) == 0:
+    if options.fileName is None and len( fileNames ) == 0:
         str( parser.print_help() or "" )
         sys.exit( 1 )
 
-    if options.fileName != None:
+    if options.fileName is not None:
         fileName = os.path.expandvars( os.path.expanduser( options.fileName ) )
         fileNames.append( fileName )
         pass
@@ -96,13 +96,13 @@ if __name__ == "__main__":
             # The name of this branch:
             brName = d.name
             # Check if this is a static auxiliary store:
-            m = re.match( "(.*)Aux\..*", d.name )
+            m = re.match( r"(.*)Aux\..*", d.name )
             if m:
                 # Yes, it is. And the name of the main object/container is:
                 brName = m.group( 1 )
                 pass
             # Check if this is a dynamic auxiliary variable:
-            m = re.match( "(.*)AuxDyn\..*", d.name )
+            m = re.match( r"(.*)AuxDyn\..*", d.name )
             if m:
                 # Oh yes, it is. Let's construct the name of the main
                 # object/container:
@@ -129,7 +129,6 @@ if __name__ == "__main__":
             orderedData += [ summedData[ br ] ]
             pass
         sorter = PF.PoolRecord.Sorter.DiskSize
-        import operator
         orderedData.sort( key = operator.attrgetter( sorter ) )
 
         # Access the CollectionTree directly:
@@ -262,7 +261,6 @@ if __name__ == "__main__":
             categorizedData += [ categData[ br ] ]
             pass
         sorter = PF.PoolRecord.Sorter.DiskSize
-        import operator
         categorizedData.sort( key = operator.attrgetter( sorter ) )
 
         print( "=" * 80 )
diff --git a/Tools/PyUtils/bin/diff-athfile b/Tools/PyUtils/bin/diff-athfile
index 40521f50e5f6..d67358616c94 100755
--- a/Tools/PyUtils/bin/diff-athfile
+++ b/Tools/PyUtils/bin/diff-athfile
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file:    diff-athfile.py
 # @purpose: simple command-line utility to diff metadata in two files.
 #           Uses PyUtils.AthFile.fopen. Based on dump-athfile.py.
 # @author:  Graeme Stewart <graeme.andrew.stewart@cern.ch>
 # @date:    Jan 2012
-# @version: $Id: diff-athfile 493697 2012-04-02 17:30:56Z binet $
 #
 # @example:
 # @code
@@ -16,9 +16,6 @@
 import sys
 import os
 
-try:                import cPickle as pickle
-except ImportError: import pickle
-    
 from optparse import OptionParser
 
 if __name__ == "__main__":
@@ -65,7 +62,7 @@ if __name__ == "__main__":
         for fname in fnames:
             fhandles[fname] = af.fopen(fname, evtmax=options.evtmax)
             msg.info(':'*80)
-            msg.info('Opened file %s.' % fname)
+            msg.info('Opened file %s.', fname)
             
 
         # Ignore the following keys, which are bound to be different:
@@ -77,10 +74,10 @@ if __name__ == "__main__":
     
         for k in simpleCompKeys:
             if fhandles[fnames[0]].infos[k] == fhandles[fnames[1]].infos[k]:
-                msg.info('%s equal in %s and %s: %s' % (k, fnames[0], fnames[1], fhandles[fnames[0]].infos[k]))
+                msg.info('%s equal in %s and %s: %s', k, fnames[0], fnames[1], fhandles[fnames[0]].infos[k])
             else:
-                msg.warning('%s not equal in %s and %s: %s != %s' % 
-                            (k, fnames[0], fnames[1], fhandles[fnames[0]].infos[k], fhandles[fnames[1]].infos[k]))
+                msg.warning('%s not equal in %s and %s: %s != %s',
+                            k, fnames[0], fnames[1], fhandles[fnames[0]].infos[k], fhandles[fnames[1]].infos[k])
                 sc = 1
 
         for k in bitByBitKeys:
@@ -90,21 +87,21 @@ if __name__ == "__main__":
             skeys.sort()
             skeys1.sort()
             if skeys != skeys1:
-                msg.warning('%s keys not equal for %s and %s: %s != %s' % 
-                            (k, fnames[0], fnames[1], skeys, skeys1))
+                msg.warning('%s keys not equal for %s and %s: %s != %s',
+                            k, fnames[0], fnames[1], skeys, skeys1)
                 sc = 1
             else:
-                msg.info('%s keys are equal for %s and %s: %s' % 
-                         (k, fnames[0], fnames[1], skeys))
+                msg.info('%s keys are equal for %s and %s: %s',
+                         k, fnames[0], fnames[1], skeys)
                 for subk in skeys:
                     if fhandles[fnames[0]].infos[k][subk] == fhandles[fnames[1]].infos[k][subk]:
                         # Here suppress the very long value output
-                        msg.info('%s element %s values are equal for %s and %s: (value suppressed)' % 
-                                 (k, subk, fnames[0], fnames[1]))
+                        msg.info('%s element %s values are equal for %s and %s: (value suppressed)',
+                                 k, subk, fnames[0], fnames[1])
                     else:
-                        msg.warning('%s element %s values are not equal for %s and %s: %s != %s' % 
-                                 (k, subk, fnames[0], fnames[1], fhandles[fnames[0]].infos[k][subk], 
-                                  fhandles[fnames[1]].infos[k][subk]))
+                        msg.warning('%s element %s values are not equal for %s and %s: %s != %s',
+                                    k, subk, fnames[0], fnames[1], fhandles[fnames[0]].infos[k][subk],
+                                    fhandles[fnames[1]].infos[k][subk])
                         sc = 1
                         
                 
@@ -119,7 +116,7 @@ if __name__ == "__main__":
         sc = 2
         pass
 
-    except :
+    except Exception:
         msg.error("Caught something !! (don't know what)")
         msg.error("\n%s\n%s",sys.exc_info()[0], sys.exc_info()[1])
         sc = 2
@@ -128,7 +125,7 @@ if __name__ == "__main__":
     
     if options.oname:
         oname = options.oname
-        msg.info("saving report into [%s]..." % oname)
+        msg.info("saving report into [%s]...", oname)
         if os.path.exists(oname):
             os.rename(oname, oname+'.bak')
         af.server.save_cache(oname)
diff --git a/Tools/PyUtils/bin/diff-jobo-cfg.py b/Tools/PyUtils/bin/diff-jobo-cfg.py
index 1a26d0905d39..bd2d7009a02a 100755
--- a/Tools/PyUtils/bin/diff-jobo-cfg.py
+++ b/Tools/PyUtils/bin/diff-jobo-cfg.py
@@ -52,7 +52,7 @@ def load_cfg_file(fname):
         import shelve
         comps_db = shelve.open(fname, 'r')
         return comps_db['all-cfgs']
-    except Exception as err:
+    except Exception:
         from past.builtins import execfile
         execfile(fname, comps_db)
         return comps_db['d']
@@ -105,17 +105,12 @@ def cmp_component_db(ref, chk, verbose=True):
 
     diff = []
     for comp_name in common_keys:
-        is_diff = False
         comp_ref = ref[comp_name]
         comp_chk = chk[comp_name]
 
-        for k in ('comp_type', 'cxx_type',):
-            if comp_ref[k] != comp_chk[k]:
-                is_diff = True
         ref_props = sorted([(k,v) for k,v in comp_ref['props'].iteritems()])
         chk_props = sorted([(k,v) for k,v in comp_chk['props'].iteritems()])
         if ref_props != chk_props:
-            is_diff = True
             diff.append((comp_name, ref_props, chk_props,
                          dict_diff(ref=comp_ref['props'],
                                    chk=comp_chk['props'])))
@@ -140,7 +135,7 @@ def cmp_component_db(ref, chk, verbose=True):
             print ("-%s: %r" %(prop_name, ref_value,))
             print ("+%s: %r" %(prop_name, chk_value,))
     
-        
+
     if (len(ref_only_keys) > 0 or
         len(chk_only_keys) > 0 or
         len(diff) > 0):
@@ -186,8 +181,7 @@ if __name__ == "__main__":
         options.chk_fname = args[1]
         pass
 
-    if (options.chk_fname == None or 
-        options.ref_fname == None) :
+    if (options.chk_fname is None or options.ref_fname is None) :
         str(parser.print_help() or "")
         sys.exit(1)
         pass
diff --git a/Tools/PyUtils/bin/diffConfigs.py b/Tools/PyUtils/bin/diffConfigs.py
index e443ad7eb792..03580a06122c 100755
--- a/Tools/PyUtils/bin/diffConfigs.py
+++ b/Tools/PyUtils/bin/diffConfigs.py
@@ -15,7 +15,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 1.1 $"
 __author__  = "Sebastien Binet"
 
 import sys
@@ -51,8 +50,7 @@ if __name__ == "__main__":
         options.fileName = args[1]
         pass
 
-    if options.fileName    == None or \
-       options.refFileName == None :
+    if options.fileName    is None or options.refFileName is None :
         str(parser.print_help() or "")
         sys.exit(1)
         pass
diff --git a/Tools/PyUtils/bin/diffPoolFiles.py b/Tools/PyUtils/bin/diffPoolFiles.py
index 0591497957ad..d4ab854c26fa 100755
--- a/Tools/PyUtils/bin/diffPoolFiles.py
+++ b/Tools/PyUtils/bin/diffPoolFiles.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file:    diffPoolFiles.py
 # @purpose: check that 2 POOL files have same content (containers and sizes)
@@ -12,7 +12,6 @@
 # diffPoolFiles aod.pool ref.aod.pool
 #
 
-__version__ = "$Revision: 1.3 $"
 __author__  = "Sebastien Binet"
 
 import sys
@@ -54,8 +53,7 @@ if __name__ == "__main__":
         options.fileName = args[1]
         pass
 
-    if options.fileName    == None or \
-       options.refFileName == None :
+    if options.fileName    is None or options.refFileName is None :
         str(parser.print_help() or "")
         sys.exit(1)
         pass
diff --git a/Tools/PyUtils/bin/dlldep.py b/Tools/PyUtils/bin/dlldep.py
index fb967379d5e0..865d5532601a 100755
--- a/Tools/PyUtils/bin/dlldep.py
+++ b/Tools/PyUtils/bin/dlldep.py
@@ -11,12 +11,10 @@
 #           based on Dominik Seichter's 'dependencies.sh':
 #           http://domseichter.blogspot.com/2008/02/visualize-dependencies-of-binaries-and.html
 #
-# $Id: dlldep.py,v 1.1 2009-02-09 17:56:35 fwinkl Exp $
-#
 
 from __future__ import print_function
 
-import sys, os
+import sys
 from os.path import basename
 import subprocess as sp
 import re
diff --git a/Tools/PyUtils/bin/dump-athfile.py b/Tools/PyUtils/bin/dump-athfile.py
index 3fa741c2e22e..962509168506 100755
--- a/Tools/PyUtils/bin/dump-athfile.py
+++ b/Tools/PyUtils/bin/dump-athfile.py
@@ -18,15 +18,11 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 1.4 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 import sys
 import os
 
-try:                import cPickle as pickle
-except ImportError: import pickle
-    
 from optparse import OptionParser
 
 if __name__ == "__main__":
@@ -65,11 +61,11 @@ if __name__ == "__main__":
         fnames = [ arg for arg in args if arg[0] != "-" ]
         pass
 
-    if options.fname == None and len(fnames) == 0:
+    if options.fname is None and len(fnames) == 0:
         str(parser.print_help() or "")
         sys.exit(1)
 
-    if options.fname != None:
+    if options.fname is not None:
         fname = os.path.expandvars(os.path.expanduser(options.fname))
         fnames.append(fname)
 
@@ -88,7 +84,7 @@ if __name__ == "__main__":
         sc = 1
         pass
 
-    except :
+    except Exception:
         msg.error("Caught something !! (don't know what)")
         msg.error("\n%s\n%s",sys.exc_info()[0], sys.exc_info()[1])
         sc = 10
@@ -154,7 +150,7 @@ if __name__ == "__main__":
     
     if options.oname:
         oname = options.oname
-        msg.info("saving report into [%s]..." % oname)
+        msg.info("saving report into [%s]...", oname)
         if os.path.exists(oname):
             os.rename(oname, oname+'.bak')
         af.server.save_cache(oname)
diff --git a/Tools/PyUtils/bin/dumpAthfilelite.py b/Tools/PyUtils/bin/dumpAthfilelite.py
index ea500d3394b9..99d661dcb8ba 100755
--- a/Tools/PyUtils/bin/dumpAthfilelite.py
+++ b/Tools/PyUtils/bin/dumpAthfilelite.py
@@ -5,12 +5,10 @@
 ## Simple wrapper to invoke AthFileLite metadata grabber and
 #  produce AthFile-like text output
 #
-# $Id: dumpAthfilelite.py 618684 2014-09-26 11:46:14Z graemes $
 
 from __future__ import print_function
 
 import argparse
-import os
 import pprint
 import sys
 
diff --git a/Tools/PyUtils/bin/filter-and-merge-d3pd.py b/Tools/PyUtils/bin/filter-and-merge-d3pd.py
index 8e7f916d6afe..f53ff2638255 100755
--- a/Tools/PyUtils/bin/filter-and-merge-d3pd.py
+++ b/Tools/PyUtils/bin/filter-and-merge-d3pd.py
@@ -34,7 +34,7 @@ def _fnmatch(fname, patterns):
     support for a list of patterns to match against
     """
     from fnmatch import fnmatch
-    if isinstance(patterns, basestring):
+    if isinstance(patterns, str):
         patterns = [patterns]
     for pattern in patterns:
         if fnmatch(fname, pattern):
@@ -78,7 +78,7 @@ def _interpret_grl(fname):
 
 def interpret_grl(fname="GRL.dat"):
     fnames = []
-    if isinstance(fname, basestring):
+    if isinstance(fname, str):
         fnames = [fname]
     elif isinstance(fname, (list,tuple)):
         fnames = fname[:]
@@ -101,12 +101,6 @@ def pass_grl(run, lb, good_lbs):
 
     return False
 
-def warm_up(fname):
-    assert os.path.exists(fname)
-    import commands
-    rc,_ = commands.getstatusoutput("/bin/dd if=%s of=/dev/null" % (fname,))
-    return rc
-
 def apply_filters(branches, patterns):
     """extract the branches which match the patterns.
     a pattern can add or remove a branch.
@@ -415,7 +409,6 @@ def order(m, chain_name, fnames, workdir):
         timer = ROOT.TStopwatch()
         timer.Start()
         print ("::: optimizing   [%s]..." % (fn,))
-        #warm_up(fn)
 
         timer.Start()
         fin = ROOT.TFile.Open(fn, "read")
@@ -484,7 +477,7 @@ def _load_filter_fct(selection):
     if selection is None:
         return filter_fct
     
-    if not isinstance(selection, basestring):
+    if not isinstance(selection, str):
         print ("** invalid filter-fct type (%r)" % (type(selection),))
         return filter_fct
     
@@ -772,7 +765,7 @@ def import_etree():
     except ImportError:
         pass
     # do it by hook or by crook...
-    import sys, os, imp
+    import os, imp
     xml_site_package = os.path.join(os.path.dirname(os.__file__), 'xml')
     m = imp.find_module('etree', [xml_site_package])
 
@@ -863,9 +856,9 @@ try:
         for child in node:
             # recursively add the element's children
             newitem = _xml2dict_recurse (child, dictclass)
-            if nodedict.has_key(child.tag):
+            if child.tag in nodedict:
                 # found duplicate tag, force a list
-                if type(nodedict[child.tag]) is type([]):
+                if isinstance(nodedict[child.tag], list):
                     # append to existing list
                     nodedict[child.tag].append(newitem)
                 else:
diff --git a/Tools/PyUtils/bin/getMetadata.py b/Tools/PyUtils/bin/getMetadata.py
index b4d8f474bc60..dff53ddec704 100755
--- a/Tools/PyUtils/bin/getMetadata.py
+++ b/Tools/PyUtils/bin/getMetadata.py
@@ -6,14 +6,17 @@ from __future__ import print_function
 __author__ = "Will Buttinger"
 __doc__ = """Extract dataset parameters from AMI, and write them to a text file.\nExamples:\n\n\ngetMetadata.py --inDS="mc15_13TeV.361103%DAOD_TRUTH%" --fields=dataset_number,ldn,nfiles,events,crossSection,genFiltEff,generator_name"""
 
-
-
 import logging
+import sys
 
 from future import standard_library
 standard_library.install_aliases()
 import subprocess
 
+# Python 2.x/3.x compatibility
+if sys.version_info[0] >= 3:
+    unicode = str   # strings are unicode in Python3
+
 #pinched from pandatools!
 def readDsFromFile(txtName):
     import re
@@ -33,9 +36,9 @@ def readDsFromFile(txtName):
             dsList += [tmpLine]
         # close file    
         txt.close()
-    except:
+    except Exception:
         errType,errValue = sys.exc_info()[:2]
-        logging.error("cannot read datasets from %s due to %s:%s" % (txtName,errType,errValue))
+        logging.error("cannot read datasets from %s due to %s:%s",txtName,errType,errValue)
         sys.exit(-1)    
     return dsList
 
@@ -43,7 +46,7 @@ def readDsFromFile(txtName):
 
 def isfloat(x):
     try:
-        a = float(x)
+        float(x)
     except ValueError:
         return False
     else:
@@ -91,13 +94,13 @@ def main():
     #check the voms proxy 
     status,out = subprocess.getstatusoutput("voms-proxy-info -fqan -exists")
     if status!=0:
-        logging.error("Please renew your certificate with this command: voms-proxy-init -voms atlas");
+        logging.error("Please renew your certificate with this command: voms-proxy-init -voms atlas")
         return -1
 
     try:
         client = pyAMI.client.Client('atlas')
         AtlasAPI.init()
-    except:
+    except Exception:
         logging.error("Could not establish pyAMI session. Are you sure you have a valid certificate? Do: voms-proxy-init -voms atlas")
         return -1
 
@@ -110,7 +113,7 @@ def main():
 
     res = client.execute('ListPhysicsParameterDefs',format='dom_object')
     for r in res.get_rows() : #r is OrderedDict
-        explainString = "%s: %s" % (r[u'PARAMNAME'],r[u'DESCRIPTION']);
+        explainString = "%s: %s" % (r[u'PARAMNAME'],r[u'DESCRIPTION'])
         if r[u'UNITS']!=u'NULL': 
             explainString += " (units: %s)" % r[u'UNITS']
             paramUnits[r[u'PARAMNAME']] = r[u'UNITS']
@@ -205,7 +208,7 @@ def main():
 
     if len(paramFields)>0 and args.physicsGroups==[""]:
         logging.error("You must specify at least one physics group. See -h for allowed groups")
-        return -1;
+        return -1
 
     #combine paramDefaults with fieldDefaults
     fieldDefaults.update(paramDefaults)
@@ -214,9 +217,9 @@ def main():
     
     for field in args.fields:
         if field not in fieldDefaults:
-            logging.error("%s is not a recognised field. Allowed fields are:" % field)
+            logging.error("%s is not a recognised field. Allowed fields are:", field)
             logging.error(fieldDefaults.keys())
-            return -1;
+            return -1
         
 
     if args.oldTimestamp!="":
@@ -231,7 +234,7 @@ def main():
   
     if len(args.inDS)==0 or (len(args.inDS)==1 and args.inDS[0]==""):
         logging.error("No datasets provided. Please specify datasets with the --inDS or --inDsTxt options")
-        return -1;
+        return -1
 
     logging.info("Fetching list of datasets from AMI (this may take a few minutes)...")
 
@@ -239,10 +242,10 @@ def main():
     #obtain list of datasets 
     res = AtlasAPI.list_datasets(client,patterns=args.inDS,fields=dsFields+['ldn'],ami_status="VALID") #changed status from %, to only catch valid now: wb 08/2015
 
-    logging.info("...Found %d datasets matching your selection" % len(res))
+    logging.info("...Found %d datasets matching your selection", len(res))
 
     if len(res)==0:
-        return 0;
+        return 0
     
     #NOTE: Should we allow retrieval of the extra information: keyword, genfiltereff, approx crossection, .. these all come from GetDatasetInfo ami command
 
@@ -258,7 +261,9 @@ def main():
         if len(extraFields)>0 or len(args.keywords)>0:
             info_res = AtlasAPI.get_dataset_info(client,str(r['ldn']))
             #print(info_res)
-            if len(info_res)==0: logging.error("Unable to retrieve dataset info for %s" % str(r['ldn']));return -1
+            if len(info_res)==0:
+                logging.error("Unable to retrieve dataset info for %s", r['ldn'])
+                return -1
             for field in extraFields:
                 #ignore the keyword_ fields 
                 if field.startswith("keyword_"): continue
@@ -284,14 +289,14 @@ def main():
 
     for ds in args.inDS:
         if '%' not in ds and ds not in dataset_values.keys():
-            logging.warning("Unknown dataset: %s" % ds)
+            logging.warning("Unknown dataset: %s", ds)
 
     datasetsToQuery = ",".join(dataset_values.keys())
 
     #if using inDsTxt, retain any comment or blank lines in structure of output
     complete_values = OrderedDict()
     if args.inDsTxt != "":
-         # read lines
+        # read lines
         commentcount=0
         import re
         txt = open(args.inDsTxt)
@@ -315,7 +320,8 @@ def main():
         txt.close()
         dataset_values = complete_values
 
-    logging.info("Obtaining %s for selected datasets at timestamp=%s... (please be patient)" % (args.fields,args.timestamp))
+    logging.info("Obtaining %s for selected datasets at timestamp=%s... (please be patient)",
+                 args.fields, args.timestamp)
 
     #do as one query, to be efficient
     if(args.timestamp==current_time):
@@ -332,7 +338,8 @@ def main():
 
 
     if args.oldTimestamp!="" :
-        logging.info("Obtaining %s for selected datasets at timestamp=%s... (please be patient)" % (args.fields,args.oldTimestamp))
+        logging.info("Obtaining %s for selected datasets at timestamp=%s... (please be patient)",
+                     args.fields,args.oldTimestamp)
         res2 = client.execute(['GetPhysicsParamsForDataset',"--logicalDatasetName=%s"% datasetsToQuery,"--timestamp='%s'"%args.oldTimestamp,"--history=true"], format='dom_object')
         old_parameterQueryResults = dict()
         for r in res2.get_rows():
@@ -391,14 +398,14 @@ def main():
                         groupsWithVals[param] += [(str(r[u'physicsGroup']),str(r[u'paramValue']))]
                         continue
                     if args.physicsGroups.index(str(r[u'physicsGroup'])) > bestGroupIndex : continue
-                    if args.physicsGroups.index(str(r[u'physicsGroup'])) == bestGroupIndex : logging.warning("Duplicate parameter %s for group %s in dataset %s (subprocess %d). Please report this!" % (param,str(r[u'physicsGroup']),ds,sp))
+                    if args.physicsGroups.index(str(r[u'physicsGroup'])) == bestGroupIndex : logging.warning("Duplicate parameter %s for group %s in dataset %s (subprocess %d). Please report this!", param, r[u'physicsGroup'], ds, sp)
                     paramVals[param] = str(r[u'paramValue'])
                     if param=="crossSection_pb": paramVals[param] = str(float(paramVals[param])*1000.0)
                     bestGroupIndex=args.physicsGroups.index(str(r[u'physicsGroup']))
                     #keep the explanation info 
                     for e in args.explainInfo: 
                         if unicode(e) not in r:
-                            logging.error("Unrecognised explainInfo field: %s" % e)
+                            logging.error("Unrecognised explainInfo field: %s", e)
                             return -1
                         explainInfo[param][e]=str(r[unicode(e)])
                 if args.oldTimestamp!="":
@@ -409,7 +416,7 @@ def main():
                         if str(r[u'paramName']) != param  and not (param=="crossSection_pb" and str(r[u'paramName'])=="crossSection"): continue
                         if str(r[u'physicsGroup']) not in args.physicsGroups: continue
                         if args.physicsGroups.index(str(r[u'physicsGroup'])) > bestGroupIndex : continue
-                        if args.physicsGroups.index(str(r[u'physicsGroup'])) == bestGroupIndex : logging.warning("Duplicate parameter %s for group %s in dataset %s (subprocess %d). Please report this!" % (param,str(r[u'physicsGroup']),ds,sp))
+                        if args.physicsGroups.index(str(r[u'physicsGroup'])) == bestGroupIndex : logging.warning("Duplicate parameter %s for group %s in dataset %s (subprocess %d). Please report this!", param, r[u'physicsGroup'], ds, sp)
                         paramVals2[param] = str(r[u'paramValue'])
                         if param=="crossSection_pb": paramVals2[param] = str(float(paramVals2[param])*1000.0)
                         bestGroupIndex=args.physicsGroups.index(str(r[u'physicsGroup']))
@@ -424,8 +431,8 @@ def main():
                 elif param == "subprocessID": val = sp
                 elif param in dataset_values[ds].keys(): val = dataset_values[ds][param]
                 else: val = paramVals.get(param,None)
-                if val == None:
-                    if args.outFile != sys.stdout: logging.warning("dataset %s (subprocess %d) does not have parameter %s, which has no default." % (ds,sp,param))
+                if val is None:
+                    if args.outFile != sys.stdout: logging.warning("dataset %s (subprocess %d) does not have parameter %s, which has no default.",ds,sp,param)
                     if len(groupsWithVals.get(param,[]))>0:
                         logging.warning("The follow physicsGroups have defined that parameter though:")
                         logging.warning(groupsWithVals[param])
@@ -439,7 +446,7 @@ def main():
                     elif param == "subprocessID": val2 = sp
                     elif param in dataset_values[ds].keys(): val2 = dataset_values[ds][param]
                     else: val2 = paramVals2.get(param,None)
-                    if val2 == None: val2 = "#UNKNOWN#"
+                    if val2 is None: val2 = "#UNKNOWN#"
                     #if isfloat(str(val2)): val2 = "%.6g" % float(val)
                     if(str(val)!=str(val2)):
                         if not firstPrint: print("%s:" % ds)
@@ -478,7 +485,8 @@ def main():
             if commentCount > 0:
                 if args.outFile!=sys.stdout and args.delim!="": print(commentCache,file=args.outFile)
                 outputTable += [["COMMENT",commentCache]]
-                commentCache = ''; commentCount = 0
+                commentCache = ''
+                commentCount = 0
             if args.outFile != sys.stdout and args.delim!="": print(rowString,file=args.outFile)
             outputTable += [rowList]
             #also print the required explanations
@@ -487,7 +495,7 @@ def main():
                 doneFirst=False
                 for eField in args.explainInfo:
                     if doneFirst: outString += " , "
-                    if not eField in expl.keys(): outString += " %s: <NONE .. value is default>"%eField
+                    if eField not in expl.keys(): outString += " %s: <NONE .. value is default>"%eField
                     else: outString += "%s: %s" % (eField,expl[eField])
                     doneFirst=True
                 outString += " }"
@@ -528,12 +536,10 @@ def main():
         print("",file=args.outFile)
         print("#lsetup  \"asetup %s,%s\" pyAMI" % (os.environ.get('AtlasProject','UNKNOWN!'),os.environ.get('AtlasVersion','UNKNOWN!')),file=args.outFile)
         print("#getMetadata.py --timestamp=\"%s\" --physicsGroups=\"%s\" --fields=\"%s\" --inDS=\"%s\"" % (args.timestamp,",".join(args.physicsGroups),",".join(args.fields),",".join(datasetss)),file=args.outFile )
-        logging.info("Results written to: %s" % args.outFile.name)
+        logging.info("Results written to: %s", args.outFile.name)
 
     args.outFile.close()
 
 
 if __name__ == "__main__":
-    import sys
     sys.exit(main())
-
diff --git a/Tools/PyUtils/bin/gprof2dot b/Tools/PyUtils/bin/gprof2dot
index 7de8f54ea77f..c27e0d0cbc3e 100755
--- a/Tools/PyUtils/bin/gprof2dot
+++ b/Tools/PyUtils/bin/gprof2dot
@@ -17,6 +17,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+# flake8: noqa
+
 """Generate a dot graph from the output of several profilers."""
 
 __author__ = "Jose Fonseca et al"
diff --git a/Tools/PyUtils/bin/issues b/Tools/PyUtils/bin/issues
index 5602cc1f9aaf..27241c479907 100755
--- a/Tools/PyUtils/bin/issues
+++ b/Tools/PyUtils/bin/issues
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from __future__ import print_function
 
@@ -25,7 +26,7 @@ def getDefects(pkg):
   request=Request(url,textData)
   try:
     u=urlopen(request, timeout=2)
-  except URLError as e:
+  except URLError:
     return "I'm sorry, the server timed out"
   textString = u.read().decode()
   return textString
diff --git a/Tools/PyUtils/bin/magnifyPoolFile.py b/Tools/PyUtils/bin/magnifyPoolFile.py
index cf3bcd80f7b8..4041a859a12d 100755
--- a/Tools/PyUtils/bin/magnifyPoolFile.py
+++ b/Tools/PyUtils/bin/magnifyPoolFile.py
@@ -2,7 +2,6 @@
 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id: magnifyPoolFile.py,v 1.5 2008-06-27 17:24:13 binet Exp $
 # @file:    magnifyPoolFile.py
 # @purpose: produce a new POOL file with N times the content of an input one.
 # @author:  Sebastien Binet <binet@cern.ch>
@@ -16,7 +15,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 1.5 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 import sys
@@ -99,7 +97,7 @@ if __name__ == "__main__":
     print ("## importing ROOT...")
     import ROOT
     print ("## importing ROOT... [DONE]")
-    import RootUtils.PyROOTFixes
+    import RootUtils.PyROOTFixes  # noqa: F401
 
     sys.argv = oldArgs
     
diff --git a/Tools/PyUtils/bin/merge-poolfiles.py b/Tools/PyUtils/bin/merge-poolfiles.py
index a67fab07b6cd..e38b71384011 100755
--- a/Tools/PyUtils/bin/merge-poolfiles.py
+++ b/Tools/PyUtils/bin/merge-poolfiles.py
@@ -1,19 +1,17 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 ## @file PyUtils/bin/merge-poolfiles.py
 ## @brief take a bunch of input pool files and produce a single one
 ##          autoconfiguration is (attempted to be) performed
 ## @author Sebastien Binet <binet@cern.ch>
 
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 __doc__ = """take a bunch of input pool files and produce a single one.
 autoconfiguration is (attempted to be) performed
 """
 
 import sys
-import os
 
 if __name__ == "__main__":
    
@@ -42,7 +40,7 @@ if __name__ == "__main__":
     
     
     msg.info(':'*40)
-    msg.info('welcome to poolfiles merger version %s', __version__)
+    msg.info('welcome to poolfiles merger')
     
     (options, args) = parser.parse_args()
 
diff --git a/Tools/PyUtils/bin/meta-reader.py b/Tools/PyUtils/bin/meta-reader.py
index 4759da281135..24e62e348776 100755
--- a/Tools/PyUtils/bin/meta-reader.py
+++ b/Tools/PyUtils/bin/meta-reader.py
@@ -115,9 +115,9 @@ def _main():
 						type=str,
 						choices=['tiny', 'lite', 'full', 'peeker'],
 						help="This flag provides the user capability to select the amount of metadata retrieved. There three options: "
-							 "tiny (only those values used in PyJobTransforms), "
-							 "lite (same output as dump-athfile) "
-							 "and full ( all  available data found) ")
+							"tiny (only those values used in PyJobTransforms), "
+							"lite (same output as dump-athfile) "
+							"and full ( all  available data found) ")
 	parser.add_argument('-t',
 						'--type',
 						default= None,
@@ -129,7 +129,7 @@ def _main():
 						'--filter',
 						default= [],
 						metavar='FILTER',
-	                    nargs = '+',
+						nargs = '+',
 						type=str,
 						help="The metadata keys to filter. ")
 	parser.add_argument('--promote',
@@ -168,7 +168,7 @@ def _main():
 		else:
 			enc = sys.stdout.encoding.lower()
 			ascii = not sys.stdout.isatty() or enc.find('ansi') >= 0 or enc.find('ascii') >= 0
-			pp=_tree_print(metadata, indent= indent, pad= 18, dict_sort='key', list_max_items = 8, ascii = True)
+			_tree_print(metadata, indent= indent, pad= 18, dict_sort='key', list_max_items = 8, ascii = True)
 			print(_tree_print(metadata, indent= indent, pad= 18, dict_sort='key', list_max_items = 8, ascii = ascii))
 
 	else:
diff --git a/Tools/PyUtils/bin/pool_extractFileIdentifier.py b/Tools/PyUtils/bin/pool_extractFileIdentifier.py
index c65df9a76572..8375f6ba6c3f 100755
--- a/Tools/PyUtils/bin/pool_extractFileIdentifier.py
+++ b/Tools/PyUtils/bin/pool_extractFileIdentifier.py
@@ -22,7 +22,7 @@ standard_library.install_aliases()
 
 def pool_extract(files):
     print (":: extracting GUID for [%i] files... "% len(files))
-    import os, sys
+    import os
     import subprocess
     sc,exe = subprocess.getstatusoutput('which pool_extractFileIdentifier')
     if sc != 0:
diff --git a/Tools/PyUtils/bin/pool_insertFileToCatalog.py b/Tools/PyUtils/bin/pool_insertFileToCatalog.py
index 89427f32cb9a..f6c371cf0c1d 100755
--- a/Tools/PyUtils/bin/pool_insertFileToCatalog.py
+++ b/Tools/PyUtils/bin/pool_insertFileToCatalog.py
@@ -25,7 +25,7 @@ def pool_insert(files, catalog_name="xmlcatalog_file:PoolFileCatalog.xml"):
         len (files),
         catalog_name
         ))
-    import os, sys
+    import os
     import subprocess
     sc,exe = subprocess.getstatusoutput ('which pool_insertFileToCatalog')
     if sc != 0:
diff --git a/Tools/PyUtils/bin/print_auditor_callgraph.py b/Tools/PyUtils/bin/print_auditor_callgraph.py
index 9ce124d7d201..e3bf1cc952c8 100755
--- a/Tools/PyUtils/bin/print_auditor_callgraph.py
+++ b/Tools/PyUtils/bin/print_auditor_callgraph.py
@@ -73,7 +73,7 @@ if __name__ == '__main__':
     step = Steps.ini
     if len(sys.argv) > 2:
         step = sys.argv[2].lower()
-        if not step in Steps.ALLOWED:
+        if step not in Steps.ALLOWED:
             raise SystemExit(
                 2, "Invalid step name [%s] allowed=%r"%(step, Steps.ALLOWED))
 
diff --git a/Tools/PyUtils/bin/pyroot.py b/Tools/PyUtils/bin/pyroot.py
index ab1b151fe564..06cd9abb896a 100755
--- a/Tools/PyUtils/bin/pyroot.py
+++ b/Tools/PyUtils/bin/pyroot.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-"exec" "`which python`" "-tt" "$0" "$@";
+"exec" "`which python`" "-tt" "$0" "$@"
 
 # File: pyroot.py
 # Author: Sebastien Binet (binet@cern.ch)
@@ -10,7 +10,6 @@
 
 from __future__ import print_function
 
-__version__ = '$Revision$'
 __author__  = 'Sebastien Binet (binet@cern.ch)'
 __doc__     = 'For details about pyroot.py, run "less `which pyroot.py`"'
 
@@ -32,8 +31,7 @@ def _help_and_exit( reason = None ):
      --no-display                           prompt, but no graphics display
  -c, --command                        ...  one-liner, runs before any scripts
  -h, --help                           ...  print this help message
- -v, --version                        ...  print version number
- -,-- [arg1,...]                      ...  additional arguments passed directly 
+ -,-- [arg1,...]                      ...  additional arguments passed directly
                                            to user scripts (left untouched)
  [<file1>.py [<file2>.py [...]]]      ...  scripts to run""")
 
@@ -75,23 +73,20 @@ for opt, arg in optlist:
    elif opt in ("-i", "--interactive"):
       runBatch = 0
       defOptions = ""
-      if display == None: display = 1
+      if display is None: display = 1
    elif opt in ("--no-display",):
       display = 0
    elif opt in ("-c", "--command"):
       command = string.strip( arg )
    elif opt in ("-h", "--help"):
       _help_and_exit()
-   elif opt in ("-v", "--version"):
-      print (__version__)
-      sys.exit(0)
 
 if optlist: del opt, arg
 del args, optlist, opts
 del _useropts, _userlongopts, string, getopt
 
 ## for the benefit of PyROOT
-if not display and not '-b' in sys.argv:
+if not display and '-b' not in sys.argv:
    sys.argv = sys.argv[:1] + ['-b'] + sys.argv[1:]
 del display
 
@@ -100,7 +95,7 @@ del display
 if not os.getcwd() in sys.path:
    sys.path = [ os.getcwd() ] + sys.path
 
-if not '' in sys.path:
+if '' not in sys.path:
    sys.path = [ '' ] + sys.path
 
 sys.ps1 = 'pyroot> '
@@ -116,7 +111,7 @@ if runBatch:
 else:
    os.environ['PYTHONINSPECT'] = '1'
  # readline support
-   import rlcompleter, readline
+   import rlcompleter, readline  # noqa: F401
 
    readline.parse_and_bind( 'tab: complete' )
    readline.parse_and_bind( 'set show-all-if-ambiguous On' )
diff --git a/Tools/PyUtils/bin/vmem-sz.py b/Tools/PyUtils/bin/vmem-sz.py
index 795f9a9e0ae8..056372e8b908 100755
--- a/Tools/PyUtils/bin/vmem-sz.py
+++ b/Tools/PyUtils/bin/vmem-sz.py
@@ -2,19 +2,15 @@
 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-#@purpose: get the inclusive and exclusive vmem sizes of a library
-
 from __future__ import print_function
 
 __author__ = "Sebastien Binet <binet@cern.ch>"
 __doc__    = "get the inclusive and exclusive vmem sizes of a library"
-__version__= "$Revision: 1.2 $"
 
 ## std imports
 import argparse
 import ctypes
 import os
-import sys
 
 ## 3rd-party imports
 from PyUtils.Decorators import forking as forking
@@ -31,7 +27,7 @@ def lib_loader(libname):
 @forking
 def load_lib (libname):
     _,vmem0,_ = pymon()
-    lib = lib_loader (libname)
+    lib_loader (libname)
     _,vmem1,_  = pymon()
     libs = [l for l in loaded_libs()
             if not os.path.basename(l) in _veto_libs and
@@ -139,8 +135,6 @@ def save_stats (lib_stats, fname=None):
     print (":: saving vmem statistics in [%s]... [done]"%fname)
     
 def main():
-    import sys
-    import os
 
     parser = argparse.ArgumentParser(
         description='get the inclusive and exclusive vmem sizes of a library'
diff --git a/Tools/PyUtils/python/scripts/check_file.py b/Tools/PyUtils/python/scripts/check_file.py
index 1ec1321bc5f5..d33c7f45cbcc 100644
--- a/Tools/PyUtils/python/scripts/check_file.py
+++ b/Tools/PyUtils/python/scripts/check_file.py
@@ -30,7 +30,7 @@ import PyUtils.acmdlib as acmdlib
                   action='store_true',
                   default=False,
                   help="""Enable fast mode.
-                  Memory szie will not be accurate AT ALL""")
+                  Memory size will not be accurate AT ALL""")
 @acmdlib.argument('-o', '--output',
                   default=None,
                   help="""name of the output file which will contain the
-- 
GitLab


From 038c31eb2a0010d571e03933326930ae6a56db5a Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 10 Jun 2020 21:04:02 +0100
Subject: [PATCH 138/266] TrkExTools clang tidy

---
 .../TrkExTools/TrkExTools/TimedExtrapolator.h |  2 +-
 .../src/DummyMaterialEffectsUpdator.cxx       |  4 +-
 .../TrkExTools/src/Extrapolator.cxx           | 58 +++++++++---------
 .../TrkExTools/src/NIMatEffUpdator.cxx        |  6 +-
 .../TrkExTools/src/Navigator.cxx              |  4 +-
 .../TrkExTools/src/TimedExtrapolator.cxx      | 60 +++++++++----------
 6 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/TimedExtrapolator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/TimedExtrapolator.h
index 4354b419b783..fe347d3c3937 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/TimedExtrapolator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/TimedExtrapolator.h
@@ -258,7 +258,7 @@ namespace Trk {
                        //const TrackingVolume& tvol,
                        float time,
                        PropDirection dir = anyDirection,
-                       BoundaryCheck bcheck = true,
+                       const BoundaryCheck& bcheck = true,
                        ParticleHypothesis particle=pion,
                        bool startingLayer = false) const;
 
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx
index 10a52c8881eb..2b1b9a2e7abd 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/DummyMaterialEffectsUpdator.cxx
@@ -44,9 +44,9 @@ Trk::DummyMaterialEffectsUpdator::initialize() {
   if (m_materialMapper.retrieve().isFailure()) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_materialMapper);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_INFO("Retrieved tool " << m_materialMapper);
-  }
+  
 
   // set the validation switch
   m_validationDirection = (m_validationDirectionSwitch == 1) ? Trk::alongMomentum : Trk::oppositeMomentum;
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 3f0cf26e73c9..63f731ce2f1a 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -2189,13 +2189,13 @@ Trk::Extrapolator::extrapolate(const EventContext& ctx,
   if (closestTrackParameters) {
     return (extrapolate(
       ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
-  } else {
+  } 
     closestTrackParameters = *(trk.trackParameters()->begin());
     if (closestTrackParameters) {
       return (extrapolate(
         ctx, *closestTrackParameters, sf, dir, bcheck, particle, matupmode, extrapolationCache));
     }
-  }
+  
 
   return nullptr;
 }
@@ -2662,7 +2662,7 @@ Trk::Extrapolator::extrapolateImpl(const EventContext& ctx,
         ATH_MSG_DEBUG("  [+] Destination surface successfully hit.");
         // return the result (succesful)
         return resultParameters;
-      } else if (!cache.m_parametersAtBoundary.nextParameters ||
+      } if (!cache.m_parametersAtBoundary.nextParameters ||
                  !cache.m_parametersAtBoundary.nextVolume) {
         ATH_MSG_DEBUG("  [-] Destination surface could not be hit.");
         return resultParameters;
@@ -2758,11 +2758,11 @@ Trk::Extrapolator::extrapolateImpl(const EventContext& ctx,
         fallback = true;
         // break it
         break;
-      } else {
+      } 
         // set the punch-through to true
         punchThroughDone = true;
         ATH_MSG_DEBUG("  [!] One time punch-through a volume done.");
-      }
+      
     }
     // ------------------- the output interpretationn of the extrapolateToVolumeBoundary
     // (3) NAVIGATION BREAK : no nextVolume found - but not in extrapolateBlindly() mode
@@ -3136,7 +3136,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
 
     if (fwd) {
       return fwd;
-    } else {
+    } 
       Trk::PropDirection oppDir =
         (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
       // return prop.propagate(*nextParameters,sf,oppDir,bcheck,*currVol,particle);
@@ -3144,7 +3144,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
         nextParameters,
         prop.propagate(
           ctx, *nextParameters, sf, oppDir, bcheck, m_fieldProperties, particle, false, currVol));
-    }
+    
   }
 
   if (fabs(dist) < m_tolerance) {
@@ -3156,7 +3156,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
         nextParameters,
         prop.propagate(
           ctx, *nextParameters, sf, dir, bcheck, m_fieldProperties, particle, false, currVol));
-    } else {
+    } 
       Trk::PropDirection oppDir =
         (dir != Trk::oppositeMomentum) ? Trk::oppositeMomentum : Trk::alongMomentum;
       // return prop.propagate(*nextParameters,sf,oppDir,bcheck,*currVol,particle);
@@ -3164,8 +3164,8 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
         nextParameters,
         prop.propagate(
           ctx, *nextParameters, sf, oppDir, bcheck, m_fieldProperties, particle, false, currVol));
-    }
-  } else if (dist < 0.) {
+    
+  } if (dist < 0.) {
     ATH_MSG_DEBUG("  [!] Initial 3D-distance to the surface negative ("
                   << dist << ") -> skip extrapolation.");
     cache.m_parametersAtBoundary.resetBoundaryInformation();
@@ -3208,9 +3208,9 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
             return cParms;
           }
           return onNextLayer;
-        } else {
+        } 
           return ManagedTrackParmPtr();
-        }
+        
       }
     } else {
       // world boundary ?
@@ -3234,7 +3234,7 @@ Trk::Extrapolator::extrapolateWithinDetachedVolumes(const EventContext& ctx,
       if (dist < 0.) {
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         return ManagedTrackParmPtr();
-      } else if (cache.m_parametersAtBoundary.nextVolume &&
+      } if (cache.m_parametersAtBoundary.nextVolume &&
                  (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::MS ||
                   (cache.m_parametersAtBoundary.nextVolume->geometrySignature() == Trk::Calo &&
                    m_useDenseVolumeDescription))) {
@@ -3492,7 +3492,7 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         resetRecallInformation(cache);
         return ManagedTrackParmPtr();
-      } else if (cache.m_boundaryVolume && nextParameters &&
+      } if (cache.m_boundaryVolume && nextParameters &&
                  !cache.m_boundaryVolume->inside(nextParameters->position())) {
         ATH_MSG_VERBOSE("  [+] Parameter outside the given boundary/world stopping loop.");
         // set the new boundary information
@@ -3564,7 +3564,7 @@ Trk::Extrapolator::insideVolumeStaticLayers(const EventContext& ctx,
         cache.m_parametersAtBoundary.resetBoundaryInformation();
         resetRecallInformation(cache);
         return ManagedTrackParmPtr();
-      } else if (cache.m_boundaryVolume && updateNext &&
+      } if (cache.m_boundaryVolume && updateNext &&
                  !cache.m_boundaryVolume->inside(updateNext->position())) {
         ATH_MSG_VERBOSE("  [+] Parameter outside the given boundary/world stopping loop.");
         // set the new boundary information
@@ -3823,7 +3823,7 @@ Trk::Extrapolator::extrapolateFromLayerToLayer(const EventContext& ctx,
         ATH_MSG_VERBOSE("  [+] Material update killed the track parameters - return 0");
         // kill the track - Fatras case
         return ManagedTrackParmPtr();
-      } else if (!nextPar) {
+      } if (!nextPar) {
         ++failedAttempts;
         ++m_layerSwitched; // record for statistics output
         // reset until break condition is fullfilled
@@ -4717,9 +4717,9 @@ Trk::Extrapolator::checkCache(Cache& cache, const std::string& txt) const
     ATH_MSG_DEBUG(txt << " PROBLEM Eloss cache pointer overwritten " << cache.m_cacheEloss
                       << " from extrapolationCache " << cache.m_extrapolationCache->eloss());
     return false;
-  } else {
+  } 
     return true;
-  }
+  
 }
 
 const std::vector<std::pair<const Trk::TrackParameters*, int>>*
@@ -4960,9 +4960,9 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
       if (nextPar) {
         return extrapolateToVolumeWithPathLimit(
           ctx, cache, nextPar.index(), pathLim, dir, particle, destVol, matupmod);
-      } else {
+      } 
         return ManagedTrackParmPtr();
-      }
+      
     }
   }
 
@@ -5412,7 +5412,7 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
     while (iSol < solutions.size()) {
       if (solutions[iSol] < iDest) {
         return nextPar;
-      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
+      } if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
         // material attached ?
         const Trk::Layer* mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
         if (mb) {
@@ -5433,7 +5433,7 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
               cache.m_parametersAtBoundary.resetBoundaryInformation();
               return ManagedTrackParmPtr();
-            } else { // the MEOT will be saved at the end
+            } // the MEOT will be saved at the end
               ATH_MSG_VERBOSE(" Update energy loss:" << nextPar->momentum().mag() - pIn
                                                      << "at position:" << nextPar->position());
               if (cache.m_matstates) {
@@ -5446,7 +5446,7 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
                                           dir,
                                           particle);
               }
-            }
+            
           }
         }
 
@@ -5525,11 +5525,11 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
             ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
             cache.m_parametersAtBoundary.resetBoundaryInformation();
             return ManagedTrackParmPtr();
-          } else { // the MEOT will be saved at the end
+          } // the MEOT will be saved at the end
             ATH_MSG_VERBOSE(" Pre-update energy loss:"
                             << nextPar->momentum().mag() - pIn << "at position:"
                             << nextPar->position() << ", current momentum:" << nextPar->momentum());
-          }
+          
         }
         // active surface intersections ( Fatras hits ...)
         if (cache.m_parametersOnDetElements && particle != Trk::neutron) {
@@ -5568,11 +5568,11 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
                 ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
                 cache.m_parametersAtBoundary.resetBoundaryInformation();
                 return ManagedTrackParmPtr();
-              } else { // the MEOT will be saved at the end
+              } // the MEOT will be saved at the end
                 ATH_MSG_VERBOSE(" Post-update energy loss:" << nextPar->momentum().mag() - pIn
                                                             << "at position:"
                                                             << nextPar->position());
-              }
+              
             }
           } else {
             double pIn = nextPar->momentum().mag();
@@ -5585,10 +5585,10 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
               cache.m_parametersAtBoundary.resetBoundaryInformation();
               return ManagedTrackParmPtr();
-            } else { // the MEOT will be saved at the end
+            } // the MEOT will be saved at the end
               ATH_MSG_VERBOSE(" Update energy loss:" << nextPar->momentum().mag() - pIn
                                                      << "at position:" << nextPar->position());
-            }
+            
           }
           if (cache.m_matstates) {
             addMaterialEffectsOnTrack(ctx,
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/NIMatEffUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/NIMatEffUpdator.cxx
index 3ebb3e9c802e..4d9f7aae1f98 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/NIMatEffUpdator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/NIMatEffUpdator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -39,9 +39,9 @@ Trk::NIMatEffUpdator::initialize() {
   if (m_matUpdator.retrieve().isFailure()) {
     ATH_MSG_FATAL("Could not retrieve " << m_matUpdator);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_DEBUG("Successfully retrieved " << m_matUpdator);
-  }
+  
 
   return StatusCode::SUCCESS;
 }
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
index e44d71848a99..01d804dd4895 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
@@ -271,11 +271,11 @@ Trk::Navigator::nextTrackingVolume(const EventContext& ctx,
                                << surface_id << " of Volume: '"
                                << vol.volumeName() << "' NOT FOUND.");
       continue;
-    } else {
+    } 
       ATH_MSG_VERBOSE("  [N] " << tryBoundary << ". try - BoundarySurface "
                                << surface_id << " of Volume: '"
                                << vol.volumeName() << "'.");
-    }
+    
 
     const Trk::Surface& currentSurface =
       currentBoundary->surfaceRepresentation();
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/TimedExtrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/TimedExtrapolator.cxx
index 9e12dfc32abe..8162d7e8081c 100644
--- a/Tracking/TrkExtrapolation/TrkExTools/src/TimedExtrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/TimedExtrapolator.cxx
@@ -42,7 +42,7 @@
 #include "TrkParameters/TrackParameters.h"
 #include "TrkGeometry/MagneticFieldProperties.h"
 // for the comparison with a pointer
-#include <stdint.h>
+#include <cstdint>
 
 // Amg
 #include "EventPrimitives/EventPrimitives.h"
@@ -172,9 +172,9 @@ Trk::TimedExtrapolator::initialize() {
     if (m_propagators.retrieve().isFailure()) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_propagators);
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tools " << m_propagators);
-    }
+    
   }
 
 
@@ -193,18 +193,18 @@ Trk::TimedExtrapolator::initialize() {
   if (m_navigator.retrieve().isFailure()) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_navigator);
     return StatusCode::FAILURE;
-  } else {
+  } 
     ATH_MSG_INFO("Retrieved tool " << m_navigator);
-  }
+  
   // Get the Material Updator
   if (m_includeMaterialEffects && !m_updators.empty()) {
     if (m_updators.retrieve().isFailure()) {
       ATH_MSG_FATAL("None of the defined material updatros could be retrieved!");
       ATH_MSG_FATAL("No multiple scattering and energy loss material update will be done.");
       return StatusCode::FAILURE;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tools: " << m_updators);
-    }
+    
   }
 
   // from the number of retrieved propagators set the configurationLevel
@@ -303,9 +303,9 @@ Trk::TimedExtrapolator::extrapolateWithPathLimit(
       ATH_MSG_ERROR("Failed to retrieve tool " << m_stepPropagator);
       ATH_MSG_ERROR("Configure STEP Propagator for extrapolation with path limit");
       return nullptr;
-    } else {
+    } 
       ATH_MSG_INFO("Retrieved tool " << m_stepPropagator);
-    }
+    
   }
 
   // reset the path ( in x0 !!)
@@ -848,9 +848,9 @@ Trk::TimedExtrapolator::extrapolateToVolumeWithPathLimit(
 
         throwIntoGarbageBin(cache,iPar);
         return extrapolateToVolumeWithPathLimit(cache,*iPar, timeLim, dir, particle, nextGeoID, destVol);
-      } else {    // kill the particle without trace ( some validation info can be included here eventually )
+      }    // kill the particle without trace ( some validation info can be included here eventually )
         return returnParameters;
-      }
+      
     }
     // decay ?
     if (timeLim.tMax > 0. && timeLim.time >= timeLim.tMax) {
@@ -864,9 +864,9 @@ Trk::TimedExtrapolator::extrapolateToVolumeWithPathLimit(
         }
         throwIntoGarbageBin(cache,iPar);
         return extrapolateToVolumeWithPathLimit(cache,*iPar, timeLim, dir, particle, nextGeoID, destVol);
-      } else {    // kill the particle without trace ( some validation info can be included here eventually )
+      }    // kill the particle without trace ( some validation info can be included here eventually )
         return returnParameters;
-      }
+      
     }
 
     // check missing volume boundary
@@ -882,7 +882,7 @@ Trk::TimedExtrapolator::extrapolateToVolumeWithPathLimit(
     while (iSol < solutions.size()) {
       if (solutions[iSol] < iDest) {
         return nextPar->clone();
-      } else if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
+      } if (solutions[iSol] < iDest + cache.m_staticBoundaries.size()) {
         // material attached ?
         const Trk::Layer *mb = cache.m_navigSurfs[solutions[iSol]].first->materialLayer();
         if (mb && m_includeMaterialEffects) {
@@ -974,12 +974,12 @@ Trk::TimedExtrapolator::extrapolateToVolumeWithPathLimit(
             ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
             cache.m_parametersAtBoundary.resetBoundaryInformation();
             return returnParameters;
-          } else {
+          } 
             ATH_MSG_VERBOSE(
               " Layer energy loss:" << nextPar->momentum().mag() - pIn << "at position:" << nextPar->position() << ", current momentum:" <<
               nextPar->momentum());
             throwIntoGarbageBin(cache,nextPar);
-          }
+          
         }
         // active surface intersections ( Fatras hits ...)
         if (cache.m_hitVector && particle != Trk::neutron) {
@@ -1125,7 +1125,7 @@ Trk::TimedExtrapolator::overlapSearch(Trk::TimedExtrapolator::Cache &cache,
                                       // const TrackingVolume& tvol,
                                       float time,
                                       PropDirection dir,
-                                      BoundaryCheck bcheck, // bcheck
+                                      const BoundaryCheck& bcheck, // bcheck
                                       ParticleHypothesis particle,
                                       bool startingLayer) const {
   // indicate destination layer
@@ -1582,7 +1582,7 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
     }
 
     return returnParameters;
-  } else if (cache.m_trStaticBounds[0].distance < m_tolerance) {
+  } if (cache.m_trStaticBounds[0].distance < m_tolerance) {
     // TODO find out why this case (=exit from volume) haven't been handled by Navigator
     // ATH_MSG_WARNING( " recovering from glitch at the static volume boundary:"<<cache.m_trStaticBounds[0].distance );
 
@@ -1591,13 +1591,13 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
 
     if (cache.m_currentStatic) {
        return transportToVolumeWithPathLimit(cache,parm, timeLim, dir, particle, nextGeoID, destVol);
-    } else {
+    } 
       ATH_MSG_DEBUG("  [+] World boundary reached        - at " << positionOutput(
                       currPar->position()) << ", timed at " << cache.m_time);
       nextGeoID = Trk::GeometrySignature(Trk::Unsigned);
       // if (!destVol) { return currPar;}
       return currPar;
-    }
+    
   }
 
   cache.m_detachedVols.clear();
@@ -1960,7 +1960,7 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
 
     if (sols[is] < iDest) {      // destination volume (most often, subdetector boundary)
       return nextPar->clone();
-    } else if (sols[is] < iDest + cache.m_trStaticBounds.size()) {     // tracking geometry frame
+    } if (sols[is] < iDest + cache.m_trStaticBounds.size()) {     // tracking geometry frame
       // material attached ?
       const Trk::Layer *mb = cache.m_trStaticBounds[sols[is] - iDest].surface->materialLayer();
       if (mb && m_includeMaterialEffects) {
@@ -1974,9 +1974,9 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
             ATH_MSG_VERBOSE("  [+] Update may have killed neutral track - return.");
             cache.m_parametersAtBoundary.resetBoundaryInformation();
             return returnParameters;
-          } else {
+          } 
             throwIntoGarbageBin(cache,nextPar);
-          }
+          
         } else {    // material layer without material ?
           ATH_MSG_VERBOSE(" boundary layer without material:" << mb->layerIndex());
         }
@@ -2057,9 +2057,9 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
           ATH_MSG_VERBOSE("  [+] Update may have killed neutral track - return.");
           cache.m_parametersAtBoundary.resetBoundaryInformation();
           return returnParameters;
-        } else {
+        } 
           throwIntoGarbageBin(cache,nextPar);
-        }
+        
       }
     } else if (sols[is] < iDest + cache.m_trStaticBounds.size() + cache.m_trLays.size() + cache.m_trDenseBounds.size()) {
       // dense volume boundary : no material update here, navigation only ( set cache.m_currentDense for next step )
@@ -2108,9 +2108,9 @@ Trk::TimedExtrapolator::transportToVolumeWithPathLimit(Trk::TimedExtrapolator::C
 
   if (nextPar) {
     return nextPar->clone();
-  } else {
+  } 
     return nullptr;
-  }
+  
 }
 
 Trk::BoundaryTrackParameters
@@ -2270,7 +2270,7 @@ Trk::TimedExtrapolator::transportInAlignableTV(Trk::TimedExtrapolator::Cache &ca
   if (cache.m_trStaticBounds.empty()) {
     ATH_MSG_WARNING("exit from alignable volume " << aliTV->volumeName() << " not resolved, aborting");
     return Trk::BoundaryTrackParameters(nullptr, nullptr, nullptr);
-  } else if (cache.m_trStaticBounds.size() > 1) {  // hit edge ?
+  } if (cache.m_trStaticBounds.size() > 1) {  // hit edge ?
     Amg::Vector3D gp = currPar->position() + (cache.m_trStaticBounds[0].distance + 1.) * dir *
                        currPar->momentum().normalized();
     nextVol = m_navigator->trackingGeometry()->lowestStaticTrackingVolume(gp);
@@ -2593,9 +2593,9 @@ Trk::TimedExtrapolator::extrapolateInAlignableTV(Trk::TimedExtrapolator::Cache &
         throwIntoGarbageBin(cache,iPar);
         ATH_MSG_WARNING("particle decay survival?" << particle << "," << timeLim.process);
         return Trk::BoundaryTrackParameters(nullptr, nullptr, nullptr);
-      } else {    // kill the particle without trace ( some validation info can be included here eventually )
+      }    // kill the particle without trace ( some validation info can be included here eventually )
         return Trk::BoundaryTrackParameters(nullptr, nullptr, nullptr);
-      }
+      
     }
 
     if (nextPar) {
-- 
GitLab


From 95b0987c2874134f203e3cf9b2a546fa7f3e8708 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 17:24:22 +0200
Subject: [PATCH 139/266] RecExCommon: Remove references to ThinningSvc.

ThinningSvc is no longer used and is being removed.
---
 .../RecExCommon/share/RecExCommon_topOptions.py    | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index a30313ddc6a9..9d1eec45e471 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -1327,10 +1327,6 @@ if rec.doWriteAOD():
     from ParticleBuilderOptions.AODFlags import AODFlags
     # Particle Builders
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    from AthenaServices.Configurables import ThinningSvc
-    if not hasattr(svcMgr, 'ThinningSvc'):
-       svcMgr += ThinningSvc(OutputLevel=INFO)
-    svcMgr.ThinningSvc.Streams += ['StreamAOD']
 
 
     # cannot redo the slimming if readAOD and writeAOD
@@ -1365,13 +1361,6 @@ if rec.doWriteAOD():
             from ThinningUtils.ThinTrkTrack import ThinTrkTrack
             ThinTrkTrack()
             
-       # Doens't exist in xAOD world:
-       # if AODFlags.TrackParticleSlimmer or AODFlags.TrackParticleLastHitAndPerigeeSlimmer:
-       #     from PrimaryDPDMaker.PrimaryDPDMakerConf import SlimTrackInfo
-       #     topSequence += SlimTrackInfo( "SlimTrackParticles",
-       #                                   thinSvc             = 'ThinningSvc/ThinningSvc',
-       #                                   TrackPartContName   = 'TrackParticleCandidate',
-       #                                   SlimPerigee=AODFlags.TrackParticleLastHitAndPerigeeSlimmer() )
 
     pdr.flag_domain('output')
     # Create output StreamAOD
@@ -1418,9 +1407,6 @@ if rec.doWriteAOD():
 
     if AODFlags.TrackParticleSlimmer or AODFlags.TrackParticleLastHitAndPerigeeSlimmer:
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-        from AthenaServices.Configurables import ThinningSvc, createThinningSvc
-        if not hasattr(svcMgr, 'ThinningSvc'):
-            svcMgr += createThinningSvc( svcName="ThinningSvc", outStreams=[StreamAOD] )
 
     # this is AOD->AOD copy
     if rec.readAOD():
-- 
GitLab


From fd89088537434a2b011dd8bec608cf46446f065f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 19:18:34 +0200
Subject: [PATCH 140/266] TrigNavStructure: Add a const version of getAllTEs().

Add a const version of TrigNavStructure::getAllTEs(),
to be used in TrigNavTools.
---
 .../TrigNavStructure/TrigNavStructure/TrigNavStructure.h   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h
index 675e07a5fe63..8a508f5582af 100644
--- a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h
+++ b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -187,6 +187,11 @@ namespace HLT {
      */
     std::vector<TriggerElement*>& getAllTEs() { return m_factory.listOfProduced(); } 
 
+    /**
+     * @brief access needed by slimming tools.
+     */
+    const std::vector<TriggerElement*>& getAllTEs() const { return m_factory.listOfProduced(); } 
+
     /**
      * @brief The query returning a collection of all TriggerElements if name is given
      * @param id name of TE, if "" given all TEs are returned
-- 
GitLab


From 2e60dfe6e329c2c3a559202ba69c5d45ec9e0570 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 04:52:16 +0200
Subject: [PATCH 141/266] AtlasGeoModel: Increase test timeout.

HITS test has been timing out frequently in the dbg build.
---
 DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
index d144ff6623da..2f77ee8ad5a6 100644
--- a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
@@ -20,7 +20,7 @@ if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
   atlas_add_test( AtlasGeoModelConfig    SCRIPT python -m AtlasGeoModel.GeoModelConfig POST_EXEC_SCRIPT nopost.sh )
   atlas_add_test( HITS_InputGeo_test
                   SCRIPT test/AtlasGeometryConfig_HITS_test.py
-                  PROPERTIES TIMEOUT 300 )
+                  PROPERTIES TIMEOUT 600 )
   atlas_add_test( AOD_InputGeo_test
                   SCRIPT test/AtlasGeometryConfig_AOD_test.py
                   PROPERTIES TIMEOUT 600 )
-- 
GitLab


From db432a56f4e10b040c8e09696d570894e0f6bcd9 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 16:34:24 +0200
Subject: [PATCH 142/266] HepMCWeightSvc: cmake fixes

Library dependency fixes.
---
 Generators/HepMCWeightSvc/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Generators/HepMCWeightSvc/CMakeLists.txt b/Generators/HepMCWeightSvc/CMakeLists.txt
index ee3d3a40d4ff..67bf86e764af 100644
--- a/Generators/HepMCWeightSvc/CMakeLists.txt
+++ b/Generators/HepMCWeightSvc/CMakeLists.txt
@@ -26,4 +26,4 @@ atlas_add_component( HepMCWeightSvc
    NO_PUBLIC_HEADERS
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
    LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps
-   AthenaPoolUtilities IOVDbDataModel EventInfo )
+   AthenaPoolUtilities IOVDbDataModel EventInfo GenInterfacesLib IOVDbMetaDataToolsLib )
-- 
GitLab


From 419cf512b93355fe97a2c31004ac0b6bb396b8f2 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 16:35:34 +0200
Subject: [PATCH 143/266] AthenaMonitoring: cmake fixes

Library dependency fixes.
---
 Control/AthenaMonitoring/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Control/AthenaMonitoring/CMakeLists.txt b/Control/AthenaMonitoring/CMakeLists.txt
index 0ba48dbf69dc..6597da299b04 100644
--- a/Control/AthenaMonitoring/CMakeLists.txt
+++ b/Control/AthenaMonitoring/CMakeLists.txt
@@ -50,6 +50,7 @@ atlas_add_library(
         LumiBlockCompsLib
         LumiBlockData
         TrigDecisionToolLib
+        TrigAnalysisInterfaces
     PRIVATE_LINK_LIBRARIES
         ${CORAL_LIBRARIES}
         AthenaKernel
-- 
GitLab


From 51cd03713138c8db46ed293207cb1e9839903dec Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 11 Jun 2020 05:39:05 +0200
Subject: [PATCH 144/266] Remove delete from SCT_DistortionsTool using
 automatic allocation.

---
 .../src/SCT_DistortionsTool.cxx               | 98 ++++++-------------
 .../src/SCT_DistortionsTool.h                 | 24 ++---
 2 files changed, 44 insertions(+), 78 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx
index dc11a9c8d104..6768701612f3 100644
--- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx
@@ -16,17 +16,7 @@
 
 SCT_DistortionsTool::SCT_DistortionsTool(const std::string& type, const std::string& name, const IInterface* parent):
   AthAlgTool(type,name,parent),
-  m_sctID(nullptr),
-  m_dataJap1_S0(nullptr),
-  m_dataJap2_S0(nullptr),
-  m_dataUK_S0(nullptr),
-  m_dataUSA_S0(nullptr),
-  m_dataScand_S0(nullptr),
-  m_dataJap1_S1(nullptr),
-  m_dataJap2_S1(nullptr),
-  m_dataUK_S1(nullptr),
-  m_dataUSA_S1(nullptr),
-  m_dataScand_S1(nullptr)
+  m_sctID(nullptr)
 {
   declareInterface<ISCT_ModuleDistortionsTool>(this);
   declareProperty("TextFileName1",m_textFileNameJ1="HashJap1.txt","Read this file for hash id"); 
@@ -47,18 +37,6 @@ StatusCode SCT_DistortionsTool::initialize(){
     return StatusCode::FAILURE;
   }
   
-  m_dataJap1_S0 =  new std::vector<float>;
-  m_dataJap2_S0 =  new std::vector<float>;
-  m_dataUK_S0 =  new std::vector<float>;
-  m_dataUSA_S0 =  new std::vector<float>;
-  m_dataScand_S0 =  new std::vector<float>;
-
-  m_dataJap1_S1 =  new std::vector<float>;
-  m_dataJap2_S1 =  new std::vector<float>;
-  m_dataUK_S1 =  new std::vector<float>;
-  m_dataUSA_S1 =  new std::vector<float>;
-  m_dataScand_S1 =  new std::vector<float>;
-  
   bool readFiles = loadData();
   if (!readFiles){
     ATH_MSG_FATAL( "Could not Read Files" );
@@ -295,35 +273,35 @@ const std::vector<float>* SCT_DistortionsTool::readDistortions(int RegionID, int
 {
   if(RegionID == 1 ){//Jap1 LL and RL
     if ( Side == 0 )
-      return m_dataJap1_S0;
+      return &m_dataJap1_S0;
     else
-      return m_dataJap1_S1;
+      return &m_dataJap1_S1;
   }
   else if(RegionID == 2){//Jap2
     if ( Side == 0 )
-      return m_dataJap2_S0;
+      return &m_dataJap2_S0;
     else
-      return m_dataJap2_S1;
+      return &m_dataJap2_S1;
   }
   else if(RegionID == 3){//UK
     if ( Side == 0 )
-      return m_dataUK_S0;
+      return &m_dataUK_S0;
     else
-      return m_dataUK_S1;
+      return &m_dataUK_S1;
   }
   else if(RegionID == 4){//USA
     if ( Side == 0 )
-      return m_dataUSA_S0;
+      return &m_dataUSA_S0;
     else 
-      return m_dataUSA_S1;
+      return &m_dataUSA_S1;
   }
   else if(RegionID == 5 ){//Scand
     if ( Side == 0 )
-      return m_dataScand_S0;
+      return &m_dataScand_S0;
     else
-      return m_dataScand_S1;
+      return &m_dataScand_S1;
   }
-  return 0;
+  return nullptr;
 }
 
 
@@ -433,85 +411,85 @@ bool SCT_DistortionsTool::loadData()
 
     if(lines < 364 && lines > 338) //LL
     {
-      m_dataJap1_S1->push_back(ZVal);
+      m_dataJap1_S1.push_back(ZVal);
     }
     if(lines < 392 && lines > 366) //RL
     {
-      m_dataJap1_S1->push_back(ZVal);
+      m_dataJap1_S1.push_back(ZVal);
     }
     if(lines < 476 && lines > 450) //LL
     {
-      m_dataJap2_S1->push_back(ZVal);
+      m_dataJap2_S1.push_back(ZVal);
     }
     if(lines < 504 && lines > 478) //RL
     {
-      m_dataJap2_S1->push_back(ZVal);
+      m_dataJap2_S1.push_back(ZVal);
     }
     if(lines < 252 && lines > 226) //LL
     {
-      m_dataUK_S1->push_back(ZVal);
+      m_dataUK_S1.push_back(ZVal);
     }
     if(lines < 280 && lines > 254) //RL
     {
-      m_dataUK_S1->push_back(ZVal);
+      m_dataUK_S1.push_back(ZVal);
     }
     if(lines < 140 && lines > 114) //LL
     {
-      m_dataUSA_S1->push_back(ZVal);
+      m_dataUSA_S1.push_back(ZVal);
     }
     if(lines < 168 && lines > 142) //RL
     {
-      m_dataUSA_S1->push_back(ZVal);
+      m_dataUSA_S1.push_back(ZVal);
     }
     if(lines < 28 && lines > 2) //LL
     {
-      m_dataScand_S1->push_back(ZVal);
+      m_dataScand_S1.push_back(ZVal);
     }
     if(lines < 56 && lines > 30) //RL
     {
-      m_dataScand_S1->push_back(ZVal);
+      m_dataScand_S1.push_back(ZVal);
     }
 
     // **** Upper surface ****
     if(lines < 420 && lines > 394) //LU
     {
-      m_dataJap1_S0->push_back(ZVal);
+      m_dataJap1_S0.push_back(ZVal);
     }
     if(lines < 448 && lines > 422) //RU
     {
-      m_dataJap1_S0->push_back(ZVal);
+      m_dataJap1_S0.push_back(ZVal);
     }
     if(lines < 532 && lines > 506) //LU
     {
-      m_dataJap2_S0->push_back(ZVal);
+      m_dataJap2_S0.push_back(ZVal);
     }
     if(lines < 560 && lines > 534) //RU
     {
-      m_dataJap2_S0->push_back(ZVal);
+      m_dataJap2_S0.push_back(ZVal);
     }
     if(lines < 308 && lines > 282) //LU
     {
-      m_dataUK_S0->push_back(ZVal);
+      m_dataUK_S0.push_back(ZVal);
     }
     if(lines < 336 && lines > 310) //RU
     {
-      m_dataUK_S0->push_back(ZVal);
+      m_dataUK_S0.push_back(ZVal);
     }
     if(lines < 196 && lines > 170) //LU
     {
-      m_dataUSA_S0->push_back(ZVal);
+      m_dataUSA_S0.push_back(ZVal);
     }
     if(lines < 224 && lines > 198) //RU
     {
-      m_dataUSA_S0->push_back(ZVal);
+      m_dataUSA_S0.push_back(ZVal);
     }
     if(lines < 84 && lines > 58) //LU
     {
-      m_dataScand_S0->push_back(ZVal);
+      m_dataScand_S0.push_back(ZVal);
     }
     if(lines < 112 && lines > 86) //RU
     {
-      m_dataScand_S0->push_back(ZVal);
+      m_dataScand_S0.push_back(ZVal);
     }
    
     if ( inputProfile.bad() || inputProfile.eof() ) break;
@@ -544,18 +522,6 @@ int SCT_DistortionsTool::identifyRegion(IdentifierHash id) const
 StatusCode SCT_DistortionsTool::finalize() {
   ATH_MSG_INFO("finalize()");
   
-  delete  m_dataJap1_S0;
-  delete  m_dataJap2_S0;
-  delete  m_dataUK_S0;
-  delete  m_dataUSA_S0;
-  delete  m_dataScand_S0;
-  
-  delete  m_dataJap1_S1;
-  delete  m_dataJap2_S1;
-  delete  m_dataUK_S1;
-  delete  m_dataUSA_S1;
-  delete  m_dataScand_S1;
-
   return StatusCode::SUCCESS;
 }
 
diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h
index 38fbd3be1c0c..aa690e5df5cc 100644
--- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h
+++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_DistortionsTool_H
@@ -62,17 +62,17 @@ class SCT_DistortionsTool : public AthAlgTool, virtual public ISCT_ModuleDistort
 
     std::map<int,int> m_moduleSites;
     
-    std::vector<float>* m_dataJap1_S0;
-    std::vector<float>* m_dataJap2_S0;
-    std::vector<float>* m_dataUK_S0;
-    std::vector<float>* m_dataUSA_S0;
-    std::vector<float>* m_dataScand_S0;
-
-    std::vector<float>* m_dataJap1_S1;
-    std::vector<float>* m_dataJap2_S1;
-    std::vector<float>* m_dataUK_S1;
-    std::vector<float>* m_dataUSA_S1;
-    std::vector<float>* m_dataScand_S1;
+    std::vector<float> m_dataJap1_S0;
+    std::vector<float> m_dataJap2_S0;
+    std::vector<float> m_dataUK_S0;
+    std::vector<float> m_dataUSA_S0;
+    std::vector<float> m_dataScand_S0;
+
+    std::vector<float> m_dataJap1_S1;
+    std::vector<float> m_dataJap2_S1;
+    std::vector<float> m_dataUK_S1;
+    std::vector<float> m_dataUSA_S1;
+    std::vector<float> m_dataScand_S1;
     
     bool loadData();
 
-- 
GitLab


From 91cb4d2a2b8944963e83ac6de3c1b1d9721dbfbe Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 16:34:45 +0200
Subject: [PATCH 145/266] TruthUtils: cmake fix

Missing find_package for HepMC.  Needed because we test HEPMC_FOUND.
---
 Generators/TruthUtils/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Generators/TruthUtils/CMakeLists.txt b/Generators/TruthUtils/CMakeLists.txt
index c2a974305879..e82e414ea1dc 100644
--- a/Generators/TruthUtils/CMakeLists.txt
+++ b/Generators/TruthUtils/CMakeLists.txt
@@ -15,6 +15,7 @@ atlas_depends_on_subdirs(
 find_package( Boost )
 find_package( HEPUtils )
 find_package( MCUtils )
+find_package( HepMC )
 
 # Extra include directories and libraries, based on which externals were found:
 set( extra_includes )
-- 
GitLab


From af2dfa60fb2dcdc85b504f14444fb5f8736c1509 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 16:35:56 +0200
Subject: [PATCH 146/266] ByteStreamCnvSvc: Missing include.

Missing #include of boost/shared_ptr.hpp.
---
 Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
index 4742badea6f5..29802d647e4e 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BYTESTREAMCNVSVC_BYTESTREAMDATAWRITER_H
@@ -19,6 +19,7 @@
 #include "EventStorage/ESCompression.h"
 #include "EventStorage/EventStorageRecords.h"
 #include "EventStorage/FileNameCallback.h"
+#include "boost/shared_ptr.hpp"
 
 
 /** @class ByteStreamDataWriter
-- 
GitLab


From cb2c027e0a02114baacc0a03b606d42a084bba41 Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Thu, 11 Jun 2020 12:57:21 +0900
Subject: [PATCH 147/266] cleanup TgcRoadDefiner

---
 .../TrigL2MuonSA/TgcRoadDefiner.h             |  4 +-
 .../TrigL2MuonSA/src/TgcRoadDefiner.cxx       | 66 ++++++++-----------
 2 files changed, 29 insertions(+), 41 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
index e1e925aaa593..c0ca5911695e 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
@@ -30,15 +30,13 @@ namespace TrigL2MuonSA {
 class TgcRoadDefiner: public AthAlgTool
 {
  public:
-  static const InterfaceID& interfaceID();
-
   TgcRoadDefiner(const std::string& type, 
 		 const std::string& name,
 		 const IInterface*  parent);
 
   ~TgcRoadDefiner()=default;
   
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override;
 
   StatusCode defineRoad(const LVL1::RecMuonRoI*      p_roi,
                         const TrigL2MuonSA::TgcHits& tgcHits,
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
index bd5987d198fb..0b1cce9ab7d1 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
@@ -3,22 +3,15 @@
 */
 
 #include "TrigL2MuonSA/TgcRoadDefiner.h"
+#include "TrigL2MuonSA/MdtRegion.h"
 #include "xAODTrigMuon/L2StandAloneMuonAuxContainer.h"
 #include "xAODTrigMuon/TrigMuonDefs.h"
-#include "CLHEP/Units/PhysicalConstants.h"
-#include "TrigL2MuonSA/MdtRegion.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_TgcRoadDefiner("IID_TgcRoadDefiner", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::TgcRoadDefiner::interfaceID() { return IID_TgcRoadDefiner; }
+#include <cmath>
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
@@ -33,7 +26,6 @@ TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type,
      m_rWidth_TGC_Failed(0),
      m_regionSelector( "RegSelSvc", name )
 {
-  declareInterface<TrigL2MuonSA::TgcRoadDefiner>(this);
 }
 
 // --------------------------------------------------------------------------------
@@ -41,7 +33,6 @@ TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type,
 
 StatusCode TrigL2MuonSA::TgcRoadDefiner::initialize()
 {
-  ATH_MSG_DEBUG("Initializing TgcRoadDefiner - package version " << PACKAGE_VERSION) ;
    
   ATH_CHECK(AthAlgTool::initialize());
 
@@ -67,7 +58,6 @@ void TrigL2MuonSA::TgcRoadDefiner::setMdtGeometry(const ServiceHandle<IRegSelSvc
 void TrigL2MuonSA::TgcRoadDefiner::setRoadWidthForFailure(double rWidth_TGC_Failed)
 {
   m_rWidth_TGC_Failed = rWidth_TGC_Failed;
-  return;
 }
 
 // --------------------------------------------------------------------------------
@@ -76,7 +66,6 @@ void TrigL2MuonSA::TgcRoadDefiner::setRoadWidthForFailure(double rWidth_TGC_Fail
 void TrigL2MuonSA::TgcRoadDefiner::setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator)
 {
   m_backExtrapolatorTool = backExtrapolator;
-  return;
 }
 
 // --------------------------------------------------------------------------------
@@ -96,6 +85,7 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
                                                     TrigL2MuonSA::TgcFitResult&  tgcFitResult)
 {
   const int N_STATION = 10;
+  const int N_LAYER = 8;
 
   bool isMiddleFailure = true;
 
@@ -162,14 +152,14 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     tgcFitResult.isSuccess = true;
     
     // PT calculation by using TGC fit result
-    const double PHI_RANGE = 12./(CLHEP::pi/8.);
+    const double PHI_RANGE = 12./(M_PI/8.);
     side = (tgcFitResult.tgcMid2[3]<=0) ? 0 : 1;
     double alpha = (*m_ptEndcapLUT)->alpha(tgcFitResult.tgcMid1[3], tgcFitResult.tgcMid1[2],
                                         tgcFitResult.tgcMid2[3], tgcFitResult.tgcMid2[2]);
     
-    int Octant = (int)(tgcFitResult.tgcMid1[1] / (CLHEP::pi/4.));
-    double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (CLHEP::pi/4.));
-    if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant;
+    int Octant = (int)(tgcFitResult.tgcMid1[1] / (M_PI/4.));
+    double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (M_PI/4.));
+    if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant;
     
     int phiBin = static_cast<int>(PhiInOctant * PHI_RANGE);
     int etaBin = static_cast<int>((fabs(tgcFitResult.tgcMid1[0]) - 1.)/0.05);
@@ -191,20 +181,20 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
       tgcFitResult.isPhiDir = true;
 
       if( tgcFitResult.tgcMid1[1]*tgcFitResult.tgcMid2[1] < 0
-          && fabsf(tgcFitResult.tgcMid1[1])>CLHEP::pi/2. ) {
+          && fabsf(tgcFitResult.tgcMid1[1])>M_PI/2. ) {
 
         double tmp1 = (tgcFitResult.tgcMid1[1]>0)?
-          tgcFitResult.tgcMid1[1] - CLHEP::pi : tgcFitResult.tgcMid1[1] + CLHEP::pi;
+          tgcFitResult.tgcMid1[1] - M_PI : tgcFitResult.tgcMid1[1] + M_PI;
 
         double tmp2 = (tgcFitResult.tgcMid2[1]>0)?
-          tgcFitResult.tgcMid2[1] - CLHEP::pi : tgcFitResult.tgcMid2[1] + CLHEP::pi;
+          tgcFitResult.tgcMid2[1] - M_PI : tgcFitResult.tgcMid2[1] + M_PI;
 
         double tmp  = (tmp1+tmp2)/2.;
 
         tgcFitResult.dPhidZ = (fabs(tgcFitResult.tgcMid2[3]-tgcFitResult.tgcMid1[3]) > ZERO_LIMIT)?
           (tmp2-tmp1)/fabs(tgcFitResult.tgcMid2[3]-tgcFitResult.tgcMid1[3]): 0;
 
-        tgcFitResult.phi = (tmp>0.)? tmp - CLHEP::pi : tmp + CLHEP::pi;
+        tgcFitResult.phi = (tmp>0.)? tmp - M_PI : tmp + M_PI;
 
       } else {
 
@@ -228,7 +218,7 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     muonRoad.bw[endcap_extra][0]     = tgcFitResult.intercept;
     muonRoad.aw[bee][0]     = tgcFitResult.slope;
     muonRoad.bw[bee][0]     = tgcFitResult.intercept;
-    for (int i_layer=0; i_layer<8; i_layer++) {
+    for (int i_layer=0; i_layer<N_LAYER; i_layer++) {
       muonRoad.rWidth[endcap_middle][i_layer] = R_WIDTH_DEFAULT;
       muonRoad.rWidth[endcap_outer][i_layer] = R_WIDTH_DEFAULT;
       muonRoad.rWidth[endcap_extra][i_layer] = R_WIDTH_DEFAULT;
@@ -239,9 +229,9 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
       muonRoad.aw[endcap_inner][0]  = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3];
       muonRoad.aw[barrel_inner][0]  = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3];
       muonRoad.aw[csc][0]           = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3];
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_DEFAULT;
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_DEFAULT;
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[csc][i_layer]          = R_WIDTH_DEFAULT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_DEFAULT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_DEFAULT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[csc][i_layer]          = R_WIDTH_DEFAULT;
     } else {
       // use the back extrapolator to retrieve the Etain the Innermost
       
@@ -290,9 +280,9 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
         muonRoad.aw[csc][0]          = 0;
       }
       
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_INNER_NO_HIT;
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_INNER_NO_HIT;
-      for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[csc][i_layer]          = R_WIDTH_INNER_NO_HIT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_INNER_NO_HIT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_INNER_NO_HIT;
+      for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[csc][i_layer]          = R_WIDTH_INNER_NO_HIT;
       
     }
     
@@ -321,7 +311,7 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     muonRoad.bw[bee][0]     = 0;
     muonRoad.aw[csc][0]     = aw;
     muonRoad.bw[csc][0]     = 0;
-    for (int i_layer=0; i_layer<8; i_layer++) {
+    for (int i_layer=0; i_layer<N_LAYER; i_layer++) {
       muonRoad.rWidth[endcap_inner][i_layer] = m_rWidth_TGC_Failed;
       muonRoad.rWidth[endcap_middle][i_layer] = m_rWidth_TGC_Failed;
       muonRoad.rWidth[endcap_outer][i_layer] = m_rWidth_TGC_Failed;
@@ -366,17 +356,17 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
   double etaMax =  p_roi->eta()+.02;
   double phiMin = muonRoad.phiMiddle-.01;
   double phiMax = muonRoad.phiMiddle+.01;
-  if(phiMax > CLHEP::pi) phiMax -= CLHEP::pi*2.;
-  if(phiMin < CLHEP::pi*-1) phiMin += CLHEP::pi*2.;
+  if(phiMax > M_PI) phiMax -= M_PI*2.;
+  if(phiMin < M_PI*-1) phiMin += M_PI*2.;
   TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); 
   const IRoiDescriptor* iroi = (IRoiDescriptor*) roi;
   if (iroi) m_regionSelector->DetHashIDList(MDT, *iroi, mdtHashList);
   else m_regionSelector->DetHashIDList(MDT, mdtHashList);
   if(roi) delete roi;
   
-  for(int i_hash=0; i_hash<(int)mdtHashList.size(); i_hash++){
+  for(const IdentifierHash& i_hash : mdtHashList ){
     Identifier id;
-    int convert = m_idHelperSvc->mdtIdHelper().get_id(mdtHashList[i_hash], id, &context);
+    int convert = m_idHelperSvc->mdtIdHelper().get_id(i_hash, id, &context);
 
     if(convert!=0) ATH_MSG_ERROR("problem converting hash list to id");
 
@@ -385,11 +375,11 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     if ( name.substr(0, 1) == 'B' ) continue;
     if ( name.substr(1, 1) != 'M' ) continue;
     int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id);
-    float floatPhi = (stationPhi-1)*CLHEP::pi/4;
-    if (name[2]=='S' || name[2]=='E') floatPhi = floatPhi + CLHEP::pi/8;
+    float floatPhi = (stationPhi-1)*M_PI/4;
+    if (name[2]=='S' || name[2]=='E') floatPhi = floatPhi + M_PI/8;
     tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle);
-    if (phiMiddle<0) tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle-2*CLHEP::pi);
-    if(tempDeltaPhi > CLHEP::pi) tempDeltaPhi = fabs(tempDeltaPhi - 2*CLHEP::pi);
+    if (phiMiddle<0) tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle-2*M_PI);
+    if(tempDeltaPhi > M_PI) tempDeltaPhi = fabs(tempDeltaPhi - 2*M_PI);
     
     int LargeSmall = 0;
     if(name[2]=='S' || name[2]=='E') LargeSmall = 1;
@@ -451,7 +441,7 @@ bool TrigL2MuonSA::TgcRoadDefiner::prepareTgcPoints(const TrigL2MuonSA::TgcHits&
       {
          w *= hit.r * hit.r;
          double phi = hit.phi;
-         if( phi < 0 && ( (CLHEP::pi+phi)<PHI_BOUNDARY) ) phi += CLHEP::pi*2;
+         if( phi < 0 && ( (M_PI+phi)<PHI_BOUNDARY) ) phi += M_PI*2;
          if      ( hit.sta < 3 ) { m_tgcStripMidPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); }
          else if ( hit.sta ==3 ) { m_tgcStripInnPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); }
       }
-- 
GitLab


From bc01ff12c499b6f6b041557552716b9eea1dcd48 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 16:36:19 +0200
Subject: [PATCH 148/266] InDetIdentifier: Adjust for change in boost header.

boost/test/output_test_stream.hpp moved to boost/test/tools/output_test_stream.hpp.
---
 .../InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx b/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
index 68068a95e713..b06eb5c04b5f 100644
--- a/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
+++ b/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
@@ -20,7 +20,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#include <boost/test/output_test_stream.hpp>
+#include <boost/test/tools/output_test_stream.hpp>
 #include <iostream>
 #include <algorithm>
 
-- 
GitLab


From e4e98aadbc3bd74b09ea9ca624f8d0c0965c0e5f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:48:08 +0200
Subject: [PATCH 149/266] MuonPRDTest: Fix clang warnings.

Unused variables.
---
 .../MuonValidation/MuonPRDTest/src/sTGCDigitVariables.cxx        | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCDigitVariables.cxx b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCDigitVariables.cxx
index 256fceb14b03..41dd7c70d35b 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCDigitVariables.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCDigitVariables.cxx
@@ -75,7 +75,6 @@ StatusCode sTGCDigitVariables::fillVariables(const MuonGM::MuonDetectorManager*
       const MuonGM::sTgcReadoutElement* rdoEl = MuonDetMgr->getsTgcRElement_fromIdFields(isSmall, stationEta, stationPhi, multiplet);
       if (!rdoEl) throw std::runtime_error(Form("File: %s, Line: %d\nsTGCDigitVariables::fillVariables() - Failed to retrieve sTgcReadoutElement for isSmall=%d, stationEta=%d, stationPhi=%d, multiplet=%d", __FILE__, __LINE__, isSmall, stationEta, stationPhi, multiplet));
       int channelNumber = 0;
-      const Identifier phiId, etaId;
       Amg::Vector3D gpos(0.,0.,0.);
       Amg::Vector2D lpos(0.,0.);
 
-- 
GitLab


From b0da2da6472d22c2a30c128e660fcdb58efadfcd Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:48:27 +0200
Subject: [PATCH 150/266] MuonCondTool: Fix clang warnings.

Unused variables.
---
 .../MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
index b77663f0408f..1e63dc317b36 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
@@ -199,7 +199,6 @@ StatusCode CSC_DCSConditionsTool::loadchamber(IOVSVC_CALLBACK_ARGS_P(I,keys)) {
   ATH_MSG_INFO(" CondAttrListCollection from DB folder have been obtained with size "<< atrc->size());
   
   CondAttrListCollection::const_iterator itr;
-  Identifier ChamberId;
   
   std::map<Identifier,int>::const_iterator it;
 
-- 
GitLab


From c1443ffd05823ae92cf28140a44cd3cbab85e9d6 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:48:45 +0200
Subject: [PATCH 151/266] MdtVsRpcRawDataMonitoring: Fix clang warnings.

Unused variables.
---
 .../MdtVsRpcRawDataMonitoring/src/MdtVsRpcRawDataValAlg.cxx     | 2 --
 1 file changed, 2 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsRpcRawDataMonitoring/src/MdtVsRpcRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsRpcRawDataMonitoring/src/MdtVsRpcRawDataValAlg.cxx
index 76b8d94fe642..39d41556d25c 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsRpcRawDataMonitoring/src/MdtVsRpcRawDataValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtVsRpcRawDataMonitoring/src/MdtVsRpcRawDataValAlg.cxx
@@ -119,7 +119,6 @@ StatusCode MdtVsRpcRawDataValAlg::fillHistograms()
   
     //mdt stuff begin     
     int nPrdmdt  = 0;
-    Identifier ch_idmdt;
     Identifier dig_idmdt;
   
     SG::ReadHandle<Muon::MdtPrepDataContainer> mdt_container(m_key_mdt);
@@ -136,7 +135,6 @@ StatusCode MdtVsRpcRawDataValAlg::fillHistograms()
   
   
     int nPrd = 0;
-    Identifier ch_id;
     Identifier dig_id;
   
     std::string type="RPC";
-- 
GitLab


From 05696d845bfa6fcab38dd56c88b80660b4b155fe Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:49:04 +0200
Subject: [PATCH 152/266] MuonRPC_Cabling: Fix clang warnings.

Unused variables.
---
 .../MuonCablings/MuonRPC_Cabling/src/MuonRpcCablingTest.cxx      | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/MuonRpcCablingTest.cxx b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/MuonRpcCablingTest.cxx
index 9155ef257af1..e756214f3133 100755
--- a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/MuonRpcCablingTest.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/MuonRpcCablingTest.cxx
@@ -65,7 +65,6 @@ MuonRpcCablingTest::execute()
         return StatusCode::FAILURE;
     }
 
-    IdentifierHash Idhash;
     IdContext rpcModuleContext = m_idHelperSvc->rpcIdHelper().module_context();
 
     // this is the right thing to do !!!!!!!
-- 
GitLab


From 09a2a770a6de4d32e624f48ecb5e9b53f4413cf9 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:49:22 +0200
Subject: [PATCH 153/266] InDetPerformanceRTT: Fix clang warnings.

Unused variables.
---
 .../InDetPerformanceRTT/src/IDStandardPerformance.cxx           | 2 --
 1 file changed, 2 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
index 8ce4c712c7fa..db417ba12db8 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
@@ -4158,8 +4158,6 @@ void IDStandardPerformance::MakeHitPlots(const DataVector<Trk::Track>* trks){
 	  }
 	  */
 
-	  Identifier TrkSurfaceID;
-
 
 	  //iterate over pixel hits on tracks
 	  //make vectors of eta, phi and disk layer coord. of hits
-- 
GitLab


From a10292796f404ba90883ee1095e4802ffd7ecaaa Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 10 Jun 2020 16:49:40 +0200
Subject: [PATCH 154/266] MuonCSC_CnvTools: Fix clang warnings.

Unused variables.
---
 .../MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
index 7abce82cec54..491c012bfd3a 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /// Author: Ketevi A. Assamagan, Woochun Park
@@ -333,9 +333,7 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(const CscRawDataContainer* rdoConta
   std::vector<uint16_t> samples;
   samples.reserve(4);
 
-  Identifier oldId;
   IdentifierHash cscHashId;
-  Identifier stationId;
   for (; rdoColl!=lastRdoColl; ++rdoColl) {
     if ( (*rdoColl)->size() > 0 ) {
       ATH_MSG_DEBUG ( " Number of RawData in this rdo " << (*rdoColl)->size() );
-- 
GitLab


From b1b0e669b6fbe02f441b858c7d8e1291e191d908 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 17:04:40 +0200
Subject: [PATCH 155/266] InDetTrigAmbiguitySolver: Complain about
 misconfigured MT jobs.

The thread-safety checker was not properly checking calls to virtual functions.
When that is fixed, we get a warning about the call to
IPRDtoTrackMapExchange::setPRDtoTrackMap.

This is indeed not thread safe, and is supposed to be used only for
backwards compatibility with run 2.

To resolve this, split out the non-thread-safe part into a separate function.
We suppress the thread-safety checker warning in the call to it,
but we also explicitly check and fail the job if we're running
such a run 2 configuration with more than one thread.
---
 .../InDetTrigAmbiguitySolver.h                |  6 ++++-
 .../src/InDetTrigAmbiguitySolver.cxx          | 24 +++++++++++++++++--
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver.h
index 5e061cd94e3d..961405c69c57 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver/InDetTrigAmbiguitySolver.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////
@@ -27,6 +27,7 @@
 #include "TrkTrack/TrackCollection.h"
 #include "TrkToolInterfaces/IPRDtoTrackMapTool.h"
 #include "TrkToolInterfaces/IPRDtoTrackMapExchangeTool.h"
+#include "CxxUtils/checker_macros.h"
 
 namespace Trk { class ITrackAmbiguityProcessorTool; }
 
@@ -49,6 +50,9 @@ namespace InDet {
     HLT::ErrorCode hltFinalize();
 
   private:
+    HLT::ErrorCode savePRDtoTrackMap ATLAS_NOT_THREAD_SAFE
+      (std::unique_ptr<Trk::PRDtoTrackMap> map);
+
     bool                    m_resolveTracks;     //!whether to resolve tracks, defaults to true
     const TrackCollection  *m_oldTracks;
     TrackCollection        *m_tracks;
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
index 3a3dc379f329..10d93241c842 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "AthenaKernel/Timeout.h"
@@ -166,7 +166,11 @@ HLT::ErrorCode InDetTrigAmbiguitySolver::hltExecute(const HLT::TriggerElement*,
     if (m_assoTool.isEnabled()) {
        std::unique_ptr<Trk::PRDtoTrackMap> tmp( m_assoTool->reduceToStorableMap(std::move(prd_to_track_map)));
        if (m_prdToTrackMapExchange.isEnabled()) {
-          m_prdToTrackMapExchange->setPRDtoTrackMap(tmp.release());
+         HLT::ErrorCode code ATLAS_THREAD_SAFE =
+           savePRDtoTrackMap (std::move (tmp));
+         if (code != HLT::OK) {
+           return code;
+         }
        }
        else {
           if ( HLT::OK !=  attachFeature(outputTE, tmp.release(), m_outputPRDMapLabel) ) {
@@ -240,3 +244,19 @@ HLT::ErrorCode InDetTrigAmbiguitySolver::hltFinalize() {
   return HLT::OK;
 }
 //--------------------------------------------------------------------
+
+// Broken out as a separate function to avoid thread-safety checker warnings.
+HLT::ErrorCode InDetTrigAmbiguitySolver::savePRDtoTrackMap ATLAS_NOT_THREAD_SAFE
+  (std::unique_ptr<Trk::PRDtoTrackMap> map)
+{
+  const EventContext& ctx = Gaudi::Hive::currentContext();
+  if (ctx.slot() > 0) {
+    msg() << MSG::ERROR << "InDetTrigAmbiguitySolver was configured to use PRDtoTrackMapTool.  This Run2 configuration is not compatible with MT running."
+          << endmsg;
+    return HLT::BAD_ALGO_CONFIG;
+  }
+
+  m_prdToTrackMapExchange->setPRDtoTrackMap (map.release());
+  return HLT::OK;
+}
+
-- 
GitLab


From fdad1b9c3e7ec08e80f8036050f30a2c33433901 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 10 Jun 2020 17:05:30 +0200
Subject: [PATCH 156/266] CaloCondPhysAlgs: Migrate LArMinBiasAlg to LArMCSym.

Migrate LArMinBiasAlg from the obsolete LArMCSymTool to the
LArMCSym conditions object.

Needed to avoid warings from the thread-safety checker.
---
 Calorimeter/CaloCondPhysAlgs/CMakeLists.txt      |  3 ++-
 .../share/LArMinBiasAlg_jobOptions.py            |  3 +++
 .../CaloCondPhysAlgs/src/LArMinBiasAlg.cxx       | 16 +++++++++-------
 Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h |  7 ++++---
 4 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
index 51d446b0f6ab..2a7b7ca629b8 100644
--- a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
+++ b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
@@ -21,6 +21,7 @@ atlas_depends_on_subdirs( PUBLIC
                           LArCalorimeter/LArIdentifier
                           LArCalorimeter/LArRecUtils
                           LArCalorimeter/LArTools
+                          LArCalorimeter/LArRawConditions
                           Trigger/TrigAnalysis/TrigDecisionTool
                           PRIVATE
                           Calorimeter/CaloConditions
@@ -46,7 +47,7 @@ atlas_add_component( CaloCondPhysAlgs
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloDetDescrLib CaloGeoHelpers 
-		     CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier TrigDecisionToolLib 
+		     CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier TrigDecisionToolLib LArRawConditions
 		     CaloConditions CaloEvent CaloUtilsLib AthenaPoolUtilities Identifier xAODEventInfo LArHV LArReadoutGeometry LArSimEvent CxxUtils)
 
 # Install files from the package:
diff --git a/Calorimeter/CaloCondPhysAlgs/share/LArMinBiasAlg_jobOptions.py b/Calorimeter/CaloCondPhysAlgs/share/LArMinBiasAlg_jobOptions.py
index 9dd71c33fc0f..97d31e34f095 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/LArMinBiasAlg_jobOptions.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/LArMinBiasAlg_jobOptions.py
@@ -61,6 +61,9 @@ include( "LArDetDescr/LArDetDescr_joboptions.py" )
 include("TileConditions/TileConditions_jobOptions.py" )
 include("LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py")
 
+from LArRecUtils.LArMCSymCondAlg import LArMCSymCondAlgDefault
+LArMCSymCondAlgDefault()
+
 from CaloCondPhysAlgs.CaloCondPhysAlgsConf import LArMinBiasAlg
 larMinBiasAlg = LArMinBiasAlg()
 larMinBiasAlg.datasetID_lowPt =119995
diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
index 5236823be771..d634db31e2d0 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArMinBiasAlg.h"
@@ -20,7 +20,6 @@
   //Constructor
   LArMinBiasAlg:: LArMinBiasAlg(const std::string& name, ISvcLocator* pSvcLocator):
     AthAlgorithm(name,pSvcLocator),
-    m_larmcsym("LArMCSymTool"),
     m_datasetID_lowPt(119995),
     m_datasetID_highPt(119996),
     m_weight_lowPt(39.8606),
@@ -76,7 +75,7 @@
 //  retrieve CaloDetDescrMgr 
     ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) );
 
-    ATH_CHECK(m_larmcsym.retrieve());
+    ATH_CHECK(m_mcSymKey.initialize());
 
     ATH_CHECK(m_cablingKey.initialize());
 
@@ -112,9 +111,12 @@
     
     ATH_MSG_DEBUG(" LArMinBiasAlg execute()");
 
+    const EventContext& ctx = Gaudi::Hive::currentContext();
+
     if (m_first) {
 
-      SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+      SG::ReadCondHandle<LArMCSym>  mcsym      (m_mcSymKey, ctx);
+      SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl (m_cablingKey, ctx);
       const LArOnOffIdMapping* cabling{*cablingHdl};
       if(!cabling) {
          ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() );
@@ -140,14 +142,14 @@
         IdentifierHash idHash=i;
         Identifier id=m_calo_id->cell_id(idHash);
         if (m_calo_id->is_tile(id)) continue;
-        // convert cell id to symetric identifier
-        HWIdentifier hwid2=m_larmcsym->symOnline(id);
+        // convert cell id to symmetric identifier
+        HWIdentifier hwid2 = mcsym->ZPhiSymOfl(id);
         Identifier id2 = cabling->cnvToIdentifier(hwid2);
         int i2 = (int) (m_calo_id->calo_cell_hash(id2));
         if(i2>=m_ncell) {
            ATH_MSG_WARNING("problem: i2: "<<i2<<" for id: "<<m_calo_id->print_to_string(id)<<" symmetrized: "<<m_calo_id->print_to_string(id2));
         }
-        // we have already processed this hash => just need to associate cell i to the same symetric cell
+        // we have already processed this hash => just need to associate cell i to the same symmetric cell
         if (doneCell[i2]>=0) {
            m_symCellIndex[i]=doneCell[i2];
         }
diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h
index 0a8e3fc737fe..2038ccd85de6 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h
+++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // TheLArMinBiasAlg.h
@@ -22,9 +22,9 @@
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "CaloDetDescr/CaloDetDescrManager.h"
 
-#include "LArElecCalib/ILArMCSymTool.h"
 #include "LArElecCalib/ILArMinBias.h"
 #include "LArCabling/LArOnOffIdMapping.h"
+#include "LArRawConditions/LArMCSym.h"
 
 #include "GaudiKernel/ITHistSvc.h"
 #include "TTree.h"
@@ -56,11 +56,12 @@
   //---------------------------------------------------
   // Member variables
   //---------------------------------------------------
-  ToolHandle<ILArMCSymTool>  m_larmcsym;
   int m_datasetID_lowPt;
   int m_datasetID_highPt;
   double m_weight_lowPt;
   double m_weight_highPt;
+  SG::ReadCondHandleKey<LArMCSym> m_mcSymKey
+  { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" };
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
 
   const CaloDetDescrManager* m_calodetdescrmgr = nullptr;
-- 
GitLab


From 3956809e574d46a717c5692ba7287cc86d26abe5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Ma=C5=A1=C3=ADk?=
 <Jiri.Masik@manchester.ac.uk>
Date: Thu, 11 Jun 2020 06:52:02 +0200
Subject: [PATCH 157/266] protect switching off the transient bytestream to
 pool input only add extra folders to the configuration of TRT condditions alg

---
 .../python/InDetTrigConfigConditions.py              | 12 ++++++++++++
 .../python/InDetTrigConfigRecPreProcessing.py        |  8 +++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
index f3f7f6e0025b..81194c479fc7 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
@@ -638,6 +638,18 @@ class TRTConditionsServicesSetup:
     if not conddb.folderRequested('/TRT/Cond/StatusHT'):
       conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer')
 
+    #these conditions were instantiated together with specific tools using them in InDetTrigRecLoadTools
+    #now required for the condAlg
+    if not (conddb.folderRequested("/TRT/Calib/PID_vector") or \
+            conddb.folderRequested("/TRT/Onl/Calib/PID_vector")):
+      conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/PID_vector","/TRT/Calib/PID_vector",className='CondAttrListVec')
+    if not (conddb.folderRequested("/TRT/Calib/ToT/ToTVectors") or \
+            conddb.folderRequested("/TRT/Onl/Calib/ToT/ToTVectors")):
+      conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToT/ToTVectors","/TRT/Calib/ToT/ToTVectors",className='CondAttrListVec')
+    if not (conddb.folderRequested("/TRT/Calib/ToT/ToTValue") or \
+            conddb.folderRequested("/TRT/Onl/Calib/ToT/ToTValue")):
+      conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToT/ToTValue","/TRT/Calib/ToT/ToTValue",className='CondAttrListCollection')
+
     # Straw status tool (now private, cannot be passed by name)
     from InDetTrigRecExample.InDetTrigCommonTools import InDetTrigTRTStrawStatusSummaryTool
     
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
index 655254ca3dd1..034793ce737d 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
@@ -21,7 +21,8 @@ EF_PixRDOKey="PixelRDOs_EF"
 EF_SCTRDOKey="SCT_RDOs_EF"
 EF_TRTRDOKey="TRT_RDOs_TRIG"
 from TriggerJobOpts.TriggerFlags import TriggerFlags
-if not TriggerFlags.doTransientByteStream():
+from AthenaCommon.GlobalFlags import globalflags
+if globalflags.InputFormat == 'pool' and not TriggerFlags.doTransientByteStream():
    EF_PixRDOKey="PixelRDOs"
 
 
@@ -45,7 +46,7 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
 
       from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder
       InDetTrigPixelRodDecoder = PixelRodDecoder(name = "InDetTrigPixelRodDecoder")
-      #InDetTrigPixelRodDecoder.OutputLevel=2
+      #InDetTrigPixelRodDecoder.OutputLevel=1
       # Disable duplcated pixel check for data15 because duplication mechanism was used.
       from RecExConfig.RecFlags import rec
       if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
@@ -100,7 +101,8 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
       self.clusteringTool          = InDetTrigMergedPixelsTool
       self.gangedAmbiguitiesFinder = InDetTrigPixelGangedAmbiguitiesFinder
       self.Pixel_RDOContainerName  = EF_PixRDOKey
-      self.skipBSDecoding = not TriggerFlags.doTransientByteStream() 
+      from AthenaCommon.GlobalFlags import globalflags
+      self.skipBSDecoding = globalflags.InputFormat == 'pool' and not TriggerFlags.doTransientByteStream()
       
       from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
       self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
-- 
GitLab


From 4d6944c146d0c8f0807fa7f0bb78269e1792bd30 Mon Sep 17 00:00:00 2001
From: Sanya Solodkov <sanya.solodkov@cern.ch>
Date: Thu, 11 Jun 2020 06:09:06 +0000
Subject: [PATCH 158/266] Cleanup of python scripts in TileCalibBlobPython and
 TileCoolDcs

---
 .../python/TileBchTools.py                    |  18 +-
 .../python/TileCalibDefaultWriter.py          |  11 +-
 .../python/TileCalibTools.py                  | 142 ++---
 .../python/TileCellTools.py                   |   5 +
 .../python/TileCoolCommentsReader.py          |   5 -
 .../TileCalibBlobPython/share/BchCleanup.py   | 576 +++++++++---------
 .../share/CheckTagAssociation.py              |  14 +-
 .../share/Example_ReadSampleNoise.py          |   2 -
 .../share/PlotCalibFromCool.py                | 139 +++--
 .../share/PlotPulseshapeFromCool.py           |   6 +-
 .../share/ReadBadBitsFromCool.py              |   1 -
 .../share/ReadBchFromCool.py                  |  33 +-
 .../share/ReadCalibFromCool.py                |  33 +-
 .../share/ReadCellNoiseFromCool.py            |  50 +-
 .../share/ReadCellNoiseFromCoolCompare.py     |  90 +--
 .../share/ReadFloatFromCool.py                |   1 -
 .../share/ReadFromCoolCompare.py              |  15 +-
 .../share/ReadLUTFromCool.py                  |   1 -
 .../share/ReadNoiseFromCool.py                |   1 -
 .../share/ReadOfcFromCool.py                  |   1 -
 .../share/ReadTripsProbsFromCool.py           |   1 -
 .../TileCalibBlobPython_badChannelExample.py  |   2 -
 .../TileCalibBlobPython_writeBchFromASCII.py  |  10 +-
 .../share/TileCalibBlobPython_writeBchM7.py   |  19 +-
 .../TileCalibBlobPython_writeBchOnlM8.py      |  47 +-
 .../TileCalibBlobPython_writeDefaultCs.py     |   1 -
 ...ileCalibBlobPython_writeDefaultOnlNoise.py |   1 -
 .../TileCalibBlobPython_writeDefaults.py      |   1 -
 ...bBlobPython_writeMuonReceiverPulseShape.py |   1 -
 .../share/TileCalibBlobPython_writeOfc.py     |   1 -
 ...ileCalibBlobPython_writeTimingFromASCII.py |   4 +-
 ...alibBlobPython_writeTripsProbsFromASCII.py |   4 -
 .../share/TileSynchronizeBch.py               |   1 -
 .../share/TileSynchronizeOnlBchWithOfl.py     |   1 -
 .../share/WriteBchToCool.py                   |   2 +-
 .../share/maskDeadModules.py                  |  22 +-
 .../share/testcurrent_tag.py                  |   2 +-
 .../TileCoolDcs/python/TileDCSDataGrabber.py  |   2 -
 .../TileCoolDcs/python/TileDCSDataInfo.py     |  26 +-
 .../share/checkCoolLatestUpdate.py            |   1 -
 40 files changed, 628 insertions(+), 665 deletions(-)
 delete mode 100644 TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py

diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
index e41cd2b3931a..1d9801e2fbc1 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
@@ -4,10 +4,8 @@
 # TileBchTools.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-12-17
 #
-#
-# Edition:
-# Andrey Kamenshchikov, 23-10-2013 (akamensh@cern.ch)
-# Yuri Smirnov, 24-12-2014 (iouri.smirnov@cern.ch)
+# Andrey Kamenshchikov <akamensh@cern.ch>, 2013-10-23
+# Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
 ################################################################
 """
 Python module for managing TileCal ADC status words.
@@ -504,13 +502,13 @@ class TileBchMgr(TileCalibLogger):
                             drawer.setData(chn,2,0, chBits)
                             #=== synchronizing channel status in low and high gain
                             if wordsLo[0] != chBits:
-                               self.log().info("Drawer %s ch %2d - sync LG status with HG ", modName,chn)
-                               status = TileBchStatus( bchDecoder.decode(chBits,loBits) )
-                               self.setAdcStatus(ros,mod,chn,0,status)
+                                self.log().info("Drawer %s ch %2d - sync LG status with HG ", modName,chn)
+                                status = TileBchStatus( bchDecoder.decode(chBits,loBits) )
+                                self.setAdcStatus(ros,mod,chn,0,status)
                             if wordsHi[0] != chBits:
-                               self.log().info("Drawer %s ch %2d - sync HG status with LG ", modName,chn)
-                               status = TileBchStatus( bchDecoder.decode(chBits,hiBits) )
-                               self.setAdcStatus(ros,mod,chn,1,status)
+                                self.log().info("Drawer %s ch %2d - sync HG status with LG ", modName,chn)
+                                status = TileBchStatus( bchDecoder.decode(chBits,hiBits) )
+                                self.setAdcStatus(ros,mod,chn,1,status)
 
         #=== register
         if nUpdates>0 or moduleList==['CMT']:
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
index 0bb4b2433d1f..91ef871d7b77 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
@@ -3,9 +3,11 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # TileCalibDefaultWriter.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-23
-# modified Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-09
-# modified Guilherme Lima <jlima@cernNOSPAM.ch>, 2013-07-30 - changes to default Cs conditions
-# modified Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24 - PyCintex->cppyy for ROOT6
+#
+# Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-09
+# Guilherme Lima <jlima@cernNOSPAM.ch>, 2013-07-30 - changes to default Cs conditions
+# Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24 - PyCintex->cppyy for ROOT6
+################################################################
 """
 Python helper module for initializing db with default values
 Note the COOL channels for default values:
@@ -1088,7 +1090,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 folderTag = TileCalibUtils.getFullTag(folder, tag) if multiVers else ""
                 blobWriter.register((MINRUN,MINLBK),(MAXRUN,MAXLBK),folderTag)
             except Exception as e:
-               self.log().critical( e )
+                self.log().critical( e )
 
 
     #____________________________________________________________________
@@ -1535,4 +1537,3 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
         #=== register in DB
         writer.register((MINRUN,MINLBK),(MAXRUN,MAXLBK), "")
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
index e1167b7bb99f..9f2d9724d95d 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
@@ -3,8 +3,9 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # TileCalibTools.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-23
+#
 # Carlos Solans <carlos.solans@cern.ch>, 2012-10-19
-# Andrey Kamenshchikov <akamensh@cern.ch>, 23-10-2013
+# Andrey Kamenshchikov <akamensh@cern.ch>, 2013-10-23
 # Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
 ################################################################
 """
@@ -201,7 +202,7 @@ def openDb(db, instance, mode="READONLY",schema="COOLONL_TILE",sqlfn="tileSqlite
         connStr="sqlite://X;schema=%s;dbname=%s" % (sqlfn,instance)
     elif db=='ORACLE':
         connStr='oracle://%s;schema=ATLAS_%s;dbname=%s' % ('ATLAS_COOLPROD',schema,instance)
-#        connStr=schema+'/'+instance
+        #connStr=schema+'/'+instance
 
     return openDbConn(connStr, mode)
 
@@ -213,8 +214,8 @@ def openDbConn(connStr, mode="READONLY"):
     - connStr: The DB connection string.
     - mode: Can be READONLY (default), RECREATE or UPDATE
     """
-# split the name into schema and dbinstance
 
+    #=== split the name into schema and dbinstance
     splitname=connStr.split('/')
     if (len(splitname)!=2):  # string connection ready to be used as it is
         connStr_new=connStr
@@ -344,16 +345,16 @@ def getFolderTag(db, folderPath, globalTag):
             if 'OFLP200' in db or 'MC' in db:
                 schema='COOLOFL_TILE/OFLP200'
                 if not globalTag.startswith("OFLCOND"):
-                   if globalTag.startswith("RUN"):
-                      globalTag='OFLCOND-'+globalTag
-                      log.info("Using Simulation global tag \'%s\'", globalTag)
+                    if globalTag.startswith("RUN"):
+                        globalTag='OFLCOND-'+globalTag
+                        log.info("Using Simulation global tag \'%s\'", globalTag)
             elif 'COMP200' in db or 'RUN1' in db:
                 schema='COOLOFL_TILE/COMP200'
                 if globalTag!='UPD1' and globalTag!='UPD4' and ('UPD1' in globalTag or 'UPD4' in globalTag or 'COND' not in globalTag):
-                   log.info("Using suffix \'%s\' as it is", globalTag)
+                    log.info("Using suffix \'%s\' as it is", globalTag)
                 else:
-                   globalTag='COMCOND-BLKPA-RUN1-06'
-                   log.info("Using RUN1 global tag \'%s\'", globalTag)
+                    globalTag='COMCOND-BLKPA-RUN1-06'
+                    log.info("Using RUN1 global tag \'%s\'", globalTag)
         if schema == 'COOLOFL_TILE/CONDBR2':
             if globalTag=='CURRENT' or globalTag=='UPD4' or globalTag=='':
                 globalTag=resolveAlias.getCurrent()
@@ -770,36 +771,36 @@ class TileBlobReader(TileCalibLogger):
         Returns a default drawer number (among first 20 COOL channels) for any drawer in any partition
         """
         if ros==0:
-           if drawer<=4 or drawer==12 or drawer>=20:
-              drawer1=0
-           elif drawer<12:
-              drawer1=4
-           else:
-              drawer1=12
+            if drawer<=4 or drawer==12 or drawer>=20:
+                drawer1=0
+            elif drawer<12:
+                drawer1=4
+            else:
+                drawer1=12
         elif ros==1 or ros==2:
-           drawer1=4
+            drawer1=4
         elif ros==3:
-           OffsetEBA = [ 0, 0, 0, 0, 0, 0, 3, 2, #// Merged E+1: EBA07; Outer MBTS: EBA08
-                         0, 0, 0, 0, 7, 6, 5, 7, #// D+4: EBA13, EBA16; Special D+4: EBA14; Special D+40: EBA15
-                         7, 6, 6, 7, 0, 0, 0, 2, #// D+4: EBA17, EBA20; Special D+4: EBA18, EBA19; Outer MBTS: EBA24
-                         3, 0, 0, 0, 0, 0, 0, 0, #// Merged E+1:  EBA25
-                         0, 0, 0, 0, 0, 0, 1, 1, #// Inner MBTS + special C+10: EBA39, EBA40
-                         1, 1, 2, 3, 0, 0, 0, 0, #// Inner MBTS + special C+10: EBA41, EBA42; Outer MBTS: EBA43; Merged E+1: EBA44
-                         0, 0, 0, 0, 3, 2, 1, 1, #// Merged E+1: EBA53; Outer MBTS: EBA54; Inner MBTS + special C+10: EBA55, EBA56
-                         1, 1, 0, 0, 0, 0, 0, 0] #// Inner MBTS + special C+10: EBA57, EBA58
-           drawer1 = 12 + OffsetEBA[drawer]
+            OffsetEBA = [ 0, 0, 0, 0, 0, 0, 3, 2, #// Merged E+1: EBA07; Outer MBTS: EBA08
+                          0, 0, 0, 0, 7, 6, 5, 7, #// D+4: EBA13, EBA16; Special D+4: EBA14; Special D+40: EBA15
+                          7, 6, 6, 7, 0, 0, 0, 2, #// D+4: EBA17, EBA20; Special D+4: EBA18, EBA19; Outer MBTS: EBA24
+                          3, 0, 0, 0, 0, 0, 0, 0, #// Merged E+1:  EBA25
+                          0, 0, 0, 0, 0, 0, 1, 1, #// Inner MBTS + special C+10: EBA39, EBA40
+                          1, 1, 2, 3, 0, 0, 0, 0, #// Inner MBTS + special C+10: EBA41, EBA42; Outer MBTS: EBA43; Merged E+1: EBA44
+                          0, 0, 0, 0, 3, 2, 1, 1, #// Merged E+1: EBA53; Outer MBTS: EBA54; Inner MBTS + special C+10: EBA55, EBA56
+                          1, 1, 0, 0, 0, 0, 0, 0] #// Inner MBTS + special C+10: EBA57, EBA58
+            drawer1 = 12 + OffsetEBA[drawer]
         elif ros==4:
-           OffsetEBC = [ 0, 0, 0, 0, 0, 0, 3, 2, #// Merged E-1: EBC07; Outer MBTS: EBC08
-                         0, 0, 0, 0, 7, 6, 6, 7, # // D-4: EBC13, EBC16; Special D-4: EBC14, EBC15;
-                         7, 5, 6, 7, 0, 0, 0, 2, #// D-4: EBC17, EBC20; Special D-40 EBC18; Special D-4: EBC19; Outer MBTS: EBC24
-                         3, 0, 0, 3, 4, 0, 3, 4, #// Merged E-1:  EBC25, EBC28, EBC31; E-4': EBC29, EBC32
-                         0, 4, 3, 0, 4, 3, 1, 1, #// E-4': EBC34, EBC37; Merged E-1: EBC35, EBC38; Inner MBTS + special C-10: EBC39, EBC40
-                         1, 1, 2, 3, 0, 0, 0, 0, #// Inner MBTS + special C-10: EBC41, EBC42; Outer MBTS: EBC43; Merged E-1: EBC44
-                         0, 0, 0, 0, 3, 2, 1, 1, #// Merged E-1: EBC53; Outer MBTS: EBC54; Inner MBTS + special C-10: EBC55, EBC56
-                         1, 1, 0, 0, 0, 0, 0, 0] #// Inner MBTS + special C-10: EBC57, EBC58
-           drawer1 = 12 + OffsetEBC[drawer]
+            OffsetEBC = [ 0, 0, 0, 0, 0, 0, 3, 2, #// Merged E-1: EBC07; Outer MBTS: EBC08
+                          0, 0, 0, 0, 7, 6, 6, 7, # // D-4: EBC13, EBC16; Special D-4: EBC14, EBC15;
+                          7, 5, 6, 7, 0, 0, 0, 2, #// D-4: EBC17, EBC20; Special D-40 EBC18; Special D-4: EBC19; Outer MBTS: EBC24
+                          3, 0, 0, 3, 4, 0, 3, 4, #// Merged E-1:  EBC25, EBC28, EBC31; E-4': EBC29, EBC32
+                          0, 4, 3, 0, 4, 3, 1, 1, #// E-4': EBC34, EBC37; Merged E-1: EBC35, EBC38; Inner MBTS + special C-10: EBC39, EBC40
+                          1, 1, 2, 3, 0, 0, 0, 0, #// Inner MBTS + special C-10: EBC41, EBC42; Outer MBTS: EBC43; Merged E-1: EBC44
+                          0, 0, 0, 0, 3, 2, 1, 1, #// Merged E-1: EBC53; Outer MBTS: EBC54; Inner MBTS + special C-10: EBC55, EBC56
+                          1, 1, 0, 0, 0, 0, 0, 0] #// Inner MBTS + special C-10: EBC57, EBC58
+            drawer1 = 12 + OffsetEBC[drawer]
         else:
-           drawer1=0
+            drawer1=0
 
         return (0,drawer1)
 
@@ -1272,57 +1273,57 @@ class TileASCIIParser2(TileCalibLogger):
 
             #=== fill dictionary
             if ros<0:
-               rosmin=0
-               rosmax=5
+                rosmin=0
+                rosmax=5
             elif ros>=5:
-               rosmin=1
-               rosmax=5
+                rosmin=1
+                rosmax=5
             else:
-               rosmin=ros
-               rosmax=ros+1
+                rosmin=ros
+                rosmax=ros+1
 
             if mod<0 or mod>=64:
-               modmin=0
-               modmax=64
+                modmin=0
+                modmax=64
             else:
-               modmin=mod
-               modmax=mod+1
+                modmin=mod
+                modmax=mod+1
 
             allchannels=True
             if chn<-2:
-               chnmin=0
-               chnmax=-chn
+                chnmin=0
+                chnmax=-chn
             elif chn<0:
-               chnmin=0
-               chnmax=48
-               allchannels=(chn==-1) # if chn=-2 only connected channels will be updated
+                chnmin=0
+                chnmax=48
+                allchannels=(chn==-1) # if chn=-2 only connected channels will be updated
             else:
-               chnmin=chn
-               chnmax=chn+1
+                chnmin=chn
+                chnmax=chn+1
 
             if adc<-1:
-               adcmin=0
-               adcmax=-adc
+                adcmin=0
+                adcmax=-adc
             elif adc<0:
-               adcmin=0
-               adcmax=2
+                adcmin=0
+                adcmax=2
             else:
-               adcmin=adc
-               adcmax=adc+1
+                adcmin=adc
+                adcmax=adc+1
 
             for ros in range(rosmin,rosmax):
-               for mod in range(modmin,modmax):
-                  for chn in range(chnmin,chnmax):
-                     if allchannels or self.channel2PMT(ros,mod,chn)>0:
-                        for adc in range (adcmin,adcmax):
-                           dictKey = (ros,mod,chn,adc)
-                           if self.__manyIOVs:
-                               if dictKey in self.__dataDict:
-                                   self.__dataDict[dictKey] += [(iov,data)]
-                               else:
-                                   self.__dataDict[dictKey] = [(iov,data)]
-                           else:
-                               self.__dataDict[dictKey] = data
+                for mod in range(modmin,modmax):
+                    for chn in range(chnmin,chnmax):
+                        if allchannels or self.channel2PMT(ros,mod,chn)>0:
+                            for adc in range (adcmin,adcmax):
+                                dictKey = (ros,mod,chn,adc)
+                                if self.__manyIOVs:
+                                    if dictKey in self.__dataDict:
+                                        self.__dataDict[dictKey] += [(iov,data)]
+                                    else:
+                                        self.__dataDict[dictKey] = [(iov,data)]
+                                else:
+                                    self.__dataDict[dictKey] = data
 
     #____________________________________________________________________
     def getData(self, ros, drawer, channel, adc, iov=(MAXRUN,MAXLBK)):
@@ -1442,4 +1443,3 @@ class TileASCIIParser3(TileCalibLogger):
     def getDict(self):
         import copy
         return copy.deepcopy(self.__dataDict)
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
index 5c4b57147796..bd757647de11 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
@@ -1,4 +1,9 @@
+#!/bin/env python
+
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# TileCellTools.py
+# Alexander Solodkov <Sanya.Solodkov@cern.ch>, 2014-11-01
+################################################################
 
 import bisect
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py
deleted file mode 100644
index a15935c7dd5c..000000000000
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-
-"""
-Migrated to the TileCalibWeb package
-"""
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
index 8e4944aa40be..b4ed7d10a9a0 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
@@ -95,295 +95,295 @@ def writeMergedIOV(ros,mod,since,until):
 
 if __name__ == "__main__":
 
-  letters = "ht:f:o:i"
-  keywords = ["help","tag=","folder=","outtag=","instance="]
-  try:
-    opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-  except getopt.GetoptError as err:
-    print (str(err))
-    usage()
-    sys.exit(2)
-
-  # defaults
-  instance='OFLP200'
-  folderPath =  "/TILE/OFL02/STATUS/ADC"
-  tag = "OFLCOND-MC16-SDR-28"
-  outtag = "test"
-
-  print ('opts:',opts)
-  for o, a in opts:
-    if o in ("-f","--folder"):
-        folderPath = "/TILE/%s/STATUS/ADC" % a
-    elif o in ("-t","--tag"):
-        tag = a
-    elif o in ("-o","--outtag"):
-        outtag = a
-    elif o in ("-i","--instance"):
-        instance = a
-    #elif o in ("-s","--schema"):
-    #    schema = a
-    #elif o in ("-r","--run"):
-    #    run = int(a)
-    #elif o in ("-l","--lumi"):
-    #    lumi = int(a)
-    elif o in ("-h","--help"):
+    letters = "ht:f:o:i"
+    keywords = ["help","tag=","folder=","outtag=","instance="]
+    try:
+        opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
+    except getopt.GetoptError as err:
+        print (str(err))
         usage()
         sys.exit(2)
-    else:
-        assert False, "unhandled option"
-
-
-  from TileCalibBlobPython.TileCalibLogger import getLogger
-  log = getLogger("BchCleanup")
-  import logging
-  log.setLevel(logging.INFO)
-
-  ischema = 'sqlite://;schema=bch-input-sqlite.db;dbname='+instance
-  oschema = 'sqlite://;schema=bch-output-sqlite.db;dbname='+instance
-  log.info("ischema=%s",ischema)
-  log.info("oschema=%s", oschema)
-
-
-  from TileCalibBlobPython import TileCalibTools
-  from TileCalibBlobPython import TileBchTools
-  from TileCalibBlobObjs.Classes import TileCalibUtils, TileBchDecoder, \
-       TileCalibDrawerBch, TileBchStatus
-
-  #=== open databases
-  idb = TileCalibTools.openDbConn(ischema,'READONLY')
-  #odb = TileCalibTools.openDbConn(oschema,'RECREATE')
-
-  #-- Workout folderTag
-  folderTag = TileCalibTools.getFolderTag(idb if 'CONDBR2' in ischema else ischema, folderPath, tag)
-
-  #-- Blob I/O classes
-  blobReader = TileCalibTools.TileBlobReader(idb,folderPath, folderTag)
-#  blobWriter = TileCalibTools.TileBlobWriter(odb,folderPath, 'Bch', True) # arg4: False:ONL, True:OFL, default=True
-#  blobWriter.setComment("lima","Cleanup of bad channels folder, by merging adjacent folders when identical")
-
-  outtagFull = 'TileOfl02StatusAdc-'+outtag
-#  outFolder = odb.getFolder(folderPath)
-
-  #-- initialize BchMgr from input DB
-  log.info("Input folder for cleaning: %s with tag %s", folderPath, folderTag)
-
-  ##=== Dump the current isBad definition
-  #isBadDef = mgr.getAdcProblems(0,1,0,0)
-  #log.info( "isBad Definition: " )
-  #for prbCode in sorted(isBadDef.keys()):
-  #     prbDesc = isBadDef[prbCode]
-  #    msg = "- %2i (%s)" % (prbCode,prbDesc)
-  #    log.info( msg )
-  #log.info( "\n" )
-  msg = 'AtlCoolCopy \"%s\" \"%s\" -folder /TILE/OFL02/STATUS/ADC  -tag %s -outtag %s -ch1 0 -ch2 19 -create' % (ischema,oschema,folderTag,outtagFull)
-  print(msg)
-
-
-  #=== Loop over DB contents
-
-  #=== get the channel status (if it is bad and will be masked)
-  #=== the channel status depends on the definition of isBad stored
-  #=== in the database drawer 1, channel 0
-  #=== isAffected = has a problem not included in isBad definition
-  #=== isGood = has no problem at all
-
-  rosinput = int(sys.argv[1]) if len(sys.argv)>1 else 0
-  log.info("rosinput=%i", rosinput)
-  if rosinput==0:
-      rosmin=1
-      rosmax=5
-  else:
-      rosmin=rosinput
-      rosmax=rosinput+1
-
-  for ros in range(rosmin,rosmax):
-    for mod in range(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
-
-      modName = TileCalibUtils.getDrawerString(ros,mod)
-      log.info(40*'='+" ros %d, drawer %s", ros, modName)
-
-      dbobjs = blobReader.getDBobjsWithinRange(ros, mod)
-      if dbobjs is None:
-        raise Exception("No DB objects retrieved for ros=%d mod=%d (%s)" % (ros,mod,modName))
-
-      #print ("# IOVs: %d - will try to print container below..." % len(dbobjs))
-      #print (dbobjs)
-
-      #.. keep track of validity range of identical and adjacent sets of conditions
-      mergedSince = mergedUntil = None
-
-      iovCounter = 0
-      objPrev = obj = None
-      blobPrev = blob = None
-      calibDrawerPrev = calibDrawer = None
-      runPrev = run = -1
-      lumPrev = lum = -1
-
-      #.. Loop over dbobjs
-      while dbobjs.goToNext():
-        iovCounter += 1
-        objPrev = obj
-        blobPrev = blob
-        calibDrawerPrev = calibDrawer
-        runPrev = run
-        lumPrev = lum
-
-        obj = dbobjs.currentRef()
-        objsince = obj.since()
-        objuntil = obj.until()
-
-        #.. initialize mergedSince,mergeUntil, which keep track of validity range of last set of identical conditions
-        if mergedSince is None and mergedUntil is None:
-            mergedSince = objsince
-            mergedUntil = objuntil
-
-        run = objsince >> 32
-        lum = objsince & 0xFFFFFFFF
-        blob = obj.payload()[0]
-
-        calibDrawer = None
-
-        if iovCounter%10 == 0:
-           log.info("Heartbeat %d: blob size=%d - [%d,%d]-[%d,%d)",
-                    iovCounter, blob.size(), run, lum, (objuntil>>32), (objuntil&0xFFFFFFFF) )
+
+    # defaults
+    instance='OFLP200'
+    folderPath =  "/TILE/OFL02/STATUS/ADC"
+    tag = "OFLCOND-MC16-SDR-28"
+    outtag = "test"
+
+    print ('opts:',opts)
+    for o, a in opts:
+        if o in ("-f","--folder"):
+            folderPath = "/TILE/%s/STATUS/ADC" % a
+        elif o in ("-t","--tag"):
+            tag = a
+        elif o in ("-o","--outtag"):
+            outtag = a
+        elif o in ("-i","--instance"):
+            instance = a
+        #elif o in ("-s","--schema"):
+        #    schema = a
+        #elif o in ("-r","--run"):
+        #    run = int(a)
+        #elif o in ("-l","--lumi"):
+        #    lumi = int(a)
+        elif o in ("-h","--help"):
+            usage()
+            sys.exit(2)
         else:
-           log.debug("blob size=%d - [%d,%d]-[%d,%d)",
-                      blob.size(), run, lum, (objuntil>>32), (objuntil&0xFFFFFFFF))
-
-        if blob.size() == 596:
-            try:
-                calibDrawer = TileCalibDrawerBch.getInstance(blob)
-            except Exception as err:
-                log.error("ros=%i mod=%i last read: runPrev=%i lumPrev=%i\n %s",
-                          ros, mod, runPrev, lumPrev, str(err))
-
-        if calibDrawer is None:
-            #.. Non-existent, zero-sized or invalid blobs
-            if calibDrawerPrev is None:
-                # push upper limit to current IOV's upper limit
-                mergedUntil = objuntil
-                if blob is None:
-                    log.warning( "extending IOV due to non-existent blob!!!" )
-                elif blob.size()==0:
-                    log.info( "extending IOV due to zero-size blob!!!"    )
-                else:
-                    log.warning( "extending IOV due to invalid-size blob!!!" )
-                continue
-
-            else:
-                # non-identical blobs: write previous blob with new saved validity range...
-                log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
-                #writeMergedIOV(outFolder, outtagFull, ros, mod, calibDrawerPrev, mergedSince, mergedUntil)
-                writeMergedIOV(ros, mod, mergedSince, mergedUntil)
-                # ...and then start a new IOV based on current blob's validity range
-                mergedSince = objsince
-                mergedUntil = objuntil
-                tempRunLum = "Starting new IOV at: [%d,%d]" % (mergedSince>>32, mergedSince&0xffffffff)
-                if blob is None:
-                    log.warning( "%s (non-existent blob!!!)", tempRunLum )
-                elif blob.size()==0:
-                    log.info( "%s (zero-size blob!!!)", tempRunLum )
+            assert False, "unhandled option"
+
+
+    from TileCalibBlobPython.TileCalibLogger import getLogger
+    log = getLogger("BchCleanup")
+    import logging
+    log.setLevel(logging.INFO)
+
+    ischema = 'sqlite://;schema=bch-input-sqlite.db;dbname='+instance
+    oschema = 'sqlite://;schema=bch-output-sqlite.db;dbname='+instance
+    log.info("ischema=%s",ischema)
+    log.info("oschema=%s", oschema)
+
+
+    from TileCalibBlobPython import TileCalibTools
+    from TileCalibBlobPython import TileBchTools
+    from TileCalibBlobObjs.Classes import TileCalibUtils, TileBchDecoder, \
+         TileCalibDrawerBch, TileBchStatus
+
+    #=== open databases
+    idb = TileCalibTools.openDbConn(ischema,'READONLY')
+    #odb = TileCalibTools.openDbConn(oschema,'RECREATE')
+
+    #-- Workout folderTag
+    folderTag = TileCalibTools.getFolderTag(idb if 'CONDBR2' in ischema else ischema, folderPath, tag)
+
+    #-- Blob I/O classes
+    blobReader = TileCalibTools.TileBlobReader(idb,folderPath, folderTag)
+    #blobWriter = TileCalibTools.TileBlobWriter(odb,folderPath, 'Bch', True) # arg4: False:ONL, True:OFL, default=True
+    #blobWriter.setComment("lima","Cleanup of bad channels folder, by merging adjacent folders when identical")
+
+    outtagFull = 'TileOfl02StatusAdc-'+outtag
+    #outFolder = odb.getFolder(folderPath)
+
+    #-- initialize BchMgr from input DB
+    log.info("Input folder for cleaning: %s with tag %s", folderPath, folderTag)
+
+    ##=== Dump the current isBad definition
+    #isBadDef = mgr.getAdcProblems(0,1,0,0)
+    #log.info( "isBad Definition: " )
+    #for prbCode in sorted(isBadDef.keys()):
+    #    prbDesc = isBadDef[prbCode]
+    #    msg = "- %2i (%s)" % (prbCode,prbDesc)
+    #    log.info( msg )
+    #log.info( "\n" )
+    msg = 'AtlCoolCopy \"%s\" \"%s\" -folder /TILE/OFL02/STATUS/ADC  -tag %s -outtag %s -ch1 0 -ch2 19 -create' % (ischema,oschema,folderTag,outtagFull)
+    print(msg)
+
+
+    #=== Loop over DB contents
+
+    #=== get the channel status (if it is bad and will be masked)
+    #=== the channel status depends on the definition of isBad stored
+    #=== in the database drawer 1, channel 0
+    #=== isAffected = has a problem not included in isBad definition
+    #=== isGood = has no problem at all
+
+    rosinput = int(sys.argv[1]) if len(sys.argv)>1 else 0
+    log.info("rosinput=%i", rosinput)
+    if rosinput==0:
+        rosmin=1
+        rosmax=5
+    else:
+        rosmin=rosinput
+        rosmax=rosinput+1
+
+    for ros in range(rosmin,rosmax):
+        for mod in range(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
+
+            modName = TileCalibUtils.getDrawerString(ros,mod)
+            log.info(40*'='+" ros %d, drawer %s", ros, modName)
+
+            dbobjs = blobReader.getDBobjsWithinRange(ros, mod)
+            if dbobjs is None:
+                raise Exception("No DB objects retrieved for ros=%d mod=%d (%s)" % (ros,mod,modName))
+
+            #print ("# IOVs: %d - will try to print container below..." % len(dbobjs))
+            #print (dbobjs)
+
+            #.. keep track of validity range of identical and adjacent sets of conditions
+            mergedSince = mergedUntil = None
+
+            iovCounter = 0
+            objPrev = obj = None
+            blobPrev = blob = None
+            calibDrawerPrev = calibDrawer = None
+            runPrev = run = -1
+            lumPrev = lum = -1
+
+            #.. Loop over dbobjs
+            while dbobjs.goToNext():
+                iovCounter += 1
+                objPrev = obj
+                blobPrev = blob
+                calibDrawerPrev = calibDrawer
+                runPrev = run
+                lumPrev = lum
+
+                obj = dbobjs.currentRef()
+                objsince = obj.since()
+                objuntil = obj.until()
+
+                #.. initialize mergedSince,mergeUntil, which keep track of validity range of last set of identical conditions
+                if mergedSince is None and mergedUntil is None:
+                    mergedSince = objsince
+                    mergedUntil = objuntil
+
+                run = objsince >> 32
+                lum = objsince & 0xFFFFFFFF
+                blob = obj.payload()[0]
+
+                calibDrawer = None
+
+                if iovCounter%10 == 0:
+                    log.info("Heartbeat %d: blob size=%d - [%d,%d]-[%d,%d)",
+                             iovCounter, blob.size(), run, lum, (objuntil>>32), (objuntil&0xFFFFFFFF) )
                 else:
-                    log.warning( "%s (invalid-size blob!!!)", tempRunLum )
-                continue
-
-        #.. Only good calibDrawers reach here
-
-        bchDecoder = TileBchDecoder(calibDrawer.getBitPatternVersion())
-
-        #=== create bad channel manager
-        mgr = TileBchTools.TileBchMgr()
-        mgr.setLogLvl(logging.ERROR)
-        mgr.initialize(idb, folderPath, folderTag, (run,lum))
-        log.debug("TileBchMgr initialized.")
-
-        #.. for first IOV, print status summary
-        if objPrev is None:
-            showAdcProblems(mgr,ros,mod)
-
-        #.. comparing current and previous blobs ===============
-        identical = True
-
-        if objPrev is not None:
-          if calibDrawerPrev is None:
-              identical = False
-          else:
-            sizelo = calibDrawerPrev.getObjSizeByte()//4
-            sizehi = calibDrawer.getObjSizeByte()//4
-            if (sizelo != sizehi):
-              log.error("Object sizes are different for ROS %s (%s %s) drawer %s", ros, sizelo, sizehi, modName)
-
-            typelo = calibDrawerPrev.getObjType()
-            typehi = calibDrawer.getObjType()
-            #ov = flt.getObjVersion()
-            #no = flt.getNObjs()
-            #nc = flt.getNChans()
-            #ng = flt.getNGains()
-
-            if (typelo != typehi):
-              log.error("Object types %s %s are different", typelo, typehi)
-              sys.exit()
-
-            #=== get all problems of this module
-            #showAdcProblems(mgr,ros,mod)
-
-            #.. check for identical conditions
-            for chn in range(TileCalibUtils.max_chan()):
-              #  chnName = " %2i" % chn
-              #if identical:
-              for adc in range(TileCalibUtils.max_gain()):
-                #if identical:
-                  for ind in range(1):  # 4 values per channel/adc
-
-                    #=== build status from both adc and channel bits
-                    adcBits = calibDrawer.getData(chn, adc, ind)
-                    chnBits = calibDrawer.getData(chn, 2, ind)
-                    status = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
-
-                    adcBits = calibDrawerPrev.getData(chn, adc, ind)
-                    chnBits = calibDrawerPrev.getData(chn, 2, ind)
-                    statusPrev = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
-
-                    adclo = calibDrawerPrev.getData(chn, adc, ind)
-                    adchi = calibDrawer.getData(chn, adc, ind)
-                    chnlo = calibDrawerPrev.getData(chn,   2, ind)
-                    chnhi = calibDrawer.getData(chn,   2, ind)
-                    diff = adclo - adchi + chnlo - chnhi
-
-                    if not (status==statusPrev):
-                      identical = False
-                      log.info("chn=%i adc=%i ind=%i - vlo=%i, vhi=%i, diffs=%i %i", chn, adc, ind, adclo+chnlo, adchi+chnhi, adclo-adchi, chnlo-chnhi)
-                      #break
-
-          #.. at this point, merge if obj is identical to objPrev
-          if identical is True:
-            # push upper limit to current IOV's upper limit
-            mergedUntil = objuntil
-          else:
-            showAdcProblems(mgr,ros,mod)
-            # non-identical blobs: write previous blob with new saved validity range...
-            log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
-            writeMergedIOV(ros, mod, mergedSince, mergedUntil)
-            #writeMergedIOV(outFolder,outtagFull,ros,mod,calibDrawerPrev,mergedSince,mergedUntil)
-            # ...and then start a new IOV based on current blob's validity range
-            mergedSince = objsince
-            mergedUntil = objuntil
-            log.info("Starting new IOV at: [%d,%d]",
-              mergedSince>>32, mergedSince&0xffffffff)
-
-      #.. end of loop over dbobjs
-
-      if objuntil == 0x7fffffffffffffff:
-        log.info("Writing last IOV: calling writeMergedIOV by hand...")
-        #writeMergedIOV(outFolder,outtagFull,ros,mod,calibDrawerPrev,mergedSince,mergedUntil)
-        writeMergedIOV(ros,mod,mergedSince,mergedUntil)
-
-  #=== print all bad channels
-  #log.info("listing bad channels")
-  #mgr.listBadAdcs()
-
-#  from TileCalibBlobPython.TileCalibTools import MINRUN, MINLBK, MAXRUN, MAXLBK
-#  blobWriter.register((MINRUN,MINLBK),(MAXRUN,MAXLBK),folderTag)
-
-  #=== close DB
-  idb.closeDatabase()
+                    log.debug("blob size=%d - [%d,%d]-[%d,%d)",
+                               blob.size(), run, lum, (objuntil>>32), (objuntil&0xFFFFFFFF))
+
+                if blob.size() == 596:
+                    try:
+                        calibDrawer = TileCalibDrawerBch.getInstance(blob)
+                    except Exception as err:
+                        log.error("ros=%i mod=%i last read: runPrev=%i lumPrev=%i\n %s",
+                                  ros, mod, runPrev, lumPrev, str(err))
+
+                if calibDrawer is None:
+                    #.. Non-existent, zero-sized or invalid blobs
+                    if calibDrawerPrev is None:
+                        # push upper limit to current IOV's upper limit
+                        mergedUntil = objuntil
+                        if blob is None:
+                            log.warning( "extending IOV due to non-existent blob!!!" )
+                        elif blob.size()==0:
+                            log.info( "extending IOV due to zero-size blob!!!"    )
+                        else:
+                            log.warning( "extending IOV due to invalid-size blob!!!" )
+                        continue
+
+                    else:
+                        # non-identical blobs: write previous blob with new saved validity range...
+                        log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
+                        #writeMergedIOV(outFolder, outtagFull, ros, mod, calibDrawerPrev, mergedSince, mergedUntil)
+                        writeMergedIOV(ros, mod, mergedSince, mergedUntil)
+                        # ...and then start a new IOV based on current blob's validity range
+                        mergedSince = objsince
+                        mergedUntil = objuntil
+                        tempRunLum = "Starting new IOV at: [%d,%d]" % (mergedSince>>32, mergedSince&0xffffffff)
+                        if blob is None:
+                            log.warning( "%s (non-existent blob!!!)", tempRunLum )
+                        elif blob.size()==0:
+                            log.info( "%s (zero-size blob!!!)", tempRunLum )
+                        else:
+                            log.warning( "%s (invalid-size blob!!!)", tempRunLum )
+                        continue
+
+                #.. Only good calibDrawers reach here
+
+                bchDecoder = TileBchDecoder(calibDrawer.getBitPatternVersion())
+
+                #=== create bad channel manager
+                mgr = TileBchTools.TileBchMgr()
+                mgr.setLogLvl(logging.ERROR)
+                mgr.initialize(idb, folderPath, folderTag, (run,lum))
+                log.debug("TileBchMgr initialized.")
+
+                #.. for first IOV, print status summary
+                if objPrev is None:
+                    showAdcProblems(mgr,ros,mod)
+
+                #.. comparing current and previous blobs ===============
+                identical = True
+
+                if objPrev is not None:
+                    if calibDrawerPrev is None:
+                        identical = False
+                    else:
+                        sizelo = calibDrawerPrev.getObjSizeByte()//4
+                        sizehi = calibDrawer.getObjSizeByte()//4
+                        if (sizelo != sizehi):
+                            log.error("Object sizes are different for ROS %s (%s %s) drawer %s", ros, sizelo, sizehi, modName)
+
+                        typelo = calibDrawerPrev.getObjType()
+                        typehi = calibDrawer.getObjType()
+                        #ov = flt.getObjVersion()
+                        #no = flt.getNObjs()
+                        #nc = flt.getNChans()
+                        #ng = flt.getNGains()
+
+                        if (typelo != typehi):
+                            log.error("Object types %s %s are different", typelo, typehi)
+                            sys.exit()
+
+                        #=== get all problems of this module
+                        #showAdcProblems(mgr,ros,mod)
+
+                        #.. check for identical conditions
+                        for chn in range(TileCalibUtils.max_chan()):
+                            #  chnName = " %2i" % chn
+                            #if identical:
+                            for adc in range(TileCalibUtils.max_gain()):
+                              #if identical:
+                                for ind in range(1):  # 4 values per channel/adc
+
+                                    #=== build status from both adc and channel bits
+                                    adcBits = calibDrawer.getData(chn, adc, ind)
+                                    chnBits = calibDrawer.getData(chn, 2, ind)
+                                    status = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
+
+                                    adcBits = calibDrawerPrev.getData(chn, adc, ind)
+                                    chnBits = calibDrawerPrev.getData(chn, 2, ind)
+                                    statusPrev = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
+
+                                    adclo = calibDrawerPrev.getData(chn, adc, ind)
+                                    adchi = calibDrawer.getData(chn, adc, ind)
+                                    chnlo = calibDrawerPrev.getData(chn,   2, ind)
+                                    chnhi = calibDrawer.getData(chn,   2, ind)
+                                    diff = adclo - adchi + chnlo - chnhi
+
+                                    if not (status==statusPrev):
+                                        identical = False
+                                        log.info("chn=%i adc=%i ind=%i - vlo=%i, vhi=%i, diffs=%i %i", chn, adc, ind, adclo+chnlo, adchi+chnhi, adclo-adchi, chnlo-chnhi)
+                                        #break
+
+                    #.. at this point, merge if obj is identical to objPrev
+                    if identical is True:
+                        # push upper limit to current IOV's upper limit
+                        mergedUntil = objuntil
+                    else:
+                        showAdcProblems(mgr,ros,mod)
+                        # non-identical blobs: write previous blob with new saved validity range...
+                        log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
+                        writeMergedIOV(ros, mod, mergedSince, mergedUntil)
+                        #writeMergedIOV(outFolder,outtagFull,ros,mod,calibDrawerPrev,mergedSince,mergedUntil)
+                        # ...and then start a new IOV based on current blob's validity range
+                        mergedSince = objsince
+                        mergedUntil = objuntil
+                        log.info("Starting new IOV at: [%d,%d]",
+                          mergedSince>>32, mergedSince&0xffffffff)
+
+            #.. end of loop over dbobjs
+
+            if objuntil == 0x7fffffffffffffff:
+                log.info("Writing last IOV: calling writeMergedIOV by hand...")
+                #writeMergedIOV(outFolder,outtagFull,ros,mod,calibDrawerPrev,mergedSince,mergedUntil)
+                writeMergedIOV(ros,mod,mergedSince,mergedUntil)
+
+    #=== print all bad channels
+    #log.info("listing bad channels")
+    #mgr.listBadAdcs()
+
+    #from TileCalibBlobPython.TileCalibTools import MINRUN, MINLBK, MAXRUN, MAXLBK
+    #blobWriter.register((MINRUN,MINLBK),(MAXRUN,MAXLBK),folderTag)
+
+    #=== close DB
+    idb.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
index 0bce3987f041..adcb4ca81c06 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
@@ -69,21 +69,16 @@ current = resolveAlias.getCurrent()
 nexttag = resolveAlias.getNext()
 #--------------------------------
 from TileCalibBlobPython.TileCalibLogger import getLogger
-#import logging
-#TileCalibTools.setLevel(logging.WARNING)
 log = getLogger("TileCalibTools")
 import logging
 log.setLevel(logging.WARNING)
-#log = getLogger("resolve_Tag")
-# import logging
-log.setLevel(logging.WARNING)
 
 
 #if instance == 'CONDBR2' :
 print ("alias CURRENT = %s alias NEXT = %s" % (current, nexttag))
 
 if folder == '':
-        sys.exit()
+    sys.exit()
 
 #=================================================
 connStr=schema+'/'+instance
@@ -92,7 +87,7 @@ connStr=schema+'/'+instance
 db = TileCalibTools.openDbConn(connStr, 'READONLY')
 
 if localtag == "" :
-#    === resolve folder tag from global tag
+    #=== resolve folder tag from global tag
     if globaltag != "":
         foldertag = TileCalibTools.getFolderTag(db, folder, globaltag)
         print ("global tag %s associated to leaf TAG %s" % (globaltag,foldertag))
@@ -105,7 +100,7 @@ if localtag == "" :
 else:
     rfolder=db.getFolderSet('/')
     taglist=rfolder.listTags()
-#    print (taglist)
+    #print (taglist)
     for tag in taglist:
         try:
             foldertag = TileCalibTools.getFolderTag(db, folder, tag)
@@ -113,5 +108,4 @@ else:
                 print (" leaf tag %s linked to global tag %s " % (localtag, tag))
         except Exception:
             print (" ")
-#            print (" WARNING !, existing global tag %s is not linked to local tag %s " % (tag,localtag))
-
+            #print (" WARNING !, existing global tag %s is not linked to local tag %s " % (tag,localtag))
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
index 402979e183e7..ea144f2fc826 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
@@ -9,7 +9,6 @@ from __future__ import print_function
 
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobObjs.Classes import TileCalibUtils
-import ROOT
 
 
 #=== specify which time to read
@@ -58,4 +57,3 @@ for ros in range(TileCalibUtils.max_ros()):
 
 #=== close the database connection
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py
index de3df330c49d..2fb01cf84cd0 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py
@@ -306,8 +306,7 @@ if val_n>0:
 
 
 import ROOT
-from ROOT import TCanvas, TH1D, TH2D, TGraph, TTree, TLegend, TLatex
-from ROOT import gROOT
+from ROOT import TCanvas, TH2D, TGraph, TTree, TLegend, TLatex
 from ROOT import kTRUE
 import numpy as np
 
@@ -350,31 +349,31 @@ idb = TileCalibTools.openDbConn(schema,'READONLY')
 iovList = []
 blobReader = []
 for (fp,ft) in zip(folderPath,folderTag):
-  try:
-    br = TileCalibTools.TileBlobReader(idb,fp, ft)
-    blobReader += [br]
-    dbobjs = br.getDBobjsWithinRange(COOL_part, COOL_chan)
-    if (dbobjs is None):
-        raise Exception("No DB objects retrieved when building IOV list!")
-    while dbobjs.goToNext():
-      obj = dbobjs.currentRef()
-      objsince = obj.since()
-      sinceRun = objsince >> 32
-      sinceLum = objsince & 0xFFFFFFFF
-      since    = (sinceRun, sinceLum)
-      objuntil = obj.until()
-      untilRun = objuntil >> 32
-      untilLum = objuntil & 0xFFFFFFFF
-      until    = (untilRun, untilLum)
-
-      if multi:
-          iov = (since, since)
-      else:
-          iov = (since, until)
-      iovList.append(iov)
-  except Exception:
-    print ("Warning: can not read IOVs from input DB file")
-    sys.exit(2)
+    try:
+        br = TileCalibTools.TileBlobReader(idb,fp, ft)
+        blobReader += [br]
+        dbobjs = br.getDBobjsWithinRange(COOL_part, COOL_chan)
+        if (dbobjs is None):
+            raise Exception("No DB objects retrieved when building IOV list!")
+        while dbobjs.goToNext():
+            obj = dbobjs.currentRef()
+            objsince = obj.since()
+            sinceRun = objsince >> 32
+            sinceLum = objsince & 0xFFFFFFFF
+            since    = (sinceRun, sinceLum)
+            objuntil = obj.until()
+            untilRun = objuntil >> 32
+            untilLum = objuntil & 0xFFFFFFFF
+            until    = (untilRun, untilLum)
+
+            if multi:
+                iov = (since, since)
+            else:
+                iov = (since, until)
+            iovList.append(iov)
+    except Exception:
+        print ("Warning: can not read IOVs from input DB file")
+        sys.exit(2)
 
 if multi:
     il=[]
@@ -555,45 +554,45 @@ for iovs in iovList:
             modName = TileCalibUtils.getDrawerString(ros,mod)
             for (fp,ft,br) in zip(folderPath,folderTag,blobReader):
                 try:
-                  flt = br.getDrawer(ros, mod,(run,lumi), False, False)   # modified
-                  if flt is None or isinstance(flt, (int)):
-                      if one_iov or ros!=0:
-                          print ("%s is missing in DB" % modName)
-                  else:
-                      nchan = flt.getNChans()
-                      ngain = flt.getNGains()
-                      nval  = flt.getObjSizeUint32()
-                      for chn in range(chanmin,min(chanmax+1,nchan)):
-                          for adc in range(gainmin,min(gainmax+1,ngain)):
-                              msg = "%s  %s %2i %1i  " % (rl, modName, chn, adc )
-                              for val in range(nval):
-                                  msg += "  %f" % flt.getData(chn, adc, val)
-                                  vals.push_back(flt.getData(chn, adc, val))
-                                  if val==0:
-                                      value[0] *= flt.getData(chn, adc, val)
-                              if print_msg:
-                                  if multi:
-                                      print (fp,msg)
-                                  else:
-                                      print (msg)
-                          channel_n[0] = chn
-                          if one_run:
-                              labels.push_back(str(lumi))
-                          else:
-                              labels.push_back(str(run))
-                          if not multi or opt2d:
-                              if first:
-                                  if vals.size()>val_n:
-                                      scale[0]=vals[val_n]
-                                  first=False
-                              tree.Fill()
-                              if not line or many:
-                                  labels.clear()
-                                  vals.clear()
-                                  value[0] = 1.
+                    flt = br.getDrawer(ros, mod,(run,lumi), False, False)   # modified
+                    if flt is None or isinstance(flt, (int)):
+                        if one_iov or ros!=0:
+                            print ("%s is missing in DB" % modName)
+                    else:
+                        nchan = flt.getNChans()
+                        ngain = flt.getNGains()
+                        nval  = flt.getObjSizeUint32()
+                        for chn in range(chanmin,min(chanmax+1,nchan)):
+                            for adc in range(gainmin,min(gainmax+1,ngain)):
+                                msg = "%s  %s %2i %1i  " % (rl, modName, chn, adc )
+                                for val in range(nval):
+                                    msg += "  %f" % flt.getData(chn, adc, val)
+                                    vals.push_back(flt.getData(chn, adc, val))
+                                    if val==0:
+                                        value[0] *= flt.getData(chn, adc, val)
+                                if print_msg:
+                                    if multi:
+                                        print (fp,msg)
+                                    else:
+                                        print (msg)
+                            channel_n[0] = chn
+                            if one_run:
+                                labels.push_back(str(lumi))
+                            else:
+                                labels.push_back(str(run))
+                            if not multi or opt2d:
+                                if first:
+                                    if vals.size()>val_n:
+                                        scale[0]=vals[val_n]
+                                    first=False
+                                tree.Fill()
+                                if not line or many:
+                                    labels.clear()
+                                    vals.clear()
+                                    value[0] = 1.
 
                 except Exception as e:
-                  print (e)
+                    print (e)
 
             if multi and not opt2d and vals.size()>0:
                 if first:
@@ -665,7 +664,7 @@ elif one_run:
 cx = 1600
 cy = 800
 #if label is not None:
-#  cy = int(1.05*cy)
+#    cy = int(1.05*cy)
 canv = TCanvas("PlotCalib","plotCalib",0,0,cx,cy)
 
 if opt2d:
@@ -905,8 +904,8 @@ os.system("display "+fname+".png")
 
 #
 #if __name__ == '__main__':
-#   rep = ''
-#   while not rep in [ 'q', 'Q' ]:
-#      rep = raw_input( 'enter "q" to quit: ' )
-#      if 1 < len(rep):
-#         rep = rep[0]
+#    rep = ''
+#    while not rep in [ 'q', 'Q' ]:
+#        rep = raw_input( 'enter "q" to quit: ' )
+#        if 1 < len(rep):
+#            rep = rep[0]
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
index b7216a93ea56..524120cb11da 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
@@ -102,9 +102,9 @@ can.cd(4)
 dsHG.Draw("AP")
 
 try:
-  from builtins import input
+    from builtins import input
 except ImportError:
-  # old python 2 without builtins
-  input=raw_input
+    # old python 2 without builtins
+    input=raw_input
 
 c = input('please enter a character: ')
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
index cd58b4132c53..f1451f59b2ea 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
@@ -144,4 +144,3 @@ for ros in range(0,5):
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
index 802631967f59..51cf495db4d5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
@@ -263,23 +263,23 @@ if iov:
         COOL_chan = 1000
 
     try:
-      dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
-      if (dbobjs is None):
-          raise Exception("No DB objects retrieved when building IOV list!")
-      while dbobjs.goToNext():
-        obj = dbobjs.currentRef()
-        objsince = obj.since()
-        sinceRun = objsince >> 32
-        sinceLum = objsince & 0xFFFFFFFF
-        since    = (sinceRun, sinceLum)
-        objuntil = obj.until()
-        untilRun = objuntil >> 32
-        untilLum = objuntil & 0xFFFFFFFF
-        until    = (untilRun, untilLum)
-        iovList.append((since, until))
+        dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
+        if (dbobjs is None):
+            raise Exception("No DB objects retrieved when building IOV list!")
+        while dbobjs.goToNext():
+            obj = dbobjs.currentRef()
+            objsince = obj.since()
+            sinceRun = objsince >> 32
+            sinceLum = objsince & 0xFFFFFFFF
+            since    = (sinceRun, sinceLum)
+            objuntil = obj.until()
+            untilRun = objuntil >> 32
+            untilLum = objuntil & 0xFFFFFFFF
+            until    = (untilRun, untilLum)
+            iovList.append((since, until))
     except Exception:
-      log.warning( "Warning: can not read IOVs from input DB file" )
-      sys.exit(2)
+        log.warning( "Warning: can not read IOVs from input DB file" )
+        sys.exit(2)
 
     be=iovList[0][0][0]
     en=iovList[-1][0][0]
@@ -421,4 +421,3 @@ for iovs in iovList:
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
index 4e506cdc607e..2b7565d5001d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
@@ -270,23 +270,23 @@ if iov:
         COOL_chan = 1000
 
     try:
-      dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
-      if (dbobjs is None):
-          raise Exception("No DB objects retrieved when building IOV list!")
-      while dbobjs.goToNext():
-        obj = dbobjs.currentRef()
-        objsince = obj.since()
-        sinceRun = objsince >> 32
-        sinceLum = objsince & 0xFFFFFFFF
-        since    = (sinceRun, sinceLum)
-        objuntil = obj.until()
-        untilRun = objuntil >> 32
-        untilLum = objuntil & 0xFFFFFFFF
-        until    = (untilRun, untilLum)
-        iovList.append((since, until))
+        dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
+        if (dbobjs is None):
+            raise Exception("No DB objects retrieved when building IOV list!")
+        while dbobjs.goToNext():
+            obj = dbobjs.currentRef()
+            objsince = obj.since()
+            sinceRun = objsince >> 32
+            sinceLum = objsince & 0xFFFFFFFF
+            since    = (sinceRun, sinceLum)
+            objuntil = obj.until()
+            untilRun = objuntil >> 32
+            untilLum = objuntil & 0xFFFFFFFF
+            until    = (untilRun, untilLum)
+            iovList.append((since, until))
     except Exception:
-      log.warning( "Warning: can not read IOVs from input DB file" )
-      sys.exit(2)
+        log.warning( "Warning: can not read IOVs from input DB file" )
+        sys.exit(2)
 
     be=iovList[0][0][0]
     en=iovList[-1][0][0]
@@ -433,4 +433,3 @@ for iovs in iovList:
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
index 594dfe326213..25d86af57c9a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
@@ -225,33 +225,33 @@ else:
     indexmax=index+1
 
 if brief or doubl:
-  name1 = ["","","0.0     "]
-  names = []
-  dm=" "
-  for i in range(indexmax):
-      names += [""]
+    name1 = ["","","0.0     "]
+    names = []
+    dm=" "
+    for i in range(indexmax):
+        names += [""]
 else:
-  name1 = ["Noise cell ", "gain ","0.00    "]
-  names = ["RMS ", "pileup ", "RMS1 ", "RMS2 ", "Ratio "]
-  for i in range(len(names),indexmax):
-      names += ["c"+str(i)+" "]
-  dm="\t"
+    name1 = ["Noise cell ", "gain ","0.00    "]
+    names = ["RMS ", "pileup ", "RMS1 ", "RMS2 ", "Ratio "]
+    for i in range(len(names),indexmax):
+        names += ["c"+str(i)+" "]
+    dm="\t"
 for cell in range(cellmin,cellmax):
-  if tile and len(name1[0]):
-    name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
-  for gain in range(gainmin,gainmax):
-    msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
-    for index in range(indexmin,indexmax):
-      v=blobFlt.getData(cell, gain, index)
-      if doubl:
-          msg += "%s%s%s" % (names[index],"{0:<15.10g}".format(v).ljust(15),dm)
-      elif v<5.e-7:
-          msg += "%s%s%s" % (names[index],name1[2],dm)
-      elif v<1:
-          msg += "%s%8.6f%s" % (names[index],v,dm)
-      else:
-          msg += "%s%s%s" % (names[index],"{0:<8.7g}".format(v).ljust(8),dm)
-    print (msg)
+    if tile and len(name1[0]):
+        name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
+    for gain in range(gainmin,gainmax):
+        msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
+        for index in range(indexmin,indexmax):
+            v=blobFlt.getData(cell, gain, index)
+            if doubl:
+                msg += "%s%s%s" % (names[index],"{0:<15.10g}".format(v).ljust(15),dm)
+            elif v<5.e-7:
+                msg += "%s%s%s" % (names[index],name1[2],dm)
+            elif v<1:
+                msg += "%s%8.6f%s" % (names[index],v,dm)
+            else:
+                msg += "%s%s%s" % (names[index],"{0:<8.7g}".format(v).ljust(8),dm)
+        print (msg)
 
 #=== close DB
 db.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
index da8caed6262b..9a44291c386f 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
@@ -331,53 +331,53 @@ else:
 log.info("From DB:  ncell: %d ngain %d index nval %d", ncell, ngain, nval)
 
 if brief or doubl:
-  name1 = ["","","0.0     "]
-  names = ["S0 ", "Pl ", "S1 ", "S2 ", "Ra "]
-  dm=" "
+    name1 = ["","","0.0     "]
+    names = ["S0 ", "Pl ", "S1 ", "S2 ", "Ra "]
+    dm=" "
 else:
-  name1 = ["Noise cell ", "gain ","0.00    "]
-  names = ["   RMS ", "pileup ", "  RMS1 ", "  RMS2 ", " Ratio "]
-  for i in range(len(names),indexmax):
-      names += ["c"+str(i)+" "]
-  dm="\t"
+    name1 = ["Noise cell ", "gain ","0.00    "]
+    names = ["   RMS ", "pileup ", "  RMS1 ", "  RMS2 ", " Ratio "]
+    for i in range(len(names),indexmax):
+        names += ["c"+str(i)+" "]
+    dm="\t"
 for cell in range(cellmin,cellmax):
-  if tile and len(name1[0]):
-    name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
-  for gain in range(gainmin,gainmax):
-    msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
-    l0=len(msg)
-    if multi:
-        dm="\n"+msg
-    for index in range(indexmin,indexmax):
-      v=blobFlt.getData(cell, gain, index)
-      v2=blobFlt2.getData(cell, gain, index)
-      dv12 = v - v2
-      if abs(dv12)<zthr:
-          dv12 = 0
-      if v2 == 0:
-          if v==0:
-              dp12=0
-          else:
-              dp12=100
-      else:
-          dp12=dv12*100./v2
-
-      if abs(dv12) > maxdiff and abs(dp12) > maxdiffpercent:
-         if doubl:
-             s1 = "{0:<14.9g}".format(v)    if    v<0 else "{0:<15.10g}".format(v)
-             s2 = "{0:<14.9g}".format(v2)   if   v2<0 else "{0:<15.10g}".format(v2)
-             s3 = "{0:<14.9g}".format(dv12) if dv12<0 else "{0:<15.10g}".format(dv12)
-             s4 = "{0:<14.9g}".format(dp12) if dp12<0 else "{0:<15.10g}".format(dp12)
-             msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1.ljust(15),s2.ljust(15),s3.ljust(15),s4.ljust(15),dm)
-         else:
-             s1 = name1[2] if    abs(v)<zthr else "%8.6f" %    v if    abs(v)<1 else "{0:<8.7g}".format(v).ljust(8)
-             s2 = name1[2] if   abs(v2)<zthr else "%8.6f" %   v2 if   abs(v2)<1 else "{0:<8.7g}".format(v2).ljust(8)
-             s3 = name1[2] if abs(dv12)<zthr else "%8.6f" % dv12 if abs(dv12)<1 else "{0:<8.7g}".format(dv12).ljust(8)
-             s4 = name1[2] if abs(dp12)<zthr else "%8.6f" % dp12 if abs(dp12)<1 else "{0:<8.7g}".format(dp12).ljust(8)
-             msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1[:8],s2[:8],s3[:8],s4[:8],dm)
-
-    if len(msg)>l0:
-        print (msg[:len(msg)-len(dm)])
+    if tile and len(name1[0]):
+        name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
+    for gain in range(gainmin,gainmax):
+        msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
+        l0=len(msg)
+        if multi:
+            dm="\n"+msg
+        for index in range(indexmin,indexmax):
+            v=blobFlt.getData(cell, gain, index)
+            v2=blobFlt2.getData(cell, gain, index)
+            dv12 = v - v2
+            if abs(dv12)<zthr:
+                dv12 = 0
+            if v2 == 0:
+                if v==0:
+                    dp12=0
+                else:
+                    dp12=100
+            else:
+                dp12=dv12*100./v2
+
+            if abs(dv12) > maxdiff and abs(dp12) > maxdiffpercent:
+                if doubl:
+                    s1 = "{0:<14.9g}".format(v)    if    v<0 else "{0:<15.10g}".format(v)
+                    s2 = "{0:<14.9g}".format(v2)   if   v2<0 else "{0:<15.10g}".format(v2)
+                    s3 = "{0:<14.9g}".format(dv12) if dv12<0 else "{0:<15.10g}".format(dv12)
+                    s4 = "{0:<14.9g}".format(dp12) if dp12<0 else "{0:<15.10g}".format(dp12)
+                    msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1.ljust(15),s2.ljust(15),s3.ljust(15),s4.ljust(15),dm)
+                else:
+                    s1 = name1[2] if    abs(v)<zthr else "%8.6f" %    v if    abs(v)<1 else "{0:<8.7g}".format(v).ljust(8)
+                    s2 = name1[2] if   abs(v2)<zthr else "%8.6f" %   v2 if   abs(v2)<1 else "{0:<8.7g}".format(v2).ljust(8)
+                    s3 = name1[2] if abs(dv12)<zthr else "%8.6f" % dv12 if abs(dv12)<1 else "{0:<8.7g}".format(dv12).ljust(8)
+                    s4 = name1[2] if abs(dp12)<zthr else "%8.6f" % dp12 if abs(dp12)<1 else "{0:<8.7g}".format(dp12).ljust(8)
+                    msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1[:8],s2[:8],s3[:8],s4[:8],dm)
+
+        if len(msg)>l0:
+            print (msg[:len(msg)-len(dm)])
 
 #=== close DB
 db.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
index 5b963ca2b28b..e369039924fa 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
@@ -128,4 +128,3 @@ print (msg)
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
index b5c3e4e25447..0817b2e228cb 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
@@ -31,10 +31,10 @@ import os, sys, getopt
 os.environ['TERM'] = 'linux'
 
 try:
-  from builtins import input
+    from builtins import input
 except ImportError:
-  # old python 2 without builtins
-  input=raw_input
+    # old python 2 without builtins
+    input=raw_input
 
 # main defaults are here - can be modified from command line
 run=999999999
@@ -110,7 +110,7 @@ if instance2=="none":
 if sqlfn2=="same":
     sqlfn2=sqlfn
 
-# if maxdiffpercent>-1:
+#if maxdiffpercent>-1:
 #    maxdiff=-1;
 
 print ('run ',run, 'lumi ',lumi, 'run2 ',run2, 'lumi2 ',lumi2)
@@ -292,7 +292,7 @@ for ros in range(0,5):
                 for adc in range(ng):
                     for ind in range(0,oscMax):
                         if (ind<osc):
-                          v[ind] = flt.getData(chn, adc, ind)
+                            v[ind] = flt.getData(chn, adc, ind)
                         if (ind<os2c):
                             v2[ind] = flt2.getData(chn, adc, ind)
                         dv12 = v[ind] - v2[ind]
@@ -300,7 +300,7 @@ for ros in range(0,5):
                             dv12percent=0
                         else:
                             dv12percent=dv12*100./v2[ind]
-#                        print ( modName, ' chann ',  repr(chn),  ' adc ',  repr(adc),  ' ind ',  repr(ind),  ' val1 ',  repr(v[ind]),' val2 ',  repr(v2[ind]), ' diff ',  repr(dv12), 'percent ', repr(dv12percent))
+                        #print ( modName, ' chann ',  repr(chn),  ' adc ',  repr(adc),  ' ind ',  repr(ind),  ' val1 ',  repr(v[ind]),' val2 ',  repr(v2[ind]), ' diff ',  repr(dv12), 'percent ', repr(dv12percent))
                         if abs(dv12) > maxdiff and abs(dv12percent) > maxdiffpercent:
                             if ot==30: # integers
                                 f.write('%s chann %2d adc %d ind %d val1 %d val2 %d  diff %d \n' % (modName,chn,adc,ind,v[ind],v2[ind],dv12))
@@ -311,7 +311,7 @@ for ros in range(0,5):
                                 if writedif and adc==0 and ind==0:
                                     fd.write("%s ch %2d %.4f\n" % (modName,chn,dv12))
 
-#                        f.write(s + "\n")
+                        #f.write(s + "\n")
 
 #=== close DB and output file
 db.closeDatabase()
@@ -319,4 +319,3 @@ db2.closeDatabase()
 f.close()
 if writedif:
     fd.close()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
index ca5b14d60b87..3856924be0d4 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
@@ -122,4 +122,3 @@ for idx in range(0,maxidx):
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
index a8410a77b566..9aed387997d8 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
@@ -113,4 +113,3 @@ print ( "%s ch %i gn %i :  PED = %f  HFN = %f  LFN = %f    OF_RMS = %f  PILEUP =
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
index ab85b4a6238f..fba45d3ef254 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
@@ -129,4 +129,3 @@ for iphase in range(abs(nphases)):
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
index e6e40e5985fb..c8e7024c5207 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
@@ -100,4 +100,3 @@ for ros in range(1, util.max_ros()):
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
index 825d82d0f8e4..0a4dff2ddd39 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
@@ -74,5 +74,3 @@ comment = "testing bad channels in LBA01, EBC64"
 since= (222222 , 0)
 mgr.commitToDb(db, folder, tag, TileBchDecoder.BitPat_ofl01, author, comment, since)
 db.closeDatabase()
-
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
index bec47e9657c1..45a211e42941 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
@@ -22,7 +22,7 @@ def fillBadChannels(db ,tag, bchFile,
                     since, until=(TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)):
 
     #=== ADC status folder (write to ONLINE from M7 onwards!)
-##    folder = TileCalibTools.getTilePrefix(False)+"STATUS/ADC"
+    ##folder = TileCalibTools.getTilePrefix(False)+"STATUS/ADC"
     folder="/TILE/OFL02/STATUS/ADC"
     #=== create bad channel manager
     mgr = TileBchTools.TileBchMgr()
@@ -37,8 +37,8 @@ def fillBadChannels(db ,tag, bchFile,
     mgr.updateFromFile(bchFile)
 
     #=== add definition for TileBchStatus::isBad from online side
-    #    mgr.addAdcProblem(0, 1, 0,0, TileBchPrbs.IgnoredInDsp)
-    #    mgr.addAdcProblem(0, 1, 0,1, TileBchPrbs.IgnoredInDsp)
+    #mgr.addAdcProblem(0, 1, 0,0, TileBchPrbs.IgnoredInDsp)
+    #mgr.addAdcProblem(0, 1, 0,1, TileBchPrbs.IgnoredInDsp)
 
     #=== print bad channels
     log.info("bad channels after update")
@@ -46,9 +46,9 @@ def fillBadChannels(db ,tag, bchFile,
 
     #=== commit changes
     #--- to ONLINE folder, i.e. tag="" and using onl01 bit pattern
-##    mgr.commitToDb(db, folder, "", TileBchDecoder.BitPat_onl01, os.getlogin(), bchFile, since, until)
+    ##mgr.commitToDb(db, folder, "", TileBchDecoder.BitPat_onl01, os.getlogin(), bchFile, since, until)
     mgr.commitToDb(db, folder, tag, TileBchDecoder.BitPat_ofl01, os.getlogin(), bchFile, since, until)
-##    mgr.commitToDb(db, "/TILE/", "", TileBchDecoder.BitPat_onl01, os.getlogin(), bchFile, since, until)
+    ##mgr.commitToDb(db, "/TILE/", "", TileBchDecoder.BitPat_onl01, os.getlogin(), bchFile, since, until)
 
 
 #===================================================================
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
index 93dfc011cd60..90af7febd9d7 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
@@ -109,9 +109,9 @@ mgr.addAdcProblem(1, 47, 45, 1, TileBchPrbs.LargeHfNoise)
 mgr.addAdcProblem(1, 48, 45, 1, TileBchPrbs.LargeHfNoise)
 mgr.addAdcProblem(1, 49, 45, 0, TileBchPrbs.VeryLargeHfNoise)
 for i in range(0, 48):
-   if i not in emptyChannelLongBarrel:
-      mgr.addAdcProblem(1, 52, i, 0, TileBchPrbs.DataCorruption)
-      mgr.addAdcProblem(1, 52, i, 1, TileBchPrbs.DataCorruption)
+    if i not in emptyChannelLongBarrel:
+        mgr.addAdcProblem(1, 52, i, 0, TileBchPrbs.DataCorruption)
+        mgr.addAdcProblem(1, 52, i, 1, TileBchPrbs.DataCorruption)
 mgr.addAdcProblem(1, 61, 28, 0, TileBchPrbs.LargeHfNoise)
 
 # LBC
@@ -124,9 +124,9 @@ mgr.addAdcProblem(2, 14, 19, 0, TileBchPrbs.BadCis)
 mgr.addAdcProblem(2, 14, 19, 1, TileBchPrbs.BadCis)
 mgr.addAdcProblem(2, 14, 45, 1, TileBchPrbs.VeryLargeHfNoise)
 for i in range(0, 48):
-   if i not in emptyChannelLongBarrel:
-      mgr.addAdcProblem(2, 16, i, 0, TileBchPrbs.DataCorruption)
-      mgr.addAdcProblem(2, 16, i, 1, TileBchPrbs.DataCorruption)
+    if i not in emptyChannelLongBarrel:
+        mgr.addAdcProblem(2, 16, i, 0, TileBchPrbs.DataCorruption)
+        mgr.addAdcProblem(2, 16, i, 1, TileBchPrbs.DataCorruption)
 mgr.addAdcProblem(2, 17, 45, 1, TileBchPrbs.LargeHfNoise)
 mgr.addAdcProblem(2, 19, 44, 0, TileBchPrbs.NoData)
 mgr.addAdcProblem(2, 19, 44, 1, TileBchPrbs.NoData)
@@ -242,9 +242,9 @@ mgr.addAdcProblem(4, 36, 40, 0, TileBchPrbs.NoCis)
 mgr.addAdcProblem(4, 36, 40, 1, TileBchPrbs.NoCis)
 mgr.addAdcProblem(4, 39, 36, 1, TileBchPrbs.BadCis)
 for i in range(0, 48):
-   if i not in emptyChannelExtendedBarrel:
-      mgr.addAdcProblem(4, 41, i, 0, TileBchPrbs.DataCorruption)
-      mgr.addAdcProblem(4, 41, i, 1, TileBchPrbs.DataCorruption)
+    if i not in emptyChannelExtendedBarrel:
+        mgr.addAdcProblem(4, 41, i, 0, TileBchPrbs.DataCorruption)
+        mgr.addAdcProblem(4, 41, i, 1, TileBchPrbs.DataCorruption)
 mgr.addAdcProblem(4, 45, 1, 0, TileBchPrbs.BadCis)
 mgr.addAdcProblem(4, 47, 35, 0, TileBchPrbs.BadCis)
 mgr.addAdcProblem(4, 47, 35, 1, TileBchPrbs.BadCis)
@@ -264,4 +264,3 @@ mgr.commitToDb(db, folder, folderTag, TileBchDecoder.BitPat_ofl01, "lpribyl", "t
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
index fc9500b903c3..7b622f4ba786 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
@@ -59,45 +59,45 @@ emptyChannelSpecialExtendedBarrel = (0, 1, 2, 3, 24, 25, 26, 27, 28, 29, 33, 34,
 #=== Add Online masked channels
 # LBA
 for i in range(30, 36):
-   if i not in emptyChannelLongBarrel: # LBA11 DMU10-11
-      mgr.addAdcProblem(1, 10, i, 0, TileBchPrbs.IgnoredInHlt)
-      mgr.addAdcProblem(1, 10, i, 1, TileBchPrbs.IgnoredInHlt)
+    if i not in emptyChannelLongBarrel: # LBA11 DMU10-11
+        mgr.addAdcProblem(1, 10, i, 0, TileBchPrbs.IgnoredInHlt)
+        mgr.addAdcProblem(1, 10, i, 1, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(1, 17, 38, 0, TileBchPrbs.IgnoredInHlt)
 for i in range(0, 48):
-   if i not in emptyChannelLongBarrel:
-      mgr.addAdcProblem(1, 52, i, 0, TileBchPrbs.IgnoredInHlt)
-      mgr.addAdcProblem(1, 52, i, 1, TileBchPrbs.IgnoredInHlt)
+    if i not in emptyChannelLongBarrel:
+        mgr.addAdcProblem(1, 52, i, 0, TileBchPrbs.IgnoredInHlt)
+        mgr.addAdcProblem(1, 52, i, 1, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(1, 56, 21, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(1, 56, 21, 1, TileBchPrbs.IgnoredInHlt)
 
 # LBC
 # We don't mask this case yet, as it doesn't pose reconstruction problems
 #for i in range(30, 36):
-#   if i not in emptyChannelLongBarrel:
-#      mgr.addAdcProblem(2, 2, i, 1, TileBchPrbs.DataCorruption)
+#    if i not in emptyChannelLongBarrel:
+#        mgr.addAdcProblem(2, 2, i, 1, TileBchPrbs.DataCorruption)
 mgr.addAdcProblem(2, 14, 19, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(2, 14, 19, 1, TileBchPrbs.IgnoredInHlt)
 for i in range(42, 48):
-   if i not in emptyChannelLongBarrel:
-      mgr.addAdcProblem(2, 19, i, 0, TileBchPrbs.IgnoredInHlt)
-      mgr.addAdcProblem(2, 19, i, 1, TileBchPrbs.IgnoredInHlt)
+    if i not in emptyChannelLongBarrel:
+        mgr.addAdcProblem(2, 19, i, 0, TileBchPrbs.IgnoredInHlt)
+        mgr.addAdcProblem(2, 19, i, 1, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(2, 23, 42, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(2, 23, 42, 1, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(2, 26, 46, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(2, 46, 44, 0, TileBchPrbs.IgnoredInHlt)
 for i in range(15, 18):
-   if i not in emptyChannelLongBarrel:
-      mgr.addAdcProblem(2, 63, i, 0, TileBchPrbs.IgnoredInHlt)
-      mgr.addAdcProblem(2, 63, i, 1, TileBchPrbs.IgnoredInHlt)
+    if i not in emptyChannelLongBarrel:
+        mgr.addAdcProblem(2, 63, i, 0, TileBchPrbs.IgnoredInHlt)
+        mgr.addAdcProblem(2, 63, i, 1, TileBchPrbs.IgnoredInHlt)
 
 
 # EBA
 mgr.addAdcProblem(3, 24, 15, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(3, 24, 15, 1, TileBchPrbs.IgnoredInHlt)
 for i in range(21, 24):
-   if i not in emptyChannelExtendedBarrel:
-      mgr.addAdcProblem(3, 43,  i, 0, TileBchPrbs.IgnoredInHlt)
-      mgr.addAdcProblem(3, 43,  i, 1, TileBchPrbs.IgnoredInHlt)
+    if i not in emptyChannelExtendedBarrel:
+        mgr.addAdcProblem(3, 43,  i, 0, TileBchPrbs.IgnoredInHlt)
+        mgr.addAdcProblem(3, 43,  i, 1, TileBchPrbs.IgnoredInHlt)
 
 mgr.addAdcProblem(3, 54, 14, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(3, 54, 14, 1, TileBchPrbs.IgnoredInHlt)
@@ -115,16 +115,16 @@ mgr.addAdcProblem(4, 36, 40, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(4, 36, 40, 1, TileBchPrbs.IgnoredInHlt)
 #DataCorrption is not enough to justify the masking
 #for i in range(0, 48):
-#   if i not in emptyChannelExtendedBarrel:
-#      mgr.addAdcProblem(4, 41, i, 0, TileBchPrbs.DataCorruption)
-#      mgr.addAdcProblem(4, 41, i, 1, TileBchPrbs.DataCorruption)
+#    if i not in emptyChannelExtendedBarrel:
+#        mgr.addAdcProblem(4, 41, i, 0, TileBchPrbs.DataCorruption)
+#        mgr.addAdcProblem(4, 41, i, 1, TileBchPrbs.DataCorruption)
 mgr.addAdcProblem(4, 47, 35, 0, TileBchPrbs.IgnoredInHlt)
 mgr.addAdcProblem(4, 47, 35, 1, TileBchPrbs.IgnoredInHlt)
 #DataCorrption is not enough to justify the masking
 #for i in range(30, 33):
-#   if i not in emptyChannelExtendedBarrel:
-#      mgr.addAdcProblem(4, 62, i, 0, TileBchPrbs.DataCorruption)
-#      mgr.addAdcProblem(4, 62, i, 1, TileBchPrbs.DataCorruption)
+#    if i not in emptyChannelExtendedBarrel:
+#        mgr.addAdcProblem(4, 62, i, 0, TileBchPrbs.DataCorruption)
+#        mgr.addAdcProblem(4, 62, i, 1, TileBchPrbs.DataCorruption)
 
 #=== print bad channels
 log.info("bad channels after update")
@@ -135,4 +135,3 @@ mgr.commitToDb(db, folder, folderTag, TileBchDecoder.BitPat_onl01, "lfiorini", "
 
 #=== close DB
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
index 36fb93b0a543..ae5330c9b380 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
@@ -42,4 +42,3 @@ defaultWriter.writeCes(tag, Simulation, MBTSflag, 1.2, 1.5, (run,0))
 
 #=== close the database connection
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
index 655a43de20c4..368f59ca9f77 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
@@ -25,4 +25,3 @@ defaultWriter.writeNoiseOnl(tag)
 
 #=== close the database connection
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
index d4b55dcc78a3..4b1eb5f611c0 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
@@ -50,4 +50,3 @@ defaultWriter.writeMuid()
 
 #=== close the database connection
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
index e6fc4939da7c..5369e0f2403e 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
@@ -23,4 +23,3 @@ defaultWriter.writeMuonReceiverPulseShape(tag)
 
 #=== close the database connection
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
index 832d1a6ff239..bc1e616e29e5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
@@ -145,4 +145,3 @@ for fileName in [ofcFiles[0]]:
     #<---end of file loop
 
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
index 57533148149b..93cba68a15e7 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
@@ -135,10 +135,10 @@ db = TileCalibTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')
 tag = "RUN2-HLT-UPD1-00"
 for directory in sorted(timingDict.keys()):
     since = timingDict[directory]
-#    fileTdlas = directory+"/Tile.tdlas"
     fileTclas = directory+"/Tile.tclas"
     fillTimingTc(fileTclas,tag,since)
-#    fillTimingTd(fileTdlas,tag,since)
+    #fileTdlas = directory+"/Tile.tdlas"
+    #fillTimingTd(fileTdlas,tag,since)
 
 #=== close the database connection
 db.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
index b7cdb027f27c..f830e3348ce5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
@@ -127,7 +127,3 @@ fillTripsProbs(fileName, folderPath, tag, (runfrom,0))
 
 #=== close the database connection
 db.closeDatabase()
-
-
-
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
index 409fe2f72c73..65e00459b92a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
@@ -223,4 +223,3 @@ else:
 #=== close databases
 db1.closeDatabase()
 db2.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
index 4cc28c918575..6b71b8b5e09e 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
@@ -187,4 +187,3 @@ else:
 #=== close databases
 db1.closeDatabase()
 db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
index ac487759bb5f..2a1744e5d4d5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
@@ -446,7 +446,7 @@ if len(onlSuffix) and not onl and "sqlite" in outSchema:
     log.info("creating DB with ONLINE status")
 
     #if dbw:
-    #  mgr.updateFromDb(dbw, folderPath, folderTag, since, -1)
+    #    mgr.updateFromDb(dbw, folderPath, folderTag, since, -1)
 
     #--- create online bad channel manager
     folderOnl = "/TILE/ONL01/STATUS/ADC"
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
index 3540b2734535..90d5a519287f 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
@@ -44,11 +44,11 @@ comment=sys.argv[7]
 
 #.. very basic input validation
 if ros<1 or ros>4:
-  raise Exception("Invalid ros=%i" % ros)
+    raise Exception("Invalid ros=%i" % ros)
 if mod<0 or mod>63:
-  raise Exception("Invalid module=%i" % mod)
+    raise Exception("Invalid module=%i" % mod)
 if run1<run:
-  raise Exception("Invalid validity range: %i < %i" % (run1,run))
+    raise Exception("Invalid validity range: %i < %i" % (run1,run))
 log.info("ros=%i mod=%i since=%s until=%s comment=%s", ros,mod,since,until,comment)
 
 #===================================================================
@@ -79,16 +79,16 @@ mgr.listBadAdcs()
 
 #.. loop over channels to be updated
 #for adc in range(0,2):
-#  for mod in range(38, 42) + range(54, 58):
-#    #.. apply updates
-#    mgr.delAdcProblem(3, mod, 4, adc, TileBchPrbs.GeneralMaskChannel)
-#    mgr.delAdcProblem(4, mod, 4, adc, TileBchPrbs.GeneralMaskChannel)
+#    for mod in range(38, 42) + range(54, 58):
+#        #.. apply updates
+#        mgr.delAdcProblem(3, mod, 4, adc, TileBchPrbs.GeneralMaskChannel)
+#        mgr.delAdcProblem(4, mod, 4, adc, TileBchPrbs.GeneralMaskChannel)
 
 for ichan in range(0,48):
-  if (ros<3 and ichan not in emptyChannelLongBarrel) or (ros>2 and ichan not in emptyChannelExtendedBarrel):
-    log.info("Masking channel %i off", ichan)
-    mgr.addAdcProblem( ros, mod, ichan, 0, TileBchPrbs.NoHV)
-    mgr.addAdcProblem( ros, mod, ichan, 1, TileBchPrbs.NoHV)
+    if (ros<3 and ichan not in emptyChannelLongBarrel) or (ros>2 and ichan not in emptyChannelExtendedBarrel):
+        log.info("Masking channel %i off", ichan)
+        mgr.addAdcProblem( ros, mod, ichan, 0, TileBchPrbs.NoHV)
+        mgr.addAdcProblem( ros, mod, ichan, 1, TileBchPrbs.NoHV)
 
 #=== print bad channels
 log.info("bad channels after update")
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
index 7c00f193b18f..f8bc40471784 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
@@ -53,7 +53,7 @@ if instance == 'CONDBR2' :
     log.info("alias CURRENT = %s alias NEXT = %s", current, nexttag)
 
 if folder == '':
-        sys.exit()
+    sys.exit()
 
 #=================================================
 connStr='COOLOFL_TILE/'+instance
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
index c24c9c794989..9f3fe0690ea7 100755
--- a/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
@@ -829,5 +829,3 @@ class TileDCSDataGrabber:
                     evhistNames["ATLAS_PVSSTIL.EVENTHISTORY_"+evhistNum] = validityRange
 
         return evhistNames
-
-
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
index ba98bdcb723a..b2d111a88b20 100755
--- a/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
@@ -135,19 +135,19 @@ class TileDCSDataInfo:
         filename=self.find_data_file("cool_channel_id.dat")
         lines = open(filename,"r").readlines()
         for line in lines:
-                line = line.strip()
-                folder, drawer, channel, oracleId = line.split()
-
-                keyFolderDrawer = ( folder , drawer)
-                if keyFolderDrawer in self.folderDrawer_to_channel:
-                    raise Exception ("trying to generate key twice: ", keyFolderDrawer)
-                self.folderDrawer_to_channel[ keyFolderDrawer] = int(channel)
-                self.folderDrawer_to_oracleId[keyFolderDrawer] = oracleId
-
-                keyFolderChannel = ( folder , int(channel))
-                if keyFolderChannel in self.folderChannel_to_drawer:
-                    raise Exception ("trying to generate key twice: ", keyFolderChannel)
-                self.folderChannel_to_drawer[keyFolderChannel] = drawer
+            line = line.strip()
+            folder, drawer, channel, oracleId = line.split()
+
+            keyFolderDrawer = ( folder , drawer)
+            if keyFolderDrawer in self.folderDrawer_to_channel:
+                raise Exception ("trying to generate key twice: ", keyFolderDrawer)
+            self.folderDrawer_to_channel[ keyFolderDrawer] = int(channel)
+            self.folderDrawer_to_oracleId[keyFolderDrawer] = oracleId
+
+            keyFolderChannel = ( folder , int(channel))
+            if keyFolderChannel in self.folderChannel_to_drawer:
+                raise Exception ("trying to generate key twice: ", keyFolderChannel)
+            self.folderChannel_to_drawer[keyFolderChannel] = drawer
 
         self.dbstring = {"DEFAULT":[],"COOL":[],"ORACLE":[],"TESTBEAM":[]}
         self.dbstring['DEFAULT'] += [dbstring]*3
diff --git a/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py b/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py
index 6bc653e78b51..35e1dfa242f2 100755
--- a/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py
+++ b/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py
@@ -27,4 +27,3 @@ for var in variables:
             folder, chanNum = dg.info.get_folder_and_channel(var, drawer)
             iovSince = dg.getEntry(drawer, var, now)[1]
             print (folder, drawer," (",chanNum,")", " ---> ", time.ctime(iovSince/dg.unix2cool)," (",iovSince,")")
-
-- 
GitLab


From 9d3479ed415e49067aa4da48855a94bf5a4d017c Mon Sep 17 00:00:00 2001
From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch>
Date: Thu, 11 Jun 2020 09:08:14 +0200
Subject: [PATCH 159/266] Use TypeError if new sequence is not a sequence

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

diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index fd9c57064ede..ecbd0816a5fc 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -219,7 +219,7 @@ class ComponentAccumulator(object):
             raise ConfigurationError('{} is not the Conf2 Sequence, ComponentAccumulator handles only the former'.format(newseq.name()))
 
         if not isSequence(newseq):
-            raise ConfigurationError('{} is not a sequence'.format(newseq.name))
+            raise TypeError('%s is not a sequence' % newseq.name)
 
         if parentName is None:
             parent=self._sequence
-- 
GitLab


From 39c6a21ef2583deebf50be53ca9455f2e4812516 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 11 Jun 2020 07:40:30 +0000
Subject: [PATCH 160/266] Remove delete from SCT_DigitizationTool, use
 std::unique_ptr

---
 .../src/SCT_DigitizationTool.cxx              | 47 +++++++------------
 .../src/SCT_DigitizationTool.h                | 11 +++--
 2 files changed, 22 insertions(+), 36 deletions(-)

diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
index 205db667d0fe..9291b8009296 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
@@ -45,12 +45,6 @@ SCT_DigitizationTool::SCT_DigitizationTool(const std::string& type,
 }
 
 SCT_DigitizationTool::~SCT_DigitizationTool() {
-  delete m_thpcsi;
-  for (SiHitCollection* hit: m_hitCollPtrs) {
-    hit->Clear();
-    delete hit;
-  }
-  m_hitCollPtrs.clear();
 }
 
 // ----------------------------------------------------------------------
@@ -199,7 +193,7 @@ StatusCode SCT_DigitizationTool::processAllSubEvents(const EventContext& ctx) {
 
   ATH_MSG_VERBOSE("Begin digitizeAllHits");
   if (m_enableHits and (not getNextEvent(ctx).isFailure())) {
-    digitizeAllHits(ctx, &m_rdoContainer, &m_simDataCollMap, &m_processedElements, m_thpcsi, rndmEngine);
+    digitizeAllHits(ctx, &m_rdoContainer, &m_simDataCollMap, &m_processedElements, m_thpcsi.get(), rndmEngine);
   } else {
     ATH_MSG_DEBUG("no hits found in event!");
   }
@@ -211,8 +205,7 @@ StatusCode SCT_DigitizationTool::processAllSubEvents(const EventContext& ctx) {
     ATH_MSG_DEBUG("Digitized Elements without Hits");
   }
 
-  delete m_thpcsi;
-  m_thpcsi = nullptr;
+  m_thpcsi.reset(nullptr);
 
   ATH_MSG_VERBOSE("Digitize success!");
   return StatusCode::SUCCESS;
@@ -235,7 +228,7 @@ StatusCode SCT_DigitizationTool::prepareEvent(const EventContext& ctx, unsigned
   m_processedElements.clear();
   m_processedElements.resize(m_detID->wafer_hash_max(), false);
 
-  m_thpcsi = new TimedHitCollection<SiHit>();
+  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>();
   m_HardScatterSplittingSkipper = false;
   return StatusCode::SUCCESS;
 }
@@ -252,21 +245,16 @@ StatusCode SCT_DigitizationTool::mergeEvent(const EventContext& ctx) {
   CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
 
   if (m_enableHits) {
-    digitizeAllHits(ctx, &m_rdoContainer, &m_simDataCollMap, &m_processedElements, m_thpcsi, rndmEngine);
+    digitizeAllHits(ctx, &m_rdoContainer, &m_simDataCollMap, &m_processedElements, m_thpcsi.get(), rndmEngine);
   }
 
   if (not m_onlyHitElements) {
     digitizeNonHits(ctx, &m_rdoContainer, &m_simDataCollMap, &m_processedElements, rndmEngine);
   }
 
-  for (SiHitCollection* hit: m_hitCollPtrs) {
-    hit->Clear();
-    delete hit;
-  }
   m_hitCollPtrs.clear();
 
-  delete m_thpcsi;
-  m_thpcsi = nullptr;
+  m_thpcsi.reset(nullptr);
 
   ATH_MSG_DEBUG("Digitize success!");
   return StatusCode::SUCCESS;
@@ -484,15 +472,15 @@ StatusCode SCT_DigitizationTool::processBunchXing(int bunchXing,
 
     TimedHitCollList::iterator endColl{hitCollList.end()};
     for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; iColl++) {
-      SiHitCollection *hitCollPtr{new SiHitCollection(*iColl->second)};
+      std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
       PileUpTimeEventIndex timeIndex{iColl->first};
       ATH_MSG_DEBUG("SiHitCollection found with " << hitCollPtr->size() <<
                     " hits");
       ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
 		      << " index: " << timeIndex.index()
 		      << " type: " << timeIndex.type());
-      m_thpcsi->insert(timeIndex, hitCollPtr);
-      m_hitCollPtrs.push_back(hitCollPtr);
+      m_thpcsi->insert(timeIndex, hitCollPtr.get());
+      m_hitCollPtrs.push_back(std::move(hitCollPtr));
     }
 
     return StatusCode::SUCCESS;
@@ -542,23 +530,20 @@ private:
 StatusCode SCT_DigitizationTool::createAndStoreRDO(SiChargedDiodeCollection* chDiodeCollection, SG::WriteHandle<SCT_RDO_Container>* rdoContainer) const {
 
   // Create the RDO collection
-  SCT_RDO_Collection* RDOColl{createRDO(chDiodeCollection)};
+  std::unique_ptr<SCT_RDO_Collection> RDOColl{createRDO(chDiodeCollection)};
+  const IdentifierHash identifyHash{RDOColl->identifyHash()};
 
   // Add it to storegate
   Identifier id_coll{RDOColl->identify()};
   int barrelec{m_detID->barrel_ec(id_coll)};
 
   if ((not m_barrelonly) or (std::abs(barrelec) <= 1)) {
-    if ((*rdoContainer)->addCollection(RDOColl, RDOColl->identifyHash()).isFailure()) {
+    if ((*rdoContainer)->addCollection(RDOColl.release(), identifyHash).isFailure()) {
       ATH_MSG_FATAL("SCT RDO collection could not be added to container!");
-      delete RDOColl;
-      RDOColl = nullptr;
       return StatusCode::FAILURE;
     }
   } else {
     ATH_MSG_VERBOSE("Not saving SCT_RDO_Collection: " << m_detID->show_to_string(RDOColl->identify()) << " to container!");
-    delete RDOColl;
-    RDOColl = nullptr;
   }
   return StatusCode::SUCCESS;
 } // SCT_Digitization::createAndStoreRDO()
@@ -566,16 +551,16 @@ StatusCode SCT_DigitizationTool::createAndStoreRDO(SiChargedDiodeCollection* chD
 // ----------------------------------------------------------------------
 // createRDO
 // ----------------------------------------------------------------------
-SCT_RDO_Collection* SCT_DigitizationTool::createRDO(SiChargedDiodeCollection* collection) const {
+std::unique_ptr<SCT_RDO_Collection> SCT_DigitizationTool::createRDO(SiChargedDiodeCollection* collection) const {
 
   // create a new SCT RDO collection
-  SCT_RDO_Collection* p_rdocoll{nullptr};
+  std::unique_ptr<SCT_RDO_Collection> p_rdocoll;
 
   // need the DE identifier
   const Identifier id_de{collection->identify()};
   IdentifierHash idHash_de{collection->identifyHash()};
   try {
-    p_rdocoll = new SCT_RDO_Collection(idHash_de);
+    p_rdocoll = std::make_unique<SCT_RDO_Collection>(idHash_de);
   } catch (const std::bad_alloc&) {
     ATH_MSG_FATAL("Could not create a new SCT_RDORawDataCollection !");
   }
@@ -731,7 +716,7 @@ StatusCode SCT_DigitizationTool::getNextEvent(const EventContext& ctx) {
     }
 
     // create a new hits collection
-    m_thpcsi = new TimedHitCollection<SiHit>{1};
+    m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(1);
     m_thpcsi->insert(0, hitCollection.cptr());
     ATH_MSG_DEBUG("SiHitCollection found with " << hitCollection->size() << " hits");
 
@@ -747,7 +732,7 @@ StatusCode SCT_DigitizationTool::getNextEvent(const EventContext& ctx) {
     ATH_MSG_DEBUG(hitCollList.size() << " SiHitCollections with key " << m_inputObjectName << " found");
   }
   // create a new hits collection
-  m_thpcsi = new TimedHitCollection<SiHit>{numberOfSiHits};
+  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(numberOfSiHits);
   // now merge all collections into one
   TimedHitCollList::iterator endColl{hitCollList.end()};
   for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h
index b229b45faba6..8cbb364564d8 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h
@@ -1,7 +1,7 @@
 /* -*- C++ -*- */
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SCT_DIGITZATION_SCT_DIGITZATIONTOOL_H
@@ -37,6 +37,7 @@
 
 // STL headers
 #include <limits>
+#include <memory>
 #include <string>
 
 // Forward declarations
@@ -104,9 +105,9 @@ private:
   StatusCode createAndStoreRDO(SiChargedDiodeCollection* chDiodeCollection, SG::WriteHandle<SCT_RDO_Container>* rdoContainer) const;
   /**
      @brief Create RDOs from the SiChargedDiodeCollection for the current wafer
-     @param chDiodeCollection       list of the SiChargedDiodes on the current wafer
+     @param collection       list of the SiChargedDiodes on the current wafer
   */
-  SCT_RDO_Collection* createRDO(SiChargedDiodeCollection* collection) const;
+  std::unique_ptr<SCT_RDO_Collection> createRDO(SiChargedDiodeCollection* collection) const;
 
   StatusCode getNextEvent(const EventContext& ctx);
   void       digitizeAllHits(const EventContext& ctx, SG::WriteHandle<SCT_RDO_Container>* rdoContainer, SG::WriteHandle<InDetSimDataCollection>* simDataCollMap, std::vector<bool>* processedElements, TimedHitCollection<SiHit>* thpcsi, CLHEP::HepRandomEngine * rndmEngine) const; //!< digitize all hits
@@ -144,10 +145,10 @@ private:
   ServiceHandle <PileUpMergeSvc> m_mergeSvc{this, "MergeSvc", "PileUpMergeSvc", "Merge service used in Pixel & SCT digitization"}; //!
 
   const SCT_ID* m_detID{nullptr}; //!< Handle to the ID helper
-  TimedHitCollection<SiHit>* m_thpcsi{nullptr};
+  std::unique_ptr<TimedHitCollection<SiHit>> m_thpcsi{nullptr};
   std::list<ISiChargedDiodesProcessorTool*> m_diodeCollectionTools;
   std::vector<bool> m_processedElements; //!< vector of processed elements - set by digitizeHits() */
-  std::vector<SiHitCollection*> m_hitCollPtrs;
+  std::vector<std::unique_ptr<SiHitCollection>> m_hitCollPtrs;
   bool m_HardScatterSplittingSkipper{false};
 };
 
-- 
GitLab


From 99df54e5fd64db2c5172800f33adde71a93e8a17 Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Thu, 11 Jun 2020 07:51:00 +0000
Subject: [PATCH 161/266] Fix calo monitoring config

---
 .../share/CaloClusterVecMonCollisions_jobOpt.py    | 14 ++++++++++----
 .../share/EMClusterVecMonCollisions_jobOpt.py      | 10 ++++++++--
 Calorimeter/CaloRec/python/CaloRecFlags.py         |  2 +-
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
index 8457d36d85a2..f9f5cdd9d601 100644
--- a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
@@ -49,7 +49,10 @@ else:
 
 if not (rec.triggerStream()=='CosmicCalo'):
   tmp_useBeamBackgroundRemoval = FALSE
+  tmp_useLArCollisionFilter = FALSE
   printfunc ("not CosmicCalo stream")
+else:
+  tmp_useLArCollisionFilter = TRUE
 
 printfunc ("tmp_useBeamBackgroundRemoval=", tmp_useBeamBackgroundRemoval)
 
@@ -65,16 +68,19 @@ CaloClusterMonNoTA = CaloClusterVecMon(
 
    useReadyFilterTool = tmp_useReadyFilterTool,
    ReadyFilterTool = GetAtlasReadyFilterTool(),
+
+   useLArCollisionFilterTool=tmp_useLArCollisionFilter,
+
    useLArNoisyAlg = tmp_useLArNoisyAlg,
 
    useBeamBackgroundRemoval = tmp_useBeamBackgroundRemoval,
 
    # cluster energy threshold in GeV
    lowEthresh = 0.0,  
-   lowmedEthresh = 5.0,
-   medEthresh = 10.0,
-   medhiEthresh = 15.0,
-   hiEthresh = 20.0,
+   lowmedEthresh = 10.0,
+   medEthresh = 25.0,
+   # medhiEthresh = 15.0,
+   hiEthresh = 50.0,
 )
 
 #ToolSvc += CaloClusterMonNoTA
diff --git a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
index 5da34fc72f39..3f206589bcb8 100644
--- a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
@@ -57,9 +57,13 @@ else:
 
 if not (rec.triggerStream()=='CosmicCalo'):
   tmp_useBeamBackgroundRemoval = FALSE
+  tmp_useLArCollisionFilter = FALSE 
   printfunc ("not CosmicCalo stream")
+else:
+  tmp_useLArCollisionFilter = TRUE
 
 printfunc ("tmp_useBeamBackgroundRemoval=", tmp_useBeamBackgroundRemoval)
+printfunc ("tmp_useLArCollisionFilter=", tmp_useLArCollisionFilter)
 
 EMCaloClusterMonNoTA = CaloClusterVecMon(
    name           = "EMCaloClusterMonNoTA",
@@ -73,16 +77,18 @@ EMCaloClusterMonNoTA = CaloClusterVecMon(
    useReadyFilterTool = tmp_useReadyFilterTool,
    ReadyFilterTool = GetAtlasReadyFilterTool(),
 
+   useLArCollisionFilterTool=tmp_useLArCollisionFilter,
+
    useLArNoisyAlg = tmp_useLArNoisyAlg,
 
    useBeamBackgroundRemoval = tmp_useBeamBackgroundRemoval,
 
    # cluster energy threshold in GeV
    lowEthresh = 0.0,  
-   lowmedEthresh = 5.0,
+   lowmedEthresh = 4.0,
    medEthresh = 10.0,
    medhiEthresh = 15.0,
-   hiEthresh = 20.0,
+   hiEthresh = 25.0,
 )
 
 #ToolSvc += EMCaloClusterMonNoTA 
diff --git a/Calorimeter/CaloRec/python/CaloRecFlags.py b/Calorimeter/CaloRec/python/CaloRecFlags.py
index e1625e9cf0f6..bb6f10ecd102 100644
--- a/Calorimeter/CaloRec/python/CaloRecFlags.py
+++ b/Calorimeter/CaloRec/python/CaloRecFlags.py
@@ -64,7 +64,7 @@ class doEmCluster(CaloRecFlagsJobProperty):
     """
     statusOn=True
     allowedTypes=['bool']
-    StoredValue=False
+    StoredValue=True
 
 class doCaloCluster(CaloRecFlagsJobProperty):
     """ switch for combined calo cluster
-- 
GitLab


From ebd5f7bc22a491e9153d0a1957732d94973fa387 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Thu, 11 Jun 2020 08:21:50 +0000
Subject: [PATCH 162/266] TrkSurfaces : run a few clang -tidy checks

---
 .../src/LineSaggingDescriptor.cxx             |  4 +-
 .../src/SaggedLineSurface.cxx                 |  4 +-
 .../src/SlidingCylinderSurface.cxx            | 18 ++---
 .../src/SlidingDiscSurface.cxx                |  4 +-
 .../TrkSurfaces/src/AnnulusBounds.cxx         | 74 +++++++++++--------
 .../TrkSurfaces/src/ConeBounds.cxx            | 16 ++--
 .../TrkSurfaces/src/ConeSurface.cxx           |  2 +-
 .../TrkSurfaces/src/CylinderBounds.cxx        | 11 +--
 .../TrkSurfaces/src/CylinderSurface.cxx       | 22 +++---
 .../TrkSurfaces/src/DiamondBounds.cxx         |  8 +-
 .../TrkSurfaces/src/DiscSurface.cxx           |  6 +-
 .../TrkSurfaces/src/PerigeeSurface.cxx        |  6 +-
 .../TrkSurfaces/src/PlaneSurface.cxx          |  6 +-
 .../TrkSurfaces/src/RectangleBounds.cxx       |  8 +-
 .../TrkSurfaces/src/RotatedDiamondBounds.cxx  |  8 +-
 .../src/RotatedTrapezoidBounds.cxx            | 10 +--
 .../TrkDetDescr/TrkSurfaces/src/Surface.cxx   |  2 +-
 .../TrkSurfaces/src/TrapezoidBounds.cxx       | 10 +--
 .../TrkSurfaces/src/TriangleBounds.cxx        |  8 +-
 19 files changed, 120 insertions(+), 107 deletions(-)

diff --git a/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/LineSaggingDescriptor.cxx b/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/LineSaggingDescriptor.cxx
index 629c8557d46d..976a655ae0ae 100755
--- a/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/LineSaggingDescriptor.cxx
+++ b/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/LineSaggingDescriptor.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -95,7 +95,7 @@ Amg::Transform3D* Trk::LineSaggingDescriptor::correctedSurfaceTransform(const Am
   // new z direction - build d(sag)/d(z)
   //double dsagdz = 8.0*s*sagMax/wireLengthSquare;
   // and the vector
-  Amg::Vector3D newLineDir(lineDirection);
+  const Amg::Vector3D& newLineDir(lineDirection);
   // build the other vectors
   Amg::Vector3D newLineY(newLineDir.cross(sagDir)); 
   // build the x vector
diff --git a/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/SaggedLineSurface.cxx b/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/SaggedLineSurface.cxx
index 799574f7692a..4c27f2cf5e95 100755
--- a/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/SaggedLineSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkDistortedSurfaces/src/SaggedLineSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ Trk::StraightLineSurface* Trk::SaggedLineSurface::correctedSurface(const Amg::Ve
   }else{
     throw std::logic_error("Condition not implemented ( Trk::SaggedLineSurface::correctedSurface (2) ).");
   }
-  return (newHepTransform) ? new Trk::StraightLineSurface(newHepTransform,bounds().r(),10e3) : 0;
+  return (newHepTransform) ? new Trk::StraightLineSurface(newHepTransform,bounds().r(),10e3) : nullptr;
 }
 
 
diff --git a/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingCylinderSurface.cxx b/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingCylinderSurface.cxx
index c68bd2cf5c63..9e56f039f354 100644
--- a/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingCylinderSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingCylinderSurface.cxx
@@ -187,9 +187,9 @@ Trk::SlidingCylinderSurface::straightLineDistanceEstimate(const Amg::Vector3D& p
   if (A == 0.) { // direction parallel to cylinder axis
     if (fabs(currDist) < tol) {
       return Trk::DistanceSolution(1, 0., true, 0.); // solution at surface
-    } else {
+    } 
       return Trk::DistanceSolution(0, currDist, true, 0.); // point of closest approach without intersection
-    }
+    
   }
 
   // minimal distance to cylinder axis
@@ -198,22 +198,22 @@ Trk::SlidingCylinderSurface::straightLineDistanceEstimate(const Amg::Vector3D& p
   if (rmin > radius) { // no intersection
     double first = B / A;
     return Trk::DistanceSolution(0, currDist, true, first); // point of closest approach without intersection
-  } else {
+  } 
     if (fabs(rmin - radius) < tol) { // tangential 'intersection' - return double solution
       double first = B / A;
       return Trk::DistanceSolution(2, currDist, true, first, first);
-    } else {
+    } 
       double first = B / A - sqrt((radius - rmin) * (radius + rmin) / A);
       double second = B / A + sqrt((radius - rmin) * (radius + rmin) / A);
       if (first >= 0.) {
         return Trk::DistanceSolution(2, currDist, true, first, second);
-      } else if (second <= 0.) {
+      } if (second <= 0.) {
         return Trk::DistanceSolution(2, currDist, true, second, first);
-      } else { // inside cylinder
+      } // inside cylinder
         return Trk::DistanceSolution(2, currDist, true, second, first);
-      }
-    }
-  }
+      
+    
+  
 }
 
 Trk::DistanceSolution
diff --git a/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingDiscSurface.cxx b/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingDiscSurface.cxx
index c08ab4b27467..43abb6f7bb9e 100644
--- a/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingDiscSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometrySurfaces/src/SlidingDiscSurface.cxx
@@ -155,9 +155,9 @@ Trk::SlidingDiscSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos,
   if (A == 0.) { // direction parallel to surface
     if (fabs(d) < tol) {
       return Trk::DistanceSolution(1, 0., true, 0.);
-    } else {
+    } 
       return Trk::DistanceSolution(0, d, true, 0.);
-    }
+    
   }
 
   double D = b * (S - (pos.dot(N))) / A;
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx
index fb9279637cd0..0f492f84d92c 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx
@@ -106,18 +106,18 @@ public:
           || ((x * h + y * w - w * h) * (x * h + y * w - w * h) <= r * r * (w * w + h * h) && x * w - y * h >= -h * h &&
               x * w - y * h <= w * w)) { // collision with (0, h)---(w, 0)
         return true;
-      } else {
+      } 
         if ((x - w) * (x - w) + (y - h) * (y - h) <= r * r || (x <= w && y - r <= h) || (y <= h && x - r <= w)) {
           return iterate(x, y, w, 0, 0, h, r * r); // collision within triangle (0, h) (w, h) (0, 0) is possible
         }
         return false;
-      }
-    } else {
+      
+    } 
       double R = -r;
       double localCos = x / R;
       double deltaR = std::sqrt(h * h + (w * w - h * h) * localCos * localCos);
       return deltaR >= R - std::sqrt(x * x + y * y);
-    }
+    
   }
   EllipseCollisionTest(int maxIterations) { this->m_maxIterations = maxIterations; }
 };
@@ -334,10 +334,11 @@ Trk::AnnulusBounds::inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk
      isRight(locpo, 0, 0, m_solution_L_max[0], m_solution_L_max[1], m_solution_L_min[0], m_solution_L_min[1]) &&
      isLeft(locpo, 0, 0, m_solution_R_max[0], m_solution_R_max[1], m_solution_R_min[0], m_solution_R_min[1]));
 
-  if (condLine)
+  if (condLine){
     return condR;
-  else
-    return (condR && condSide);
+  }
+
+  return (condR && condSide);
 }
 
 // checking if local point lies above a line
@@ -356,7 +357,7 @@ Trk::AnnulusBounds::isAbove(const Amg::Vector2D& locpo,
     // the most tolerant approach for tol1 and tol2
     double sign = k > 0. ? -1. : +1.;
     return (locpo[Trk::locY] + tol2 > (k * (locpo[Trk::locX] + sign * tol1) + d));
-  } else
+  } 
     return false;
 }
 
@@ -375,15 +376,19 @@ Trk::AnnulusBounds::isRight(const Amg::Vector2D& locpo,
     double k = (y2 - y1) / (x2 - x1);
     double d = y1 - k * x1;
 
-    if (k > 0)
-      return (locpo[Trk::locY] < (k * locpo[Trk::locX] + d) || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
-    else if (k < 0)
-      return (locpo[Trk::locY] > (k * locpo[Trk::locX] + d) || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
-    else
-      return false;
-  } else {
-    return (locpo[Trk::locX] > x1 || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    if (k > 0){
+      return (locpo[Trk::locY] < (k * locpo[Trk::locX] + d) ||
+              EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    }
+    if (k < 0){
+      return (locpo[Trk::locY] > (k * locpo[Trk::locX] + d) ||
+              EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    }
+
+    return false;
   }
+  return (locpo[Trk::locX] > x1 ||
+          EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
 }
 
 // checking if local point left from a line
@@ -401,15 +406,19 @@ Trk::AnnulusBounds::isLeft(const Amg::Vector2D& locpo,
     double k = (y2 - y1) / (x2 - x1);
     double d = y1 - k * x1;
 
-    if (k < 0)
-      return (locpo[Trk::locY] < (k * locpo[Trk::locX] + d) || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
-    else if (k > 0)
-      return (locpo[Trk::locY] > (k * locpo[Trk::locX] + d) || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
-    else
-      return false;
-  } else {
-    return (locpo[Trk::locX] < x1 || EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    if (k < 0){
+      return (locpo[Trk::locY] < (k * locpo[Trk::locX] + d) ||
+              EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    }
+    if (k > 0){
+      return (locpo[Trk::locY] > (k * locpo[Trk::locX] + d) ||
+              EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
+    }
+
+    return false;
   }
+  return (locpo[Trk::locX] < x1 ||
+          EllipseIntersectLine(locpo, tol1, tol2, x1, y1, x2, y2));
 }
 
 double
@@ -434,9 +443,9 @@ Trk::AnnulusBounds::minDistance(const Amg::Vector2D& locpo) const
 
   dist = std::min(dist, distArc);
 
-  if (inside(locpo, 0., 0.))
+  if (inside(locpo, 0., 0.)){
     dist = -dist;
-
+  }
   return dist;
 }
 
@@ -456,14 +465,14 @@ Trk::AnnulusBounds::circleLineIntersection(double R, double k, double d) const
   // equation:   (1+k^2)*x^2 + 2kdx +d^2 - R^2 = 0
   double delta = 4. * k * d * k * d - 4. * (1 + k * k) * (d * d - R * R);
 
-  if (delta < 0)
+  if (delta < 0){
     return solution;
-  else {
+  }
     x1 = (-2. * k * d - std::sqrt(delta)) / (2. * (1 + k * k));
     x2 = (-2. * k * d + std::sqrt(delta)) / (2. * (1 + k * k));
     y1 = k * x1 + d;
     y2 = k * x2 + d;
-  }
+  
   if (y1 > y2) {
     solution.push_back(x1);
     solution.push_back(y1);
@@ -522,10 +531,11 @@ Trk::AnnulusBounds::distanceToArc(const Amg::Vector2D& locpo,
   double tanPhi_L = sL[0] / sL[1];
   double tanPhi_R = sR[0] / sR[1];
 
-  if (tanlocPhi > tanPhi_L && tanlocPhi < tanPhi_R)
+  if (tanlocPhi > tanPhi_L && tanlocPhi < tanPhi_R){
     return std::fabs(std::sqrt(X * X + Y * Y) - R);
-  else
-    return 9999999999.;
+  }
+
+  return 9999999999.;
 }
 
 // ellipse and line intersection
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx
index 750ff8bcda8c..3e0871a206a8 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 Trk::ConeBounds::ConeBounds()
   : m_boundValues(ConeBounds::bv_length, 0.)
@@ -131,17 +131,19 @@ Trk::ConeBounds::minDistance(const Amg::Vector2D& pos) const
   // if inside the cone, return the smaller length (since both are
   // negative, the *larger* of the 2 is the *smaller* distance)
   if (phiDist <= 0. && zDist <= 0) {
-    if (phiDist > zDist)
+    if (phiDist > zDist){
       return phiDist;
-    else
-      return zDist;
+    }
+    return zDist;
   }
 
   // if inside the phi or z boundary, return the other
-  if (phiDist <= 0.)
+  if (phiDist <= 0.){
     return zDist;
-  if (zDist <= 0.)
+  }
+  if (zDist <= 0.){
     return phiDist;
+  }
 
   // otherwise, return both (this should be the distance to the corner
   // closest to the cone
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeSurface.cxx
index 04ad64a328e1..8a5f5a99ea0a 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeSurface.cxx
@@ -14,7 +14,7 @@
 // STD
 //#include <iostream>
 //#include <iomanip>
-#include <assert.h>
+#include <cassert>
 
 // default constructor
 Trk::ConeSurface::ConeSurface()
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx
index 3b050de27048..8f3035e7728e 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 Trk::CylinderBounds::CylinderBounds()
   : m_boundValues(CylinderBounds::bv_length, 0.)
@@ -102,10 +102,11 @@ Trk::CylinderBounds::minDistance(const Amg::Vector2D& pos) const
   double sF = 2. * m_boundValues[CylinderBounds::bv_radius] * sin(.5 * (dF - wF));
 
   if (sF <= 0. || sZ <= 0.) {
-    if (sF > sZ)
+    if (sF > sZ){
       return sF;
-    else
-      return sZ;
+    }
+
+    return sZ;
   }
   return sqrt(sF * sF + sZ * sZ);
 }
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderSurface.cxx
index eb87fb08547a..76970b2c2618 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,7 +12,7 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
-#include <assert.h>
+#include <cassert>
 #include <iomanip>
 #include <iostream>
 
@@ -327,9 +327,9 @@ Trk::CylinderSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, con
   if (A == 0.) { // direction parallel to cylinder axis
     if (fabs(currDist) < tol) {
       return Trk::DistanceSolution(1, 0., true, 0.); // solution at surface
-    } else {
+    } 
       return Trk::DistanceSolution(0, currDist, true, 0.); // point of closest approach without intersection
-    }
+    
   }
 
   // minimal distance to cylinder axis
@@ -344,11 +344,11 @@ Trk::CylinderSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, con
   if (rmin > radius) { // no intersection
     double first = B / A;
     return Trk::DistanceSolution(0, currDist, true, first); // point of closest approach without intersection
-  } else {
+  } 
     if (fabs(rmin - radius) < tol) { // tangential 'intersection' - return double solution
       double first = B / A;
       return Trk::DistanceSolution(2, currDist, true, first, first);
-    } else {
+    } 
       // The [[maybe_unused]] declaration here suppresses redundant division checking.
       // We don't want to rewrite how this is evaluated due to instabilities.
       [[maybe_unused]]
@@ -358,13 +358,13 @@ Trk::CylinderSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, con
       double second = b_a + x;
       if (first >= 0.) {
         return Trk::DistanceSolution(2, currDist, true, first, second);
-      } else if (second <= 0.) {
+      } if (second <= 0.) {
         return Trk::DistanceSolution(2, currDist, true, second, first);
-      } else { // inside cylinder
+      } // inside cylinder
         return Trk::DistanceSolution(2, currDist, true, second, first);
-      }
-    }
-  }
+      
+    
+  
 }
 
 Trk::DistanceSolution
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx
index ff6f70dc777a..1ae873c77b12 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 // default constructor
 Trk::DiamondBounds::DiamondBounds()
@@ -105,13 +105,13 @@ Trk::DiamondBounds::insideFull(const Amg::Vector2D& locpo, double tol1, double t
                      m_boundValues[DiamondBounds::bv_halfY1]
                  : 0.;
     return (fabs(locpo[Trk::locX]) <= m_boundValues[DiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locY]));
-  } else {
+  } 
     double k = m_boundValues[DiamondBounds::bv_halfY2] > 0.
                  ? (m_boundValues[DiamondBounds::bv_medHalfX] - m_boundValues[DiamondBounds::bv_maxHalfX]) / 2 /
                      m_boundValues[DiamondBounds::bv_halfY2]
                  : 0.;
     return (fabs(locpo[Trk::locX]) <= m_boundValues[DiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locY]));
-  }
+  
 }
 
 // opening angle in point A
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx
index 848dbd7e9b72..4c519c73558e 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -237,9 +237,9 @@ Trk::DiscSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, const A
   if (A == 0.) { // direction parallel to surface
     if (fabs(d) < tol) {
       return Trk::DistanceSolution(1, 0., true, 0.);
-    } else {
+    } 
       return Trk::DistanceSolution(0, d, true, 0.);
-    }
+    
   }
 
   double D = b * (S - (pos.dot(N))) / A;
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx
index 159f4bf3dbd8..e84583da2990 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ Trk::PerigeeSurface::PerigeeSurface(std::unique_ptr<Amg::Transform3D> tTransform
 {}
 
 Trk::PerigeeSurface::PerigeeSurface(const PerigeeSurface& pesf)
-  : Surface()
+  : Surface(pesf)
   , m_lineDirection(nullptr)
 {
   if (pesf.m_center)
@@ -97,7 +97,7 @@ Trk::PerigeeSurface::localToGlobal(const Trk::LocalParameters& locpars) const
     Amg::Vector3D loc3Dframe(
       -locpars[Trk::d0] * sin(locpars[Trk::phi0]), locpars[Trk::d0] * cos(locpars[Trk::phi0]), locpars[Trk::z0]);
     return new Amg::Vector3D(transform() * loc3Dframe);
-  } else
+  } 
     return new Amg::Vector3D(0., 0., locpars[Trk::z0] + (center().z()));
 }
 
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx
index 0f14b1c7c739..991f8f8f2e46 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -246,9 +246,9 @@ Trk::PlaneSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, const
   if (A == 0.) {               // direction parallel to surface
     if (fabs(d) < tol) {
       return Trk::DistanceSolution(1, 0., true, 0.);
-    } else {
+    } 
       return Trk::DistanceSolution(0, d, true, 0.);
-    }
+    
   }
 
   return Trk::DistanceSolution(1, d, true, -d / A);
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/RectangleBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/RectangleBounds.cxx
index abf38e4f19ea..b865e69cc3dd 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/RectangleBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/RectangleBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -61,10 +61,10 @@ Trk::RectangleBounds::minDistance(const Amg::Vector2D& pos) const
   double dy = fabs(pos[1]) - m_boundValues[RectangleBounds::bv_halfY];
 
   if (dx <= 0. || dy <= 0.) {
-    if (dx > dy)
+    if (dx > dy){
       return dx;
-    else
-      return dy;
+    }
+    return dy;
   }
   return sqrt(dx * dx + dy * dy);
 }
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx
index e5653685f40e..01c44034acd0 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 // default constructor
 Trk::RotatedDiamondBounds::RotatedDiamondBounds()
@@ -110,14 +110,14 @@ Trk::RotatedDiamondBounds::insideFull(const Amg::Vector2D& locpo, double tol1, d
             m_boundValues[RotatedDiamondBounds::bv_halfY1]
         : 0.;
     return (fabs(locpo[Trk::locY]) <= m_boundValues[RotatedDiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locX]));
-  } else {
+  } 
     double k =
       m_boundValues[RotatedDiamondBounds::bv_halfY2] > 0.
         ? (m_boundValues[RotatedDiamondBounds::bv_medHalfX] - m_boundValues[RotatedDiamondBounds::bv_maxHalfX]) / 2 /
             m_boundValues[RotatedDiamondBounds::bv_halfY2]
         : 0.;
     return (fabs(locpo[Trk::locY]) <= m_boundValues[RotatedDiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locX]));
-  }
+  
 }
 
 // opening angle in point A
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx
index 94886e6ec5f1..88f8fcc8718c 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 // default constructor
 Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds()
@@ -146,10 +146,10 @@ Trk::RotatedTrapezoidBounds::minDistance(const Amg::Vector2D& pos) const
       in = false;
     Ao = A;
   }
-  if (in)
+  if (in){
     return -sqrt(dm);
-  else
-    return sqrt(dm);
+  }
+  return sqrt(dm);
 }
 
 // ostream operator overload
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/Surface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/Surface.cxx
index dc6be0e23e70..370fe35a387b 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/Surface.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/Surface.cxx
@@ -186,7 +186,7 @@ Trk::Surface::isOnSurface(const Amg::Vector3D& glopo, BoundaryCheck bchk, double
   if (posOnSurface) {
     delete posOnSurface;
     return true;
-  } else
+  } 
     return false;
 }
 
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx
index 9f4d837906c6..9ecc1710caa2 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -11,9 +11,9 @@
 // Gaudi
 #include "GaudiKernel/MsgStream.h"
 // STD
+#include <cmath>
 #include <iomanip>
 #include <iostream>
-#include <math.h>
 
 // default constructor
 Trk::TrapezoidBounds::TrapezoidBounds()
@@ -194,10 +194,10 @@ Trk::TrapezoidBounds::minDistance(const Amg::Vector2D& pos) const
       in = false;
     Ao = A;
   }
-  if (in)
+  if (in){
     return -sqrt(dm);
-  else
-    return sqrt(dm);
+  }
+  return sqrt(dm);
 }
 
 // ostream operator overload
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx
index 991aec7107f4..a61de0eb6bf6 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -131,10 +131,10 @@ Trk::TriangleBounds::minDistance(const Amg::Vector2D& pos) const
       in = false;
     Ao = A;
   }
-  if (in)
+  if (in){
     return -sqrt(dm);
-  else
-    return sqrt(dm);
+  }
+  return sqrt(dm);
 }
 
 // ostream operator overload
-- 
GitLab


From 5f38507c8d494e548a07359b2b4e99cfd77c5f73 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 11 Jun 2020 10:58:26 +0200
Subject: [PATCH 163/266] Remove delete from InDetServMatGeoModel using
 std::unique_ptr.

---
 .../InDetGeoModelUtils/InDetSubDetectorFactoryBase.h       | 6 +++++-
 .../InDetServMatGeoModel/PixelServMatFactoryFS.h           | 4 ++--
 .../InDetServMatGeoModel/SCT_ServMatFactoryFS.h            | 5 +++--
 .../InDetServMatGeoModel/TRT_ServMatFactoryFS.h            | 5 +++--
 .../InDetServMatGeoModel/src/PixelServMatFactory.cxx       | 7 +++----
 .../InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx     | 7 ++-----
 .../InDetServMatGeoModel/src/SCT_ServMatFactory.cxx        | 7 +++----
 .../InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx      | 6 ++----
 .../InDetServMatGeoModel/src/TRT_ServMatFactory.cxx        | 7 +++----
 .../InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx      | 6 ++----
 10 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/InDetSubDetectorFactoryBase.h b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/InDetSubDetectorFactoryBase.h
index 51517ea821c9..b87b19bc8d2e 100644
--- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/InDetSubDetectorFactoryBase.h
+++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/InDetSubDetectorFactoryBase.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef InDetGeoModelUtils_SubDetectorFactoryBase_H
@@ -8,6 +8,8 @@
 #include "AthenaKernel/MsgStreamMember.h"
 #include "InDetGeoModelUtils/InDetDDAthenaComps.h"
 
+#include <memory>
+
 class StoreGateSvc;
 class IGeoDbTagSvc;
 class IRDBAccessSvc;
@@ -57,6 +59,8 @@ private:
   
 protected:
   InDetMaterialManager * m_materialManager;
+  // Use this std::unique_ptr when this class owns InDetMaterialManager
+  std::unique_ptr<InDetMaterialManager> m_materialManagerUnique;
 };
 
 } // end namespace
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/PixelServMatFactoryFS.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/PixelServMatFactoryFS.h
index 3f92e350fa1f..79f91d19cdca 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/PixelServMatFactoryFS.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/PixelServMatFactoryFS.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETSERVMATGEOMODEL_PIXELSERVMATFACTORYFS_H
@@ -39,7 +39,7 @@ class PixelServMatFactoryFS   {
   // private data
   StoreGateSvc                    *m_detStore;
   ServiceHandle<IRDBAccessSvc>     m_rdbAccess;
-  InDetMaterialManager            *m_materialManager;
+  std::unique_ptr<InDetMaterialManager> m_materialManager;
   mutable Athena::MsgStreamMember  m_msg;
 
 };
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/SCT_ServMatFactoryFS.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/SCT_ServMatFactoryFS.h
index e81180f1d36e..3a4c3a0a493d 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/SCT_ServMatFactoryFS.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/SCT_ServMatFactoryFS.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETSERVMATGEOMODEL_SCT_SERVMATFACTORYFS_H
@@ -13,6 +13,7 @@ class GeoPhysVol;
 class InDetMaterialManager;
 class IRDBAccessSvc;
 
+#include <memory>
 #include <string>
 
 // SCT service material factory for Frozen Showers
@@ -40,7 +41,7 @@ class SCT_ServMatFactoryFS   {
   // private data
   StoreGateSvc                    *m_detStore;
   ServiceHandle<IRDBAccessSvc>     m_rdbAccess;
-  InDetMaterialManager            *m_materialManager;
+  std::unique_ptr<InDetMaterialManager> m_materialManager;
   mutable Athena::MsgStreamMember  m_msg;
 
 };
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/TRT_ServMatFactoryFS.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/TRT_ServMatFactoryFS.h
index 2aa44c2f93f8..34ba811ead0a 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/TRT_ServMatFactoryFS.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/TRT_ServMatFactoryFS.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETSERVMATGEOMODEL_TRT_SERVMATFACTORYFS_H
@@ -13,6 +13,7 @@ class GeoPhysVol;
 class InDetMaterialManager;
 class IRDBAccessSvc;
 
+#include <memory>
 #include <string>
 
 // TRT service material factory fro Frozen Showers
@@ -40,7 +41,7 @@ class TRT_ServMatFactoryFS   {
   // private data
   StoreGateSvc                    *m_detStore;
   ServiceHandle<IRDBAccessSvc>     m_rdbAccess;
-  InDetMaterialManager            *m_materialManager;
+  std::unique_ptr<InDetMaterialManager> m_materialManager;
   mutable Athena::MsgStreamMember  m_msg;
 };
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactory.cxx
index 6d4967906cff..d4345d719eb2 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactory.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactory.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/PixelServMatFactory.h"
@@ -34,8 +34,6 @@ PixelServMatFactory::PixelServMatFactory(const InDetDD::AthenaComps * athenaComp
 
 PixelServMatFactory::~PixelServMatFactory()
 {
-  // It owns the material manager
-  delete m_materialManager;
 }
 
 
@@ -56,7 +54,8 @@ void PixelServMatFactory::create(GeoPhysVol *mother)
 
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table if it exists
-  m_materialManager = new InDetMaterialManager("PixelMaterialManager", getAthenaComps());
+  m_materialManagerUnique = std::make_unique<InDetMaterialManager>("PixelMaterialManager", getAthenaComps());
+  m_materialManager = m_materialManagerUnique.get();
   m_materialManager->addWeightTable(weightTable, "pix");
   m_materialManager->addScalingTable(scalingTable);
   
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx
index 0c8e91457035..e07e13909213 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/PixelServMatFactoryFS.h"
@@ -36,7 +36,6 @@ PixelServMatFactoryFS::PixelServMatFactoryFS(StoreGateSvc *detStore,
 					     ServiceHandle<IRDBAccessSvc> pRDBAccess) :
   m_detStore(detStore),
   m_rdbAccess(pRDBAccess),
-  m_materialManager(0),
   m_msg("PixelServMatFactoryFS")
 { 
 }
@@ -44,7 +43,6 @@ PixelServMatFactoryFS::PixelServMatFactoryFS(StoreGateSvc *detStore,
 
 PixelServMatFactoryFS::~PixelServMatFactoryFS()
 {
-  delete m_materialManager;
 }
 
 
@@ -63,7 +61,7 @@ void PixelServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM)
 
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table if it exists
-  m_materialManager = new InDetMaterialManager("PixelMaterialManager", m_detStore, weightTable, "pix");
+  m_materialManager = std::make_unique<InDetMaterialManager>("PixelMaterialManager", m_detStore, weightTable, "pix");
 
 
   // Build general services:
@@ -84,7 +82,6 @@ void PixelServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM)
     const GeoShape* serviceTube = serviceTubeTmp;
 
     std::string materialName = tubeHelper.materialName();
-    //const GeoMaterial* material = m_materialManager->getMaterialForVolume(materialName, serviceTube->volume());
     const GeoMaterial* material = m_materialManager->getMaterial(materialName);
    
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx
index 9c1001f08ea6..2a5e7b46f230 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/SCT_ServMatFactory.h"
@@ -37,8 +37,6 @@ SCT_ServMatFactory::SCT_ServMatFactory(const InDetDD::AthenaComps * athenaComps)
 
 SCT_ServMatFactory::~SCT_ServMatFactory()
 {
-  // It owns the material manager
-  delete m_materialManager;
 }
 
 
@@ -67,7 +65,8 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother)
 
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table.
-  m_materialManager = new InDetMaterialManager("SCT_MaterialManager", getAthenaComps());
+  m_materialManagerUnique = std::make_unique<InDetMaterialManager>("SCT_MaterialManager", getAthenaComps());
+  m_materialManager = m_materialManagerUnique.get();
   m_materialManager->addWeightTable(weightTable, "sct");
   m_materialManager->addScalingTable(scalingTable);
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx
index 6645fab3a90b..60af3962afa9 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/SCT_ServMatFactoryFS.h"
@@ -39,7 +39,6 @@
 SCT_ServMatFactoryFS::SCT_ServMatFactoryFS(StoreGateSvc *detStore,ServiceHandle<IRDBAccessSvc>& pRDBAccess) :
   m_detStore(detStore),
   m_rdbAccess(pRDBAccess),
-  m_materialManager(0),
   m_msg("SCT_ServMatFactoryFS")
 {
 }
@@ -47,7 +46,6 @@ SCT_ServMatFactoryFS::SCT_ServMatFactoryFS(StoreGateSvc *detStore,ServiceHandle<
 
 SCT_ServMatFactoryFS::~SCT_ServMatFactoryFS()
 {
-  delete m_materialManager;
 }
 
 
@@ -70,7 +68,7 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM)
  
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table.
-  m_materialManager = new InDetMaterialManager("SCT_MaterialManager", m_detStore, weightTable, "sct");
+  m_materialManager = std::make_unique<InDetMaterialManager>("SCT_MaterialManager", m_detStore, weightTable, "sct");
   
 
   //------------------------------------------
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx
index bd3fcd6a4efc..65526925cd7e 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/TRT_ServMatFactory.h"
@@ -39,8 +39,6 @@ TRT_ServMatFactory::TRT_ServMatFactory(const InDetDD::AthenaComps * athenaComps)
 
 TRT_ServMatFactory::~TRT_ServMatFactory()
 {
-  // It owns the material manager
-  delete m_materialManager;
 }
 
 
@@ -73,7 +71,8 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother)
 
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table if it exists
-  m_materialManager = new InDetMaterialManager("TRT_MaterialManager", getAthenaComps());
+  m_materialManagerUnique = std::make_unique<InDetMaterialManager>("TRT_MaterialManager", getAthenaComps());
+  m_materialManager = m_materialManagerUnique.get();
   m_materialManager->addWeightTable(weightTable, "trt");
   m_materialManager->addScalingTable(scalingTable);
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx
index 2e3a3aa3c046..ff2905579814 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/TRT_ServMatFactoryFS.h"
@@ -34,7 +34,6 @@
 TRT_ServMatFactoryFS::TRT_ServMatFactoryFS(StoreGateSvc *detStore,ServiceHandle<IRDBAccessSvc> pRDBAccess) :
   m_detStore(detStore),
   m_rdbAccess(pRDBAccess),
-  m_materialManager(0),
   m_msg("TRT_ServMatFactoryFS")
 {
   
@@ -43,7 +42,6 @@ TRT_ServMatFactoryFS::TRT_ServMatFactoryFS(StoreGateSvc *detStore,ServiceHandle<
 
 TRT_ServMatFactoryFS::~TRT_ServMatFactoryFS()
 {
-  delete m_materialManager;
 }
 
 
@@ -70,7 +68,7 @@ void TRT_ServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM)
 
   // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
   // with weights table if it exists
-  m_materialManager = new InDetMaterialManager("TRT_MaterialManager", m_detStore, weightTable, "trt");
+  m_materialManager = std::make_unique<InDetMaterialManager>("TRT_MaterialManager", m_detStore, weightTable, "trt");
 
 
 //VK  10/09/2005 Construct a gap for rails
-- 
GitLab


From 31af82debead8ecf303b2e127d0610ac15088f18 Mon Sep 17 00:00:00 2001
From: Artem Basalaev <artem.basalaev@cern.ch>
Date: Thu, 11 Jun 2020 09:28:43 +0000
Subject: [PATCH 164/266] ART comparison in simulation tests: ignoring
 mc_event_number in MT jobs

---
 .../test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh        | 2 +-
 .../OverlayTestsMT/test/test_MCOverlay_MT_ttbar_4threads.sh     | 2 +-
 .../test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh          | 2 +-
 .../Tests/OverlayTestsMT/test/test_MCOverlay_ttbar_ST_vs_MT.sh  | 2 +-
 .../SimCoreTestsMT/test/test_AtlasG4_CalibationHits_pions_MT.sh | 2 +-
 .../Tests/SimCoreTestsMT/test/test_AtlasG4_TTbarSim_MT.sh       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh b/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
index 126773fcf958..183204de3faf 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
@@ -25,7 +25,7 @@ if [ $rc -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root --excluded-vars mc_event_number
     rc2=$?
 fi
 echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_4threads.sh b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_4threads.sh
index f2950caed71c..a546ff7f86c0 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_4threads.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_4threads.sh
@@ -31,7 +31,7 @@ if [ $rc -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root --excluded-vars mc_event_number
     rc2=$?
 fi
 echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
index 0a1803d98408..bdfc98b342b9 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
@@ -25,7 +25,7 @@ if [ $rc -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root --excluded-vars mc_event_number
     rc2=$?
 fi
 echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_ttbar_ST_vs_MT.sh b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_ttbar_ST_vs_MT.sh
index b351c7de68b0..b75b96236864 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_ttbar_ST_vs_MT.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_ttbar_ST_vs_MT.sh
@@ -58,7 +58,7 @@ if [ $rc2 -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --diff-root --excluded-vars mc_event_number
     rc4=$?
 fi
 echo  "art-result: $rc4 regression"
diff --git a/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_CalibationHits_pions_MT.sh b/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_CalibationHits_pions_MT.sh
index 9d3b35725390..0c7a6c982c21 100755
--- a/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_CalibationHits_pions_MT.sh
+++ b/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_CalibationHits_pions_MT.sh
@@ -33,7 +33,7 @@ if [ $rc -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --excluded-vars mc_event_number
     rc2=$?
 fi
 echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_TTbarSim_MT.sh b/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_TTbarSim_MT.sh
index 22b66dc5abaf..a480b9c70bf6 100755
--- a/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_TTbarSim_MT.sh
+++ b/Simulation/Tests/SimCoreTestsMT/test/test_AtlasG4_TTbarSim_MT.sh
@@ -32,7 +32,7 @@ if [ $rc -eq 0 ]
 then
     ArtPackage=$1
     ArtJobName=$2
-    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --excluded-vars mc_event_number
     rc2=$?
 fi
 echo  "art-result: $rc2 regression"
-- 
GitLab


From 33b9e0c2295dde0fbbcbb11569497167eb944c0a Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Thu, 11 Jun 2020 09:30:31 +0000
Subject: [PATCH 165/266] DistributedKalmanFilter :  EventContext aware, use
 new style ToolHandles, ATH_MSG macros etc

---
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../DistributedKalmanFilter.h                 | 316 +++---
 .../src/DistributedKalmanFilter.cxx           | 956 +++++++++---------
 .../src/TrkFilteringNodes.cxx                 |  22 +-
 .../src/TrkPlanarSurface.cxx                  |  10 +-
 .../src/TrkTrackState.cxx                     |  28 +-
 .../TrkFitterInterfaces/ITrackFitter.h        |   2 +-
 7 files changed, 666 insertions(+), 669 deletions(-)
 create mode 100644 Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..e7c052501194
--- /dev/null
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Tracking/TrkFitter/TrkDistributedKalmanFilter
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h
index 8598627a4896..4b8f6abcf03b 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h
@@ -14,162 +14,198 @@
 #ifndef __TRK_DISTRIBUTED_KALMAN_FILTER__
 #define __TRK_DISTRIBUTED_KALMAN_FILTER__
 
-#include "TrkFitterUtils/FitterTypes.h"
-#include "TrkFitterInterfaces/ITrackFitter.h"
-//#include "GaudiKernel/AlgTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "TrkEventPrimitives/ParticleHypothesis.h"
+#include "TrkFitterInterfaces/ITrackFitter.h"
+#include "TrkFitterUtils/FitterTypes.h"
 
-#include "StoreGate/ReadCondHandleKey.h"
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
+#include "TrkExInterfaces/IExtrapolator.h"
 
+#include <memory>
 #include <vector>
-
 class IAlgTool;
 class AtlasDetectorID;
 
 namespace Trk {
-	
-    class Track;                   //!> ATLAS standard track class
-    class TrkBaseNode;             //!> Base class for track filtering nodes
-    class TrkTrackState;           //!> Simple track state: 5 parameters + covariance
-    class TrkPlanarSurface;        //!> Simple class for planar surface description
-    class TrackStateOnSurface;
-    class IMagneticFieldTool;
-    class IRIO_OnTrackCreator;     //!> Interface for creation of ROT
-    class IExtrapolator;           //!> Extrapolation Tool
-    class MeasuredPerigee;
-
-
-    class DistributedKalmanFilter : virtual public ITrackFitter, public AthAlgTool { 
-    public:
-	// standard AlgTool methods
-	DistributedKalmanFilter(const std::string&,const std::string&,const IInterface*);
-	virtual ~DistributedKalmanFilter();
-		
-	// standard Athena methods
-	StatusCode initialize();
-	StatusCode finalize();
-
-	// Filter settings:
-	//			RunOutlierRemoval - use logic to remove bad hits
-	//			ParticleHypothesis   - allow for multiple scattering and energy loss?
-  
+
+class Track;            //!> ATLAS standard track class
+class TrkBaseNode;      //!> Base class for track filtering nodes
+class TrkTrackState;    //!> Simple track state: 5 parameters + covariance
+class TrkPlanarSurface; //!> Simple class for planar surface description
+class TrackStateOnSurface;
+class MeasuredPerigee;
+
+class DistributedKalmanFilter
+  : virtual public ITrackFitter
+  , public AthAlgTool
+{
+public:
+  // standard AlgTool methods
+  DistributedKalmanFilter(const std::string&,
+                          const std::string&,
+                          const IInterface*);
+  virtual ~DistributedKalmanFilter();
+
+  // standard Athena methods
+  virtual StatusCode initialize() override; 
+  virtual StatusCode finalize() override;
+
+  // Filter settings:
+  //			RunOutlierRemoval - use logic to remove bad hits
+  //			ParticleHypothesis   - allow for multiple scattering and
+  //energy loss?
+
   /*
-   * Bring in default impl with
+   * Bring in default impl without
    * EventContext for now
    */
   using ITrackFitter::fit;
-	virtual Track* fit(const Track&,
-			   const RunOutlierRemoval  runOutlier=false,
-			   const ParticleHypothesis matEffects=Trk::nonInteracting) const;
-
-	// refit a track adding a PrepRawDataSet -- use base class method.
-	virtual Track* fit(const Track&,
-			   const PrepRawDataSet&,
-			   const RunOutlierRemoval,
-			   const ParticleHypothesis) const {return NULL;}
-	
-	// fit a set of PrepRawData objects
-	virtual Track* fit(const PrepRawDataSet&,
-			   const TrackParameters&   estimatedParametersNearOrigine,
-			   const RunOutlierRemoval  runOutlier=false,
-			   const ParticleHypothesis matEffects=Trk::nonInteracting) const;
-	
-	// fit a set of RIO_OnTrack objects
-	virtual Track* fit(const RIO_OnTrackSet&,
-			   const TrackParameters&   estimatedParametersNearOrigine,
-			   const RunOutlierRemoval  runOutlier=false,
-			   const ParticleHypothesis matEffects=Trk::nonInteracting) const;
-        
-        virtual Track* fit(const MeasurementSet&,
-                           const TrackParameters& estim,
-                           const RunOutlierRemoval runo=false, 
-                           const ParticleHypothesis 
-			   mat=Trk::nonInteracting) const;
-
-	virtual Track* fit(const Track&,
-			   const MeasurementSet&,
-			   const RunOutlierRemoval runOutlier=false,
-			   const ParticleHypothesis matEffects=Trk::nonInteracting) const;
-
-	virtual Track* fit(const Track&,
-			   const Track&,
-			   const RunOutlierRemoval,
-			   const ParticleHypothesis) const {return NULL;}
-                        
+
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track&,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
+  virtual std::unique_ptr<Track> fit(const EventContext&,
+                                     const Track&,
+                                     const PrepRawDataSet&,
+                                     const RunOutlierRemoval,
+                                     const ParticleHypothesis) const override
+  {
+    return nullptr;
+  }
+
+  // fit a set of PrepRawData objects
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const PrepRawDataSet&,
+    const TrackParameters& estimatedParametersNearOrigine,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const MeasurementSet&,
+    const TrackParameters& estim,
+    const RunOutlierRemoval runo = false,
+    const ParticleHypothesis mat = Trk::nonInteracting) const override;
+
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track&,
+    const MeasurementSet&,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const override;
+
+
+  virtual std::unique_ptr<Track> fit(const EventContext&,
+                                     const Track&,
+                                     const Track&,
+                                     const RunOutlierRemoval,
+                                     const ParticleHypothesis) const override
+  {
+    return nullptr;
+  }
+
+  // fit a set of RIO_OnTrack objects
+  std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const RIO_OnTrackSet&,
+    const TrackParameters& estimatedParametersNearOrigine,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
 private:
-	///////////////////////////////////////////////////////////////////
-	// Private functions:
-	///////////////////////////////////////////////////////////////////
-
-	Trk::TrkTrackState* extrapolate(TrkTrackState*,
-                                        TrkPlanarSurface*,
-                                        TrkPlanarSurface*,
-                                        MagField::AtlasFieldCache &fieldCache) const;
-        bool runForwardKalmanFilter(TrkTrackState*,
-                                    MagField::AtlasFieldCache &fieldCache) const;
-	void runSmoother() const;
-	int  findOutliers(double) const;
-	void calculateLRsolution() const;
-	TrackStateOnSurface* createTrackStateOnSurface(TrkBaseNode*) const;
-	void deleteNodes() const;
-	void deleteSurfaces() const;
-	void deleteTrackStates() const;
-	void report();
-	void report(char fileName[]);
-	void getMagneticField(double[3],
-                              double*,
-                              MagField::AtlasFieldCache &fieldCache) const;
-	void matrixInversion5x5(double a[5][5]) const;
-	Perigee* createMeasuredPerigee(TrkTrackState*) const;
-
-	void numericalJacobian(TrkTrackState*,
-                               TrkPlanarSurface*,
-                               TrkPlanarSurface*,
-                               double A[5][5],
-                               MagField::AtlasFieldCache &fieldCache) const;
-	double integrate(double Rk[5],
-                         TrkPlanarSurface* pSB,
-                         TrkPlanarSurface* pSE,
-                         double* Rf,
-                         MagField::AtlasFieldCache &fieldCache) const;
-
-	///////////////////////////////////////////////////////////////////
-	// Private data:
-	///////////////////////////////////////////////////////////////////
-
-	//    RunOutlierRemoval             m_option_runOutlier;
-	//    ParticleHypothesis               m_option_matEffects;
-
-	ToolHandle<IRIO_OnTrackCreator>          m_ROTcreator;
-	ToolHandle<IExtrapolator>                m_extrapolator;
-	const AtlasDetectorID*      m_idHelper;
-
-        SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
-           {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
-
-	std::vector<TrkBaseNode*>* m_pvpNodes;
-	std::vector<TrkPlanarSurface*>* m_pvpSurfaces;
-	std::vector<TrkTrackState*>* m_pvpTrackStates;
-
-	// ME temporary fix
-	std::vector<double> m_option_sortingRefPoint;
-
-    };
-
-   inline
-   void Trk::DistributedKalmanFilter::getMagneticField(double gP[3],
-                                                       double* pB,
-                                                       MagField::AtlasFieldCache &fieldCache) const
-   {
-      pB[0]=0.0;pB[1]=0.0;pB[2]=0.0;
-      double field[3];
-      fieldCache.getField(gP,field);//field is returned in kT
-      for(int i=0;i<3;i++) pB[i]=field[i]/Gaudi::Units::kilogauss;//convert to kG
-   }
+  ///////////////////////////////////////////////////////////////////
+  // Private functions:
+  ///////////////////////////////////////////////////////////////////
+
+  Trk::TrkTrackState* extrapolate(TrkTrackState*,
+                                  TrkPlanarSurface*,
+                                  TrkPlanarSurface*,
+                                  MagField::AtlasFieldCache& fieldCache) const;
+
+  bool runForwardKalmanFilter(TrkTrackState*,
+                              MagField::AtlasFieldCache& fieldCache) const;
+  void runSmoother() const;
+  int findOutliers(double) const;
+  void calculateLRsolution() const;
+  TrackStateOnSurface* createTrackStateOnSurface(TrkBaseNode*) const;
+  void deleteNodes() const;
+  void deleteSurfaces() const;
+  void deleteTrackStates() const;
+  void report();
+  void report(char fileName[]);
+  void getMagneticField(double[3],
+                        double*,
+                        MagField::AtlasFieldCache& fieldCache) const;
+
+  void matrixInversion5x5(double a[5][5]) const;
+
+  Perigee* createMeasuredPerigee(TrkTrackState*) const;
+
+
+  double integrate(double Rk[5],
+                   TrkPlanarSurface* pSB,
+                   TrkPlanarSurface* pSE,
+                   double* Rf,
+                   MagField::AtlasFieldCache& fieldCache) const;
+
+  ///////////////////////////////////////////////////////////////////
+  // Private data:
+  ///////////////////////////////////////////////////////////////////
+
+  //    RunOutlierRemoval             m_option_runOutlier;
+  //    ParticleHypothesis               m_option_matEffects;
+
+  const AtlasDetectorID* m_idHelper;
+
+  ToolHandle<IRIO_OnTrackCreator> m_ROTcreator{
+    this,
+    "ROTcreator",
+    "Trk::RIO_OnTrackCreator/RIO_OnTrackCreator",
+    "ROT Creator Tool"
+  };
+  ToolHandle<IExtrapolator> m_extrapolator{ this,
+                                            "ExtrapolatorTool",
+                                            "Trk::Extrapolator/Extrapolator",
+                                            "Extrapolator Tool" };
+  
+  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey{
+    this,
+    "AtlasFieldCacheCondObj",
+    "fieldCondObj",
+    "Name of the Magnetic Field conditions object key"
+  };
+
+  std::vector<TrkBaseNode*>* m_pvpNodes;
+  std::vector<TrkPlanarSurface*>* m_pvpSurfaces;
+  std::vector<TrkTrackState*>* m_pvpTrackStates;
+
+  // ME temporary fix
+  std::vector<double> m_option_sortingRefPoint;
+};
+
+inline void
+Trk::DistributedKalmanFilter::getMagneticField(
+  double gP[3],
+  double* pB,
+  MagField::AtlasFieldCache& fieldCache) const
+{
+  pB[0] = 0.0;
+  pB[1] = 0.0;
+  pB[2] = 0.0;
+  double field[3];
+  fieldCache.getField(gP, field); // field is returned in kT
+  for (int i = 0; i < 3; i++)
+    pB[i] = field[i] / Gaudi::Units::kilogauss; // convert to kG
+}
 
 } // end of namespace
 
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx
index bf224ed5e474..a5519a4ec73a 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx
@@ -34,8 +34,6 @@
 #include "TrkEventPrimitives/FitQuality.h"
 #include "TrkEventPrimitives/FitQualityOnSurface.h"
 
-#include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
-#include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkEventUtils/PrepRawDataComparisonFunction.h"
 
 #include "AtlasDetDescr/AtlasDetectorID.h"
@@ -58,21 +56,17 @@
 
 // constructor
 
-Trk::DistributedKalmanFilter::DistributedKalmanFilter(const std::string& t,const std::string& n,
-						      const IInterface* p) :
-  AthAlgTool(t,n,p),
-  m_ROTcreator("Trk::RIO_OnTrackCreator/RIO_OnTrackCreator"),
-  m_extrapolator("Trk::Extrapolator/Extrapolator"),
-  m_idHelper(nullptr)
+Trk::DistributedKalmanFilter::DistributedKalmanFilter(const std::string& t,
+                                                      const std::string& n,
+                                                      const IInterface* p)
+  : AthAlgTool(t, n, p)
+  , m_idHelper(nullptr)
 {
   // AlgTool stuff
   declareInterface<ITrackFitter>( this );
   m_pvpNodes=new std::vector<TrkBaseNode*>;
   m_pvpSurfaces=new std::vector<TrkPlanarSurface*>;
   m_pvpTrackStates=new std::vector<TrkTrackState*>;
-
-  declareProperty( "ExtrapolatorTool", m_extrapolator, "Extrapolator" );
-  declareProperty( "ROTcreator", m_ROTcreator, "ROTcreatorTool" );
   // ME temporary fix
   declareProperty("sortingReferencePoint",m_option_sortingRefPoint);
 }
@@ -94,7 +88,6 @@ StatusCode Trk::DistributedKalmanFilter::initialize()
 
   ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
   ATH_CHECK(m_ROTcreator.retrieve());
-  
   ATH_CHECK(m_extrapolator.retrieve());
   
   ATH_MSG_VERBOSE( "initialize() successful in Trk::DistributedKalmanFilter");
@@ -120,12 +113,14 @@ struct minTrkPar {
 };
 
 // refit a track
-Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::Track&       inputTrack,
-                                              const RunOutlierRemoval runOutlier,
-                                              const ParticleHypothesis matEffects) const
+std::unique_ptr<Trk::Track>
+Trk::DistributedKalmanFilter::fit(const EventContext& ctx,
+                                  const Trk::Track& inputTrack,
+                                  const RunOutlierRemoval runOutlier,
+                                  const ParticleHypothesis matEffects) const
 {
-  msg(MSG::VERBOSE) << "--> enter DistributedKalmanFilter::fit(Track,,)" << endmsg;
-  
+  ATH_MSG_VERBOSE("--> enter DistributedKalmanFilter::fit(Track,,)");
+
   // protection against track not having any parameters
   if (inputTrack.trackParameters()->empty()) {
     ATH_MSG_ERROR( "need estimated track parameters near "<< "origin, reject fit" );
@@ -141,30 +136,32 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::Track&       inputTrack
   PrepRawDataSet prepRDColl;
 
   // collect PrepRawData pointers from input track ROTs
-  msg(MSG::VERBOSE) << "extract PrepRawDataSet from Track" << endmsg;
   DataVector<const MeasurementBase>::const_iterator it    = inputTrack.measurementsOnTrack()->begin();
   DataVector<const MeasurementBase>::const_iterator itEnd = inputTrack.measurementsOnTrack()->end(); 
   for ( ; it!=itEnd; ++it) {
     if (!(*it)) 
       {
-	      ATH_MSG_WARNING( "This track contains empty MeasurementBase "<< "objects! Skipped this MB.." );  
+      ATH_MSG_WARNING("This track contains empty MeasurementBase "
+                      << "objects! Skipped this MB..");
       } 
     else 
       {
 	const RIO_OnTrack* testROT = dynamic_cast<const RIO_OnTrack*>(*it);
-	const PrepRawData* prepRD = (testROT) ? (testROT)->prepRawData() : 0;
+	const PrepRawData* prepRD = (testROT) ? (testROT)->prepRawData() : nullptr;
 	if (!prepRD) {
-	  msg(MSG::WARNING) << "RIO_OnTrack->prepRawRata() "
-	      << "returns no object, ignore... " << endmsg;
-	} else { prepRDColl.push_back( prepRD );  }
+          ATH_MSG_WARNING("RIO_OnTrack->prepRawRata() "
+                          << "returns no object, ignore... ");
+        } else { prepRDColl.push_back( prepRD );  }
       }
   }
-  const TrackParameters* minPar = *(std::min_element(inputTrack.trackParameters()->begin(),inputTrack.trackParameters()->end(),
-						     minTrkPar()));
-							
+  const TrackParameters* minPar =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       minTrkPar()));
+
   // fit set of PrepRawData using main method, start with first Track Parameter in inputTrack
-  msg(MSG::VERBOSE) << "call fit(PRDSet,TP,,)" << endmsg;
-  return fit(prepRDColl,*minPar,runOutlier,matEffects);
+  ATH_MSG_VERBOSE("call fit(PRDSet,TP,,)");
+  return fit(ctx, prepRDColl, *minPar, runOutlier, matEffects);
 }
 
 // @TODO remove ? unused :
@@ -186,7 +183,7 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
   sinf=sin(Rk[2]);cost=cos(Rk[3]);
   gV[0]=sint*cosf;gV[1]=sint*sinf;gV[2]=cost;CQ=C*Rk[4];
 
-  if(pSB!=NULL)
+  if(pSB!=nullptr)
     {
       lP[0]=Rk[0];lP[1]=Rk[1];lP[2]=0.0;
       pSB->transformPointToGlobal(lP,gP);
@@ -220,9 +217,10 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
     {
       c=D[0]*gP[0]+D[1]*gP[1]+D[2]*gP[2]+D[3];
       b=D[0]*gV[0]+D[1]*gV[1]+D[2]*gV[2];
-      a=0.5*CQ*(gB[0]*(D[1]*gV[2]-D[2]*gV[1])+
-		gB[1]*(D[2]*gV[0]-D[0]*gV[2])+
-		gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
+      a = 0.5 * CQ *
+          (gB[0] * (D[1] * gV[2] - D[2] * gV[1]) +
+           gB[1] * (D[2] * gV[0] - D[0] * gV[2]) +
+           gB[2] * (D[0] * gV[1] - D[1] * gV[0]));
       sl=-c/b;
       sl=sl*(1-a*sl/b);
       ds=sl/nStep;path+=ds;
@@ -235,68 +233,25 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
       V[0]=gV[0]+Av*(gV[1]*gB[2]-gV[2]*gB[1]);
       V[1]=gV[1]+Av*(gV[2]*gB[0]-gV[0]*gB[2]);
       V[2]=gV[2]+Av*(gV[0]*gB[1]-gV[1]*gB[0]);
-      for(i=0;i<3;i++) 
-	{
-	  gV[i]=V[i];gP[i]=P[i];
-	}
+      for (i = 0; i < 3; i++) {
+        gV[i] = V[i];
+        gP[i] = P[i];
+      }
       getMagneticField(gP,gB, fieldCache);
       nStep--;
     }
-  pSE->transformPointToLocal(P,lP);
+    pSE->transformPointToLocal(P, lP);
 
-  Rf[0]=lP[0];Rf[1]=lP[1];
-  Rf[2]=atan2(V[1],V[0]);
-  Rf[3]=acos(V[2]);
-  Rf[4]=Rk[4];
+    Rf[0] = lP[0];
+    Rf[1] = lP[1];
+    Rf[2] = atan2(V[1], V[0]);
+    Rf[3] = acos(V[2]);
+    Rf[4] = Rk[4];
 
-  return path;
-}
-
-// @TODO remove ? unused:
-void Trk::DistributedKalmanFilter::numericalJacobian(TrkTrackState* pTS, 
-                                                     TrkPlanarSurface*,// pSB,
-                                                     TrkPlanarSurface*,// pSE,
-                                                     double A[5][5],
-                                                     MagField::AtlasFieldCache &fieldCache) const
-{
-  (void) fieldCache;
-  const double eps=0.005;
-  
-  double R0[5],delta,Ri[5],Rf[5],J[5][5],Rs[5];
-  int i,j;
-  //not sure what Rs/Rf should be intialised to - at the moment it is not set at all so setting to zero to solve coverity bugs 14380/14381...
-  for(i=0;i<5;i++) {R0[i]=pTS->getTrackState(i);Rs[i]=0;Rf[i]=0;}
-  
-  //s0=integrate(R0,pSB,pSE,Rs, fieldCache);
-  
-  for(i=0;i<5;i++)
-  {
-    delta=R0[i]*eps;
-    for(j=0;j<5;j++) Ri[j]=R0[j];
-    Ri[i]+=delta;
-      
-    //s1=integrate(Ri,pSB,pSE,Rf, fieldCache);
-      
-    // dsdp[i]=(s1-s0)/delta;
-    for(j=0;j<5;j++)
-    {
-      J[j][i]=(Rf[j]-Rs[j])/delta;
-    }
-  }
-  //printf("------ Numerical Jacobian ------\n");
-  for(i=0;i<5;i++)
-  {
-    for(j=0;j<5;j++) 
-    {
-      // printf("%E ",J[i][j]);
-      A[i][j]=J[i][j];
-    }
-    // printf("\n");
-  }
+    return path;
 }
 
 
-
 Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState* pTS, 
                                                               Trk::TrkPlanarSurface* pSB,
                                                               Trk::TrkPlanarSurface* pSE,
@@ -310,7 +265,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
 
   bool samePlane=false;
 
-  if(pSB!=NULL)
+  if(pSB!=nullptr)
   {   
     double diff=0.0;
     for(i=0;i<4;i++) diff+=fabs(pSE->getPar(i)-pSB->getPar(i));
@@ -335,7 +290,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
 
     memset(&J0[0][0],0,sizeof(J0));
 
-    if(pSB!=NULL)
+    if(pSB!=nullptr)
     {    
       double L[3][3];
       lP[0]=pTS->getTrackState(0);lP[1]=pTS->getTrackState(1);lP[2]=0.0;
@@ -381,7 +336,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
     if(descr<0.0) 
     {
       //      printf("D<0 - extrapolation failed\n");
-      return NULL;
+      return nullptr;
     }
     
     bool useExpansion=true;
@@ -406,7 +361,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
     }
     if((nStepMax<0)||(nStepMax>1000))
     {
-      return NULL;
+      return nullptr;
     } 
     Av=sl*CQ;
     Ac=0.5*sl*Av;
@@ -439,9 +394,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
                 gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
 	
       ratio = 4*a*c/(b*b);
-      if(fabs(ratio)>0.1) 
-        useExpansion = false;
-      else useExpansion = true;
+      useExpansion = fabs(ratio) <= 0.1;
 	
       if(useExpansion) {
         sl=-c/b;
@@ -452,7 +405,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
         if(descr<0.0) 
         {
           // printf("D<0 - extrapolation failed\n");
-          return NULL;
+          return nullptr;
         }
         int signb = (b<0.0)?-1:1;
         sl = (-b+signb*sqrt(descr))/(2*a);
@@ -484,7 +437,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
 
     if(fabs(V[2])>1.0) 
     {
-      return NULL;
+      return nullptr;
     }
 
     Rf[3]=acos(V[2]);
@@ -507,9 +460,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
 	  gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
     
     ratio = 4*a*c/(b*b);
-    if(fabs(ratio)>0.1) 
-      useExpansion = false;
-    else useExpansion = true;
+    useExpansion = fabs(ratio) <= 0.1;
     
     if(useExpansion) {
       s=-c/b;
@@ -520,7 +471,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
       if(descr<0.0) 
       {
         // printf("D<0 - extrapolation failed\n");
-        return NULL;
+        return nullptr;
       }
       int signb = (b<0.0)?-1:1;
       s = (-b+signb*sqrt(descr))/(2*a);
@@ -638,7 +589,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
       Buf[4][i]=Jm[6][i];
     }
     
-    if(pSB!=NULL)
+    if(pSB!=nullptr)
     {
       for(i=0;i<5;i++)
       {
@@ -764,7 +715,7 @@ bool Trk::DistributedKalmanFilter::runForwardKalmanFilter(TrkTrackState* pInitSt
 {
   std::vector<TrkBaseNode*>::iterator pnIt(m_pvpNodes->begin()),pnEnd(m_pvpNodes->end());
   bool OK=true;
-  Trk::TrkPlanarSurface *pSB=NULL,*pSE;
+  Trk::TrkPlanarSurface *pSB=nullptr,*pSE;
 
   Trk::TrkTrackState* pTS=new Trk::TrkTrackState(pInitState);
   m_pvpTrackStates->push_back(pTS);
@@ -773,7 +724,7 @@ bool Trk::DistributedKalmanFilter::runForwardKalmanFilter(TrkTrackState* pInitSt
     pSE=(*pnIt)->getSurface();
     Trk::TrkTrackState* pNS=extrapolate(pTS,pSB,pSE, fieldCache);
       pSB=pSE;
-      if(pNS!=NULL)
+      if(pNS!=nullptr)
 	{
 	  m_pvpTrackStates->push_back(pNS);
 
@@ -840,9 +791,9 @@ int Trk::DistributedKalmanFilter::findOutliers(double cut) const
 
 Trk::TrackStateOnSurface* Trk::DistributedKalmanFilter::createTrackStateOnSurface(Trk::TrkBaseNode* pN) const
 {
-  TrackStateOnSurface* pTSS=NULL;
+  TrackStateOnSurface* pTSS=nullptr;
   char type=pN->getNodeType();
-  const Trk::TrackParameters* pTP=NULL;
+  const Trk::TrackParameters* pTP=nullptr;
 
 
 
@@ -855,7 +806,7 @@ Trk::TrackStateOnSurface* Trk::DistributedKalmanFilter::createTrackStateOnSurfac
     {
       const Trk::Surface& rS = pPRD->detectorElement()->surface();
       const Trk::PlaneSurface* pPS = dynamic_cast<const Trk::PlaneSurface*>(&rS);
-      if(pPS==NULL) return pTSS;
+      if(pPS==nullptr) return pTSS;
       
       AmgSymMatrix(5)* pM = new AmgSymMatrix(5);
 
@@ -874,7 +825,7 @@ Trk::TrackStateOnSurface* Trk::DistributedKalmanFilter::createTrackStateOnSurfac
     {
       const Trk::Surface& rS = pPRD->detectorElement()->surface(pPRD->identify()); 
       const Trk::StraightLineSurface* pLS=dynamic_cast<const Trk::StraightLineSurface*>(&rS);
-      if(pLS==NULL) return pTSS;
+      if(pLS==nullptr) return pTSS;
 
       AmgSymMatrix(5)* pM = new AmgSymMatrix(5);
 
@@ -893,12 +844,12 @@ Trk::TrackStateOnSurface* Trk::DistributedKalmanFilter::createTrackStateOnSurfac
 				   *pLS,
 				   pM);
     }
-  if(pTP==NULL) return NULL;
+  if(pTP==nullptr) return nullptr;
   const Trk::RIO_OnTrack* pRIO=m_ROTcreator->correct(*pPRD,*pTP);
-  if(pRIO==NULL) 
+  if(pRIO==nullptr) 
     {
-      if(pTP!=NULL) delete pTP;
-      return NULL;
+      if(pTP!=nullptr) delete pTP;
+      return nullptr;
     }
   Trk::FitQualityOnSurface* pFQ=new Trk::FitQualityOnSurface(pN->getChi2(),pN->getNdof());
   pTSS = new Trk::TrackStateOnSurface(pRIO,pTP,pFQ);
@@ -909,27 +860,34 @@ Trk::Perigee* Trk::DistributedKalmanFilter::createMeasuredPerigee(TrkTrackState*
 {
 
 
-  Trk::Perigee* pMP=NULL;
+  Trk::Perigee* pMP=nullptr;
 
   AmgSymMatrix(5)* pM = new AmgSymMatrix(5);
 
-  for(int i=0;i<5;i++) 
-    for(int j=0;j<5;j++)
-      (*pM)(i,j)=pTS->getTrackCovariance(i,j);
+  for(int i=0;i<5;i++){
+    for (int j = 0; j < 5; j++){
+      (*pM)(i, j) = pTS->getTrackCovariance(i, j);
+    }
+  }
   const Trk::PerigeeSurface perSurf;
   pMP = new Trk::Perigee(pTS->getTrackState(0),
-			 pTS->getTrackState(1),
-			 pTS->getTrackState(2),
-			 pTS->getTrackState(3),
-			 pTS->getTrackState(4),perSurf,pM);
+                         pTS->getTrackState(1),
+                         pTS->getTrackState(2),
+                         pTS->getTrackState(3),
+                         pTS->getTrackState(4),
+                         perSurf,
+                         pM);
   return pMP;
 }
 
 // fit a set of PrepRawData objects
-Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepRDColl,
-					      const Trk::TrackParameters&  estimatedParametersNearOrigine,
-					      const RunOutlierRemoval      runOutlier,
-					      const Trk::ParticleHypothesis     matEffects) const
+std::unique_ptr<Trk::Track>
+Trk::DistributedKalmanFilter::fit(
+  const EventContext& ctx,
+  const Trk::PrepRawDataSet& prepRDColl,
+  const Trk::TrackParameters& estimatedParametersNearOrigine,
+  const RunOutlierRemoval runOutlier,
+  const Trk::ParticleHypothesis matEffects) const
 {
   const double outlCut=12.0;
   const double rlSili=0.022;
@@ -944,23 +902,22 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
   double Rk[5],C[3],N[3],M[3][3];
   int i,nAmbHits=0;
   const Perigee* pP;
-  Trk::Track* fittedTrack=NULL;
+  Trk::Track* fittedTrack=nullptr;
   Eigen::Vector3d mx,my,mz;
   const Trk::PerigeeSurface perSurf;
 
   bool badTrack=false;
 
-  msg(MSG::VERBOSE) << "--> entering DistributedKalmanFilter::fit"
-      << "(PrepRawDataSet,TrackParameters,,)" << endmsg;
 	
   // protection, if empty PrepRawDataSet
   if (prepRDColl.empty()) {
-    msg(MSG::ERROR) << "try to fit empty vec<PrepRawData>, reject fit" << endmsg;
-    return 0;
+    ATH_MSG_ERROR("try to fit empty vec<PrepRawData>, reject fit");
+    return nullptr;
   }
-  if (runOutlier) msg(MSG::VERBOSE) << "-> Outlier removal switched on" << endmsg;
-  if (matEffects!=nonInteracting) msg(MSG::VERBOSE) << "-> Material Effects switched on" << endmsg;
-
+  if (runOutlier)
+    ATH_MSG_VERBOSE("-> Outlier removal switched on");
+  if (matEffects != nonInteracting)
+    ATH_MSG_VERBOSE("-> Material Effects switched on");
 
   // 0. Sort PRD set
 
@@ -971,64 +928,61 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
   if(!is_sorted(inputPRDColl.begin(),inputPRDColl.end(),*compareHits)) 
     std::sort(inputPRDColl.begin(), inputPRDColl.end(), *compareHits);
   delete compareHits;
-  msg(MSG::VERBOSE)<<" List of sorted PRDs: "<<endmsg;      
+  ATH_MSG_VERBOSE(" List of sorted PRDs: ");
   for(PrepRawDataSet::const_iterator prdIt=inputPRDColl.begin();prdIt!=inputPRDColl.end();prdIt++) 
     {
       if(!(*prdIt)->detectorElement()) continue;
-      msg(MSG::VERBOSE)<<m_idHelper->print_to_string((*prdIt)->identify())<<" radius= "<<
-	(*prdIt)->detectorElement()->surface((*prdIt)->identify()).center().mag()<<endmsg;
+      ATH_MSG_VERBOSE(m_idHelper->print_to_string((*prdIt)->identify())
+                      << " radius= "
+                      << (*prdIt)
+                           ->detectorElement()
+                           ->surface((*prdIt)->identify())
+                           .center()
+                           .mag());
     }
 
   // 1. Create initial track state:
 
-  pP=dynamic_cast<const Perigee*>(&estimatedParametersNearOrigine);
-  if(pP==NULL)
-    {
-      msg(MSG::DEBUG) << " fit needs perigee parameters - creating it" << endmsg;
-      /*
-      const Trk::TrackParameters* pTP=m_extrapolator->extrapolate(estimatedParametersNearOrigine, perSurf,
-								  Trk::oppositeMomentum, false, matEffects);
-      */
-      const Trk::TrackParameters* pTP=m_extrapolator->extrapolateDirectly(estimatedParametersNearOrigine, 
-									  perSurf,
-									  Trk::anyDirection, false, Trk::nonInteracting);
-
-      pP=dynamic_cast<const Perigee*>(pTP);
-      if(pP==NULL)
-	{
-	  msg(MSG::ERROR) << "failed to create perigee parameters, reject fit" << endmsg;
-	  return 0;
-	}
-    }
-  Rk[0]=pP->parameters()[Trk::d0];
-  Rk[1]=pP->parameters()[Trk::z0];
-  Rk[2]=pP->parameters()[Trk::phi0];
-  Rk[3]=pP->parameters()[Trk::theta];
-  Rk[4]=pP->parameters()[Trk::qOverP];
+    pP = dynamic_cast<const Perigee*>(&estimatedParametersNearOrigine);
+    if (pP == nullptr) {
+      ATH_MSG_DEBUG(" fit needs perigee parameters - creating it");
+      const Trk::TrackParameters* pTP =
+        m_extrapolator->extrapolateDirectly(ctx,
+                                            estimatedParametersNearOrigine,
+                                            perSurf,
+                                            Trk::anyDirection,
+                                            false,
+                                            Trk::nonInteracting);
+
+      pP = dynamic_cast<const Perigee*>(pTP);
+      if (pP == nullptr) {
+        ATH_MSG_ERROR("failed to create perigee parameters, reject fit");
+        return nullptr;
+      }
+  }
+  Rk[0] = pP->parameters()[Trk::d0];
+  Rk[1] = pP->parameters()[Trk::z0];
+  Rk[2] = pP->parameters()[Trk::phi0];
+  Rk[3] = pP->parameters()[Trk::theta];
+  Rk[4] = pP->parameters()[Trk::qOverP];
   pTS = new TrkTrackState(Rk);
 
-  if (matEffects==Trk::nonInteracting) 
-    {
-      pTS->setScatteringMode(0);
-      msg(MSG::VERBOSE) << "-> Multiple Scattering treatment switched off" << endmsg;
-    }
-  else 
-    {
-      if ((matEffects==Trk::pion)||(matEffects==Trk::muon))      
-	{
-	  pTS->setScatteringMode(1);
-	  msg(MSG::VERBOSE) << "-> Multiple Scattering treatment switched on" << endmsg;
-	}
-      else 
-	{
-	  if (matEffects==Trk::electron)  
-	    {
-	      pTS->setScatteringMode(2);
-	      msg(MSG::VERBOSE) << "-> Multiple Scattering and Bremm treatments switched on" << endmsg;
-	    }
-	  else msg(MSG::WARNING) << "Material setting " << matEffects << "not supported !" << endmsg;
-	}
+  if (matEffects == Trk::nonInteracting) {
+    pTS->setScatteringMode(0);
+    ATH_MSG_VERBOSE("-> Multiple Scattering treatment switched off");
+  } else {
+    if ((matEffects == Trk::pion) || (matEffects == Trk::muon)) {
+      pTS->setScatteringMode(1);
+      ATH_MSG_VERBOSE("-> Multiple Scattering treatment switched on");
+    } else {
+      if (matEffects == Trk::electron) {
+        pTS->setScatteringMode(2);
+        ATH_MSG_VERBOSE(
+          "-> Multiple Scattering and Bremm treatments switched on");
+      } else
+        ATH_MSG_WARNING("Material setting " << matEffects << "not supported !");
     }
+  }
 
   pInitState=pTS;
 
@@ -1038,284 +992,290 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
   m_pvpSurfaces->clear();
   m_pvpTrackStates->clear();
 
-  for(PrepRawDataSet::const_iterator prdIt=inputPRDColl.begin();prdIt!=inputPRDColl.end();prdIt++) 
-    {
-      if((*prdIt)->detectorElement()==NULL)
-	{
-	  msg(MSG::WARNING) << " PrepRawData has no detector element - drop it" << endmsg;
-	  continue;
-	} 
-      Identifier ID=(*prdIt)->identify();
-      if(m_idHelper->is_indet(ID) || m_idHelper->is_sct(ID) || m_idHelper->is_pixel(ID) || m_idHelper->is_trt(ID))
-	{	
-	  if(m_idHelper->is_pixel(ID)|| m_idHelper->is_sct(ID))
-	    {
-	      const Trk::Surface& rSurf=(*prdIt)->detectorElement()->surface();
-	      N[0]=rSurf.normal().x();
-	      N[1]=rSurf.normal().y();
-	      N[2]=rSurf.normal().z();
-	      C[0]=rSurf.center().x();
-	      C[1]=rSurf.center().y();
-	      C[2]=rSurf.center().z();
-	      mx=rSurf.transform().rotation().block(0,0,3,1);
-	      my=rSurf.transform().rotation().block(0,1,3,1);
-	      mz=rSurf.transform().rotation().block(0,2,3,1);
-	      for(i=0;i<3;i++) 
-		{
-		  M[i][0]=mx[i];M[i][1]=my[i];M[i][2]=mz[i];
-		}
-	      pS = new TrkPlanarSurface(C,N,M,rlSili);
-	      m_pvpSurfaces->push_back(pS);
-	      if(m_idHelper->is_pixel(ID))
-		{
-		  pPN = new TrkPixelNode(pS,200.0,(*prdIt));
-		  m_pvpNodes->push_back(pPN);
-		}
-	      else
-		{
-		  if(fabs(N[2])<0.1)
-		    {
-		      pCN = new TrkClusterNode(pS,200.0,(*prdIt));
-		      m_pvpNodes->push_back(pCN);
-		    }
-		  else
-		    {
-		      pECN = new TrkEndCapClusterNode(pS,200.0,(*prdIt));
-		      m_pvpNodes->push_back(pECN);
-		    }
-		}
-	      continue;
-	    }
-	  if(m_idHelper->is_trt(ID))
-	    {
-	      nAmbHits++;
-
-	      const Trk::Surface& rSurf=(*prdIt)->detectorElement()->surface(ID);
-	      double len=500.0;
-	      const Trk::SurfaceBounds& rBounds=(*prdIt)->detectorElement()->surface().bounds();
-
-	      C[0]=rSurf.center().x();C[1]=rSurf.center().y();C[2]=rSurf.center().z();
-	      double cosFs=C[0]/sqrt(C[0]*C[0]+C[1]*C[1]);
-	      double sinFs=C[1]/sqrt(C[0]*C[0]+C[1]*C[1]);
-
-	      const Amg::Vector3D& rNorm=(*prdIt)->detectorElement()->surface().normal();
-	      bool isBarrel=true;
-	      if(fabs(rNorm.z())>0.2) isBarrel=false;
-	      
-	      if(isBarrel)
-		{
-		  const Trk::RectangleBounds& bBounds=dynamic_cast<const Trk::RectangleBounds&>(rBounds);
-		  len=bBounds.halflengthY();
-		  N[0]=cosFs;N[1]=sinFs;N[2]=0.0;
-
-		  if(C[2]<0.0)
-		    {
-		      M[0][0]=-sinFs; M[0][1]=0.0; M[0][2]=cosFs;
-		      M[1][0]= cosFs; M[1][1]=0.0; M[1][2]=sinFs;
-		      M[2][0]= 0.0;   M[2][1]=1.0; M[2][2]=0.0;
-		    }
-		  else
-		    {
-		      M[0][0]= sinFs; M[0][1]=0.0; M[0][2]=cosFs;
-		      M[1][0]=-cosFs; M[1][1]=0.0; M[1][2]=sinFs;
-		      M[2][0]= 0.0;   M[2][1]=-1.0; M[2][2]=0.0;
-		    }
-		}
-	      else
-		{
-		  const Trk::DiscBounds& ecBounds=dynamic_cast<const Trk::DiscBounds&>(rBounds);
-		  len=0.5*(ecBounds.rMax()-ecBounds.rMin());
-		  N[0]=0.0;N[1]=0.0;N[2]=1.0;
-		  M[0][0]=-sinFs; M[0][1]=-cosFs; M[0][2]=0.0;
-		  M[1][0]= cosFs; M[1][1]=-sinFs; M[1][2]=0.0;
-		  M[2][0]= 0.0;   M[2][1]= 0.0;   M[2][2]=1.0;
-		}
-	      pS = new TrkPlanarSurface(C,N,M,rlTrt);
-	      m_pvpSurfaces->push_back(pS);
-	      pTN = new TrkTrtNode(pS,200.0,-len,len,(*prdIt));
-	      m_pvpNodes->push_back(pTN);
-	      
-	      continue;
-	    }
-	}
-      msg(MSG::WARNING) << " PrepRawData is neither identified nor supported !" << endmsg;
-      msg(MSG::WARNING)<<"RIO ID prints as "
-	  << m_idHelper->print_to_string(ID)<<endmsg;
+  for (PrepRawDataSet::const_iterator prdIt = inputPRDColl.begin();
+       prdIt != inputPRDColl.end();
+       prdIt++) {
+    if ((*prdIt)->detectorElement() == nullptr) {
+          ATH_MSG_WARNING(" PrepRawData has no detector element - drop it");
+          continue;
     }
-  msg(MSG::VERBOSE) << " Number of nodes/surfaces created: "<< m_pvpNodes->size()<<"/"<<m_pvpSurfaces->size()<<endmsg;
+    Identifier ID = (*prdIt)->identify();
+    if (m_idHelper->is_indet(ID) || m_idHelper->is_sct(ID) ||
+        m_idHelper->is_pixel(ID) || m_idHelper->is_trt(ID)) {
+      if (m_idHelper->is_pixel(ID) || m_idHelper->is_sct(ID)) {
+        const Trk::Surface& rSurf = (*prdIt)->detectorElement()->surface();
+        N[0] = rSurf.normal().x();
+        N[1] = rSurf.normal().y();
+        N[2] = rSurf.normal().z();
+        C[0] = rSurf.center().x();
+        C[1] = rSurf.center().y();
+        C[2] = rSurf.center().z();
+        mx = rSurf.transform().rotation().block(0, 0, 3, 1);
+        my = rSurf.transform().rotation().block(0, 1, 3, 1);
+        mz = rSurf.transform().rotation().block(0, 2, 3, 1);
+        for (i = 0; i < 3; i++) {
+          M[i][0] = mx[i];
+          M[i][1] = my[i];
+          M[i][2] = mz[i];
+        }
+        pS = new TrkPlanarSurface(C, N, M, rlSili);
+        m_pvpSurfaces->push_back(pS);
+        if (m_idHelper->is_pixel(ID)) {
+          pPN = new TrkPixelNode(pS, 200.0, (*prdIt));
+          m_pvpNodes->push_back(pPN);
+        } else {
+          if (fabs(N[2]) < 0.1) {
+            pCN = new TrkClusterNode(pS, 200.0, (*prdIt));
+            m_pvpNodes->push_back(pCN);
+          } else {
+            pECN = new TrkEndCapClusterNode(pS, 200.0, (*prdIt));
+            m_pvpNodes->push_back(pECN);
+          }
+        }
+        continue;
+      }
+      if (m_idHelper->is_trt(ID)) {
+        nAmbHits++;
+
+        const Trk::Surface& rSurf = (*prdIt)->detectorElement()->surface(ID);
+        double len = 500.0;
+        const Trk::SurfaceBounds& rBounds =
+          (*prdIt)->detectorElement()->surface().bounds();
+
+        C[0] = rSurf.center().x();
+        C[1] = rSurf.center().y();
+        C[2] = rSurf.center().z();
+        double cosFs = C[0] / sqrt(C[0] * C[0] + C[1] * C[1]);
+        double sinFs = C[1] / sqrt(C[0] * C[0] + C[1] * C[1]);
+
+        const Amg::Vector3D& rNorm =
+          (*prdIt)->detectorElement()->surface().normal();
+        bool isBarrel = true;
+        if (fabs(rNorm.z()) > 0.2)
+          isBarrel = false;
+
+        if (isBarrel) {
+          const Trk::RectangleBounds& bBounds =
+            dynamic_cast<const Trk::RectangleBounds&>(rBounds);
+          len = bBounds.halflengthY();
+          N[0] = cosFs;
+          N[1] = sinFs;
+          N[2] = 0.0;
+
+          if (C[2] < 0.0) {
+            M[0][0] = -sinFs;
+            M[0][1] = 0.0;
+            M[0][2] = cosFs;
+            M[1][0] = cosFs;
+            M[1][1] = 0.0;
+            M[1][2] = sinFs;
+            M[2][0] = 0.0;
+            M[2][1] = 1.0;
+            M[2][2] = 0.0;
+          } else {
+            M[0][0] = sinFs;
+            M[0][1] = 0.0;
+            M[0][2] = cosFs;
+            M[1][0] = -cosFs;
+            M[1][1] = 0.0;
+            M[1][2] = sinFs;
+            M[2][0] = 0.0;
+            M[2][1] = -1.0;
+            M[2][2] = 0.0;
+          }
+        } else {
+          const Trk::DiscBounds& ecBounds =
+            dynamic_cast<const Trk::DiscBounds&>(rBounds);
+          len = 0.5 * (ecBounds.rMax() - ecBounds.rMin());
+          N[0] = 0.0;
+          N[1] = 0.0;
+          N[2] = 1.0;
+          M[0][0] = -sinFs;
+          M[0][1] = -cosFs;
+          M[0][2] = 0.0;
+          M[1][0] = cosFs;
+          M[1][1] = -sinFs;
+          M[1][2] = 0.0;
+          M[2][0] = 0.0;
+          M[2][1] = 0.0;
+          M[2][2] = 1.0;
+        }
+        pS = new TrkPlanarSurface(C, N, M, rlTrt);
+        m_pvpSurfaces->push_back(pS);
+        pTN = new TrkTrtNode(pS, 200.0, -len, len, (*prdIt));
+        m_pvpNodes->push_back(pTN);
 
-  SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey};
-  if (!readHandle.isValid()) {
-     std::stringstream msg;
-     msg << "Failed to retrieve magmnetic field conditions data " << m_fieldCacheCondObjInputKey.key() << ".";
-     throw std::runtime_error(msg.str());
+        continue;
+      }
+    }
+      ATH_MSG_WARNING(" PrepRawData is neither identified nor supported !");
+      ATH_MSG_WARNING("RIO ID prints as " << m_idHelper->print_to_string(ID));
   }
-  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+    ATH_MSG_VERBOSE(" Number of nodes/surfaces created: "
+                    << m_pvpNodes->size() << "/" << m_pvpSurfaces->size());
 
-  MagField::AtlasFieldCache fieldCache;
-  fieldCondObj->getInitializedCache (fieldCache);
+    SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{
+      m_fieldCacheCondObjInputKey, ctx
+    };
+   
+    if (!readHandle.isValid()) {
+      std::stringstream msg;
+      msg << "Failed to retrieve magmnetic field conditions data "
+          << m_fieldCacheCondObjInputKey.key() << ".";
+      throw std::runtime_error(msg.str());
+    }
+    const AtlasFieldCacheCondObj* fieldCondObj{ *readHandle };
 
-  // 3. Sort vector of filtering nodes according to their distances from the perigee point
+    MagField::AtlasFieldCache fieldCache;
+    fieldCondObj->getInitializedCache(fieldCache);
 
-  //  m_sortFilteringNodes(pInitState);
+    // 3. Sort vector of filtering nodes according to their distances from the
+    // perigee point
 
-  // 4. Main algorithm: filter and smoother (Rauch-Tung-Striebel)
- 
-  if(runForwardKalmanFilter(pInitState, fieldCache))
-  {
-    runSmoother();
-    if(runOutlier)
-    {
-      int nOutl=findOutliers(outlCut);
-      msg(MSG::VERBOSE) << nOutl <<" outliers removed "<<endmsg;
+    //  m_sortFilteringNodes(pInitState);
 
-      if((nOutl*1.0/m_pvpNodes->size())>0.3)
-	{
-	  msg(MSG::VERBOSE) <<" two many outliers - bad track "<<endmsg;
-	  badTrack=true;
-	}
-      if((nOutl!=0)&&(!badTrack))
-	{
-	  deleteTrackStates();
-	  runForwardKalmanFilter(pInitState,fieldCache);
-	  runSmoother();
-	  nOutl=findOutliers(outlCut);
-	  msg(MSG::VERBOSE) << nOutl <<" new outliers found "<<endmsg;
-	}
-    }
-    if((nAmbHits!=0)&&(!badTrack))
-      {
-	calculateLRsolution();
-	deleteTrackStates();
-	runForwardKalmanFilter(pInitState,fieldCache);
-	runSmoother();
-      }
-  
-    // 5. Create and store back all the stuff
-    if(!badTrack)
-      {
-	pTS=(*m_pvpTrackStates->begin());
-	const Trk::Perigee* pMP=createMeasuredPerigee(pTS);
-	msg(MSG::DEBUG) <<"Fitted perigee: d0="
-	    <<pMP->parameters()[Trk::d0]<<
-	  " z0="
-	    <<pMP->parameters()[Trk::z0]<<
-	  " phi="
-	    <<pMP->parameters()[Trk::phi0]<<
-	  " theta="
-	    <<pMP->parameters()[Trk::theta]<<
-	  " qOverP="
-	    <<pMP->parameters()[Trk::qOverP]<<
-	  " pT="<<sin(pMP->parameters()[Trk::theta])/
-	  pMP->parameters()[Trk::qOverP]<<endmsg;
-	
-	DataVector<const TrackStateOnSurface>* pvTS = new DataVector<const TrackStateOnSurface>;
-	pvTS->clear();
+    // 4. Main algorithm: filter and smoother (Rauch-Tung-Striebel)
 
-	std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern; 
-	typePattern.set(Trk::TrackStateOnSurface::Perigee);
-	const TrackStateOnSurface* pTSOS = new TrackStateOnSurface(0,pMP,0,0,typePattern);
+    if (runForwardKalmanFilter(pInitState, fieldCache)) {
+      runSmoother();
+      if (runOutlier) {
+        int nOutl = findOutliers(outlCut);
+        ATH_MSG_VERBOSE(nOutl << " outliers removed ");
 
-	pvTS->push_back(pTSOS);
-	std::vector<TrkBaseNode*>::iterator pnIt(m_pvpNodes->begin()),pnEnd(m_pvpNodes->end());
-	
-	double chi2=0.0;
-	int ndof=-5;
-	
-	for(;pnIt!=pnEnd;++pnIt)
-	  {
-	    if((*pnIt)->isValidated())
-	      {
-		TrackStateOnSurface* pTSS=createTrackStateOnSurface(*pnIt);
-		if(pTSS!=NULL) 
-		  {
-		    pvTS->push_back(pTSS);
-		    chi2+=(*pnIt)->getChi2();
-		    ndof+=(*pnIt)->getNdof();
-		  }
-	      }
-	  }
-	msg(MSG::DEBUG) <<"Total Chi2: "<<chi2<<" DoF="<<ndof<<endmsg;
-	Trk::FitQuality* pFQ=new Trk::FitQuality(chi2,ndof);
-	msg(MSG::DEBUG) <<pvTS->size()<<" new RIO_OnTrack(s) created"<<endmsg; 
-	TrackInfo info(TrackInfo::DistributedKalmanFilter,matEffects);
-	fittedTrack = new Track(info,pvTS,pFQ);
+        if ((nOutl * 1.0 / m_pvpNodes->size()) > 0.3) {
+          ATH_MSG_VERBOSE(" two many outliers - bad track ");
+          badTrack=true;
+        }
+        if ((nOutl != 0) && (!badTrack)) {
+          deleteTrackStates();
+          runForwardKalmanFilter(pInitState, fieldCache);
+          runSmoother();
+          nOutl = findOutliers(outlCut);
+          ATH_MSG_VERBOSE(nOutl <<" new outliers found ");
+        }
       }
-    else
-      {
-	fittedTrack=NULL;
+      if ((nAmbHits != 0) && (!badTrack)) {
+        calculateLRsolution();
+        deleteTrackStates();
+        runForwardKalmanFilter(pInitState,fieldCache);
+        runSmoother();
       }
-  }
-  else
-    {
-      msg(MSG::WARNING) <<"Extrapolation failed "<<endmsg;
-      fittedTrack=NULL;
+
+      // 5. Create and store back all the stuff
+      if (!badTrack) {
+        pTS = (*m_pvpTrackStates->begin());
+        const Trk::Perigee* pMP = createMeasuredPerigee(pTS);
+        ATH_MSG_DEBUG("Fitted perigee: d0=" << pMP->parameters()[Trk::d0]
+                        << " z0=" << pMP->parameters()[Trk::z0]
+                        << " phi=" << pMP->parameters()[Trk::phi0]
+                        << " theta=" << pMP->parameters()[Trk::theta]
+                        << " qOverP=" << pMP->parameters()[Trk::qOverP]
+                        << " pT="
+                        << sin(pMP->parameters()[Trk::theta]) /
+                             pMP->parameters()[Trk::qOverP]);
+
+        DataVector<const TrackStateOnSurface>* pvTS =
+          new DataVector<const TrackStateOnSurface>;
+        pvTS->clear();
+
+        std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
+          typePattern;
+        typePattern.set(Trk::TrackStateOnSurface::Perigee);
+        const TrackStateOnSurface* pTSOS =
+          new TrackStateOnSurface(nullptr, pMP, nullptr, nullptr, typePattern);
+
+        pvTS->push_back(pTSOS);
+        std::vector<TrkBaseNode*>::iterator pnIt(m_pvpNodes->begin()),
+          pnEnd(m_pvpNodes->end());
+
+        double chi2=0.0;
+        int ndof = -5;
+
+        for (; pnIt != pnEnd; ++pnIt) {
+          if ((*pnIt)->isValidated()) {
+            TrackStateOnSurface* pTSS = createTrackStateOnSurface(*pnIt);
+            if (pTSS != nullptr) {
+              pvTS->push_back(pTSS);
+              chi2 += (*pnIt)->getChi2();
+              ndof += (*pnIt)->getNdof();
+            }
+          }
+        }
+        ATH_MSG_DEBUG("Total Chi2: "<<chi2<<" DoF="<<ndof);
+        Trk::FitQuality* pFQ = new Trk::FitQuality(chi2, ndof);
+        ATH_MSG_DEBUG(pvTS->size() << " new RIO_OnTrack(s) created");
+        TrackInfo info(TrackInfo::DistributedKalmanFilter,matEffects);
+        fittedTrack = new Track(info, pvTS, pFQ);
+      } else {
+        fittedTrack=nullptr;
+      }
+    } else {
+      ATH_MSG_WARNING("Extrapolation failed ");
+      fittedTrack = nullptr;
     }
-  deleteNodes();
-  deleteSurfaces();
-  deleteTrackStates();
-  delete pInitState;
-  return fittedTrack;
+    deleteNodes();
+    deleteSurfaces();
+    deleteTrackStates();
+    delete pInitState;
+    return std::unique_ptr<Trk::Track>(fittedTrack);
 }
 
-Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::MeasurementSet&    inputRotColl,
-                                              const Trk::TrackParameters&   estimatedParametersNearOrigine,                       
-                                              const Trk::RunOutlierRemoval  runOutlier,                                           
-                                              const Trk::ParticleHypothesis matEffects) const                                
+std::unique_ptr<Trk::Track>
+Trk::DistributedKalmanFilter::fit(
+  const EventContext& ctx,
+  const Trk::MeasurementSet& inputRotColl,
+  const Trk::TrackParameters& estimatedParametersNearOrigine,
+  const Trk::RunOutlierRemoval runOutlier,
+  const Trk::ParticleHypothesis matEffects) const
 {
   if (inputRotColl.empty()) {
-    msg(MSG::ERROR) << "try to fit empty vec<MeasurementBase>, reject fit" << endmsg;
-    return NULL;
+    ATH_MSG_ERROR( "try to fit empty vec<MeasurementBase>, reject fit" );
+    return nullptr;
   }
 
   PrepRawDataSet prepRDColl;
-
   DataVector<const MeasurementBase>::const_iterator it    = inputRotColl.begin();
-  DataVector<const MeasurementBase>::const_iterator itEnd = inputRotColl.end(); 
-  for(;it!=itEnd;++it) 
-    {
-      if(!(*it))
-	{
-	  msg(MSG::WARNING) << "This track contains empty MeasurementBase "
-	      << "objects! Skipped this MB.." << endmsg;
-	} 
-      else 
-	{
-	  const RIO_OnTrack* pROT = dynamic_cast<const RIO_OnTrack*>(*it);
-	  const PrepRawData* prepRD=(pROT)?(pROT->prepRawData()):NULL;
-	  if (!prepRD) 
-	    {
-	      msg(MSG::WARNING) << "RIO_OnTrack->prepRawRata() "
-		  << "returns no object, ignore... " << endmsg;
-	    } 
-	  else 
-	    {
-	      prepRDColl.push_back( prepRD );
-	    }
-	}          
+  DataVector<const MeasurementBase>::const_iterator itEnd = inputRotColl.end();
+  for (; it != itEnd; ++it) {
+    if (!(*it)) {
+      ATH_MSG_WARNING("This track contains empty MeasurementBase "
+                        << "objects! Skipped this MB..");
+    } else {
+      const RIO_OnTrack* pROT = dynamic_cast<const RIO_OnTrack*>(*it);
+      const PrepRawData* prepRD = (pROT) ? (pROT->prepRawData()) : nullptr;
+      if (!prepRD) {
+        ATH_MSG_WARNING("RIO_OnTrack->prepRawRata() "
+                          << "returns no object, ignore... " );
+      } else {
+        prepRDColl.push_back(prepRD);
+      }
     }
-  return fit(prepRDColl,estimatedParametersNearOrigine,runOutlier,matEffects);
+  }
+  return fit(ctx,
+    prepRDColl, estimatedParametersNearOrigine, runOutlier, matEffects);
 }
-
-Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::Track&  inputTrack,
-					      const Trk::MeasurementSet& inputRotColl,
-					      const Trk::RunOutlierRemoval runOutlier,
-					      const Trk::ParticleHypothesis matEffects) const
+std::unique_ptr<Trk::Track>
+Trk::DistributedKalmanFilter::fit(
+  const EventContext& ctx,
+  const Trk::Track& inputTrack,
+  const Trk::MeasurementSet& inputRotColl,
+  const Trk::RunOutlierRemoval runOutlier,
+  const Trk::ParticleHypothesis matEffects) const
 {
 
-  msg(MSG::VERBOSE) << "--> enter DistributedKalmanFilter::fit(Track,easurementSet,)" << endmsg;
+  ATH_MSG_VERBOSE("--> enter DistributedKalmanFilter::fit(Track,easurementSet,)");
   
   // protection against track not having any parameters
   if (inputTrack.trackParameters()->empty()) {
-    msg(MSG::ERROR) << "need estimated track parameters near "
-	<< "origin, reject fit" << endmsg;
-    return 0;
+    ATH_MSG_ERROR("need estimated track parameters near "
+                  << "origin, reject fit");
+    return nullptr;
   }
   // protection against not having RIO_OnTracks
   if (inputTrack.measurementsOnTrack()->empty()) {
-    msg(MSG::ERROR) << "try to refit track with empty "
-	<< "vec<RIO_OnTrack>, reject fit" << endmsg;
-    return 0;
+    ATH_MSG_ERROR("try to refit track with empty "
+                  << "vec<RIO_OnTrack>, reject fit");
+    return nullptr;
   }
 	
   // create PrepRawData subset
@@ -1326,77 +1286,71 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::Track&  inputTrack,
   DataVector<const MeasurementBase>::const_iterator it    = inputTrack.measurementsOnTrack()->begin();
   DataVector<const MeasurementBase>::const_iterator itEnd = inputTrack.measurementsOnTrack()->end(); 
   for ( ; it!=itEnd; ++it) {
-    if (!(*it)) 
-      {
-	msg(MSG::WARNING) << "This track contains empty MeasurementBase "
-	    << "objects! Skipped this MB.." << endmsg;  
-      } 
-    else 
-      {
-	const RIO_OnTrack* testROT = dynamic_cast<const RIO_OnTrack*>(*it);
-	const PrepRawData* prepRD = (testROT) ? (testROT)->prepRawData() : 0;
-	if (!prepRD) {
-	  msg(MSG::WARNING) << "RIO_OnTrack->prepRawRata() "
-	      << "returns no object, ignore... " << endmsg;
-	} else { prepRDColl.push_back( prepRD );  }
+    if (!(*it)) {
+      ATH_MSG_WARNING("This track contains empty MeasurementBase "
+                      << "objects! Skipped this MB..");
+    } else {
+      const RIO_OnTrack* testROT = dynamic_cast<const RIO_OnTrack*>(*it);
+      const PrepRawData* prepRD = (testROT) ? (testROT)->prepRawData() : nullptr;
+      if (!prepRD) {
+        ATH_MSG_WARNING("RIO_OnTrack->prepRawRata() "
+                        << "returns no object, ignore... ");
+      } else {
+        prepRDColl.push_back(prepRD);
       }
+    }
   }
-  const Trk::TrackParameters* minPar = *(std::min_element(inputTrack.trackParameters()->begin(),
-							  inputTrack.trackParameters()->end(),
-							  minTrkPar()));
-
-  it    = inputRotColl.begin();
-  itEnd = inputRotColl.end(); 
-  for(;it!=itEnd;++it) 
-    {
-      if(!(*it))
-	{
-	  msg(MSG::WARNING) << "This track contains empty MeasurementBase "
-	      << "objects! Skipped this MB.." << endmsg;
-	} 
-      else 
-	{
-	  const RIO_OnTrack* pROT = dynamic_cast<const RIO_OnTrack*>(*it);
-	  const PrepRawData* prepRD=(pROT)?(pROT->prepRawData()):NULL;
-	  if (!prepRD) 
-	    {
-	      msg(MSG::WARNING) << "RIO_OnTrack->prepRawRata() "
-		  << "returns no object, ignore... " << endmsg;
-	    } 
-	  else 
-	    {
-	      prepRDColl.push_back( prepRD );
-	    }
-	}          
+  const Trk::TrackParameters* minPar =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       minTrkPar()));
+
+  it = inputRotColl.begin();
+  itEnd = inputRotColl.end();
+  for (; it != itEnd; ++it) {
+    if (!(*it)) {
+      ATH_MSG_WARNING("This track contains empty MeasurementBase "
+                      << "objects! Skipped this MB..");
+    } else {
+      const RIO_OnTrack* pROT = dynamic_cast<const RIO_OnTrack*>(*it);
+      const PrepRawData* prepRD = (pROT) ? (pROT->prepRawData()) : nullptr;
+      if (!prepRD) {
+        ATH_MSG_WARNING("RIO_OnTrack->prepRawRata() "
+                        << "returns no object, ignore... ");
+      } else {
+        prepRDColl.push_back(prepRD);
+      }
     }
-  return fit(prepRDColl,*minPar,runOutlier,matEffects);
+  }
+  return fit(ctx,prepRDColl,*minPar,runOutlier,matEffects);
 }
 
-
 // fit a set of RIO_OnTrack objects
-
-
-Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::RIO_OnTrackSet&   inputRotColl,
-					      const Trk::TrackParameters&  estimatedParametersNearOrigine,
-					      const Trk::RunOutlierRemoval runOutlier,
-					      const Trk::ParticleHypothesis     matEffects) const
+std::unique_ptr<Trk::Track>
+Trk::DistributedKalmanFilter::fit(
+  const EventContext& ctx,
+  const Trk::RIO_OnTrackSet& inputRotColl,
+  const Trk::TrackParameters& estimatedParametersNearOrigine,
+  const Trk::RunOutlierRemoval runOutlier,
+  const Trk::ParticleHypothesis matEffects) const
 {
-    msg(MSG::VERBOSE) << "--> entering DistributedKalmanFilter::fit"
-        << "(RIO_OnTrackSet,TrackParameters,,)" << endmsg;
-
-    // protection, if empty RIO_OnTrackSet
-    if (inputRotColl.empty()) {
-        msg(MSG::ERROR) << "try to fit track+vec<ROT> with empty "
-            << "extended vec<RIO_OnTrack>, reject fit" << endmsg;
-        return 0;
+  ATH_MSG_VERBOSE("--> entering DistributedKalmanFilter::fit"
+                  << "(RIO_OnTrackSet,TrackParameters,,)");
+
+  // protection, if empty RIO_OnTrackSet
+  if (inputRotColl.empty()) {
+    ATH_MSG_ERROR("try to fit track+vec<ROT> with empty "
+                  << "extended vec<RIO_OnTrack>, reject fit");
+    return nullptr;
     }
 
-    if (runOutlier) msg(MSG::VERBOSE) << "-> Outlier removal switched on" << endmsg;
-    if (matEffects!=Trk::nonInteracting) msg(MSG::VERBOSE) << "-> Material Effects switched on" << endmsg;
+    if (runOutlier) ATH_MSG_VERBOSE( "-> Outlier removal switched on");
+    if (matEffects != Trk::nonInteracting)
+      ATH_MSG_VERBOSE("-> Material Effects switched on");
 
     // for the time being, disintegrate ROTSet back to PrepRawData set.
-    msg(MSG::VERBOSE) << "copy & downgrade ROTSet into PRDset - "
-        << "this is improvised." << endmsg;
+    ATH_MSG_VERBOSE("copy & downgrade ROTSet into PRDset - "
+                    << "this is improvised.");
     PrepRawDataSet prepRDColl;
 
     RIO_OnTrackSet::const_iterator it    = inputRotColl.begin();
@@ -1405,37 +1359,43 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::RIO_OnTrackSet&   input
     for ( ; it!=itEnd; ++it) {
         const PrepRawData* prepRD = ((*it)->prepRawData());
         if (!prepRD) {
-            msg(MSG::WARNING) << "RIO_OnTrack->prepRawRata() "
-                << "returns no object, ignore... " << endmsg;
+          ATH_MSG_WARNING("RIO_OnTrack->prepRawRata() "
+                          << "returns no object, ignore... ");
         } else {
-            prepRDColl.push_back( prepRD );
+          prepRDColl.push_back(prepRD);
         }
     }
 							
     // fit set of PrepRawData using main method, start with first Track Parameter in inputTrack
-    msg(MSG::VERBOSE) << "call fit(PRDSet,TP,,)" << endmsg;
-    return fit(prepRDColl,estimatedParametersNearOrigine,runOutlier,matEffects);
+    ATH_MSG_VERBOSE("call fit(PRDSet,TP,,)");
+    return fit(
+      ctx, prepRDColl, estimatedParametersNearOrigine, runOutlier, matEffects);
 }
 
-void Trk::DistributedKalmanFilter::deleteNodes() const
+void
+Trk::DistributedKalmanFilter::deleteNodes() const
 {
-  for(std::vector<TrkBaseNode*>::iterator pnIt=m_pvpNodes->begin();pnIt!=m_pvpNodes->end();++pnIt) 
-    {
-      delete (*pnIt);
-    }
+  for (std::vector<TrkBaseNode*>::iterator pnIt = m_pvpNodes->begin();
+       pnIt != m_pvpNodes->end();
+       ++pnIt) {
+    delete (*pnIt);
+  }
   m_pvpNodes->clear();
 }
 
-void Trk::DistributedKalmanFilter::deleteSurfaces() const
+void
+Trk::DistributedKalmanFilter::deleteSurfaces() const
 {
-  std::vector<TrkPlanarSurface*>::iterator psIt(m_pvpSurfaces->begin()),psEnd(m_pvpSurfaces->end());
+  std::vector<TrkPlanarSurface*>::iterator psIt(m_pvpSurfaces->begin()),
+    psEnd(m_pvpSurfaces->end());
   for(;psIt!=psEnd;++psIt) delete (*psIt);
   m_pvpSurfaces->clear();
 }
 
 void Trk::DistributedKalmanFilter::deleteTrackStates() const
 {
-  std::vector<TrkTrackState*>::iterator ptsIt(m_pvpTrackStates->begin()),ptsEnd(m_pvpTrackStates->end());
+  std::vector<TrkTrackState*>::iterator ptsIt(m_pvpTrackStates->begin()),
+    ptsEnd(m_pvpTrackStates->end());
   for(;ptsIt!=ptsEnd;++ptsIt) delete (*ptsIt);
   m_pvpTrackStates->clear();
 }
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkFilteringNodes.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkFilteringNodes.cxx
index ca1d3a45998a..f964d28a1746 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkFilteringNodes.cxx
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkFilteringNodes.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////
@@ -12,19 +12,19 @@
 // D.Emeliyanov@rl.ac.uk
 ///////////////////////////////////////////////////////////////////
 
-#include<stdio.h>
-#include<stdlib.h>
-#include<math.h>
-#include "TrkDistributedKalmanFilter/TrkBaseNode.h"
 #include "TrkDistributedKalmanFilter/TrkFilteringNodes.h"
-#include "TrkDistributedKalmanFilter/TrkTrackState.h"
+#include "TrkDistributedKalmanFilter/TrkBaseNode.h"
 #include "TrkDistributedKalmanFilter/TrkPlanarSurface.h"
+#include "TrkDistributedKalmanFilter/TrkTrackState.h"
 #include "TrkEventPrimitives/ParamDefs.h"
+#include "TrkParameters/TrackParameters.h"
 #include "TrkPrepRawData/PrepRawData.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "TrkParameters/TrackParameters.h"
 #include "TrkSurfaces/Surface.h"
 #include "TrkSurfaces/TrapezoidBounds.h"
+#include<cmath>
+#include<cstdio>
+#include<cstdlib>
 
 
 
@@ -142,7 +142,7 @@ namespace Trk
   TrkClusterNode::TrkClusterNode(TrkPlanarSurface* pS, double chi2Cut, double pos, double cov)
   {
     m_pSurface=pS;m_chi2Cut=chi2Cut;
-    m_m=pos;m_V=cov;m_pPRD=NULL;m_nodeType=2;m_ndof=1;
+    m_m=pos;m_V=cov;m_pPRD=nullptr;m_nodeType=2;m_ndof=1;
   }
 
   void TrkClusterNode::serialize(char fileName[])
@@ -225,7 +225,7 @@ namespace Trk
 					     double pos, double cov)
   {
     m_pSurface=pS;m_chi2Cut=chi2Cut;
-    m_m=pos;m_V=cov;m_pPRD=NULL;m_Rc=Rc;
+    m_m=pos;m_V=cov;m_pPRD=nullptr;m_Rc=Rc;
     m_nodeType=2;m_ndof=1;
   }
 
@@ -300,7 +300,7 @@ namespace Trk
     m_pSurface=pS;m_chi2Cut=chi2Cut;
     m_m[0]=pos[0];m_m[1]=pos[1];
     m_V[0][0]=cov[0];m_V[0][1]=cov[1]; m_V[1][0]=cov[2]; m_V[1][1]=cov[3];
-    m_pPRD=NULL;m_nodeType=1;m_ndof=2;
+    m_pPRD=nullptr;m_nodeType=1;m_ndof=2;
   }
 
   void TrkPixelNode::serialize(char fileName[])
@@ -439,7 +439,7 @@ namespace Trk
 
   void TrkTrtNode::updateInternal()
   {
-    if(isValidated()&&(m_pTrackState!=NULL))
+    if(isValidated()&&(m_pTrackState!=nullptr))
       {
 	m_freezeLR=true;
 	m_lrSign=(m_pTrackState->getTrackState(0)<0.0)?-1:1;
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkPlanarSurface.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkPlanarSurface.cxx
index 4e923695adac..83834eb2e1d9 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkPlanarSurface.cxx
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkPlanarSurface.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////
@@ -12,11 +12,11 @@
 // D.Emeliyanov@rl.ac.uk
 ///////////////////////////////////////////////////////////////////
 
-#include<stdio.h>
-#include<stdlib.h>
-#include<math.h>
-#include "TrkSurfaces/Surface.h"
 #include"TrkDistributedKalmanFilter/TrkPlanarSurface.h"
+#include "TrkSurfaces/Surface.h"
+#include<cmath>
+#include<cstdio>
+#include<cstdlib>
 
 namespace Trk
 {
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkTrackState.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkTrackState.cxx
index c3fa4a352a65..f77d8cdc1909 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkTrackState.cxx
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/TrkTrackState.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////
@@ -18,10 +18,10 @@
 #include "TrkDistributedKalmanFilter/TrkTrackState.h"
 #include "TrkParameters/TrackParameters.h"
 
-#include "stdio.h"
-#include "stdlib.h"
 #include "memory.h"
-#include "math.h"
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
 
 namespace Trk
 {
@@ -29,8 +29,8 @@ namespace Trk
   {
     memset(m_Rk,0,sizeof(m_Rk));
     memset(m_Gk,0,sizeof(m_Gk));
-    m_pSurface=NULL;m_scattMode=0;
-    m_isScattered=false;m_pPrevState=NULL;
+    m_pSurface=nullptr;m_scattMode=0;
+    m_isScattered=false;m_pPrevState=nullptr;
   }
 
   TrkTrackState::TrkTrackState(double Rk[5])
@@ -41,8 +41,8 @@ namespace Trk
     if(m_Rk[2]<-M_PI) m_Rk[2]+=2*M_PI;
     if(m_Rk[3]<0.0) m_Rk[3]+=M_PI;
     if(m_Rk[3]>M_PI) m_Rk[3]-=M_PI;
-    m_pSurface=NULL;m_scattMode=0;
-    m_isScattered=false;m_pPrevState=NULL;
+    m_pSurface=nullptr;m_scattMode=0;
+    m_isScattered=false;m_pPrevState=nullptr;
     resetCovariance();
   }
 
@@ -61,8 +61,8 @@ namespace Trk
     for(int i=0;i<5;i++)
       for(int j=0;j<5;j++) m_Gk[i][j]=pTS->m_Gk[i][j];
     m_scattMode=pTS->m_scattMode;
-    m_pSurface=NULL;
-    m_isScattered=false;m_pPrevState=NULL;
+    m_pSurface=nullptr;
+    m_isScattered=false;m_pPrevState=nullptr;
   }
 
   void TrkTrackState::serialize(char fileName[])
@@ -167,7 +167,7 @@ namespace Trk
   {
     double lenCorr,sigmaMS,s2,a2,radLength,lV[3],gV[3],a;
     TrkPlanarSurface* pS=m_pSurface;
-    if(pS==NULL) return;
+    if(pS==nullptr) return;
     gV[0]=sin(m_Re[3])*cos(m_Re[2]);
     gV[1]=sin(m_Re[3])*sin(m_Re[2]);
     gV[2]=cos(m_Re[3]);
@@ -186,7 +186,7 @@ namespace Trk
   {
     double lenCorr,effLength,lV[3],gV[3];
     TrkPlanarSurface* pS=m_pSurface;
-    if(pS==NULL) return;
+    if(pS==nullptr) return;
     gV[0]=sin(m_Re[3])*cos(m_Re[2]);
     gV[1]=sin(m_Re[3])*sin(m_Re[2]);
     gV[2]=cos(m_Re[3]);
@@ -212,7 +212,7 @@ namespace Trk
     if(m_scattMode!=0) applyMultipleScattering();
     if(m_scattMode==-2) applyEnergyLoss(-1);
     else if(m_scattMode==2) applyEnergyLoss(1);
-    if(m_pSurface!=NULL)
+    if(m_pSurface!=nullptr)
       {
 	if(m_pSurface->isBreakPoint()) applyEnergyLoss(2);
       }
@@ -223,7 +223,7 @@ namespace Trk
     double dR[5],dG[5][5],B[5][5];
     int i,j,m;
 
-    if(m_pPrevState==NULL) return;
+    if(m_pPrevState==nullptr) return;
     
     for(i=0;i<5;i++) 
       {
diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
index 7a4be5035f10..0ec02babca45 100755
--- a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
+++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
@@ -136,7 +136,7 @@ namespace Trk {
           estimate for the track, represented close to the origin.
       */
       virtual std::unique_ptr<Track> fit(
-        const ::EventContext& ctx,
+        const EventContext& ctx,
         const MeasurementSet& measSet,
         const TrackParameters& params,
         const RunOutlierRemoval runOutlier = false,
-- 
GitLab


From 9b84cc6c3bc3864d0812d67bbf9071ca41ff6f29 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 11 Jun 2020 11:30:40 +0200
Subject: [PATCH 166/266] Avoid new in SiSpacePointMakerTool.cxx and remove
 unused constructors of SCT_SpacePoint.

---
 .../SiSpacePoint/SCT_SpacePoint.h             | 16 +------
 .../SiSpacePoint/src/SCT_SpacePoint.cxx       | 43 -------------------
 .../src/SiSpacePointMakerTool.cxx             |  4 +-
 3 files changed, 3 insertions(+), 60 deletions(-)

diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h
index c960680465fe..3528e9716c35 100755
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -50,23 +50,9 @@ namespace InDet
        * on the surface associated to the FIRST member of the PRD-pair clusList.
        */
       //@{
-      SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList, 
-		     const Amg::Vector3D* position, 
-		     const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) ;
-      
-      SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList, 
-		     const Amg::Vector3D* position,
-		     const Amg::MatrixX* loccov,//assumes ownership of loccov
-		     const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) ;
-      
       SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList, 
 		     const Amg::Vector3D& position, 
 		     const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) ;
-      
-      SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList, 
-		     const Amg::Vector3D& position,
-		     const Amg::MatrixX& loccov,//assumes ownership of loccov
-		     const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) ;
       //@}
 
       /** Copy Constructor */
diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
index 7adb6e674f2c..312ae0b072ea 100755
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
@@ -20,34 +20,6 @@ namespace InDet
 
   //-------------------------------------------------------------
 
-  SCT_SpacePoint::SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList,  		    
-				 const Amg::Vector3D* position,
-				 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) 
-    :
-    Trk::SpacePoint()
-  {
-    setup(elementIdList,*position,clusList);
-    setupLocalCovarianceSCT();
-    setupGlobalFromLocalCovariance();
-    delete position;
-  }
-
-  //-------------------------------------------------------------
-
-  SCT_SpacePoint::SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList,  		    
-				 const Amg::Vector3D* position,
-				 const Amg::MatrixX* loccov,
-				 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) 
-    :
-    Trk::SpacePoint()
-  {
-    Trk::MeasurementBase::m_localCovariance = *loccov;
-    setup(elementIdList,*position,clusList);
-    setupGlobalFromLocalCovariance();
-    delete loccov;
-    delete position;
-  }
-
   SCT_SpacePoint::SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList,  		    
 				 const Amg::Vector3D& position,
 				 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) 
@@ -58,21 +30,6 @@ namespace InDet
     setupLocalCovarianceSCT();
     setupGlobalFromLocalCovariance();
   }
-
-  //-------------------------------------------------------------
-
-  SCT_SpacePoint::SCT_SpacePoint(const std::pair<IdentifierHash, IdentifierHash>& elementIdList,  		    
-				 const Amg::Vector3D& position,
-				 const Amg::MatrixX& loccov,
-				 const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList) 
-    :
-    Trk::SpacePoint()
-  {
-    Trk::MeasurementBase::m_localCovariance = loccov;
-    setup(elementIdList,position,clusList);
-    setupGlobalFromLocalCovariance();
-  }
-
   
   //-------------------------------------------------------------
   
diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
index 552fea4dbae7..5caa00056c52 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
@@ -181,7 +181,7 @@ namespace InDet {
       const std::pair<IdentifierHash,IdentifierHash> elementIdList( element1->identifyHash() , element2->identifyHash() ); 
       const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>*
         clusList = new std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(&cluster1, &cluster2);
-      return new InDet::SCT_SpacePoint(elementIdList, new Amg::Vector3D(point), clusList);
+      return new InDet::SCT_SpacePoint(elementIdList, point, clusList);
     }
 
     return nullptr;
@@ -746,7 +746,7 @@ namespace InDet {
     const std::pair<IdentifierHash,IdentifierHash> elementIdList(ID0,ID1); 
     const std::pair<const Trk::PrepRawData*,const Trk::PrepRawData*>* 
       clusList = new std::pair<const Trk::PrepRawData*,const Trk::PrepRawData*>(In0.cluster(),In1.cluster());
-    return new InDet::SCT_SpacePoint(elementIdList,new Amg::Vector3D(point),clusList);
+    return new InDet::SCT_SpacePoint(elementIdList, point, clusList);
   }
  
 }
-- 
GitLab


From aad08c31a832b14541ca91784ce43a0342288651 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Thu, 11 Jun 2020 09:32:08 +0000
Subject: [PATCH 167/266] Use MuonIdHelperSvc in athena components

---
 .../MuonTrackingGeometry/MuonStationBuilder.h |  48 +---
 .../src/MuonStationBuilder.cxx                | 247 ++++++++----------
 .../MM_Digitization/MM_DigitToolOutput.h      |   4 +-
 .../MM_Digitization/MM_Response_DigitTool.h   |  18 +-
 .../src/MM_Response_DigitTool.cxx             |  22 +-
 .../src/MM_FastDigitizer.cxx                  |   1 -
 .../sTGC_Digitization/sTgcVMMSim.h            |   3 +-
 .../src/ProjectionMMClusterBuilderTool.cxx    |  34 +--
 .../src/SimpleMMClusterBuilderTool.cxx        |  25 +-
 .../src/SimpleMMClusterBuilderTool.h          |  23 +-
 .../G4AtlasTests/src/MMHitsTestTool.cxx       |   3 +-
 .../G4AtlasTests/src/MuonHitTestToolBase.h    |   6 +-
 .../G4AtlasTests/src/sTGCHitsTestTool.cxx     |   3 +-
 .../Tools/HitAnalysis/src/MMHitAnalysis.cxx   |   3 +-
 .../Tools/HitAnalysis/src/sTGCHitAnalysis.cxx |   3 +-
 .../TrigT1NSWSimTools/PadOfflineData.h        |   3 +-
 .../TrigT1NSWSimTools/PadTdsOfflineTool.h     |   4 +-
 .../PadTriggerLogicOfflineTool.h              |  23 +-
 .../TrigT1NSWSimTools/PadTriggerLookupTool.h  |  23 +-
 .../StripClusterOfflineData.h                 |   3 +-
 .../TrigT1NSWSimTools/StripClusterTool.h      |  17 +-
 .../TrigT1NSWSimTools/StripSegmentTool.h      |  22 +-
 .../TrigT1NSWSimTools/StripTdsOfflineTool.h   |  15 +-
 .../src/PadTdsOfflineTool.cxx                 |   2 -
 .../src/PadTriggerLogicOfflineTool.cxx        |  50 +---
 .../src/PadTriggerLookupTool.cxx              |  64 ++---
 .../src/StripClusterTool.cxx                  |  34 +--
 .../src/StripSegmentTool.cxx                  |  29 +-
 .../src/StripTdsOfflineTool.cxx               |  46 ++--
 29 files changed, 274 insertions(+), 504 deletions(-)

diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h
index 354a1c3f9988..b902f9a68d36 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h
@@ -2,50 +2,29 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MuonStationBuilder.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONTRACKINGGEOMETRY_MUONSTATIONBUILDER_H
 #define MUONTRACKINGGEOMETRY_MUONSTATIONBUILDER_H
 
-//Muon
 #include "MuonTrackingGeometry/MuonStationTypeBuilder.h"
-//Trk
 #include "TrkDetDescrInterfaces/IDetachedTrackingVolumeBuilder.h"
-#include "TrkDetDescrInterfaces/ITrackingVolumeHelper.h"
-#include "TrkGeometry/DetachedTrackingVolume.h"
-#include "TrkGeometry/TrackingVolume.h"
-// Gaudi
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
+#include "TrkDetDescrInterfaces/ITrackingVolumeHelper.h"
+#include "TrkGeometry/DetachedTrackingVolume.h"
+#include "TrkGeometry/TrackingVolume.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "GeoModelKernel/GeoVPhysVol.h"
 #include "TrkDetDescrGeoModelCnv/GeoMaterialConverter.h"
 #include "TrkDetDescrGeoModelCnv/GeoShapeConverter.h"
 
-class MdtIdHelper;
-class RpcIdHelper;
-class CscIdHelper;
-class TgcIdHelper;
-class sTgcIdHelper;
-class MmIdHelper;
-
 namespace Trk {
- class TrackingGeometry;
- class TrackingVolume;
- class Volume;
- class Layer;
- class ITrackingVolumeBuilder;
- class ITrackingVolumeArrayCreator;
- class ILayerBuilder;
- class ILayerArrayCreator;
  class MaterialProperties;
 }
 
 namespace MuonGM {
   class MuonDetectorManager;
-  class MuonStation;
 }
  
 namespace Muon {
@@ -59,21 +38,16 @@ namespace Muon {
       by Sarka.Todorova@cern.ch
     */
     
-  class MuonStationBuilder : public AthAlgTool,
-                             virtual public Trk::IDetachedTrackingVolumeBuilder {
+  class MuonStationBuilder : public AthAlgTool, virtual public Trk::IDetachedTrackingVolumeBuilder {
   public:
-      /** Constructor */
       MuonStationBuilder(const std::string&,const std::string&,const IInterface*);
-      /** Destructor */
       virtual ~MuonStationBuilder() = default;
-      /** AlgTool initailize method.*/
       StatusCode initialize();
-      /** AlgTool finalize method */
-      StatusCode finalize();
 
       const std::vector<const Trk::DetachedTrackingVolume*>* buildDetachedTrackingVolumes(bool blend=false); 
 
     private:
+      ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
       const std::vector<const Trk::DetachedTrackingVolume*>* buildDetachedTrackingVolumeTypes(bool blend); 
 
@@ -83,13 +57,7 @@ namespace Muon {
       void identifyPrototype(const Trk::TrackingVolume*, int, int, Amg::Transform3D ) const;
       void getNSWStationsForTranslation(const GeoVPhysVol* pv, std::string name, Amg::Transform3D , std::vector<std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*>,std::vector<Amg::Transform3D> > >& vols, std::vector<std::string>& volNames ) const;
   
-      const MuonGM::MuonDetectorManager*  m_muonMgr;               //!< the MuonDetectorManager
-      const MdtIdHelper*            m_mdtIdHelper;           //!< 
-      const RpcIdHelper*            m_rpcIdHelper;           //!< 
-      const CscIdHelper*            m_cscIdHelper;           //!< 
-      const TgcIdHelper*            m_tgcIdHelper;           //!< 
-      const sTgcIdHelper*           m_stgcIdHelper;           //!< 
-      const MmIdHelper*             m_mmIdHelper;           //!< 
+      const MuonGM::MuonDetectorManager* m_muonMgr;               //!< the MuonDetectorManager
       Gaudi::Property<std::string>  m_muonMgrLocation{this,"MuonDetManagerLocation","MuonMgr"}; //!< the location of the Muon Manager
 
       ToolHandle<Muon::MuonStationTypeBuilder>  m_muonStationTypeBuilder
diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
index 46af2e94b6fd..6beaf1c1adff 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
@@ -2,13 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MuonStationBuilder.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-// Muon
 #include "MuonTrackingGeometry/MuonStationBuilder.h"
-//MuonSpectrometer include
+
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MuonStation.h"
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
@@ -17,10 +12,6 @@
 #include "MuonReadoutGeometry/TgcReadoutElement.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
 #include "MuonReadoutGeometry/MMReadoutElement.h"
-#include "MuonIdHelpers/MdtIdHelper.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonIdHelpers/MmIdHelper.h"
 // Amg
 #include "GeoPrimitives/GeoPrimitives.h"
 // Trk
@@ -48,13 +39,11 @@
 #include "TrkGeometry/Layer.h"
 #include "TrkGeometry/MaterialProperties.h"
 #include "TrkGeometry/HomogeneousLayerMaterial.h"
-#include<fstream>
 #include "GeoModelKernel/GeoShape.h"
 #include "GeoModelKernel/GeoShapeShift.h"
 #include "GeoModelKernel/GeoTube.h"
 #include "GeoModelKernel/GeoTubs.h"
 #include "GeoModelKernel/GeoCons.h"
-//mw
 #include "GeoModelKernel/GeoShapeSubtraction.h"
 #include "GeoModelKernel/GeoShapeUnion.h"
 #include "GeoModelKernel/GeoShapeIntersection.h"
@@ -64,10 +53,6 @@
 #include "GeoModelKernel/GeoPgon.h"
 #include "GeoModelKernel/GeoPara.h"
 #include "GeoModelKernel/GeoVolumeCursor.h"
-
-// STD
-#include <map>
-
 #include "GeoModelKernel/GeoShape.h"
 #include "GeoModelKernel/GeoShapeShift.h"
 #include "GeoModelKernel/GeoShapeSubtraction.h"
@@ -75,6 +60,9 @@
 #include "GeoModelKernel/GeoTrd.h"
 #include "GeoModelKernel/GeoVolumeCursor.h"
 
+#include <map>
+#include <fstream>
+
 // constructor
 Muon::MuonStationBuilder::MuonStationBuilder(const std::string& t, const std::string& n, const IInterface* p) :
   AthAlgTool(t,n,p)
@@ -89,13 +77,6 @@ StatusCode Muon::MuonStationBuilder::initialize()
 
     // get Muon Spectrometer Description Manager
     ATH_CHECK( detStore()->retrieve(m_muonMgr) );
-    
-    m_mdtIdHelper = m_muonMgr-> mdtIdHelper(); 
-    m_rpcIdHelper = m_muonMgr-> rpcIdHelper();
-    m_cscIdHelper = m_muonMgr-> cscIdHelper();
-    m_tgcIdHelper = m_muonMgr-> tgcIdHelper();
-    m_stgcIdHelper = m_muonMgr-> stgcIdHelper();
-    m_mmIdHelper  = m_muonMgr-> mmIdHelper();
 
     ATH_MSG_INFO( m_muonMgr->geometryVersion() ); 
     
@@ -122,7 +103,9 @@ StatusCode Muon::MuonStationBuilder::initialize()
       return StatusCode::FAILURE;
     }
 
-    ATH_MSG_INFO( name() <<" initialize() successful" );    
+    ATH_MSG_INFO( name() <<" initialize() successful" );
+
+    ATH_CHECK(m_idHelperSvc.retrieve());
     
   return StatusCode::SUCCESS;
 }
@@ -205,7 +188,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	  const Trk::DiamondBounds* dia=nullptr;
 	  const Trk::RotatedDiamondBounds* rdia=nullptr;
 	  Amg::Transform3D layTransf(Trk::s_idTransform);
-	  if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(nswId)) {
+	  if (m_idHelperSvc->issTgc(nswId)) {
 	    const MuonGM::sTgcReadoutElement* stgc=m_muonMgr->getsTgcReadoutElement(nswId);
 	    if (stgc) rtrd = dynamic_cast<const Trk::RotatedTrapezoidBounds*> (&stgc->bounds(nswId));
 	    if (stgc) trd = dynamic_cast<const Trk::TrapezoidBounds*> (&stgc->bounds(nswId));
@@ -214,7 +197,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
             if (stgc) layTransf = stgc->transform(nswId);
             if(stgc) ATH_MSG_DEBUG( " STGC readout element " );
             if(!stgc) ATH_MSG_DEBUG( " STGC and NO readout element " );
-	  } else if (m_mmIdHelper && m_mmIdHelper->is_mm(nswId)) {
+	  } else if (m_idHelperSvc->isMM(nswId)) {
 	    const MuonGM::MMReadoutElement* mm=m_muonMgr->getMMReadoutElement(nswId);
 	    if (mm) rtrd = dynamic_cast<const Trk::RotatedTrapezoidBounds*> (&mm->bounds(nswId));
             if (mm) layTransf = mm->transform(nswId);
@@ -326,18 +309,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	      if (iType!=0) {
                 Identifier id(iType);
 		Identifier nid(0);
-		if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		  nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							     m_stgcIdHelper->stationEta(id),
-							     m_stgcIdHelper->stationPhi(id)+it,
-							     m_stgcIdHelper->multilayer(id),
-							     m_stgcIdHelper->gasGap(id),1,1);
-		}  else if (m_mmIdHelper) {
-		  nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							   m_mmIdHelper->stationEta(id),
-							   m_mmIdHelper->stationPhi(id)+it,
-							   m_mmIdHelper->multilayer(id),
-							   m_mmIdHelper->gasGap(id),1);
+		if (m_idHelperSvc->issTgc(id)) {
+		  nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							     m_idHelperSvc->stgcIdHelper().stationEta(id),
+							     m_idHelperSvc->stgcIdHelper().stationPhi(id)+it,
+							     m_idHelperSvc->stgcIdHelper().multilayer(id),
+							     m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		}  else if (m_idHelperSvc->isMM(id)) {
+		  nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							   m_idHelperSvc->mmIdHelper().stationEta(id),
+							   m_idHelperSvc->mmIdHelper().stationPhi(id)+it,
+							   m_idHelperSvc->mmIdHelper().multilayer(id),
+							   m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		}
 		
 		unsigned int nType = nid.get_identifier32().get_compact();
@@ -358,18 +341,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	      if (iType!=0) {
 		Identifier id(iType);
 		Identifier nid(0);
-		if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		  nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							     -m_stgcIdHelper->stationEta(id),
-							     m_stgcIdHelper->stationPhi(id),
-							     m_stgcIdHelper->multilayer(id),
-							     m_stgcIdHelper->gasGap(id),1,1);
-		}  else if (m_mmIdHelper) {
-		  nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							   -m_mmIdHelper->stationEta(id),
-							   m_mmIdHelper->stationPhi(id),
-							   m_mmIdHelper->multilayer(id),
-							   m_mmIdHelper->gasGap(id),1);
+		if (m_idHelperSvc->issTgc(id)) {
+		  nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							     -m_idHelperSvc->stgcIdHelper().stationEta(id),
+							     m_idHelperSvc->stgcIdHelper().stationPhi(id),
+							     m_idHelperSvc->stgcIdHelper().multilayer(id),
+							     m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		}  else if (m_idHelperSvc->isMM(id)) {
+		  nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							   -m_idHelperSvc->mmIdHelper().stationEta(id),
+							   m_idHelperSvc->mmIdHelper().stationPhi(id),
+							   m_idHelperSvc->mmIdHelper().multilayer(id),
+							   m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		}
 		
 		unsigned int nType = nid.get_identifier32().get_compact();
@@ -389,18 +372,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 		if (iType!=0) {
 		  Identifier id(iType);
 		  Identifier nid(0);
-		  if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		    nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							       m_stgcIdHelper->stationEta(id),
-							       m_stgcIdHelper->stationPhi(id)+it,
-							       m_stgcIdHelper->multilayer(id),
-							       m_stgcIdHelper->gasGap(id),1,1);
-		  }  else if (m_mmIdHelper) {
-		    nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							     m_mmIdHelper->stationEta(id),
-							     m_mmIdHelper->stationPhi(id)+it,
-							     m_mmIdHelper->multilayer(id),
-							     m_mmIdHelper->gasGap(id),1);
+		  if (m_idHelperSvc->issTgc(id)) {
+		    nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							       m_idHelperSvc->stgcIdHelper().stationEta(id),
+							       m_idHelperSvc->stgcIdHelper().stationPhi(id)+it,
+							       m_idHelperSvc->stgcIdHelper().multilayer(id),
+							       m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		  }  else if (m_idHelperSvc->isMM(id)) {
+		    nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							     m_idHelperSvc->mmIdHelper().stationEta(id),
+							     m_idHelperSvc->mmIdHelper().stationPhi(id)+it,
+							     m_idHelperSvc->mmIdHelper().multilayer(id),
+							     m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		  }
 
 		  unsigned int nType = nid.get_identifier32().get_compact();
@@ -427,18 +410,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	      if (iType!=0) {
                 Identifier id(iType);
 		Identifier nid(0);
-		if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		  nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							     m_stgcIdHelper->stationEta(id),
-							     m_stgcIdHelper->stationPhi(id)+it,
-							     m_stgcIdHelper->multilayer(id),
-							     m_stgcIdHelper->gasGap(id),1,1);
-		}  else if (m_mmIdHelper) {
-		  nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							   m_mmIdHelper->stationEta(id),
-							   m_mmIdHelper->stationPhi(id)+it,
-							   m_mmIdHelper->multilayer(id),
-							   m_mmIdHelper->gasGap(id),1);
+		if (m_idHelperSvc->issTgc(id)) {
+		  nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							     m_idHelperSvc->stgcIdHelper().stationEta(id),
+							     m_idHelperSvc->stgcIdHelper().stationPhi(id)+it,
+							     m_idHelperSvc->stgcIdHelper().multilayer(id),
+							     m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		}  else if (m_idHelperSvc->isMM(id)) {
+		  nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							   m_idHelperSvc->mmIdHelper().stationEta(id),
+							   m_idHelperSvc->mmIdHelper().stationPhi(id)+it,
+							   m_idHelperSvc->mmIdHelper().multilayer(id),
+							   m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		}
 
 		unsigned int nType = nid.get_identifier32().get_compact();
@@ -462,18 +445,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	      if (iType!=0) {
 		Identifier id(iType);
 		Identifier nid(0);
-		if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		  nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							     -m_stgcIdHelper->stationEta(id),
-							     m_stgcIdHelper->stationPhi(id),
-							     m_stgcIdHelper->multilayer(id),
-							     m_stgcIdHelper->gasGap(id),1,1);
-		}  else if (m_mmIdHelper) {
-		  nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							   -m_mmIdHelper->stationEta(id),
-							   m_mmIdHelper->stationPhi(id),
-							   m_mmIdHelper->multilayer(id),
-							   m_mmIdHelper->gasGap(id),1);
+		if (m_idHelperSvc->issTgc(id)) {
+		  nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							     -m_idHelperSvc->stgcIdHelper().stationEta(id),
+							     m_idHelperSvc->stgcIdHelper().stationPhi(id),
+							     m_idHelperSvc->stgcIdHelper().multilayer(id),
+							     m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		}  else if (m_idHelperSvc->isMM(id)) {
+		  nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							   -m_idHelperSvc->mmIdHelper().stationEta(id),
+							   m_idHelperSvc->mmIdHelper().stationPhi(id),
+							   m_idHelperSvc->mmIdHelper().multilayer(id),
+							   m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		}
 		
 		unsigned int nType = nid.get_identifier32().get_compact();
@@ -493,18 +476,18 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 		if (iType!=0) {
 		  Identifier id(iType);
 		  Identifier nid(0);
-		  if (m_stgcIdHelper && m_stgcIdHelper->is_stgc(id)) {
-		    nid = m_stgcIdHelper->channelID(m_stgcIdHelper->stationName(id),
-							       m_stgcIdHelper->stationEta(id),
-							       m_stgcIdHelper->stationPhi(id)+it,
-							       m_stgcIdHelper->multilayer(id),
-							       m_stgcIdHelper->gasGap(id),1,1);
-		  }  else if (m_mmIdHelper) {
-		    nid = m_mmIdHelper->channelID(m_mmIdHelper->stationName(id),
-							     m_mmIdHelper->stationEta(id),
-							     m_mmIdHelper->stationPhi(id)+it,
-							     m_mmIdHelper->multilayer(id),
-							     m_mmIdHelper->gasGap(id),1);
+		  if (m_idHelperSvc->issTgc(id)) {
+		    nid = m_idHelperSvc->stgcIdHelper().channelID(m_idHelperSvc->stgcIdHelper().stationName(id),
+							       m_idHelperSvc->stgcIdHelper().stationEta(id),
+							       m_idHelperSvc->stgcIdHelper().stationPhi(id)+it,
+							       m_idHelperSvc->stgcIdHelper().multilayer(id),
+							       m_idHelperSvc->stgcIdHelper().gasGap(id),1,1);
+		  }  else if (m_idHelperSvc->isMM(id)) {
+		    nid = m_idHelperSvc->mmIdHelper().channelID(m_idHelperSvc->mmIdHelper().stationName(id),
+							     m_idHelperSvc->mmIdHelper().stationEta(id),
+							     m_idHelperSvc->mmIdHelper().stationPhi(id)+it,
+							     m_idHelperSvc->mmIdHelper().multilayer(id),
+							     m_idHelperSvc->mmIdHelper().gasGap(id),1);
 		  }
 
 		  unsigned int nType = nid.get_identifier32().get_compact();
@@ -569,8 +552,8 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	    if (msTV && gmStation) {
 	      Amg::Transform3D transf = Amg::CLHEPTransformToEigen(gmStation->getTransform()); 
               Identifier stId(0);
-              if (m_cscIdHelper && stName.substr(0,1)=="C") {
-		stId = m_cscIdHelper->elementID(vname.substr(0,3),eta,phi);
+              if (m_idHelperSvc->hasCSC() && stName.substr(0,1)=="C") {
+		stId = m_idHelperSvc->cscIdHelper().elementID(vname.substr(0,3),eta,phi);
               }
               // adjust eta,phi
               if (msTypeName.substr(0,1)=="C") {
@@ -606,7 +589,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 		if (msName.substr(7,2)=="21") eta = az ? 5 : 4;
 		if (msName.substr(7,2)=="22") eta = az ? 5 : 4;
 	      }     
-              if (m_tgcIdHelper && stName.substr(0,1)=="T") {
+              if (m_idHelperSvc->hasTGC() && stName.substr(0,1)=="T") {
 		int etaSt = eta - 4;
 		if (eta < 5) etaSt = eta - 5; 
 		double phic = transf.translation().phi(); 
@@ -615,11 +598,11 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 		else
                   phi = static_cast<int> (phic<0 ? 12*phic/M_PI+24 : 12*phic/M_PI);
                 phi++;
-                stId = m_tgcIdHelper->elementID(vname.substr(0,3),etaSt,phi);
-              } else if (m_rpcIdHelper && stName.substr(0,3)=="BML") {
-		stId = m_rpcIdHelper->elementID(vname.substr(0,3),eta,phi,1);
-              } else if (m_mdtIdHelper && stName.substr(0,1)!="C" ) {
-		stId = m_mdtIdHelper->elementID(vname.substr(0,3),eta,phi);
+                stId = m_idHelperSvc->tgcIdHelper().elementID(vname.substr(0,3),etaSt,phi);
+              } else if (m_idHelperSvc->hasRPC() && stName.substr(0,3)=="BML") {
+		stId = m_idHelperSvc->rpcIdHelper().elementID(vname.substr(0,3),eta,phi,1);
+              } else if (m_idHelperSvc->hasMDT() && stName.substr(0,1)!="C" ) {
+		stId = m_idHelperSvc->mdtIdHelper().elementID(vname.substr(0,3),eta,phi);
               }
               if (!(stId.get_compact())) ATH_MSG_WARNING( "identifier of the station not found:"<<vname <<","<<eta<<","<<phi );
               unsigned int iD = stId.get_identifier32().get_compact();
@@ -850,13 +833,6 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
    return mStations;  
 }
 
-// finalize
-StatusCode Muon::MuonStationBuilder::finalize()
-{
-  ATH_MSG_INFO(  name() <<" finalize() successful" );
-  return StatusCode::SUCCESS;
-}
-//
 void Muon::MuonStationBuilder::glueComponents(const Trk::DetachedTrackingVolume* stat) const
 {
    const Trk::TrackingVolumeArray* volArray = stat->trackingVolume()->confinedVolumes();
@@ -904,7 +880,7 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
     if (!cscRE) cscRE = m_muonMgr->getCscReadoutElement(st,eta,phi,cLay);
     if (cscRE) {
       for (int gasgap = 0; gasgap < cscRE->Ngasgaps(); gasgap++) {
-	Identifier idi = m_cscIdHelper->channelID(cscRE->identify(),cscRE->ChamberLayer(),gasgap+1,0,1);   
+	Identifier idi = m_idHelperSvc->cscIdHelper().channelID(cscRE->identify(),cscRE->ChamberLayer(),gasgap+1,0,1);   
         const Trk::PlaneSurface* stripSurf = dynamic_cast<const Trk::PlaneSurface*> (&(cscRE->surface(idi)));
         const Amg::Vector3D gpi = stripSurf->center();
         const Trk::TrackingVolume* assocVol = station->trackingVolume()->associatedSubVolume(gpi);
@@ -949,9 +925,9 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
           phi = phit;
           // update station identity
           Identifier oldId(station->layerRepresentation()->layerType());
-          int stationName = m_tgcIdHelper->stationName(oldId);
-          int stationEta  = m_tgcIdHelper->stationEta(oldId);
-          Identifier stId = m_tgcIdHelper->elementID(stationName,stationEta,phi);
+          int stationName = m_idHelperSvc->tgcIdHelper().stationName(oldId);
+          int stationEta  = m_idHelperSvc->tgcIdHelper().stationEta(oldId);
+          Identifier stId = m_idHelperSvc->tgcIdHelper().elementID(stationName,stationEta,phi);
           station->layerRepresentation()->setLayerType(stId.get_identifier32().get_compact());
           break;
         }
@@ -965,7 +941,7 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
       int phiSt = tgc->getStationPhi();
 
       bool* validId=new bool(false);
-      Identifier wireId  = m_tgcIdHelper->channelID(stationName.substr(0,3),etaSt,phiSt,1,0,1,true,validId);
+      Identifier wireId  = m_idHelperSvc->tgcIdHelper().channelID(stationName.substr(0,3),etaSt,phiSt,1,0,1,true,validId);
       if (!(*validId)) ATH_MSG_ERROR( "invalid TGC channel:" << wireId );
       const Amg::Vector3D gp = tgc->channelPos(wireId);
       const Trk::TrackingVolume* assocVol = station->trackingVolume()->associatedSubVolume(gp);
@@ -973,7 +949,7 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
       if (assocVol && assocVol->confinedLayers()) {
 	const std::vector<const Trk::Layer*> layers = assocVol->confinedLayers()->arrayObjects();           
 	for (unsigned int il=0;il<layers.size();il++) {
-	  wireId  = m_tgcIdHelper->channelID(stationName.substr(0,3),etaSt,phiSt,il+1,0,1,true,validId);            
+	  wireId  = m_idHelperSvc->tgcIdHelper().channelID(stationName.substr(0,3),etaSt,phiSt,il+1,0,1,true,validId);            
 	  if (!(*validId)) layers[il]->setLayerType(1);
 	  else {
 	    if (!(*validId)) ATH_MSG_ERROR( "invalid TGC channel:" << wireId );
@@ -995,11 +971,11 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
     }
   }
 
-  if (m_mdtIdHelper && (stationName.substr(0,1)=="B" || stationName.substr(0,1)=="E" )) { 
+  if (m_idHelperSvc->hasMDT() && (stationName.substr(0,1)=="B" || stationName.substr(0,1)=="E" )) { 
     // recalculate id
     Identifier stId(station->layerRepresentation()->layerType());
    
-    int nameIndex = m_mdtIdHelper->stationNameIndex( stationName.substr(0,3) ); 
+    int nameIndex = m_idHelperSvc->mdtIdHelper().stationNameIndex( stationName.substr(0,3) ); 
     if (station->trackingVolume()->confinedVolumes()) {
       const std::vector<const Trk::TrackingVolume*> cVols = station->trackingVolume()->confinedVolumes()->arrayObjects();
       for (unsigned int i=0; i<cVols.size() ; i++) {
@@ -1008,9 +984,9 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
           const MuonGM::MdtReadoutElement* mdtROE = 0;
 	  for (unsigned int il=0; il<cLays.size() ; il++) {
 	    Identifier id(cLays[il]->layerType());
-	    if (id.get_compact() > 0 && m_mdtIdHelper->is_mdt(id)) {
-              Identifier newId = m_mdtIdHelper->channelID(nameIndex,eta,phi,
-							  m_mdtIdHelper->multilayer(id),m_mdtIdHelper->tubeLayer(id),m_mdtIdHelper->tube(id));
+	    if (id.get_compact() > 0 && m_idHelperSvc->isMdt(id)) {
+              Identifier newId = m_idHelperSvc->mdtIdHelper().channelID(nameIndex,eta,phi,
+							  m_idHelperSvc->mdtIdHelper().multilayer(id),m_idHelperSvc->mdtIdHelper().tubeLayer(id),m_idHelperSvc->mdtIdHelper().tube(id));
               if (!mdtROE) mdtROE=m_muonMgr->getMdtReadoutElement(newId);
               unsigned int newid = newId.get_identifier32().get_compact();
               cLays[il]->setLayerType(newid); 
@@ -1035,10 +1011,10 @@ void Muon::MuonStationBuilder::identifyLayers(const Trk::DetachedTrackingVolume*
 	  const std::vector<const Trk::Layer*>* cLays = cVols[i]->confinedArbitraryLayers();
 	  for (unsigned int il=0; il<cLays->size() ; il++) {
 	    Identifier id((*cLays)[il]->layerType());
-	    if (m_rpcIdHelper && id.get_compact() > 0 && m_rpcIdHelper->is_rpc(id)) {
-              Identifier newId = m_rpcIdHelper->channelID(nameIndex,eta,phi,m_rpcIdHelper->doubletR(id),
-							  m_rpcIdHelper->doubletZ(id),m_rpcIdHelper->doubletPhi(id),m_rpcIdHelper->gasGap(id),
-							  m_rpcIdHelper->measuresPhi(id),m_rpcIdHelper->strip(id));
+	    if (m_idHelperSvc->hasRPC() && id.get_compact() > 0 && m_idHelperSvc->isRpc(id)) {
+              Identifier newId = m_idHelperSvc->rpcIdHelper().channelID(nameIndex,eta,phi,m_idHelperSvc->rpcIdHelper().doubletR(id),
+							  m_idHelperSvc->rpcIdHelper().doubletZ(id),m_idHelperSvc->rpcIdHelper().doubletPhi(id),m_idHelperSvc->rpcIdHelper().gasGap(id),
+							  m_idHelperSvc->rpcIdHelper().measuresPhi(id),m_idHelperSvc->rpcIdHelper().strip(id));
               int newid = newId.get_identifier32().get_compact();
               (*cLays)[il]->setLayerType(newid);  
             }
@@ -1087,9 +1063,9 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat
   std::string stationName = station->volumeName();
   ATH_MSG_VERBOSE( " for station " << stationName );    
 
-  if (m_mdtIdHelper && (stationName.substr(0,1)=="B" || stationName.substr(0,1)=="E" )) { 
+  if (m_idHelperSvc->hasMDT() && (stationName.substr(0,1)=="B" || stationName.substr(0,1)=="E" )) { 
     // MDT
-    int nameIndex = m_mdtIdHelper->stationNameIndex( stationName.substr(0,3) ); 
+    int nameIndex = m_idHelperSvc->mdtIdHelper().stationNameIndex( stationName.substr(0,3) ); 
     int nameIndexC = nameIndex;
     if (stationName.substr(0,3)=="EIS") nameIndexC = 22; 
     if (stationName.substr(0,3)=="BIM") nameIndexC = 23; 
@@ -1102,12 +1078,11 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat
         const Trk::TrackingVolume* assocVol = station->associatedSubVolume(transf.inverse()*multilayer->center());
         if (!assocVol ) {
 	  ATH_MSG_WARNING( "valid multilayer outside station:" << stationName );
-	  //ATH_MSG_WARNING( "multilayer position:" << multilayer->center()<<", local: "<< transf.inverse()*multilayer->center() );
 	}
         if (assocVol) {
 	  int nLayers = multilayer->getNLayers();
 	  for (int layer =1; layer <= nLayers ; layer++) {
-	    Identifier id = m_mdtIdHelper->channelID(nameIndex,eta,phi,multi+1,layer,1);           
+	    Identifier id = m_idHelperSvc->mdtIdHelper().channelID(nameIndex,eta,phi,multi+1,layer,1);           
 	    if (id.get_compact() > 0) {
 	      // retrieve associated layer
 	      Amg::Vector3D gp = multilayer->tubePos(id);
@@ -1124,10 +1099,10 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat
     const Trk::BinnedArray< Trk::TrackingVolume >* confinedVolumes = station->confinedVolumes();
     if (confinedVolumes){
       const std::vector<const Trk::TrackingVolume*>& vols = confinedVolumes->arrayObjects();
-      for (unsigned int iv=0;iv<vols.size();iv++) if (m_rpcIdHelper && vols[iv]->volumeName() == "RPC") {
+      for (unsigned int iv=0;iv<vols.size();iv++) if (m_idHelperSvc->hasRPC() && vols[iv]->volumeName() == "RPC") {
         // for active layers do a search of associated ROE
         const std::vector<const Trk::Layer*>* layers = vols[iv]->confinedArbitraryLayers();
-        int nameIndex = m_rpcIdHelper->stationNameIndex( stationName.substr(0,3) ); 
+        int nameIndex = m_idHelperSvc->rpcIdHelper().stationNameIndex( stationName.substr(0,3) ); 
         if (stationName.substr(0,3)=="BME") nameIndex=12;              // hack for BME
         if (stationName.substr(0,3)=="BMG") nameIndex=13;              // hack for BMG (even though BMG don't have RPC)
         // loop over doubletR, doubletZ 
@@ -1138,9 +1113,8 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat
 	  if (rpc) {
             if (doubletZ < rpc->getDoubletZ() ) {  
 	      for (int gasGap=0; gasGap<2; gasGap++) {
-		Identifier etaId = m_rpcIdHelper->channelID(nameIndex,eta,phi,
+		Identifier etaId = m_idHelperSvc->rpcIdHelper().channelID(nameIndex,eta,phi,
 							    doubletR+1,doubletZ+1,doubletPhi+1,gasGap+1,0,1); 
-		if (1/*m_rpcIdHelper->valid(etaId)*/){
 		  for (unsigned int il=0;il<layers->size();il++) {
 		    if ((*layers)[il]->layerType() != 0 && (*layers)[il]->surfaceRepresentation().isOnSurface(transf.inverse()*rpc->stripPos(etaId),false,0.5*(*layers)[il]->thickness() ) ) {
                       const Amg::Vector3D locPos1 = (*layers)[il]->surfaceRepresentation().transform().inverse()*transf.inverse()*rpc->stripPos(etaId);
@@ -1153,7 +1127,6 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat
 		      (*layers)[il]->setRef(swap + locPos[0]);
 		    } 
 		  }
-		}
 	 }}}}}}                  
       }
     }
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitToolOutput.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitToolOutput.h
index 6e5e3de07f4a..67d251a7c150 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitToolOutput.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitToolOutput.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MM_DIGITIZATION_MM_DIGITTOOLOUTPUT_H
@@ -20,6 +20,8 @@ Class to store output produced by MDT_Digitization tools:
 
 -----------------------------------------------*/
 
+#include <vector>
+
 class MM_DigitToolOutput {
  public:
     MM_DigitToolOutput(bool hitWasEff, std::vector <int> strpos, std::vector<float> time, std::vector<float> charge, int strTrig, float strTimeTrig )
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Response_DigitTool.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Response_DigitTool.h
index 16c97f347383..89de12db0b9b 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Response_DigitTool.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Response_DigitTool.h
@@ -1,16 +1,16 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MM_DIGITIZATION_MM_RESPONSE_DIGITTOOL_H
 #define MM_DIGITIZATION_MM_RESPONSE_DIGITTOOL_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "MM_Digitization/MM_DigitToolOutput.h"
 #include "MM_Digitization/IMM_DigitizationTool.h"
-
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 
+// #include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "MM_Digitization/MM_DigitToolOutput.h"
 #include "CLHEP/Random/RandomEngine.h"
 #include "AthenaKernel/IAtRndmGenSvc.h"
 /*-----------------------------------------------
@@ -26,14 +26,10 @@ input quantities into the output
 namespace MuonGM{
   class MuonDetectorManager;
 }
-class MmIdHelper;
-class IAtRndmGenSvc;
 
 class MM_Response_DigitTool : public AthAlgTool, virtual public IMM_DigitizationTool {
  public:
-  MM_Response_DigitTool( const std::string& type,
-			const std::string& name,
-			const IInterface* parent );
+  MM_Response_DigitTool( const std::string& type, const std::string& name, const IInterface* parent);
 
   MM_DigitToolOutput digitize(/* const MmDigitToolInput& input */ );
   StatusCode initialize();
@@ -41,8 +37,8 @@ class MM_Response_DigitTool : public AthAlgTool, virtual public IMM_Digitization
 
  private:
 
-  const MuonGM::MuonDetectorManager* m_muonGeoMgr;
-  const MmIdHelper*         m_idHelper;
+  // const MuonGM::MuonDetectorManager* m_muonGeoMgr;
+  // ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
  protected:
   CLHEP::HepRandomEngine *m_rndmEngine;    // Random number engine used - not init in SiDigitization
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_Response_DigitTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_Response_DigitTool.cxx
index 1985f0d9c1fa..577c1c8c2c5e 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_Response_DigitTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_Response_DigitTool.cxx
@@ -2,11 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "MM_Digitization/MM_DigitToolInput.h"
 #include "MM_Digitization/MM_Response_DigitTool.h"
-#include "MuonIdHelpers/MmIdHelper.h"
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "AthenaKernel/IAtRndmGenSvc.h"
+
+#include "MM_Digitization/MM_DigitToolInput.h"
+// #include "MuonReadoutGeometry/MuonDetectorManager.h"
 
 #include <iostream>
 #include <vector>
@@ -16,8 +15,7 @@ using namespace MuonGM;
 /*******************************************************************************/
 MM_Response_DigitTool::MM_Response_DigitTool(const std::string& type, const std::string& name, const IInterface* parent) :
   AthAlgTool(type,name,parent),
-  m_muonGeoMgr(0),
-  m_idHelper(0),
+  // m_muonGeoMgr(0),
   m_rndmEngine(0),
   m_rndmEngineName("MuonDigitization"),
   m_rndmSvc("AtRndmGenSvc", name )
@@ -37,13 +35,11 @@ MM_DigitToolOutput MM_Response_DigitTool::digitize( /*const MmDigitToolInput& in
 /*******************************************************************************/
 StatusCode MM_Response_DigitTool::initialize()
 {
-  if(detStore()->contains<MuonDetectorManager>( "Muon" )){
-    ATH_CHECK( detStore()->retrieve(m_muonGeoMgr) );
-    ATH_MSG_DEBUG("MuonGeoModelDetectorManager retrieved from StoreGate.");
-    m_idHelper = m_muonGeoMgr->mmIdHelper();
-    ATH_MSG_DEBUG("MdtIdHelper: " << m_idHelper );
-  }
-
+  // if(detStore()->contains<MuonDetectorManager>( "Muon" )){
+  //   ATH_CHECK( detStore()->retrieve(m_muonGeoMgr) );
+  //   ATH_MSG_DEBUG("MuonGeoModelDetectorManager retrieved from StoreGate.");
+  // }
+  // ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK( m_rndmSvc.retrieve() );
 
   // getting our random numbers stream
diff --git a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx
index 5dc51f9b854c..886f33742324 100644
--- a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx
+++ b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx
@@ -14,7 +14,6 @@
 #include "MuonSimEvent/MicromegasHitIdHelper.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MMReadoutElement.h"
-#include "MuonIdHelpers/MmIdHelper.h"
 #include "TrkEventPrimitives/LocalDirection.h"
 #include "MuonAGDDDescription/MMDetectorDescription.h"
 #include "MuonAGDDDescription/MMDetectorHelper.h"
diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcVMMSim.h b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcVMMSim.h
index 6562bf72ca8e..3fb9bbaf17ed 100644
--- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcVMMSim.h
+++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcVMMSim.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /* This class is a simulation of the sTGC VMM behavior.  It is intended to be used as a module controlling
@@ -20,7 +20,6 @@
 #include <iosfwd>
 #include <inttypes.h>
 #include "MuonDigitContainer/MuonDigit.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
index 53fda070640d..81ddd34b7f36 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
@@ -1,34 +1,24 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-#include "ProjectionMMClusterBuilderTool.h"
 
-#include <cmath>
-#include <algorithm>
+#include "ProjectionMMClusterBuilderTool.h"
 
 #include "MuonPrepRawData/MMPrepData.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonIdHelpers/MmIdHelper.h"
-
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/SystemOfUnits.h"
 
-namespace{
-// Parametrization of the strip error after the projection
-constexpr double stripErrorSlope = 0.2;
-constexpr double stripErrorIntercept = 0.15;
-}
-
-
-
+#include <cmath>
+#include <algorithm>
 
+namespace {
+  // Parametrization of the strip error after the projection
+  constexpr double stripErrorSlope = 0.2;
+  constexpr double stripErrorIntercept = 0.15;
+}
 
-Muon::ProjectionMMClusterBuilderTool::ProjectionMMClusterBuilderTool(const std::string& t,
-							     const std::string& n,
-							     const IInterface*  p )
-  :  
-  AthAlgTool(t,n,p)
-{
+Muon::ProjectionMMClusterBuilderTool::ProjectionMMClusterBuilderTool(const std::string& t, const std::string& n, const IInterface* p) :
+    AthAlgTool(t,n,p) {
   declareInterface<IMMClusterBuilderTool>(this);
   declareProperty("tmin", m_tmin=0.0);
   declareProperty("tmax", m_tmax=5.0);
@@ -40,8 +30,6 @@ Muon::ProjectionMMClusterBuilderTool::ProjectionMMClusterBuilderTool(const std::
   declareProperty("minClusterSize",m_minClusterSize=2);
 }
 
-
-
 StatusCode Muon::ProjectionMMClusterBuilderTool::initialize()
 {
   ATH_CHECK(m_idHelperSvc.retrieve());
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
index 41270cbf2389..b53d64d4eabf 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
@@ -2,38 +2,21 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 #include "SimpleMMClusterBuilderTool.h"
+
 #include "MuonPrepRawData/MMPrepData.h"
-#include "MuonIdHelpers/MmIdHelper.h"
 
 using namespace Muon;
 
-Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string& t,
-							     const std::string& n,
-							     const IInterface*  p )
-  :  
-  AthAlgTool(t,n,p)
-{
+Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string& t, const std::string& n, const IInterface* p) :
+    AthAlgTool(t,n,p) {
   declareInterface<IMMClusterBuilderTool>(this);
   declareProperty("useErrorParametrization", m_useErrorParametrization = true);
   declareProperty("maxHoleSize", m_maxHoleSize = 1);
 }
 
-Muon::SimpleMMClusterBuilderTool::~SimpleMMClusterBuilderTool()
-{
-
-}
-
-
 StatusCode Muon::SimpleMMClusterBuilderTool::initialize()
 {
-  ATH_CHECK( m_idHelperSvc.retrieve() );
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode Muon::SimpleMMClusterBuilderTool::finalize()
-{
-
+  ATH_CHECK(m_idHelperSvc.retrieve());
   return StatusCode::SUCCESS;
 }
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
index eacd9b6fab01..6426c0655af4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
@@ -1,19 +1,19 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef SimpleMMClusterBuilderTool_h
 #define SimpleMMClusterBuilderTool_h
 
-#include <vector>
-
-#include "GaudiKernel/ServiceHandle.h"
 #include "MMClusterization/IMMClusterBuilderTool.h"
-#include "MuonPrepRawData/MMPrepData.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 
-
+#include "MuonPrepRawData/MMPrepData.h"
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
+#include <vector>
+#include <string>
 
 //
 // Simple clusterization tool for MicroMegas
@@ -24,23 +24,14 @@ namespace Muon
   class SimpleMMClusterBuilderTool : virtual public IMMClusterBuilderTool, public AthAlgTool {
 
   public:
-    /** Default constructor */
     SimpleMMClusterBuilderTool(const std::string&, const std::string&, const IInterface*);
-     
-    /** Default destructor */
-    virtual ~SimpleMMClusterBuilderTool();
-
-    /** standard initialize method */
+    virtual ~SimpleMMClusterBuilderTool()=default;
     virtual StatusCode initialize();
-    
-    /** standard finalize method */
-    virtual StatusCode finalize();
 
     StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect, 
 			   std::vector<Muon::MMPrepData*>& clustersVect) const;
 
   private: 
-    /// Muon Detector Descriptor
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     
     bool m_useErrorParametrization;
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx
index f54464d6ac29..0c5ba191dfb0 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MMHitsTestTool.h"
@@ -13,7 +13,6 @@
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MMReadoutElement.h"
 
-#include "MuonIdHelpers/MmIdHelper.h"
 #include "MuonSimEvent/MicromegasHitIdHelper.h"
 
 #include "MuonSimEvent/MMSimHitCollection.h"
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h
index ce020cc0c61c..cdcf36de3085 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h
+++ b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef G4AT_MuonHitTestToolBase_h
@@ -8,8 +8,6 @@
 #include "SimTestToolBase.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
-//#include "CLHEP/Geometry/Point3D.h"
-//#include "CLHEP/Geometry/Vector3D.h"
 #include "Identifier/Identifier.h"
 #include "HitManagement/HitIdHelper.h"
 
@@ -17,7 +15,6 @@ namespace MuonGM {
   class MuonDetectorManager;
 }
 
-
 class MuonHitTestToolBase : public SimTestToolBase {
 
 public:
@@ -31,7 +28,6 @@ protected:
   StatusCode executeFillHistos(const Amg::Vector3D &);
   StatusCode executeFillHistosSectors_Wedge1(const Amg::Vector3D &, std::string);
   StatusCode executeFillHistosSectors_Wedge2(const Amg::Vector3D &, std::string);
-  //StatusCode executeFillHistos_sTGc_Wedge1(const Amg::Vector3D &, std::string);
   StatusCode executeFillHistos_sTGc(const Amg::Vector3D &, std::string);
 
 protected:
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx
index f7f2b4d65292..eb95ce9778a1 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "sTGCHitsTestTool.h"
@@ -13,7 +13,6 @@
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
 
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonSimEvent/sTgcHitIdHelper.h"
 
 #include "MuonSimEvent/sTGCSimHitCollection.h"
diff --git a/Simulation/Tools/HitAnalysis/src/MMHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/MMHitAnalysis.cxx
index 2f7e875917dc..010d1d4756d5 100755
--- a/Simulation/Tools/HitAnalysis/src/MMHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/MMHitAnalysis.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MMHitAnalysis.h"
@@ -9,7 +9,6 @@
 #include "GeoAdaptors/GeoMuonHits.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MMReadoutElement.h"
-#include "MuonIdHelpers/MmIdHelper.h"
 #include "MuonSimEvent/MicromegasHitIdHelper.h"
 #include "MuonSimEvent/MMSimHitCollection.h"
 #include "MuonSimEvent/MMSimHit.h"
diff --git a/Simulation/Tools/HitAnalysis/src/sTGCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/sTGCHitAnalysis.cxx
index 79220a81a071..c39075e30988 100755
--- a/Simulation/Tools/HitAnalysis/src/sTGCHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/sTGCHitAnalysis.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "sTGCHitAnalysis.h"
@@ -9,7 +9,6 @@
 #include "GeoAdaptors/GeoMuonHits.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonSimEvent/sTgcHitIdHelper.h"
 #include "MuonSimEvent/sTGCSimHitCollection.h"
 #include "MuonSimEvent/sTGCSimHit.h"
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
index 4d6dca9782ee..36f84dc34f76 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef PADOFFLINEDATA_H
@@ -7,7 +7,6 @@
 
 // Identifier includes
 #include "Identifier/Identifier.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 
 // local includes
 #include "TrigT1NSWSimTools/PadData.h"
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
index bb0b6bc1c7dc..9f9c20d7347d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
@@ -14,9 +14,9 @@
 #include "TrigT1NSWSimTools/IPadTdsTool.h"
 #include "PadTdsValidationTree.h"
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "GaudiKernel/IIncidentSvc.h"
+#include "AthenaKernel/IAtRndmGenSvc.h"
 
-class IIncidentSvc;
-class IAtRndmGenSvc;
 class sTgcDigit;
 class TTree;
 class MuonSimDataCollection;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
index ab0a094d5ac1..e7d6e550ea17 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
@@ -1,33 +1,25 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// -*-c++-*-
 #ifndef NSWL1_PADTRIGGERLOGICOFFLINETOOL_H
 #define NSWL1_PADTRIGGERLOGICOFFLINETOOL_H
 
-//basic includes
+#include "TrigT1NSWSimTools/IPadTriggerLogicTool.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
-#include "GaudiKernel/Property.h"
 
-//local includes
-#include "TrigT1NSWSimTools/IPadTriggerLogicTool.h"
 #include "TrigT1NSWSimTools/PadTriggerValidationTree.h"
 #include "TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
-
-
-//To access detector envelope
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "RegSelLUT/IRegionIDLUT_Creator.h"
 
-
 //forward declarations
 class IIncidentSvc;
 class TTree;
 
-
 namespace MuonGM {
     class MuonDetectorManager;
 }
@@ -55,15 +47,13 @@ namespace NSWL1 {
 
     */
     class PadTriggerLogicOfflineTool:
-            virtual public IPadTriggerLogicTool,
-            public AthAlgTool,
-            public IIncidentListener {
+            virtual public IPadTriggerLogicTool, public AthAlgTool, public IIncidentListener {
     public:
         enum CacheStatus {OK, FILL_ERROR, CLEARED};
         PadTriggerLogicOfflineTool(const std::string& type,
                         const std::string& name,
                         const IInterface* parent);
-        virtual ~PadTriggerLogicOfflineTool();
+        virtual ~PadTriggerLogicOfflineTool()=default;
         virtual StatusCode initialize() override;
         virtual void handle (const Incident& inc) override;
         /// Log a message using the Athena controlled logging system
@@ -86,6 +76,7 @@ namespace NSWL1 {
         PadTrigger convert(const SectorTriggerCandidate &t);
             
     private:
+        ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
         /// get the output tree from the athena histogram service
          const std::vector<float> m_etaBandsLargeSector;
          const std::vector<float> m_etaBandsSmallSector;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLookupTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLookupTool.h
index 6a92d18c290e..5b7054b023de 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLookupTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLookupTool.h
@@ -1,29 +1,23 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// -*-c++-*-
-
 /*
 This tool utilizes the same LUT as in the pad trigger hardware. Trigger band-id and phi-d are looked up where pad coincidence patterns are keys
 */
-
-
-
 #ifndef NSWL1_PadTriggerLookupTool_H
 #define NSWL1_PadTriggerLookupTool_H
 
-//basic includes
+#include "TrigT1NSWSimTools/IPadTriggerLookupTool.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
-#include "GaudiKernel/Property.h"
 
-//local includes
-#include "TrigT1NSWSimTools/IPadTriggerLookupTool.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 #include <unordered_map>
+#include <string>
 #include <vector>
 
 namespace MuonGM {
@@ -42,20 +36,19 @@ namespace NSWL1 {
         }
     };
     class PadTriggerLookupTool:
-            virtual public IPadTriggerLookupTool,
-            public AthAlgTool,
-            public IIncidentListener {
+            virtual public IPadTriggerLookupTool, public AthAlgTool, public IIncidentListener {
     public:
         PadTriggerLookupTool(const std::string& type,
                         const std::string& name,
                         const IInterface* parent);
-        virtual ~PadTriggerLookupTool();
+        virtual ~PadTriggerLookupTool()=default;
         virtual StatusCode initialize() override;
         virtual void handle (const Incident& inc) override;
         virtual
         StatusCode lookup_pad_triggers(const std::vector<std::shared_ptr<PadData>>& pads,
                                        std::vector<std::unique_ptr<PadTrigger>> &triggers) override;
     private:
+        ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
         /// load the 4o4 coincidence table
          StatusCode loadCoincidenceTable(std::string);
         // inflates the table by appending 3o4s //empty hits/missing layers are -9999 (const value of the 'nullPadNumber' variable. Never use any nonsense number for non existing values it will break some rules )
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
index 8a3f13725b62..7634005c566b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPCLUSTEROFFLINEDATA_H
@@ -7,7 +7,6 @@
 
 // Identifier includes
 #include "Identifier/Identifier.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigit.h"
 // local includes
 #include "TrigT1NSWSimTools/StripClusterData.h"
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
index 0eb67c560fc6..2ca6dcf30e69 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
@@ -1,29 +1,24 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPCLUSTERTOOL_H
 #define STRIPCLUSTERTOOL_H
 
-//basic includes
+#include "TrigT1NSWSimTools/IStripClusterTool.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
 
-#include "GaudiKernel/Property.h"
-
-//local includes
-#include "TrigT1NSWSimTools/IStripClusterTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "StripClusterOfflineData.h"
 #include "TrigT1NSWSimTools/PadTrigger.h"
 #include "TrigT1NSWSimTools/StripTdsOfflineTool.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 
-
 //forward declarations
 class IIncidentSvc;
 class IAtRndmGenSvc;
-class sTgcIdHelper;
 class sTgcDigit;
 class TTree;
 
@@ -61,7 +56,7 @@ namespace NSWL1 {
     StripClusterTool(const std::string& type, 
                       const std::string& name,
                       const IInterface* parent);
-    virtual ~StripClusterTool();
+    virtual ~StripClusterTool()=default;
     virtual StatusCode initialize() override;
     virtual void handle (const Incident& inc) override;
     virtual
@@ -79,7 +74,7 @@ namespace NSWL1 {
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
     ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
-    const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
     // analysis ntuple
     TTree* m_tree;                                          //!< ntuple for analysis
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
index e19124fb2a77..cb960dd1c361 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
@@ -1,29 +1,22 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPSEGMENTTOOL_H
 #define STRIPSEGMENTTOOL_H
 
-//basic includes
+#include "TrigT1NSWSimTools/IStripSegmentTool.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
+#include "GaudiKernel/ToolHandle.h"
 
-#include "GaudiKernel/Property.h"
-
-//Muon RDOs for trigger EDM
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MuonRDO/NSW_TrigRawDataContainer.h"
-
-
-//To access detector envelope
 #include "RegSelLUT/IRegionIDLUT_Creator.h"
-
-//local includes
-#include "TrigT1NSWSimTools/IStripSegmentTool.h"
 #include "TrigT1NSWSimTools/PadTrigger.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
-//forward declarations
+
 class IIncidentSvc;
 class TTree;
 
@@ -52,7 +45,7 @@ namespace NSWL1 {
     StripSegmentTool(const std::string& type, 
                       const std::string& name,
                       const IInterface* parent);
-    virtual ~StripSegmentTool();
+    virtual ~StripSegmentTool()=default;
     virtual StatusCode initialize() override;
     virtual void handle (const Incident& inc) override;
     virtual
@@ -60,6 +53,7 @@ namespace NSWL1 {
 
     
   private:
+        ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
         // methods implementing the internal data processing
 
         StatusCode book_branches();                             //!< book the branches to analyze the StripTds behavior                                                                                           
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
index b2218ea455d0..52d2f7ba0f5c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
@@ -1,27 +1,22 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPTDSOFFLINETOOL_H
 #define STRIPTDSOFFLINETOOL_H
 
-//basic includes
+#include "TrigT1NSWSimTools/IStripTdsTool.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
 
-#include "GaudiKernel/Property.h"
-
-//local includes
-#include "TrigT1NSWSimTools/IStripTdsTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "TrigT1NSWSimTools/PadTrigger.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 
-
 //forward declarations
 class IIncidentSvc;
 class IAtRndmGenSvc;
-class sTgcIdHelper;
 class sTgcDigit;
 class TTree;
 
@@ -80,6 +75,7 @@ namespace NSWL1 {
  
 
   private:
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     // methods implementing the internal data processing
     cStatus fill_strip_cache( const std::vector<std::unique_ptr<PadTrigger>>& padTriggers);   //!< loop over the digit container, apply the additional processing then fill the cache
     void clear_cache();                                     //!< clear the strip hit cache deleting the StripData pointers
@@ -95,7 +91,6 @@ namespace NSWL1 {
     ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
     CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
-    const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
 
     // hidden variables
     std::vector<std::unique_ptr<StripData>>  m_strip_cache;                 //!< cache for the STRIP hit data in the event
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
index b4c7177b8cbf..43155a5d7b2c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
@@ -3,7 +3,6 @@
 */
 
 #include "GaudiKernel/ITHistSvc.h"
-#include "GaudiKernel/IIncidentSvc.h"
 #include "AGDDKernel/AGDDDetector.h"
 #include "AGDDKernel/AGDDDetectorStore.h"
 
@@ -20,7 +19,6 @@
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
 
-#include "AthenaKernel/IAtRndmGenSvc.h"
 #include "GaudiKernel/ThreadLocalContext.h"
 #include "GaudiKernel/EventContext.h"
 #include "CLHEP/Random/RandFlat.h"
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
index f1e028e34cba..a391a8ae1550 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
@@ -1,16 +1,11 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include <boost/geometry.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
+#include "TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h"
 
-// Athena/Gaudi includes
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
-// local includes
-#include "TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h"
 #include "TrigT1NSWSimTools/PadData.h"
 #include "TrigT1NSWSimTools/PadOfflineData.h"
 #include "TrigT1NSWSimTools/PadTrigger.h"
@@ -18,52 +13,41 @@
 #include "TrigT1NSWSimTools/SingleWedgePadTrigger.h"
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
 #include "TrigT1NSWSimTools/sTGCTriggerBandsInEta.h"
-
-
-//Event info includes
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
-
-// Muon software includes
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "MuonDigitContainer/sTgcDigit.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
-// trk
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkSurfaces/TrapezoidBounds.h"
-
-// random numbers
 #include "AthenaKernel/IAtRndmGenSvc.h"
 #include "CLHEP/Random/RandFlat.h"
 #include "CLHEP/Random/RandGauss.h"
 
-
-// root
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
 #include "TTree.h"
 #include "TVector3.h"
-// std
 #include <functional>
 #include <algorithm>
 #include <map>
 #include <utility>
-#include <math.h>
+#include <cmath>
 
 namespace NSWL1 {
 //------------------------------------------------------------------------------
-PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool( const std::string& type,
-                                                        const std::string& name,
-                                                        const IInterface* parent) :
+PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool(const std::string& type, const std::string& name, const IInterface* parent) :
     AthAlgTool(type,name,parent),
     m_etaBandsLargeSector(BandsInEtaLargeSector),
     m_etaBandsSmallSector(BandsInEtaSmallSector),
     m_incidentSvc("IncidentSvc",name),
-    m_detManager(0),
+    m_detManager(nullptr),
     m_rndmEngineName(""),
     m_sTgcDigitContainer(""),
     m_sTgcSdoContainer(""),
@@ -72,20 +56,13 @@ PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool( const std::string& type,
     m_useSimple4of4(false),
     m_doNtuple(false),
     m_tdrLogic(),
-    m_lutCreatorToolsTGC ("sTGC_RegionSelectorTable",this)
-{
+    m_lutCreatorToolsTGC ("sTGC_RegionSelectorTable",this) {
     declareInterface<NSWL1::IPadTriggerLogicTool>(this);
     declareProperty("TimeJitter", m_PadEfficiency = 1.0, "pad trigger efficiency (tmp placeholder)");
     declareProperty("PhiIdBits", m_phiIdBits = 6, "Number of bit to compute Phi-Id of pad triggers");
     declareProperty("UseSimple4of4", m_useSimple4of4 = false, "use simplified logic requiring 4 hits on 4 gas gaps");
     declareProperty("DoNtuple", m_doNtuple = false, "save the trigger outputs in an analysis ntuple");
 }
-//------------------------------------------------------------------------------
-PadTriggerLogicOfflineTool::~PadTriggerLogicOfflineTool() {
-
-}
-
-
 
 StatusCode PadTriggerLogicOfflineTool::initialize() {
     ATH_MSG_INFO( "initializing " << name() );
@@ -104,8 +81,8 @@ StatusCode PadTriggerLogicOfflineTool::initialize() {
     ATH_CHECK(m_incidentSvc.retrieve());
     m_incidentSvc->addListener(this,IncidentType::BeginEvent);
     ATH_CHECK(m_lutCreatorToolsTGC.retrieve());
-    ATH_CHECK( detStore()->retrieve( m_detManager ));
-    
+    ATH_CHECK(detStore()->retrieve(m_detManager));
+    ATH_CHECK(m_idHelperSvc.retrieve());
     return StatusCode::SUCCESS;
 }
 //------------------------------------------------------------------------------
@@ -478,11 +455,10 @@ NSWL1::PadTrigger PadTriggerLogicOfflineTool::convert(const SectorTriggerCandida
     //Assignment of  Phi Id using 6 bits slicing
     Identifier padIdentifier(pt.m_pads.at(0)->id() );
     IdentifierHash moduleHashId;
-    const sTgcIdHelper* idhelper=m_detManager->stgcIdHelper();
-    const IdContext ModuleContext = idhelper->detectorElement_context();
+    const IdContext ModuleContext = m_idHelperSvc->stgcIdHelper().detectorElement_context();
 
     //get the module Identifier using the pad's
-    idhelper->get_hash( padIdentifier, moduleHashId, &ModuleContext );
+    m_idHelperSvc->stgcIdHelper().get_hash( padIdentifier, moduleHashId, &ModuleContext );
     const auto regSelector = m_lutCreatorToolsTGC->getLUT();
     const RegSelModule* thismodule=regSelector->Module(moduleHashId);
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLookupTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLookupTool.cxx
index 935dce62eb87..4236e9ace4a2 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLookupTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLookupTool.cxx
@@ -1,63 +1,45 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include <boost/geometry.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
+#include "TrigT1NSWSimTools/PadTriggerLookupTool.h"
 
-// Athena/Gaudi includes
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
-// local includes
-#include "TrigT1NSWSimTools/PadTriggerLookupTool.h"
 #include "TrigT1NSWSimTools/PadData.h"
 #include "TrigT1NSWSimTools/PadOfflineData.h"
 #include "TrigT1NSWSimTools/PadTrigger.h"
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
 #include "TrigT1NSWSimTools/sTGCTriggerBandsInEta.h"
-
-
-
-// Muon software includes
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
-
 #include "PathResolver/PathResolver.h"
 
+#include <boost/geometry.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
 #include <algorithm>
 #include <fstream>
 #include <numeric>
 
 namespace NSWL1 {
 //------------------------------------------------------------------------------
-PadTriggerLookupTool::PadTriggerLookupTool( const std::string& type,
-                                                        const std::string& name,
-                                                        const IInterface* parent) :
+PadTriggerLookupTool::PadTriggerLookupTool(const std::string& type, const std::string& name, const IInterface* parent) :
     AthAlgTool(type,name,parent),
     m_etaBandsLargeSector(BandsInEtaLargeSector),
     m_etaBandsSmallSector(BandsInEtaSmallSector),
-    m_detManager(0),
-    m_dumpSectorGeometry(true)
-{
+    m_detManager(nullptr),
+    m_dumpSectorGeometry(true) {
     declareInterface<NSWL1::IPadTriggerLookupTool>(this);
     declareProperty("DumpSectorGeometry",m_dumpSectorGeometry  = true, "record sector pad geometry into an ASCII file / use it for debugging");
 }
-//------------------------------------------------------------------------------
-PadTriggerLookupTool::~PadTriggerLookupTool() {
-
-}
-
-
 
 StatusCode PadTriggerLookupTool::initialize() {
     ATH_MSG_INFO( "initializing " << name() );
     ATH_MSG_INFO( name() << " configuration:");
     ATH_CHECK( detStore()->retrieve( m_detManager ));
     ATH_CHECK(loadCoincidenceTable("TriggerPatterns.dat") );
-    
     if(m_dumpSectorGeometry){
         ATH_MSG_INFO(" Will dump  3D pad geometry / sector");
         std::ofstream padGeoFile("NSWSectorPadsGeoDump.dat");//use local variables in order not to contaminate members
@@ -69,7 +51,7 @@ StatusCode PadTriggerLookupTool::initialize() {
         padGeoFile.close();
 
     }
-    
+    ATH_CHECK(m_idHelperSvc.retrieve());
     return StatusCode::SUCCESS;
 }
 //------------------------------------------------------------------------------
@@ -416,23 +398,23 @@ std::vector<std::vector<std::shared_ptr<PadData> >> PadTriggerLookupTool::select
         also useful to dump the full geometetry for geometry validation& side studies(see  'printGeometry' meth. and corresponding flag in the JO)
     */
     std::vector<std::shared_ptr<PadOfflineData>> PadTriggerLookupTool::fetchSectorPads(bool isSmall, int SIDE,int SECTOR) {
-        const sTgcIdHelper* idhelper=m_detManager->stgcIdHelper();
 
         std::vector<std::shared_ptr<PadOfflineData>> sectorPads;
         std::vector<Identifier> padIds;
         
-        for(const Identifier& modId : idhelper->idVector() ){
-            int ModuleSide=1?idhelper->stationEta(modId)>0 :0;
-            int ModuleSect=idhelper->stationPhi(modId);
-            bool SectType=idhelper->isSmall(modId);
+        for(const Identifier& modId : m_idHelperSvc->stgcIdHelper().idVector() ){
+            int ModuleSide=1?m_idHelperSvc->stgcIdHelper().stationEta(modId)>0 :0;
+            int ModuleSect=m_idHelperSvc->stgcIdHelper().stationPhi(modId);
+            bool SectType=m_idHelperSvc->stgcIdHelper().isSmall(modId);
             if(ModuleSide!=SIDE || ModuleSect !=SECTOR || SectType!=isSmall) continue;//grab only sector modules selected by the method args
             std::vector<Identifier> all_channels;
-            idhelper->idChannels(modId,all_channels);
+            m_idHelperSvc->stgcIdHelper().idChannels(modId,all_channels);
 
             std::vector<Identifier> pad_channels;
+            const sTgcIdHelper* idHelper = &m_idHelperSvc->stgcIdHelper();
             std::copy_if(all_channels.begin(),all_channels.end(),std::back_inserter(pad_channels),
-                    [idhelper](const Identifier& id){
-                         int chanType=idhelper->channelType(id);
+                    [idHelper](const Identifier& id){
+                         int chanType=idHelper->channelType(id);
                          return chanType==0;
                     }
             );
@@ -441,23 +423,23 @@ std::vector<std::vector<std::shared_ptr<PadData> >> PadTriggerLookupTool::select
         }
 
         for(Identifier id : padIds){
-            int multilayer=idhelper->multilayer(id);
-            int gasgap=idhelper->gasGap(id);
+            int multilayer=m_idHelperSvc->stgcIdHelper().multilayer(id);
+            int gasgap=m_idHelperSvc->stgcIdHelper().gasGap(id);
 
-            int channeltype=idhelper->channelType(id);
+            int channeltype=m_idHelperSvc->stgcIdHelper().channelType(id);
             const MuonGM::sTgcReadoutElement* rdoEl = m_detManager->getsTgcReadoutElement(id);
             const MuonGM::MuonPadDesign* mpd=rdoEl->getPadDesign(id);
             int padEtaMinFromDesign=mpd->padEtaMin;
             int padEtaMaxFromDesign=mpd->padEtaMax;
             int nPadCols=mpd->nPadColumns; 
 
-            int thisEta=idhelper->padEta(id);
-            int thisPhi=idhelper->padPhi(id);
+            int thisEta=m_idHelperSvc->stgcIdHelper().padEta(id);
+            int thisPhi=m_idHelperSvc->stgcIdHelper().padPhi(id);
 
             int nPadRowsFromDesign=padEtaMaxFromDesign-padEtaMinFromDesign;
             if( thisEta>nPadRowsFromDesign || thisPhi > nPadCols  ) continue;
 
-            Identifier pid=idhelper->padID(id,  multilayer,  gasgap,  channeltype,  thisEta,  thisPhi,true);
+            Identifier pid=m_idHelperSvc->stgcIdHelper().padID(id,  multilayer,  gasgap,  channeltype,  thisEta,  thisPhi,true);
             auto pad=std::make_shared<PadOfflineData>(pid, 0, 0, m_detManager);
             pad->fillGeometricInformation();
             sectorPads.push_back(pad);
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
index d64e48732807..5192479b8dbf 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
@@ -1,24 +1,18 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// Athena/Gaudi includes
+#include "TrigT1NSWSimTools/StripClusterTool.h"
+
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
-
-// local includes
-#include "TrigT1NSWSimTools/StripClusterTool.h"
 #include "TrigT1NSWSimTools/StripOfflineData.h"
-
-// Muon software includes
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "MuonDigitContainer/sTgcDigit.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
-// random numbers
 #include "AthenaKernel/IAtRndmGenSvc.h"
 #include "CLHEP/Random/RandFlat.h"
 #include "CLHEP/Random/RandGauss.h"
@@ -29,17 +23,14 @@
 #include <map>
 #include <utility>
 
-
-
 namespace NSWL1 {
 
     StripClusterTool::StripClusterTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
       m_rndmSvc("AtRndmGenSvc",name),
-      m_detManager(0),
-      m_sTgcIdHelper(0),
-      m_tree(0),
+      m_detManager(nullptr),
+      m_tree(nullptr),
       m_clusters()
     {
       declareInterface<NSWL1::IStripClusterTool>(this);
@@ -47,11 +38,6 @@ namespace NSWL1 {
       declareProperty("sTGC_SdoContainerName", m_sTgcSdoContainer = "sTGC_SDO", "the name of the sTGC SDO container");
     }
 
-    StripClusterTool::~StripClusterTool() {
-    }
-
-
-
   StatusCode StripClusterTool::initialize() {
     ATH_MSG_INFO( "initializing " << name() );
     ATH_MSG_INFO( name() << " configuration:");
@@ -74,11 +60,9 @@ namespace NSWL1 {
 
     // retrieve the Random Service
     ATH_CHECK(m_rndmSvc.retrieve());
-    //  retrieve the MuonDetectormanager
+    // retrieve the MuonDetectormanager
     ATH_CHECK(detStore()->retrieve( m_detManager ));
-    //  retrieve the sTGC offline Id helper
-    ATH_CHECK(detStore()->retrieve( m_sTgcIdHelper ));
-
+    ATH_CHECK(m_idHelperSvc.retrieve());
     return StatusCode::SUCCESS;
   }
 
@@ -387,7 +371,7 @@ void StripClusterTool::fill_strip_validation_id(std::vector<std::unique_ptr<Stri
       
       StripData* prev_hit=nullptr;
       int first_ch=(*hit)->channelId();//channel id of the first strip
-      ATH_MSG_DEBUG("Cluster Hits :" << (*hit)->channelId() << " " << m_sTgcIdHelper->gasGap( (*hit)->Identity())
+      ATH_MSG_DEBUG("Cluster Hits :" << (*hit)->channelId() << " " << m_idHelperSvc->stgcIdHelper().gasGap( (*hit)->Identity())
 		    << "   " <<   (*hit)->moduleId() << "   " << (*hit)->sectorId() << "   " <<(*hit)->wedge()
 		    << "  "<< (*hit)->sideId()  );
       hit++;//S.I is this ncessary ?
@@ -395,7 +379,7 @@ void StripClusterTool::fill_strip_validation_id(std::vector<std::unique_ptr<Stri
       for(auto & this_hit : strips){
 	      if(!(this_hit)->readStrip() )continue;
           if( ((this_hit)->bandId()==-1 || this_hit->phiId()==-1) ){
-	       ATH_MSG_WARNING("Read Strip without BandId :" << (this_hit)->channelId() << " " << m_sTgcIdHelper->gasGap( (this_hit)->Identity())
+	       ATH_MSG_WARNING("Read Strip without BandId :" << (this_hit)->channelId() << " " << m_idHelperSvc->stgcIdHelper().gasGap( (this_hit)->Identity())
 		      << "   " <<   (this_hit)->moduleId() << "   " << (this_hit)->sectorId() << "   " <<(this_hit)->wedge()
 		      << "  "<< (this_hit)->sideId()   );
 	       continue;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
index 1d1fdb042566..c070b85c5bf7 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
@@ -1,48 +1,39 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// Athena/Gaudi includes
+#include "TrigT1NSWSimTools/StripSegmentTool.h"
+
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
-
-// local includes
-#include "TrigT1NSWSimTools/StripSegmentTool.h"
 #include "TrigT1NSWSimTools/StripOfflineData.h"
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
-
-// Muon software includes
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "MuonDigitContainer/sTgcDigit.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
 #include "MuonRegionSelector/sTGC_RegionSelectorTable.h"
-
-// random numbers
 #include "AthenaKernel/IAtRndmGenSvc.h"
 #include "CLHEP/Random/RandFlat.h"
 #include "CLHEP/Random/RandGauss.h"
 
-// local includes
 #include "TTree.h"
-
 #include <functional>
 #include <algorithm>
 #include <map>
 #include <utility>
-#include <math.h>      
+#include <cmath>
 
 namespace NSWL1 {
 
     StripSegmentTool::StripSegmentTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_tree(0),
+      m_tree(nullptr),
       m_rIndexBits(0),
       m_dThetaBits(0),
       m_zbounds({-1,1}),
@@ -63,10 +54,6 @@ namespace NSWL1 {
       declareProperty("rIndexScheme", m_ridxScheme = 1, "rIndex slicing scheme/ 0-->R / 1-->eta");
 
     }
-
-    StripSegmentTool::~StripSegmentTool() {
-
-    }
   
   StatusCode StripSegmentTool::initialize() {
       ATH_MSG_INFO("initializing " << name() );
@@ -87,6 +74,7 @@ namespace NSWL1 {
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
       ATH_CHECK(m_lutCreatorToolsTGC.retrieve());
       ATH_CHECK( FetchDetectorEnvelope());
+      ATH_CHECK(m_idHelperSvc.retrieve());
       return StatusCode::SUCCESS;
     }
 
@@ -99,12 +87,11 @@ namespace NSWL1 {
     StatusCode StripSegmentTool::FetchDetectorEnvelope(){
         const MuonGM::MuonDetectorManager* p_det;
         ATH_CHECK(detStore()->retrieve(p_det));
-        const auto  p_IdHelper =p_det->stgcIdHelper();
         const auto regSelector = m_lutCreatorToolsTGC->getLUT();
         std::vector<const RegSelModule*>  moduleList;
-        for(const auto& i : p_IdHelper->idVector()){// all modules
+        for(const auto& i : m_idHelperSvc->stgcIdHelper().idVector()){// all modules
             IdentifierHash moduleHashId;            
-            p_IdHelper->get_module_hash( i, moduleHashId);
+            m_idHelperSvc->stgcIdHelper().get_module_hash( i, moduleHashId);
             moduleList.push_back(regSelector->Module(moduleHashId));
         }
         float etamin=-1;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
index 3b719efb936a..8e99cccba6ab 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
@@ -1,27 +1,22 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "TrigT1NSWSimTools/StripTdsOfflineTool.h"
+
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
-
-#include "TrigT1NSWSimTools/StripTdsOfflineTool.h"
 #include "TrigT1NSWSimTools/StripOfflineData.h"
 #include "TrigT1NSWSimTools/PadOfflineData.h"
-
-
 #include "EventInfo/EventID.h"
-
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "MuonDigitContainer/sTgcDigit.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
-
 #include "AthenaKernel/IAtRndmGenSvc.h"
 #include "GaudiKernel/ThreadLocalContext.h"
 #include "GaudiKernel/EventContext.h"
@@ -29,13 +24,11 @@
 #include "CLHEP/Random/RandGauss.h"
 
 #include "TTree.h"
-
 #include <functional>
 #include <algorithm>
 #include <map>
 #include <utility>
 
-
 namespace NSWL1 {
 
     class StripHits {
@@ -54,13 +47,12 @@ namespace NSWL1 {
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
       m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
-      m_detManager(0),
-      m_sTgcIdHelper(0),
+      m_rndmEngine(nullptr),
+      m_detManager(nullptr),
       m_strip_cache_runNumber(-1),
       m_strip_cache_eventNumber(-1),
       m_strip_cache_status(CLEARED),
-      m_tree(0)
+      m_tree(nullptr)
 
     {
       declareInterface<NSWL1::IStripTdsTool>(this);
@@ -75,8 +67,6 @@ namespace NSWL1 {
       if(m_stripCharge) delete m_stripCharge;
       if(m_stripCharge_6bit) delete m_stripCharge_6bit;
       if(m_stripCharge_10bit) delete m_stripCharge_10bit;
-
-
     }
 
     void StripTdsOfflineTool::clear_cache() {
@@ -115,8 +105,8 @@ namespace NSWL1 {
         ATH_MSG_FATAL("Could not retrieve the random engine " << m_rndmEngineName);
         return StatusCode::FAILURE;
       }
-      ATH_CHECK(detStore()->retrieve( m_detManager ));
-      ATH_CHECK(detStore()->retrieve( m_sTgcIdHelper )); 
+      ATH_CHECK(detStore()->retrieve(m_detManager));
+      ATH_CHECK(m_idHelperSvc.retrieve());
       return StatusCode::SUCCESS;
     }
 
@@ -294,7 +284,7 @@ namespace NSWL1 {
             const sTgcDigit* digit = coll->at(item);
             Identifier Id = digit->identify();
 	          const MuonGM::sTgcReadoutElement* rdoEl = m_detManager->getsTgcReadoutElement(Id);
-            int channel_type   = m_sTgcIdHelper->channelType(Id);
+            int channel_type   = m_idHelperSvc->stgcIdHelper().channelType(Id);
  	          // process only Strip data
 	          if (channel_type!=1) continue;           
             
@@ -304,17 +294,17 @@ namespace NSWL1 {
             auto stripSurface=rdoEl->surface(Id); 
 	          stripSurface.localToGlobal(strip_lpos, strip_gpos, strip_gpos);
 
-	          std::string stName = m_sTgcIdHelper->stationNameString(m_sTgcIdHelper->stationName(Id));
-            int stationEta     = m_sTgcIdHelper->stationEta(Id);
-            int stationPhi     = m_sTgcIdHelper->stationPhi(Id);
-            int wedge          = m_sTgcIdHelper->multilayer(Id);
-            int layer          = m_sTgcIdHelper->gasGap(Id);
-            int channel        = m_sTgcIdHelper->channel(Id);
+	          std::string stName = m_idHelperSvc->stgcIdHelper().stationNameString(m_idHelperSvc->stgcIdHelper().stationName(Id));
+            int stationEta     = m_idHelperSvc->stgcIdHelper().stationEta(Id);
+            int stationPhi     = m_idHelperSvc->stgcIdHelper().stationPhi(Id);
+            int wedge          = m_idHelperSvc->stgcIdHelper().multilayer(Id);
+            int layer          = m_idHelperSvc->stgcIdHelper().gasGap(Id);
+            int channel        = m_idHelperSvc->stgcIdHelper().channel(Id);
 	          int bctag          = digit->bcTag();
 
 	          strip_hit_number++;
-            int strip_eta        = 0;// m_sTgcIdHelper->stripEta(Id);
-            int strip_phi        = 0;// m_sTgcIdHelper->stripPhi(Id);
+            int strip_eta        = 0;
+            int strip_phi        = 0;
 
             ATH_MSG_DEBUG(     "sTGC Strip hit " << strip_hit_number << ":  Station Name [" << stName << "]"
 			        << "  Station Eta ["  << stationEta             << "]"
@@ -345,7 +335,7 @@ namespace NSWL1 {
             m_strip_eta->push_back(stationEta);
             m_strip_phi->push_back(stationPhi);
             ATH_MSG_DEBUG( "Fill Stuff more" );
-            auto strip=std::make_unique<StripOfflineData>(Id,m_sTgcIdHelper,digit);
+            auto strip=std::make_unique<StripOfflineData>(Id,&m_idHelperSvc->stgcIdHelper(),digit);
             strip->set_locX(strip_lpos.x());
             strip->set_locY(strip_lpos.y());
             int sideid= (stationEta>0) ? 1 : 0;
-- 
GitLab


From b42faacf4b762735dd477ee167dfa73aca0f6d3b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Thu, 11 Jun 2020 11:36:40 +0200
Subject: [PATCH 168/266] TriggerMenuMT: Replaces future.moves with six.moves

Importing anything from `future.moves` creates extra threads and
causes a WARNING when running in athenaHLT (to avoid problems when
forking). Replace it by using `six.moves` instead, which does not seem
to have this problem.

Fixes ATR-20879.
---
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
index 0b87a9f717ad..361a3aa0148f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
@@ -1,6 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from future.moves.collections import UserList
+from six.moves import UserList
+
 from AthenaCommon.Logging import logging
 log = logging.getLogger( __name__ )
 
-- 
GitLab


From 2e2289d8204b61892fa2b6c3004e97e9e714c528 Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Thu, 11 Jun 2020 18:41:26 +0900
Subject: [PATCH 169/266] cleanup TgcRoadDefiner: initialize member variable in
 header

---
 .../TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h            | 8 ++++----
 .../TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx    | 6 +-----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
index c0ca5911695e..6716fa428861 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
@@ -51,17 +51,17 @@ class TgcRoadDefiner: public AthAlgTool
   bool prepareTgcPoints(const TrigL2MuonSA::TgcHits& tgcHits);
   
  private:
-  ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool;
-  const ToolHandle<PtEndcapLUT>*         m_ptEndcapLUT;
+  ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool {nullptr};
+  const ToolHandle<PtEndcapLUT>*         m_ptEndcapLUT {nullptr};
 
-  ToolHandle<TgcFit>                     m_tgcFit;
+  ToolHandle<TgcFit>                     m_tgcFit {"TrigL2MuonSA::TgcFit"};
 
   TrigL2MuonSA::TgcFit::PointArray m_tgcStripMidPoints;  // List of TGC strip middle station points.
   TrigL2MuonSA::TgcFit::PointArray m_tgcWireMidPoints;   // List of TGC wire middle station points.
   TrigL2MuonSA::TgcFit::PointArray m_tgcStripInnPoints;  // List of TGC strip inner station points.
   TrigL2MuonSA::TgcFit::PointArray m_tgcWireInnPoints;   // List of TGC wire inner station points.
 
-  double m_rWidth_TGC_Failed;
+  double m_rWidth_TGC_Failed {0};
   
   ServiceHandle<IRegSelSvc> m_regionSelector;
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
index 0b1cce9ab7d1..ce94c2ed95a6 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
@@ -19,11 +19,7 @@
 TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type,
 					     const std::string& name,
 					     const IInterface*  parent):
-     AthAlgTool(type, name, parent), 
-     m_backExtrapolatorTool(0),
-     m_ptEndcapLUT(0),
-     m_tgcFit("TrigL2MuonSA::TgcFit"),
-     m_rWidth_TGC_Failed(0),
+     AthAlgTool(type, name, parent),
      m_regionSelector( "RegSelSvc", name )
 {
 }
-- 
GitLab


From abb15689b820981463c9861d98b285e87977e08d Mon Sep 17 00:00:00 2001
From: Peter Van Gemmeren <peter.van.gemmeren@cern.ch>
Date: Thu, 11 Jun 2020 09:46:29 +0000
Subject: [PATCH 170/266] Fix for SharedReader to handle aux store without
 container name

---
 .../AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
index 17b82a6ba94b..a45a0580a3a8 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
@@ -39,7 +39,7 @@ bool AuxDiscoverySvc::getAuxStore(void* obj, const Guid& classId, const std::str
    if (info == nullptr) {
       return false;
    }
-   if ((contId.size() < 5 || contId.substr(contId.size() - 5, 4) != "Aux.")
+   if (!contId.empty() && (contId.size() < 5 || contId.substr(contId.size() - 5, 4) != "Aux.")
 	   && !info->clazz().Properties().HasProperty("IAuxStore")) {
       return false;
    }
@@ -110,7 +110,7 @@ AuxDiscoverySvc::getAuxIDs(const void* obj, const Guid& classId, const std::stri
    if (info == nullptr) {
       return SG::auxid_set_t();
    }
-   if ((contId.size() < 5 || contId.substr(contId.size() - 5, 4) != "Aux.")
+   if (!contId.empty() && (contId.size() < 5 || contId.substr(contId.size() - 5, 4) != "Aux.")
 	   && !info->clazz().Properties().HasProperty("IAuxStore")) {
       return SG::auxid_set_t();
    }
@@ -171,7 +171,7 @@ StatusCode AuxDiscoverySvc::receiveStore(const IAthenaSerializeSvc* serSvc, cons
       return(StatusCode::FAILURE);
    }
    const std::string contName = std::string(static_cast<char*>(buffer));
-   if (classId != Guid::null() && !contName.empty() && this->getAuxStore(obj, classId, contName)) {
+   if (classId != Guid::null() && this->getAuxStore(obj, classId, contName)) {
       void* attrName = nullptr;
       void* typeName = nullptr;
       void* elemName = nullptr;
-- 
GitLab


From 0d6bd8e70035a440f1f7609107d803b25824f2cd Mon Sep 17 00:00:00 2001
From: Konstantin Lehmann <konstantin.lehmann@cern.ch>
Date: Thu, 11 Jun 2020 10:01:11 +0000
Subject: [PATCH 171/266] Need to take absolute value of delta phi when
 comparing if electrons are close-by

---
 .../AssociationUtils/Root/EleEleOverlapTool.cxx            | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
index 4e6ceef19bb0..5af8c8a51283 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
@@ -168,8 +168,11 @@ namespace ORUtils
         throw DummyValError();
       }
 
-      if( std::abs(clus1.etaBE(layer) - clus2.etaBE(layer)) < m_clusterDeltaEta &&
-          deltaPhi(clus1.phiBE(layer),  clus2.phiBE(layer)) < m_clusterDeltaPhi )
+      const float dEta = clus1.etaBE(layer) - clus2.etaBE(layer);
+      const float dPhi = deltaPhi(clus1.phiBE(layer), clus2.phiBE(layer));
+
+      if( std::abs(dEta) < m_clusterDeltaEta &&
+          std::abs(dPhi) < m_clusterDeltaPhi )
       {
         return true;
       }
-- 
GitLab


From 425b14426fcb4e70e71aa8fb848c171e0e5d3f4a Mon Sep 17 00:00:00 2001
From: Guillaume Unal <guillaume.unal@cern.ch>
Date: Thu, 11 Jun 2020 10:03:11 +0000
Subject: [PATCH 172/266] add LAr improvements for MC to MC overlay from 21.0
 branch

---
 .../LArDigitization/src/LArPileUpTool.cxx     | 59 ++++++++++++++++---
 1 file changed, 51 insertions(+), 8 deletions(-)

diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
index a5bc95bd138a..456fea141233 100755
--- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // +==========================================================================+
@@ -80,7 +80,11 @@ StatusCode LArPileUpTool::initialize()
   //
   if (m_RndmEvtOverlay)
   {
-    m_NoiseOnOff = false ;
+    if (!m_isMcOverlay) m_NoiseOnOff = false ;
+    else {
+       ATH_MSG_INFO(" MC overlay case => switch back on noise only to emulate extra noise for cells with different gains");
+       m_NoiseOnOff=true;
+    }
     m_PileUp = true ;
     ATH_MSG_INFO(" pileup and/or noise added by overlaying digits of random events");
     if (m_isMcOverlay) ATH_MSG_INFO("   random events are from MC ");
@@ -210,9 +214,10 @@ StatusCode LArPileUpTool::initialize()
 
   m_Noise.resize(m_NSamples);
 
+
 // register data handle for conditions data
 
-  ATH_CHECK(m_noiseKey.initialize(!m_RndmEvtOverlay && !m_pedestalNoise && m_NoiseOnOff));
+  ATH_CHECK(m_noiseKey.initialize((!m_RndmEvtOverlay || m_isMcOverlay) && !m_pedestalNoise && m_NoiseOnOff));
 
   ATH_CHECK(m_shapeKey.initialize());
   ATH_CHECK(m_fSamplKey.initialize());
@@ -1624,7 +1629,7 @@ StatusCode LArPileUpTool::MakeDigit(const EventContext& ctx, const Identifier &
   const ILArPedestal* pedestal=*pedHdl;
 
   const ILArNoise* noise=nullptr;  
-  if ( !m_RndmEvtOverlay && !m_pedestalNoise && m_NoiseOnOff ){
+  if ( (!m_RndmEvtOverlay || m_isMcOverlay)  && !m_pedestalNoise && m_NoiseOnOff ){
     SG::ReadCondHandle<ILArNoise> noiseHdl(m_noiseKey, ctx);
     noise=*noiseHdl;
   }
@@ -1676,7 +1681,6 @@ StatusCode LArPileUpTool::MakeDigit(const EventContext& ctx, const Identifier &
    if(m_doDigiTruth) {
      m_Samples_DigiHSTruth[i]=0.;
    }
-
   }
 
 #ifndef NDEBUG
@@ -1824,6 +1828,7 @@ StatusCode LArPileUpTool::MakeDigit(const EventContext& ctx, const Identifier &
   int BvsEC=0;
   if(iCalo==EM || iCalo==EMIW) BvsEC=abs(m_larem_id->barrel_ec(cellId));
 
+  bool addedNoise=false;
   if(    m_NoiseOnOff
       && (    (BvsEC==1 && m_NoiseInEMB)
            || (BvsEC>1  && m_NoiseInEMEC)
@@ -1855,8 +1860,46 @@ StatusCode LArPileUpTool::MakeDigit(const EventContext& ctx, const Identifier &
            }
            m_Noise[i]=m_Noise[i]*SigmaNoise;
         }
-     } else for (int i=0;i<m_NSamples;i++) m_Noise[i]=0.;
-  }
+        addedNoise=true;
+     } else  {
+        // overlay case a priori don't add any noise
+        for (int i=0;i<m_NSamples;i++) m_Noise[i]=0.;
+        // if gain from zerobias events is < gain from mixed events => add extra noise to account for gain vs noise dependance
+        //   done in a simple way without taking into account the time correlation of this extra noise properly
+        if (rndmEvtDigit) {
+            // if gain of cell is different from ZB event gain
+            if (igain > rndmEvtDigit->gain() ) {
+               double SigmaNoiseZB=0.;    // noise in ZB event for gain of ZB event
+               double SigmaNoise=0.;      // noise expected for new gain value
+               double SigmaExtraNoise=0.;  // quadratic difference of noise values
+               if (!m_pedestalNoise) {
+                  SigmaNoiseZB =  noise->noise(ch_id,rndmEvtDigit->gain());
+                  SigmaNoise   =  noise->noise(ch_id,igain );
+               }    
+               else {
+                  float noise = pedestal->pedestalRMS(ch_id,rndmEvtDigit->gain() );
+                  if (noise >= (1.0+LArElecCalib::ERRORCODE) ) SigmaNoiseZB = noise;
+                  else SigmaNoiseZB=0.;
+                  noise = pedestal->pedestalRMS(ch_id,igain);
+                  if (noise >= (1.0+LArElecCalib::ERRORCODE) ) SigmaNoise=noise;
+                  else SigmaNoise=0.;
+               }
+               // Convert SigmaNoiseZB in noise in ADC counts for igain conversion
+               auto polynom_adc2mevZB = adc2MeVs->ADC2MEV(cellId,rndmEvtDigit->gain() );
+               auto polynom_adc2mev = adc2MeVs->ADC2MEV(cellId,igain);
+               if ( polynom_adc2mevZB.size()>1 &&  polynom_adc2mev.size()>1) {
+                  if (polynom_adc2mev[1] >0.) {
+                   SigmaNoiseZB = SigmaNoiseZB * (polynom_adc2mevZB[1])/(polynom_adc2mev[1]);
+                   if (SigmaNoise > SigmaNoiseZB) SigmaExtraNoise = sqrt(SigmaNoise*SigmaNoise - SigmaNoiseZB*SigmaNoiseZB);
+                  }
+               }    // check that AC2MeV factors are there
+               RandGaussZiggurat::shootArray(engine,m_NSamples,m_Rndm,0.,1.);   // generate noise
+               for (int i=0;i<m_NSamples;i++) m_Noise[i] = SigmaExtraNoise * m_Rndm[i];
+               addedNoise=true;
+            }  // different gains
+        }      // rndm Digit is there
+     }         // rndm Overlay test
+  }            // add noise ?
 //
 // ......... convert into adc counts  ................................
 //
@@ -1893,7 +1936,7 @@ StatusCode LArPileUpTool::MakeDigit(const EventContext& ctx, const Identifier &
     double xAdc;
     double xAdc_DigiHSTruth = 0;
 
-    if ( m_NoiseOnOff ){
+    if ( addedNoise ){
       xAdc =  m_Samples[i]*energy2adc + m_Noise[i] + Pedestal + 0.5;
       if(m_doDigiTruth) {
         xAdc_DigiHSTruth =  m_Samples_DigiHSTruth[i]*energy2adc + m_Noise[i] + Pedestal + 0.5;
-- 
GitLab


From 56e45ed4d937d53a434ee5c63a0cfbac3fdb2032 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 11 Jun 2020 12:14:01 +0200
Subject: [PATCH 173/266] Remove delete from SCT_PrepDataToxAOD using automatic
 allocation

---
 .../src/SCT_PrepDataToxAOD.cxx                | 31 +++++++++----------
 .../src/SCT_PrepDataToxAOD.h                  |  7 +++--
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
index 118fe9c1a148..ba1ab55499ad 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
@@ -299,7 +299,8 @@ void SCT_PrepDataToxAOD::addSiHitInformation(xAOD::TrackMeasurementValidation* x
                                              const InDet::SCT_Cluster* prd,
                                              const std::vector<const SiHit*>* siHits) const
 {
-  std::vector<SiHit*> matchingHits{findAllHitsCompatibleWithCluster(prd, siHits)};
+  std::vector<SiHit> matchingHits;
+  findAllHitsCompatibleWithCluster(prd, siHits, matchingHits);
 
   long unsigned int numHits{matchingHits.size()};
 
@@ -318,27 +319,25 @@ void SCT_PrepDataToxAOD::addSiHitInformation(xAOD::TrackMeasurementValidation* x
   int hitNumber{0};
   const InDetDD::SiDetectorElement* de{prd->detectorElement()};
   if (de) {
-    for (auto& sihit: matchingHits) {
-      sihit_energyDeposit[hitNumber] = sihit->energyLoss();
-      sihit_meanTime[hitNumber] = sihit->meanTime();
-      sihit_barcode[hitNumber] = sihit->particleLink().barcode();
+    for (const SiHit& sihit : matchingHits) {
+      sihit_energyDeposit[hitNumber] = sihit.energyLoss();
+      sihit_meanTime[hitNumber] = sihit.meanTime();
+      sihit_barcode[hitNumber] = sihit.particleLink().barcode();
     
       // Convert Simulation frame into reco frame
-      const HepGeom::Point3D<double>& startPos{sihit->localStartPosition()};
+      const HepGeom::Point3D<double>& startPos{sihit.localStartPosition()};
 
       Amg::Vector2D pos{de->hitLocalToLocal(startPos.z(), startPos.y())};
       sihit_startPosX[hitNumber] = pos[0];
       sihit_startPosY[hitNumber] = pos[1];
       sihit_startPosZ[hitNumber] = startPos.x();
 
-      const HepGeom::Point3D<double>& endPos{sihit->localEndPosition()};
+      const HepGeom::Point3D<double>& endPos{sihit.localEndPosition()};
       pos= de->hitLocalToLocal(endPos.z(), endPos.y());
       sihit_endPosX[hitNumber] = pos[0];
       sihit_endPosY[hitNumber] = pos[1];
       sihit_endPosZ[hitNumber] = endPos.x();
       ++hitNumber;
-      delete sihit;
-      sihit = nullptr;
     }
   }
 
@@ -355,15 +354,15 @@ void SCT_PrepDataToxAOD::addSiHitInformation(xAOD::TrackMeasurementValidation* x
   AUXDATA(xprd, std::vector<float>, sihit_endPosZ) = sihit_endPosZ;
 }
 
-std::vector<SiHit*> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster* prd, 
-                                                                         const std::vector<const SiHit*>* siHits) const
+void SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster* prd, 
+                                                          const std::vector<const SiHit*>* siHits,
+                                                          std::vector<SiHit>& matchingHits) const
 {
   ATH_MSG_VERBOSE("Got " << siHits->size() << " SiHits to look through");
-  std::vector<SiHit*> matchingHits;
 
   // Check if we have detector element  --  needed to find the local position of the SiHits
   const InDetDD::SiDetectorElement* de{prd->detectorElement()};
-  if (de==nullptr) return matchingHits;
+  if (de==nullptr) return;
 
   std::vector<const SiHit*> multiMatchingHits;
 
@@ -433,7 +432,7 @@ std::vector<SiHit*> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const I
       continue;
     } else if (ajoiningHits.size()==1) {
       // Copy Si Hit ready to return
-      matchingHits.push_back(new SiHit(*ajoiningHits[0]));
+      matchingHits.push_back(SiHit(*ajoiningHits[0]));
       continue;
     } else {
       //  Build new SiHit and merge information together.
@@ -445,7 +444,7 @@ std::vector<SiHit*> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const I
         time += siHit->meanTime();
       }
       time /= static_cast<float>(ajoiningHits.size());
-      matchingHits.push_back(new SiHit{lowestXPos->localStartPosition(), 
+      matchingHits.push_back(SiHit{lowestXPos->localStartPosition(), 
             highestXPos->localEndPosition(),
             energyDep,
             time,
@@ -458,8 +457,6 @@ std::vector<SiHit*> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const I
             (*siHitIter)->getSide()});
     }
   }
-
-  return matchingHits;
 }
 
 void SCT_PrepDataToxAOD::addRDOInformation(xAOD::TrackMeasurementValidation* xprd, 
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
index 350d7d676a79..8b296b7d65b0 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -63,8 +63,9 @@ class SCT_PrepDataToxAOD : public AthReentrantAlgorithm {
                            const InDet::SCT_Cluster* prd,
                            const std::vector<const SiHit*>* siHits) const;
 
-  std::vector<SiHit*> findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster* prd,
-                                                       const std::vector<const SiHit*>* siHits) const;
+  void findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster* prd,
+                                        const std::vector<const SiHit*>* siHits,
+                                        std::vector<SiHit>& matchingHits) const;
 
   void addRDOInformation(xAOD::TrackMeasurementValidation*,
                          const InDet::SCT_Cluster*,
-- 
GitLab


From cc10116549fd41af10d03eb20d7daa7226f8b41e Mon Sep 17 00:00:00 2001
From: amete <serhanmete@gmail.com>
Date: Thu, 11 Jun 2020 14:49:28 +0200
Subject: [PATCH 174/266] Move PerfMonMTSvc reporting from finalize to
 SvcPostFinalize incident

---
 .../PerfMonComps/src/PerfMonMTSvc.cxx         | 33 ++++++++++++++-----
 .../PerfMonComps/src/PerfMonMTSvc.h           |  8 +++--
 2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
index 8a812befddc3..adc829f41103 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
@@ -7,6 +7,7 @@
  */
 
 // Framework includes
+#include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/ThreadLocalContext.h"
 
 // PerfMonComps includes
@@ -58,6 +59,11 @@ StatusCode PerfMonMTSvc::initialize() {
   // Print where we are
   ATH_MSG_INFO("Initializing " << name());
 
+  // Set to be listener to SvcPostFinalize
+  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc/IncidentSvc", name());
+  ATH_CHECK(incSvc.retrieve());
+  incSvc->addListener(this, IncidentType::SvcPostFinalize);
+
   // Check if /proc exists, if not memory statistics are not available
   const bool procExists = PMonMT::doesDirectoryExist("/proc");
   if(!procExists) {
@@ -96,16 +102,23 @@ StatusCode PerfMonMTSvc::finalize() {
   // Print where we are
   ATH_MSG_INFO("Finalizing " << name());
 
-  // Final capture upon finalization
-  m_measurement_snapshots.capture_snapshot();
-  m_snapshotData[FINALIZE].addPointStop_snapshot(m_measurement_snapshots);
-
-  // Report everything
-  report();
-
   return StatusCode::SUCCESS;
 }
 
+/*
+ * Capture finalizations and report in SvcPostFinalize
+ */
+void PerfMonMTSvc::handle(const Incident& inc) {
+  if (inc.type() == IncidentType::SvcPostFinalize) {
+    // Final capture upon post-finalization
+    m_measurement_snapshots.capture_snapshot();
+    m_snapshotData[FINALIZE].addPointStop_snapshot(m_measurement_snapshots);
+
+    // Report everything
+    report();
+  }
+  return;
+}
 /*
  * Start Auditing
  */
@@ -341,7 +354,8 @@ void PerfMonMTSvc::report2Log_Description() const {
   ATH_MSG_INFO("=======================================================================================");
   ATH_MSG_INFO("                                 PerfMonMTSvc Report                                   ");
   ATH_MSG_INFO("=======================================================================================");
-  ATH_MSG_INFO("!!! PLEASE NOTE THAT THIS SERVICE IS CURRENTLY IN R&D PHASE");
+  ATH_MSG_INFO("IMPORTANT : PLEASE NOTE THAT THIS SERVICE IS CURRENTLY IN R&D PHASE.");
+  ATH_MSG_INFO("            FOR FURTHER INFORMATION/QUERIES PLEASE GET IN TOUCH WITH THE SPOT TEAM.");
   ATH_MSG_INFO("=======================================================================================");
   if (m_reportResultsToJSON) {
     ATH_MSG_INFO("*** Full set of information can also be found in: " << m_jsonFileName.toString());
@@ -422,6 +436,8 @@ void PerfMonMTSvc::report2Log_EventLevel() {
   using boost::format;
 
   ATH_MSG_INFO("                                Event Level Monitoring                                 ");
+  ATH_MSG_INFO("                 (Only first " << m_eventLoopMsgLimit.toString() <<
+               " measurements are explicitly printed)");
   ATH_MSG_INFO("=======================================================================================");
 
   ATH_MSG_INFO(format("%1% %|16t|%2$.2f %|28t|%3$.2f %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % "Event" % "CPU [s]" %
@@ -488,6 +504,7 @@ void PerfMonMTSvc::report2Log_Summary() {
     ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Leak estimate per event Pss: " % scaleMem(m_fit_pss.slope()));
     ATH_MSG_INFO("  >> Estimated using the last " << m_fit_vmem.nPoints()
                                                   << " measurements from the Event Level Monitoring");
+    ATH_MSG_INFO("  >> Events prior to the first 25 are omitted...");
   }
 
   ATH_MSG_INFO("=======================================================================================");
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
index 5ff69c0e2f51..d825d8a6a1b2 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
@@ -11,6 +11,7 @@
 
 // Framework includes
 #include "AthenaBaseComps/AthService.h"
+#include "GaudiKernel/IIncidentListener.h"
 
 // PerfMonKernel includes
 #include "PerfMonKernel/IPerfMonMTSvc.h"
@@ -34,7 +35,7 @@
 #include <cmath>
 #include <functional>
 
-class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
+class PerfMonMTSvc : virtual public IPerfMonMTSvc, virtual public IIncidentListener, public AthService {
  public:
   /// Standard Gaudi Service constructor
   PerfMonMTSvc(const std::string& name, ISvcLocator* pSvcLocator);
@@ -45,6 +46,9 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
   /// Function declaring the interface(s) implemented by the service
   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
+  /// Incident service handle for post-finalize
+  virtual void handle( const Incident& incident ) override;
+
   /// Standard Gaudi Service initialization
   virtual StatusCode initialize() override;
 
@@ -74,7 +78,7 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, public AthService {
   /// Report the results
   void report();
 
-  /// Report to stdout
+  /// Report to log
   void report2Log();
   void report2Log_Description() const;
   void report2Log_ComponentLevel();
-- 
GitLab


From 781c87f2399af8ccaa3ecdad0524fd7d177b5928 Mon Sep 17 00:00:00 2001
From: Marcin Nowak <Marcin.Nowak@cern.ch>
Date: Thu, 11 Jun 2020 15:38:28 +0200
Subject: [PATCH 175/266] Removed debug output left by mistake in !33184

---
 Control/AthenaServices/src/AthenaOutputStream.cxx       | 2 --
 Control/AthenaServices/src/OutputStreamSequencerSvc.cxx | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx
index cadbc700470d..714c8db10b3b 100644
--- a/Control/AthenaServices/src/AthenaOutputStream.cxx
+++ b/Control/AthenaServices/src/AthenaOutputStream.cxx
@@ -856,10 +856,8 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
                      // create a temporary DataObject for an entry in the  container to pass to CnvSvc
                      DataBucketBase* dbb = static_cast<DataBucketBase*>( itemProxy->object() );
                      const MetaContBase* metaCont = static_cast<MetaContBase*>( dbb->cast( ClassID_traits<MetaContBase>::ID() ) );
-                     ATH_MSG_INFO("MN: metaCont after cast=" << metaCont );
                      if( metaCont ) {
                         void* obj = metaCont->getAsVoid( m_outSeqSvc->currentRangeID() );
-                        ATH_MSG_INFO("MN:    got object" << obj );
                         auto altbucket = std::make_unique<AltDataBucket>(
                            obj, item_id, *CLIDRegistry::CLIDToTypeinfo(item_id), *itemProxy );
                         m_objects.push_back( altbucket.get() );
diff --git a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
index d9a6e189fa6f..5ce4ef5df738 100644
--- a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
+++ b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
@@ -92,7 +92,6 @@ void OutputStreamSequencerSvc::handle(const Incident& inc)
    ATH_MSG_INFO("handle incident type " << inc.type());
 
    auto slot = Gaudi::Hive::currentContext().slot();
-   ATH_MSG_INFO("MN: SLOT in seq handle=" << slot);
    if( slot == EventContext::INVALID_CONTEXT_ID )  slot = 0;
 
    if( inc.type() == incidentName() ) {  // NextEventRange 
@@ -134,7 +133,7 @@ void OutputStreamSequencerSvc::handle(const Incident& inc)
    }
    else if( inc.type() == IncidentType::BeginProcessing ) {
       // new event start - assing current rangeId to its slot
-      ATH_MSG_INFO("MN: assigne rangeID = " << m_currentRangeID << " to slot " << slot);
+      ATH_MSG_DEBUG("Assigning rangeID = " << m_currentRangeID << " to slot " << slot);
       std::lock_guard lockg( m_mutex );
       m_rangeIDinSlot[ slot ] = m_currentRangeID;
    }
-- 
GitLab


From d38f7b553ef29c47332215120363502fcbca808e Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Thu, 11 Jun 2020 23:06:51 +0900
Subject: [PATCH 176/266] cleanup TgcFit

---
 .../TrigL2MuonSA/TrigL2MuonSA/TgcFit.h        |  19 +-
 .../TrigL2MuonSA/TgcRoadDefiner.h             |  12 +-
 .../TrigL2MuonSA/src/TgcFit.cxx               | 580 ++++++++----------
 .../TrigL2MuonSA/src/TgcRoadDefiner.cxx       |  32 -
 4 files changed, 270 insertions(+), 373 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
index a6589bc21b8f..00090b72f544 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
@@ -149,7 +149,6 @@ class TgcFit: public AthAlgTool
   };
   
  public:
-  static const InterfaceID& interfaceID();
 
   /*
    *  Default constuctor.
@@ -158,15 +157,6 @@ class TgcFit: public AthAlgTool
 	 const std::string& name,
 	 const IInterface*  parent);
 
-  /*
-   *  Default destructor.
-   */
-
-  ~TgcFit(void);
-  
-  virtual StatusCode initialize();
-  virtual StatusCode finalize  ();
-
   void setFitParameters(double CHI2_TEST,
 			unsigned MIN_WIRE_POINTS,
 			unsigned MIN_STRIP_POINTS);
@@ -200,11 +190,12 @@ class TgcFit: public AthAlgTool
   
  protected:
   PointArray m_superPoints;           /**< List of wire (eta) super-points. */
-  double m_CHI2_TEST;                 /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */
-  unsigned m_MIN_WIRE_POINTS;         /**< Minimum number of wire points for linear fit. */
-  unsigned m_MIN_STRIP_POINTS;        /**< Minimum number of strip points for linear fit. */
   
-  void printDebug(const std::string& str);
+  double m_CHI2_TEST { 10.0 };                 /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */
+  unsigned m_MIN_WIRE_POINTS { 4 };         /**< Minimum number of wire points for linear fit. */
+  unsigned m_MIN_STRIP_POINTS { 3 };        /**< Minimum number of strip points for linear fit. */
+  
+  void printDebug(const std::string& str){ ATH_MSG_DEBUG(str); };
 };
  
 }
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
index 6716fa428861..ebeba8737169 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h
@@ -33,8 +33,6 @@ class TgcRoadDefiner: public AthAlgTool
   TgcRoadDefiner(const std::string& type, 
 		 const std::string& name,
 		 const IInterface*  parent);
-
-  ~TgcRoadDefiner()=default;
   
   virtual StatusCode initialize() override;
 
@@ -43,15 +41,17 @@ class TgcRoadDefiner: public AthAlgTool
                         TrigL2MuonSA::MuonRoad&      muonRoad,
                         TrigL2MuonSA::TgcFitResult&  tgcFitResult);
 
-  void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector);
-  void setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc);
-  void setRoadWidthForFailure(double rWidth_TGC_Failed);
-  void setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator);
+  void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector) { m_regionSelector = regionSelector; };
+  void setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc) { m_ptEndcapLUT = ptEndcapLUTSvc->ptEndcapLUT(); };
+  void setRoadWidthForFailure(double rWidth_TGC_Failed) { m_rWidth_TGC_Failed = rWidth_TGC_Failed; };
+  void setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator) { m_backExtrapolatorTool = backExtrapolator; };
 
   bool prepareTgcPoints(const TrigL2MuonSA::TgcHits& tgcHits);
   
  private:
+  // setted in MuFastSteering::hltInitialize, setExtrapolatorTool
   ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool {nullptr};
+  // setted in MuFastSteering::hltInitialize, setMCFlag  
   const ToolHandle<PtEndcapLUT>*         m_ptEndcapLUT {nullptr};
 
   ToolHandle<TgcFit>                     m_tgcFit {"TrigL2MuonSA::TgcFit"};
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
index 6e574018cb3f..6ae25d8da62f 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
@@ -7,58 +7,20 @@
 #include "gsl/gsl_fit.h"
 #include <float.h>
 #include <iostream>
-#include <math.h>
+#include <cmath>
 #include <sstream>
 #include <set>
 
-#include "CLHEP/Units/PhysicalConstants.h"
-
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-static const InterfaceID IID_TgcFit("IID_TgcFit", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::TgcFit::interfaceID() { return IID_TgcFit; }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 TrigL2MuonSA::TgcFit::TgcFit(const std::string& type,
 			     const std::string& name,
                              const IInterface*  parent):
-  AthAlgTool(type, name, parent),
-  m_CHI2_TEST(10.0),
-  m_MIN_WIRE_POINTS(4),
-  m_MIN_STRIP_POINTS(3)
-{
-  declareInterface<TrigL2MuonSA::TgcFit>(this);
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::TgcFit::~TgcFit(void)
-{
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::TgcFit::initialize()
+  AthAlgTool(type, name, parent)
 {
-  ATH_MSG_DEBUG("Initializing TgcFit - package version " << PACKAGE_VERSION) ;
-   
-  StatusCode sc;
-  sc = AthAlgTool::initialize();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-    return sc;
-  }
-
-  // 
-  return StatusCode::SUCCESS; 
 }
 
 // --------------------------------------------------------------------------------
@@ -71,18 +33,6 @@ void TrigL2MuonSA::TgcFit::setFitParameters(double CHI2_TEST,
   m_CHI2_TEST        = CHI2_TEST;
   m_MIN_WIRE_POINTS  = MIN_WIRE_POINTS;
   m_MIN_STRIP_POINTS = MIN_STRIP_POINTS;
-
-  return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::TgcFit::printDebug(const std::string& str)
-{
-  ATH_MSG_DEBUG(str);
-
-  return;
 }
 
 // --------------------------------------------------------------------------------
@@ -90,9 +40,9 @@ void TrigL2MuonSA::TgcFit::printDebug(const std::string& str)
 
 double TrigL2MuonSA::TgcFit::LinStats::eval(double fX) const
 {
-   double fY, fYerr;
-   gsl_fit_linear_est(fX, fIntercept, fSlope, fCov00, fCov01, fCov11, &fY, &fYerr);
-   return fY;
+  double fY, fYerr;
+  gsl_fit_linear_est(fX, fIntercept, fSlope, fCov00, fCov01, fCov11, &fY, &fYerr);
+  return fY;
 }
 
 // --------------------------------------------------------------------------------
@@ -100,55 +50,55 @@ double TrigL2MuonSA::TgcFit::LinStats::eval(double fX) const
 
 void TrigL2MuonSA::TgcFit::SimpleStatistics(TrigL2MuonSA::TgcFit::PointArray& points, TrigL2MuonSA::TgcFit::SimpleStats& stats)
 {
-   double *y = new double[points.size()];
-   double *w = new double[points.size()];
-   for (;;)
-   {
-      stats.clear();
-      for (unsigned iPt = 0; iPt < points.size(); iPt++)
+  double *y = new double[points.size()];
+  double *w = new double[points.size()];
+  for (;;)
+  {
+    stats.clear();
+    for (const TrigL2MuonSA::TgcFit::Point& Pt : points) 
+    {
+      // Exclude outliers.
+      if (!Pt.bOutlier)
       {
-	 // Exclude outliers.
-	 if (!points[iPt].bOutlier)
-	 {
-	    y[stats.n] = points[iPt].fY;
-	    w[stats.n] = points[iPt].fW;
-	    stats.n++;
-	 }
+        y[stats.n] = Pt.fY;
+        w[stats.n] = Pt.fW;
+        stats.n++;
       }
-      if (stats.n == 0)
-	 break;
-      // Calculate mean and standard deviation.
-      stats.fMean = gsl_stats_wmean(w, 1, y, 1, stats.n);
-      if (stats.n == 1)
-	 break;
-      stats.fStd  = gsl_stats_wsd  (w, 1, y, 1, stats.n);
-      double fMaxChi2 = 0.0;
-      int iPtMax = -1;
-      for (unsigned iPt = 0; iPt < points.size(); iPt++)
+    }
+    if (stats.n == 0)
+      break;
+    // Calculate mean and standard deviation.
+    stats.fMean = gsl_stats_wmean(w, 1, y, 1, stats.n);
+    if (stats.n == 1)
+      break;
+    stats.fStd  = gsl_stats_wsd  (w, 1, y, 1, stats.n);
+    double fMaxChi2 = 0.0;
+    int iPtMax = -1;
+    for (unsigned iPt = 0; iPt < points.size(); iPt++)
+    {
+      if (!points[iPt].bOutlier)
       {
-	 if (!points[iPt].bOutlier)
-	 {
-	    double fDiff = points[iPt].fY - stats.fMean;
-	    points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff;
-	    stats.fChi2 += points[iPt].fChi2;
-	    if (fMaxChi2 < points[iPt].fChi2)
-	    {
-	       fMaxChi2 = points[iPt].fChi2;
-	       iPtMax = iPt;
-	    }
-	 }
+        double fDiff = points[iPt].fY - stats.fMean;
+        points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff;
+        stats.fChi2 += points[iPt].fChi2;
+        if (fMaxChi2 < points[iPt].fChi2)
+        {
+          fMaxChi2 = points[iPt].fChi2;
+          iPtMax = iPt;
+        }
       }
-      // Print results.
-      ATH_MSG_DEBUG( "SimpleStatistics:"
-		     << " n=" << stats.n << " Mean=" << stats.fMean
-		     << " Std=" << stats.fStd << " Chi2=" << stats.fChi2);
-
-      if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST)
-	 break;
-      points[iPtMax].bOutlier = true;
-   }
-   delete [] y;
-   delete [] w;
+    }
+    // Print results.
+    ATH_MSG_DEBUG( "SimpleStatistics:"
+        << " n=" << stats.n << " Mean=" << stats.fMean
+        << " Std=" << stats.fStd << " Chi2=" << stats.fChi2);
+
+    if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST)
+      break;
+    points[iPtMax].bOutlier = true;
+  }
+  delete [] y;
+  delete [] w;
 }
 
 // --------------------------------------------------------------------------------
@@ -156,256 +106,244 @@ void TrigL2MuonSA::TgcFit::SimpleStatistics(TrigL2MuonSA::TgcFit::PointArray& po
 
 void TrigL2MuonSA::TgcFit::linReg(TrigL2MuonSA::TgcFit::PointArray& points, TrigL2MuonSA::TgcFit::LinStats& stats)
 {
-   double *x = new double[points.size()];
-   double *y = new double[points.size()];
-   double *w = new double[points.size()];
-   for (;;)
-   {
-      stats.clear();
-      for (unsigned iPt = 0; iPt < points.size(); iPt++)
+  double *x = new double[points.size()];
+  double *y = new double[points.size()];
+  double *w = new double[points.size()];
+  for (;;)
+  {
+    stats.clear();
+    for (const TrigL2MuonSA::TgcFit::Point& Pt : points)
+    {
+      if (!Pt.bOutlier)
       {
-	 if (!points[iPt].bOutlier)
-	 {
-	    x[stats.n] = points[iPt].fX;
-	    y[stats.n] = points[iPt].fY;
-	    w[stats.n] = points[iPt].fW;
-	    stats.n++;
-	 }
+        x[stats.n] = Pt.fX;
+        y[stats.n] = Pt.fY;
+        w[stats.n] = Pt.fW;
+        stats.n++;
       }
-      if (stats.n < 2)
-	 break;
-
-      gsl_fit_wlinear(x, 1,
-		      w, 1,
-		      y, 1,
-		      stats.n,
-		      &stats.fIntercept, &stats.fSlope,
-		      &stats.fCov00, &stats.fCov01, &stats.fCov11,
-		      &stats.fChi2);
-      ATH_MSG_DEBUG("Y=" << stats.fIntercept << "+X*" << stats.fSlope
-		    << ", N=" << stats.n << ", Chi2=" << stats.fChi2);
-
-      double fMaxChi2 = 0.0;
-      int iPtMax = -1;
-      for (unsigned iPt = 0; iPt < points.size(); iPt++)
+    }
+    if (stats.n < 2)
+      break;
+
+    gsl_fit_wlinear(x, 1,
+        w, 1,
+        y, 1,
+        stats.n,
+        &stats.fIntercept, &stats.fSlope,
+        &stats.fCov00, &stats.fCov01, &stats.fCov11,
+        &stats.fChi2);
+    ATH_MSG_DEBUG("Y=" << stats.fIntercept << "+X*" << stats.fSlope
+        << ", N=" << stats.n << ", Chi2=" << stats.fChi2);
+
+    double fMaxChi2 = 0.0;
+    int iPtMax = -1;
+    for (unsigned iPt = 0; iPt < points.size(); iPt++)
+    {
+      if (!points[iPt].bOutlier)
       {
-	 if (!points[iPt].bOutlier)
-	 {
-	    double fDiff = points[iPt].fY - stats.eval(points[iPt].fX);
-	    points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff;
-	    if (fMaxChi2 < points[iPt].fChi2)
-	    {
-	       fMaxChi2 = points[iPt].fChi2;
-	       iPtMax = iPt;
-	    }
-	 }
+        double fDiff = points[iPt].fY - stats.eval(points[iPt].fX);
+        points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff;
+        if (fMaxChi2 < points[iPt].fChi2)
+        {
+          fMaxChi2 = points[iPt].fChi2;
+          iPtMax = iPt;
+        }
       }
-      if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST || stats.n <= 2)
-	 break;
-      points[iPtMax].bOutlier = true;
-   }
-
-   delete [] x;
-   delete [] y;
-   delete [] w;
-
-   // Print results
-   for (unsigned iPt = 0; iPt < points.size(); iPt++)
-   {
-      if (!points[iPt].bOutlier)
-	{
-	  ATH_MSG_DEBUG("Idx=" << points[iPt].nIdx
-			<< ", x=" << points[iPt].fX
-			<< ", y=" << points[iPt].fY
-			<< ", w=" << points[iPt].fW
-			<< ", Y=" << stats.eval(points[iPt].fX)
-			<< ", chi2=" << points[iPt].fChi2);
-	}
-   }
+    }
+    if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST || stats.n <= 2)
+      break;
+    points[iPtMax].bOutlier = true;
+  }
+
+  delete [] x;
+  delete [] y;
+  delete [] w;
+
+  // Print results
+  for (const TrigL2MuonSA::TgcFit::Point& Pt : points)
+  {
+    if (!Pt.bOutlier)
+    {
+      ATH_MSG_DEBUG("Idx=" << Pt.nIdx
+          << ", x=" << Pt.fX
+          << ", y=" << Pt.fY
+          << ", w=" << Pt.fW
+          << ", Y=" << stats.eval(Pt.fX)
+          << ", chi2=" << Pt.fChi2);
+    }
+  }
 }
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
 TrigL2MuonSA::TgcFit::Status TrigL2MuonSA::TgcFit::runTgcMiddle(TrigL2MuonSA::TgcFit::PointArray& stripPoints,
-								TrigL2MuonSA::TgcFit::PointArray& wirePoints,
-								TrigL2MuonSA::TgcFitResult& tgcFitResult)
+    TrigL2MuonSA::TgcFit::PointArray& wirePoints,
+    TrigL2MuonSA::TgcFitResult& tgcFitResult)
 {
   ATH_MSG_DEBUG("TrigL2MuonSA::TgcFit::runTgcMiddle stripPoints=" << stripPoints.size()
-		<< " wirePoints=" << wirePoints.size());
-    
-   tgcFitResult.tgcMidRhoNin = wirePoints.size();
-   tgcFitResult.tgcMidPhiNin = stripPoints.size();
-
-   if (stripPoints.empty() || wirePoints.empty())
-      return FIT_NONE;
-
-   unsigned iPt;
-   Status status = FIT_NONE;
-   LinStats stripStats;
-   LinStats wireStats;
-   std::set<int> wireStations, stripStations;
-
-   for (iPt = 0; iPt < wirePoints.size(); iPt++)
-   {
-      wireStations.insert(wirePoints[iPt].nStation);
-   }
-   for (iPt = 0; iPt < stripPoints.size(); iPt++)
-   {
-      stripStations.insert(stripPoints[iPt].nStation);
-   }
-
-   if (wireStations.size() == 1 || wirePoints.size() < m_MIN_WIRE_POINTS)
-   {
-      status = FIT_POINT;
-      printDebug("runTgcMiddle: Wires fit point");
-      SimpleStats stats;
-      SimpleStatistics(wirePoints, stats);
-      wireStats.fIntercept = stats.fMean;
-      wireStats.n = stats.n;
-      wireStats.fChi2 = stats.fChi2;
+      << " wirePoints=" << wirePoints.size());
+
+  tgcFitResult.tgcMidRhoNin = wirePoints.size();
+  tgcFitResult.tgcMidPhiNin = stripPoints.size();
+
+  if (stripPoints.empty() || wirePoints.empty())
+    return FIT_NONE;
 
+  Status status = FIT_NONE;
+  LinStats stripStats;
+  LinStats wireStats;
+  std::set<int> wireStations, stripStations;
+
+  for (const TrigL2MuonSA::TgcFit::Point& wirePt : wirePoints)
+  {
+    wireStations.insert(wirePt.nStation);
+  }
+  for (const TrigL2MuonSA::TgcFit::Point& stripPt : stripPoints)
+  {
+    stripStations.insert(stripPt.nStation);
+  }
+
+  if (wireStations.size() == 1 || wirePoints.size() < m_MIN_WIRE_POINTS)
+  {
+    status = FIT_POINT;
+    printDebug("runTgcMiddle: Wires fit point");
+    SimpleStats stats;
+    SimpleStatistics(wirePoints, stats);
+    wireStats.fIntercept = stats.fMean;
+    wireStats.n = stats.n;
+    wireStats.fChi2 = stats.fChi2;
+
+    printDebug("runTgcMiddle: Strips fit point");
+    SimpleStatistics(stripPoints, stats);
+    stripStats.fIntercept = stats.fMean;
+    stripStats.n = stats.n;
+    stripStats.fChi2 = stats.fChi2;
+  }
+  else
+  {
+    status = FIT_LINE;
+    printDebug("runTgcMiddle: Wires fit line");
+    linReg(wirePoints, wireStats);
+    if (stripStations.size() == 1 || stripPoints.size() < m_MIN_STRIP_POINTS)
+    {
       printDebug("runTgcMiddle: Strips fit point");
+      SimpleStats stats;
       SimpleStatistics(stripPoints, stats);
       stripStats.fIntercept = stats.fMean;
       stripStats.n = stats.n;
       stripStats.fChi2 = stats.fChi2;
-   }
-   else
-   {
-      status = FIT_LINE;
-      printDebug("runTgcMiddle: Wires fit line");
-      linReg(wirePoints, wireStats);
-      if (stripStations.size() == 1 || stripPoints.size() < m_MIN_STRIP_POINTS)
-      {
-	 printDebug("runTgcMiddle: Strips fit point");
-	 SimpleStats stats;
-	 SimpleStatistics(stripPoints, stats);
-	 stripStats.fIntercept = stats.fMean;
-	 stripStats.n = stats.n;
-	 stripStats.fChi2 = stats.fChi2;
-      }
-      else
+    }
+    else
+    {
+      printDebug("runTgcMiddle: Strips fit line");
+      linReg(stripPoints, stripStats);
+    }
+  }
+
+  tgcFitResult.intercept = wireStats.fIntercept;
+  tgcFitResult.slope     = wireStats.fSlope;
+
+  // Create low and high points
+  double lowZ = 30000.0, highZ = 0.0;
+  int iLow = -1, iHigh = -1;
+  for (unsigned iPt = 0; iPt < wirePoints.size(); iPt++)
+  {
+    if (!wirePoints[iPt].bOutlier)
+    {
+      if (lowZ > fabs(wirePoints[iPt].fX))
       {
-	 printDebug("runTgcMiddle: Strips fit line");
-	 linReg(stripPoints, stripStats);
+        lowZ = fabs(wirePoints[iPt].fX);
+        iLow = iPt;
       }
-   }
-
-   tgcFitResult.intercept = wireStats.fIntercept;
-   tgcFitResult.slope     = wireStats.fSlope;
-
-   // Create low and high points
-   double lowZ = 30000.0, highZ = 0.0;
-   int iLow = -1, iHigh = -1;
-   for (iPt = 0; iPt < wirePoints.size(); iPt++)
-   {
-      if (!wirePoints[iPt].bOutlier)
+      if (highZ < fabs(wirePoints[iPt].fX))
       {
-	 if (lowZ > fabs(wirePoints[iPt].fX))
-	 {
-	    lowZ = fabs(wirePoints[iPt].fX);
-	    iLow = iPt;
-	 }
-	 if (highZ < fabs(wirePoints[iPt].fX))
-	 {
-	    highZ = fabs(wirePoints[iPt].fX);
-	    iHigh = iPt;
-	 }
+        highZ = fabs(wirePoints[iPt].fX);
+        iHigh = iPt;
       }
-   }
-   if (iLow > -1 && iLow < (int)wirePoints.size()) lowZ  = wirePoints[iLow].fX;
-   if (iHigh > -1 && iHigh < (int)wirePoints.size()) highZ = wirePoints[iHigh].fX;
-   Amg::Vector3D p1(wireStats.eval(lowZ), 0.0, lowZ);
-   double phi = stripStats.eval(lowZ);
-   if( phi >  CLHEP::pi ) phi -= CLHEP::pi*2;
-   if( phi < -CLHEP::pi ) phi += CLHEP::pi*2;
-   Amg::setPhi(p1, phi);
-   Amg::Vector3D p2(wireStats.eval(highZ), 0.0, highZ);
-   phi = stripStats.eval(highZ);
-   if( phi >  CLHEP::pi ) phi -= CLHEP::pi*2;
-   if( phi < -CLHEP::pi ) phi += CLHEP::pi*2;
-   Amg::setPhi(p2, phi);
-   {
-     ATH_MSG_DEBUG("runTgcMiddle: Point1 eta=" << p1.eta()
-		   << ",phi=" << p1.phi() << ",perp=" << p1.perp() << ",z=" << p1.z());
-   }
-   {
-     ATH_MSG_DEBUG("runTgcMiddle: Point2 eta=" << p2.eta()
-		   << ",phi=" << p2.phi() << ",perp=" << p2.perp() << ",z=" << p2.z());
-   }
-   tgcFitResult.tgcMid1[0] = p1.eta();
-   tgcFitResult.tgcMid1[1] = p1.phi();
-   tgcFitResult.tgcMid1[2] = p1.perp();
-   tgcFitResult.tgcMid1[3] = p1.z();
-   tgcFitResult.tgcMid2[0] = p2.eta();
-   tgcFitResult.tgcMid2[1] = p2.phi();
-   tgcFitResult.tgcMid2[2] = p2.perp();
-   tgcFitResult.tgcMid2[3] = p2.z();
-   tgcFitResult.tgcMidRhoChi2 = wireStats.fChi2;
-   tgcFitResult.tgcMidRhoN = wireStats.n;
-   tgcFitResult.tgcMidPhiChi2 = stripStats.fChi2;
-   tgcFitResult.tgcMidPhiN = stripStats.n;
-
-   return status;
+    }
+  }
+  if (iLow > -1 && iLow < (int)wirePoints.size()) lowZ  = wirePoints[iLow].fX;
+  if (iHigh > -1 && iHigh < (int)wirePoints.size()) highZ = wirePoints[iHigh].fX;
+  Amg::Vector3D p1(wireStats.eval(lowZ), 0.0, lowZ);
+  double phi = stripStats.eval(lowZ);
+  if( phi >  M_PI ) phi -= M_PI*2;
+  if( phi < -M_PI ) phi += M_PI*2;
+  Amg::setPhi(p1, phi);
+  Amg::Vector3D p2(wireStats.eval(highZ), 0.0, highZ);
+  phi = stripStats.eval(highZ);
+  if( phi >  M_PI ) phi -= M_PI*2;
+  if( phi < -M_PI ) phi += M_PI*2;
+  Amg::setPhi(p2, phi);
+  {
+    ATH_MSG_DEBUG("runTgcMiddle: Point1 eta=" << p1.eta()
+        << ",phi=" << p1.phi() << ",perp=" << p1.perp() << ",z=" << p1.z());
+  }
+  {
+    ATH_MSG_DEBUG("runTgcMiddle: Point2 eta=" << p2.eta()
+        << ",phi=" << p2.phi() << ",perp=" << p2.perp() << ",z=" << p2.z());
+  }
+  tgcFitResult.tgcMid1[0] = p1.eta();
+  tgcFitResult.tgcMid1[1] = p1.phi();
+  tgcFitResult.tgcMid1[2] = p1.perp();
+  tgcFitResult.tgcMid1[3] = p1.z();
+  tgcFitResult.tgcMid2[0] = p2.eta();
+  tgcFitResult.tgcMid2[1] = p2.phi();
+  tgcFitResult.tgcMid2[2] = p2.perp();
+  tgcFitResult.tgcMid2[3] = p2.z();
+  tgcFitResult.tgcMidRhoChi2 = wireStats.fChi2;
+  tgcFitResult.tgcMidRhoN = wireStats.n;
+  tgcFitResult.tgcMidPhiChi2 = stripStats.fChi2;
+  tgcFitResult.tgcMidPhiN = stripStats.n;
+
+  return status;
 }
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
 TrigL2MuonSA::TgcFit::Status TrigL2MuonSA::TgcFit::runTgcInner(TrigL2MuonSA::TgcFit::PointArray& stripPoints,
-							       TrigL2MuonSA::TgcFit::PointArray& wirePoints,
-							       TrigL2MuonSA::TgcFitResult& tgcFitResult)
+    TrigL2MuonSA::TgcFit::PointArray& wirePoints,
+    TrigL2MuonSA::TgcFitResult& tgcFitResult)
 {
-   Status status = FIT_NONE;
-   SimpleStats stripStats;
-   SimpleStats wireStats;    
-    
-   tgcFitResult.tgcInnRhoNin = wirePoints.size();
-   tgcFitResult.tgcInnPhiNin = stripPoints.size();
-
-   ATH_MSG_DEBUG("runTgcInner: stripPoints.size()=" << stripPoints.size()
-		 << ", wirePoints.size()=" << wirePoints.size());
-
-   if (stripPoints.size() > 1 && wirePoints.size() > 1)
-   {
-      status = FIT_POINT;
-      printDebug("runTgcInner: Wires fit point");
-      SimpleStatistics(wirePoints, wireStats);
-        
-      printDebug("runTgcInner: Strips fit point");
-      SimpleStatistics(stripPoints, stripStats);
-
-      Amg::Vector3D p(wireStats.fMean, 0.0, wirePoints[0].fX);
-      double phi = stripStats.fMean;
-      if( phi >  CLHEP::pi ) phi -= CLHEP::pi*2;
-      if( phi < -CLHEP::pi ) phi += CLHEP::pi*2;
-      Amg::setPhi(p, phi);
-
-      ATH_MSG_DEBUG("runTgcInner: Point eta=" << p.eta()
-		    << ",phi=" << p.phi() << ",perp=" << p.perp() << ",z=" << p.z());
-
-      tgcFitResult.tgcInn[0] = p.eta();
-      tgcFitResult.tgcInn[1] = p.phi();
-      tgcFitResult.tgcInn[2] = p.perp();
-      tgcFitResult.tgcInn[3] = p.z();
-      tgcFitResult.tgcInnRhoStd = wireStats.fStd;
-      tgcFitResult.tgcInnRhoN   = wireStats.n;
-      tgcFitResult.tgcInnPhiStd = stripStats.fStd;
-      tgcFitResult.tgcInnPhiN   = stripStats.n;
-   }
-   return status;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::TgcFit::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing TgcFit - package version " << PACKAGE_VERSION);
-   
-  StatusCode sc = AthAlgTool::finalize(); 
-  return sc;
+  Status status = FIT_NONE;
+  SimpleStats stripStats;
+  SimpleStats wireStats;    
+
+  tgcFitResult.tgcInnRhoNin = wirePoints.size();
+  tgcFitResult.tgcInnPhiNin = stripPoints.size();
+
+  ATH_MSG_DEBUG("runTgcInner: stripPoints.size()=" << stripPoints.size()
+      << ", wirePoints.size()=" << wirePoints.size());
+
+  if (stripPoints.size() > 1 && wirePoints.size() > 1)
+  {
+    status = FIT_POINT;
+    printDebug("runTgcInner: Wires fit point");
+    SimpleStatistics(wirePoints, wireStats);
+
+    printDebug("runTgcInner: Strips fit point");
+    SimpleStatistics(stripPoints, stripStats);
+
+    Amg::Vector3D p(wireStats.fMean, 0.0, wirePoints[0].fX);
+    double phi = stripStats.fMean;
+    if( phi >  M_PI ) phi -= M_PI*2;
+    if( phi < -M_PI ) phi += M_PI*2;
+    Amg::setPhi(p, phi);
+
+    ATH_MSG_DEBUG("runTgcInner: Point eta=" << p.eta()
+        << ",phi=" << p.phi() << ",perp=" << p.perp() << ",z=" << p.z());
+
+    tgcFitResult.tgcInn[0] = p.eta();
+    tgcFitResult.tgcInn[1] = p.phi();
+    tgcFitResult.tgcInn[2] = p.perp();
+    tgcFitResult.tgcInn[3] = p.z();
+    tgcFitResult.tgcInnRhoStd = wireStats.fStd;
+    tgcFitResult.tgcInnRhoN   = wireStats.n;
+    tgcFitResult.tgcInnPhiStd = stripStats.fStd;
+    tgcFitResult.tgcInnPhiN   = stripStats.n;
+  }
+  return status;
 }
 
 // --------------------------------------------------------------------------------
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
index ce94c2ed95a6..1a769effe4b0 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx
@@ -43,38 +43,6 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::initialize()
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-void TrigL2MuonSA::TgcRoadDefiner::setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector)
-{
-  m_regionSelector = regionSelector;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::TgcRoadDefiner::setRoadWidthForFailure(double rWidth_TGC_Failed)
-{
-  m_rWidth_TGC_Failed = rWidth_TGC_Failed;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::TgcRoadDefiner::setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator)
-{
-  m_backExtrapolatorTool = backExtrapolator;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::TgcRoadDefiner::setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc)
-{
-  m_ptEndcapLUT = ptEndcapLUTSvc->ptEndcapLUT();
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*      p_roi,
                                                     const TrigL2MuonSA::TgcHits& tgcHits,
                                                     TrigL2MuonSA::MuonRoad&      muonRoad,
-- 
GitLab


From 063ffd44059c6d7c598a18a56b1be865935fd7c3 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Thu, 11 Jun 2020 17:35:57 +0200
Subject: [PATCH 177/266] Eliminate some obsolete functions and use FourVector
 with HepMC

---
 .../src/MuonTrackStatisticsAlg.cxx            | 64 +------------------
 .../test/McVtxFilterTest_CppUnit.cxx          |  2 +-
 .../test/TruthParticle_test.cxx               |  2 +-
 .../test/McVtxFilterTest_CppUnit.cxx          |  4 +-
 .../src/GenParticleGenericFilter.cxx          |  2 +-
 .../TruthJiveXML/src/TruthTrackRetriever.cxx  | 14 ++--
 6 files changed, 14 insertions(+), 74 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackStatisticsAlg.cxx b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackStatisticsAlg.cxx
index 7bd6832f29f6..b72e54784e97 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackStatisticsAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackStatisticsAlg.cxx
@@ -90,68 +90,6 @@ StatusCode MuonTrackStatisticsAlg::finalize()
 void
 MuonTrackStatisticsAlg::storeTruthTracks(void)
 {
-  /*
-    const McEventCollection* mcCollection = 0;
-    std::string key = "TruthEvent";
-    StatusCode sc = p_SGevent->retrieve(mcCollection,key);
-    if (sc.isFailure()) {
-    *m_log << MSG::ERROR << "Could not find the McEventCollection" << endmsg;
-    return;
-    }
-
-    const TrackRecordCollection* recordCollection = 0;
-    std::string recordKey = "MuonEntryLayer";
-    if (!(p_SGevent->retrieve(recordCollection, recordKey))) {
-    *m_log << MSG::WARNING << "Could not find the TrackRecordCollection" << endmsg;
-    }
-
-    m_nkine = 0;
-
-    const HepMC::GenEvent* event = *mcCollection->begin();   
-    HepMC::GenEvent::particle_const_iterator particle = event->particles_begin();
-    HepMC::GenEvent::particle_const_iterator particle_end = event->particles_end();
-
-    for ( ; particle != particle_end; ++particle) {	
-
-    // select final-state muons above min calo penetration energy 
-    // and in MS acceptance
-    if (abs((*particle)->pdg_id()) != 13) continue;
-    if ((*particle)->status() != 1) continue;
-    if ((*particle)->momentum().e() < m_minProductionEnergy) continue;	    
-    if (fabs((*particle)->momentum().pseudoRapidity()) > m_maxEtaMS) continue;
-    //    if ((*particle)->barcode() > 10000) continue;
-
-    const Trk::TrackParameters* genPerigee = m_truthToTrack->makePerigeeParameters(*particle);
-    if( !genPerigee ) continue;
-
-    const Trk::TrackParameters* genEntry = m_edmHelperSvc->extrapolateToMuonEntryRecord(*genPerigee,Trk::muon);
-    if( !genEntry ){
-    delete genPerigee;
-    continue;
-    }
-    HepPoint3D  gen_position = genPerigee->position();
-    HepVector3D	gen_momentum = genPerigee->momentum();
-    double      gen_charge   = (*particle)->pdg_id() < 0 ? 1. : -1.;
-
-    HepPoint3D  extr_position = genEntry->position();
-    HepVector3D	extr_momentum = genEntry->momentum();
-    double      extr_charge   = (*particle)->pdg_id() < 0 ? 1. : -1.;
-
-    ++m_nkine;
-
-    // store the muon generated parameters
-    m_xvtxg->push_back((*particle)->production_vertex()->point3d().x());
-    m_yvtxg->push_back((*particle)->production_vertex()->point3d().y());
-    m_zvtxg->push_back((*particle)->production_vertex()->point3d().z());
-    m_a0g->push_back(genPerigee->parameters()[Trk::d0]);
-    m_z0g->push_back(genPerigee->parameters()[Trk::z0]);
-    m_phig->push_back((*particle)->momentum().phi());
-    m_thetag->push_back((*particle)->momentum().theta());
-    m_qpig->push_back(gen_charge/(*particle)->momentum().mag());
-    m_etag->push_back((*particle)->momentum().pseudoRapidity());
-    m_barcode->push_back((*particle)->barcode());
-    m_status->push_back((*particle)->status());
-
-  */
+  
   
 }
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/test/McVtxFilterTest_CppUnit.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/test/McVtxFilterTest_CppUnit.cxx
index 1bf60d1e7316..972aedbc44d6 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/test/McVtxFilterTest_CppUnit.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/test/McVtxFilterTest_CppUnit.cxx
@@ -55,7 +55,7 @@ private:
   int               m_bcZee;
   int               m_bcZgee;
   int               m_bcTopWbgg;
-  typedef HepLorentzVector HLV_t;
+  typedef HepMC::FourVector HLV_t;
   
 public:
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEvent/test/TruthParticle_test.cxx b/PhysicsAnalysis/TruthParticleID/McParticleEvent/test/TruthParticle_test.cxx
index f329a50a8191..5ad7d3ee2e60 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleEvent/test/TruthParticle_test.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleEvent/test/TruthParticle_test.cxx
@@ -76,7 +76,7 @@ void throw_tp_test_err (const char* file, int line, const char* what)
 
 #define TP_ASSERT(X) myassert(X)
 
-typedef CLHEP::HepLorentzVector HLV_t;
+typedef HepMC::FourVector HLV_t;
 typedef TruthParticleContainer::Map_t Map_t;
 typedef TruthEtIsolations::EtIsol_t EtIsol_t;
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleUtils/test/McVtxFilterTest_CppUnit.cxx b/PhysicsAnalysis/TruthParticleID/McParticleUtils/test/McVtxFilterTest_CppUnit.cxx
index 0a8ef1049ee4..f205bc92ffae 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleUtils/test/McVtxFilterTest_CppUnit.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleUtils/test/McVtxFilterTest_CppUnit.cxx
@@ -18,13 +18,13 @@
 #include "StoreGate/StoreGateSvc.h"
 
 // CLHEP includes
-#include "CLHEP/Vector/LorentzVector.h"
 #include "CLHEP/Units/SystemOfUnits.h"
 
 // HepMC includes
 #include "AtlasHepMC/GenEvent.h"
 #include "AtlasHepMC/GenVertex.h"
 #include "AtlasHepMC/GenParticle.h"
+#include "AtlasHepMC/SimpleVector.h"
 
 #include "AthContainers/DataVector.h"
 
@@ -57,7 +57,7 @@ private:
   int               m_bcZee;
   int               m_bcZgee;
   int               m_bcTopWbgg;
-  typedef HepLorentzVector HLV_t;
+  typedef HepMC::FourVector HLV_t;
   
 public:
 
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx
index 007e192d62d9..51531a82191c 100644
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx
+++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx
@@ -104,7 +104,7 @@ bool ISF::GenParticleGenericFilter::pass(const HepMC::GenParticle& particle) con
 /** Check whether the given particle passes all configure cuts or not */
 bool ISF::GenParticleGenericFilter::check_cuts_passed(const HepMC::GenParticle &particle) const {
   const auto& momentum = particle.momentum();
-  double mom = momentum.rho();
+  double mom = std::sqrt(momentum.x()*momentum.x()+momentum.y()*momentum.y()+momentum.z()*momentum.z());
   double eta = momentum.eta();
   double phi = momentum.phi();
   int pdg = particle.pdg_id();
diff --git a/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx b/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx
index 88bfa0f291be..da3d4e7fa6ec 100755
--- a/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx
+++ b/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx
@@ -113,10 +113,11 @@ namespace JiveXML {
         // Get the vertex information
         HepMC::GenVertex* vertex =  particle->production_vertex();
         if (vertex) {
-          rhoVertex.push_back(DataType( vertex->point3d().r()*Gaudi::Units::mm/Gaudi::Units::cm ));
-          float vtxPhi = vertex->position().phi();
+          auto pos=vertex->position();
+          rhoVertex.push_back(DataType( std::sqrt(pos.x()*pos.x()+pos.y()*pos.y()+pos.z()*pos.z())*Gaudi::Units::mm/Gaudi::Units::cm ));
+          float vtxPhi = pos.phi();
           phiVertex.push_back(DataType( (vtxPhi<0)? vtxPhi+=2*M_PI : vtxPhi ));
-          zVertex.push_back(DataType( vertex->position().z()*Gaudi::Units::mm/Gaudi::Units::cm )); 
+          zVertex.push_back(DataType( pos.z()*Gaudi::Units::mm/Gaudi::Units::cm )); 
         } else {
           rhoVertex.push_back(DataType( 0. ));
           phiVertex.push_back(DataType( 0. ));
@@ -125,10 +126,11 @@ namespace JiveXML {
         //Do the same for the end vertex
         vertex =  particle->end_vertex();
         if ( vertex ) {
-         rhoEndVertex.push_back(DataType(vertex->point3d().r()*Gaudi::Units::mm/Gaudi::Units::cm));
-         float vtxPhi = vertex->position().phi();
+         auto pos=vertex->position();
+         rhoEndVertex.push_back(DataType(std::sqrt(pos.x()*pos.x()+pos.y()*pos.y()+pos.z()*pos.z())*Gaudi::Units::mm/Gaudi::Units::cm));
+         float vtxPhi = pos.phi();
          phiEndVertex.push_back(DataType( (vtxPhi<0)? vtxPhi+=2*M_PI : vtxPhi ));
-         zEndVertex.push_back(DataType(vertex->position().z()*Gaudi::Units::mm/Gaudi::Units::cm)); 
+         zEndVertex.push_back(DataType(pos.z()*Gaudi::Units::mm/Gaudi::Units::cm)); 
         } else {
          rhoEndVertex.push_back(DataType( 0. ));
          phiEndVertex.push_back(DataType( 0. ));
-- 
GitLab


From c9f583ac939ba42771797227d4a451612f26d3a4 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Thu, 11 Jun 2020 18:16:42 +0200
Subject: [PATCH 178/266] py3 fixes

---
 Calorimeter/CaloMonitoring/python/LArCellBinning.py | 2 +-
 Calorimeter/CaloMonitoring/python/LArCellMonAlg.py  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Calorimeter/CaloMonitoring/python/LArCellBinning.py b/Calorimeter/CaloMonitoring/python/LArCellBinning.py
index 8c293827851b..6e18fde522cd 100644
--- a/Calorimeter/CaloMonitoring/python/LArCellBinning.py
+++ b/Calorimeter/CaloMonitoring/python/LArCellBinning.py
@@ -105,7 +105,7 @@ for Part in lArCellBinningScheme.PartitionLayers:
             if Part=="FCAL":
                   lArCellBinningScheme.etaRange[Part+Lay+"C"] = lArCellBinningScheme.etaRange[Part+Lay+"A"]
             else: #all other partitions
-                  lArCellBinningScheme.etaRange[Part+Lay+"C"] =map(lambda x: x*-1,lArCellBinningScheme.etaRange[Part+Lay+"A"])[::-1]
+                  lArCellBinningScheme.etaRange[Part+Lay+"C"] =list(map(lambda x: x*-1,lArCellBinningScheme.etaRange[Part+Lay+"A"]))[::-1]
                   pass
 
 #energy and time
diff --git a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
index d69a775d192a..3c0dfdf8791e 100644
--- a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
+++ b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
@@ -289,8 +289,8 @@ def LArCellMonConfig(inputFlags):
                            type='TH2F', path=energyvstime_hist_path,
                            xbins=lArCellBinningScheme.timescale, ybins=lArCellBinningScheme.energyscale)
 
-         cellMonGroup.defineHistogram('cellTime_'+part+'_cut;CellEnergyVsTime_'+part+'_'+str(eCutForTiming[idx/2]),
-                           title='Cell Energy vs Cell Time in '+part+' with CSC veto - Cell Time (E>'+str(eCutForTiming[idx/2])+' [MeV]);Cell Time [ns];Cell Energy [MeV]',
+         cellMonGroup.defineHistogram('cellTime_'+part+'_cut;CellEnergyVsTime_'+part+'_'+str(eCutForTiming[idx//2]),
+                           title='Cell Energy vs Cell Time in '+part+' with CSC veto - Cell Time (E>'+str(eCutForTiming[idx//2])+' [MeV]);Cell Time [ns];Cell Energy [MeV]',
                            weight='cellEnergy_'+part+'_cut',
                            cutmask='enGreaterThanCut_'+part,
                            type='TH1F', path=energyvstime_hist_path,
-- 
GitLab


From 04ad70d19a56bdc33cfa869653b11373d1bf2ae3 Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Thu, 11 Jun 2020 20:29:37 +0200
Subject: [PATCH 179/266] TileMonitoring: Update JO used in online Tile
 monitoring

JO used in online Tile monitoring have been updated
to use new cabling, to use new geometry, to use new condtitions,
to set up correctly channel timing in the case of laser in the gap,
to fix DQ status in the case of laser run.
---
 TileCalorimeter/TileMonitoring/share/TileMonState.py     | 7 +++----
 .../TileMonitoring/share/TileRec_FlagOptions.py          | 9 ++++-----
 .../TileMonitoring/share/jobOptions_TileLasMon.py        | 8 +++++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/TileCalorimeter/TileMonitoring/share/TileMonState.py b/TileCalorimeter/TileMonitoring/share/TileMonState.py
index 2c3dae5222b7..2baf18dae8cf 100644
--- a/TileCalorimeter/TileMonitoring/share/TileMonState.py
+++ b/TileCalorimeter/TileMonitoring/share/TileMonState.py
@@ -202,11 +202,10 @@ else:
 if 'TriggerType' in dir():
     ByteStreamEmonInputSvc.TriggerType = TriggerType
 
-
-if 'Dispersion' in dir():
-    ByteStreamEmonInputSvc.Dispersion = Dispersion
+if 'GroupName' in dir():
+    ByteStreamEmonInputSvc.GroupName = GroupName
 else:
-    ByteStreamEmonInputSvc.Dispersion = True
+    ByteStreamEmonInputSvc.GroupName = "TilePhysMon"
 
 # #################################################
 # Shall athena exit if the partition is shutdown ?
diff --git a/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py b/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
index 2465b0ea7129..32311c5a3435 100644
--- a/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
+++ b/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
@@ -106,10 +106,10 @@ if not 'TileUseCOOL' in dir():
    
 if TileUseCOOL and not 'tileCOOLtag' in dir():
     if doOnline:
-        tileCOOLtag = "CONDBR2-HLTP-2017-03"
+        tileCOOLtag = "CONDBR2-HLTP-2018-01"
     else:
         if RunNumber > 232498:
-            tileCOOLtag = "CONDBR2-BLKPA-2017-10"
+            tileCOOLtag = "CONDBR2-BLKPA-2018-14"
         else:
             tileCOOLtag = "COMCOND-BLKPA-RUN1-06"
 
@@ -141,7 +141,6 @@ if not 'doMBTS' in dir():
     # MBTS monitoring
     doMBTS = True
 
-
 if not 'doTileTMDBRawChannel' in dir():
     doTileTMDBRawChannel = True
 
@@ -203,7 +202,7 @@ if not 'doTileNoiseMon' in dir():
 
 if not 'doTileTMDBDigitsMon' in dir():
     doTileTMDBDigitsMon = True
-    
+
 if not 'doTileTMDBRawChannelMon' in dir():
     doTileTMDBRawChannelMon = True
 
@@ -218,7 +217,7 @@ if doAtlantis:
     doTileMuonFit = False
 
 if doOnline and not 'TileCablingType' in dir():
-    TileCablingType = 4
+    TileCablingType = 5
 
 if not 'TileNoiseFilter' in dir():
     TileNoiseFilter = 1
diff --git a/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py b/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
index a87a099bffaa..b86eb2e0a058 100644
--- a/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
+++ b/TileCalorimeter/TileMonitoring/share/jobOptions_TileLasMon.py
@@ -156,7 +156,7 @@ if not athenaCommonFlags.isOnline():
 # init DetDescr
 from AthenaCommon.GlobalFlags import jobproperties
 if not 'DetDescrVersion' in dir():
-    DetDescrVersion = 'ATLAS-R2-2015-04-00-00'
+    DetDescrVersion = 'ATLAS-R2-2016-01-00-01'
 jobproperties.Global.DetDescrVersion = DetDescrVersion 
 log.info( "DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion() ))
 
@@ -192,12 +192,12 @@ doTileFit = True
 TileCorrectTime = True    
 doTileOptATLAS = False
 
+TileLasRun = True
+TilePhysTiming = True
 
 # load conditions data
 include( "TileRec/TileDefaults_jobOptions.py" )
 include( "TileConditions/TileConditions_jobOptions.py" )
-from TileConditions.TileCondToolConf import getTileCondToolTiming
-tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','GAPLAS')
 
 # set reconstruction flags and reconstruct data
 from TileRecUtils.TileRecFlags import jobproperties
@@ -314,3 +314,5 @@ if TileUseCOOL:
     from DBReplicaSvc.DBReplicaSvcConf import DBReplicaSvc
     svcMgr += DBReplicaSvc(UseCOOLSQLite=False)
 
+topSequence.TileDQstatusAlg.TileBeamElemContainer = ""
+
-- 
GitLab


From c70bae64f932a76922a2cf86d977af6904d84475 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:23:11 +0200
Subject: [PATCH 180/266] InDetTrackSelectorTool: Use thread-safe track summary
 method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../src/InDetConversionTrackSelectorTool.cxx                 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx
index 98757b1adeec..07d9f0f725c8 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h"
@@ -130,7 +130,7 @@ namespace InDet
    double pt = std::fabs(1./qOverP)*std::sin(perigee->parameters()[Trk::theta]);
    double d0 = perigee->parameters()[Trk::d0];
    double z0 = perigee->parameters()[Trk::z0];
-   const Trk::TrackSummary* tSum = m_trkSumTool->createSummaryNoHoleSearch(track);
+   std::unique_ptr<const Trk::TrackSummary> tSum = m_trkSumTool->summaryNoHoleSearch(track);
    if(tSum){
      double ratioTrk = 1.0;
      int nclus  = tSum->get(Trk::numberOfPixelHits) + tSum->get(Trk::numberOfSCTHits);
@@ -171,7 +171,6 @@ namespace InDet
        if(ratioTrk>m_trRatioV0) pass = false;
      }
 
-     delete tSum;
    } else pass = false;
    if (not vertexSuppliedByUser) delete myVertex;
    if (perigee!=track.perigeeParameters()) delete perigee;
-- 
GitLab


From ac9816a7f915e3230a3efb633df32d9c0556fc09 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:23:50 +0200
Subject: [PATCH 181/266] InDetTrackScoringTools: Use thread-safe track summary
 method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../src/InDetAmbiScoringTool.cxx              | 24 ++++++++----------
 .../src/InDetCosmicScoringTool.cxx            | 25 ++++++++-----------
 .../src/InDetTrtTrackScoringTool.cxx          | 23 +++++++----------
 3 files changed, 29 insertions(+), 43 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
index 2ae8ce75a52f..1d0f450574e9 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
@@ -178,21 +178,17 @@ StatusCode InDet::InDetAmbiScoringTool::finalize()
 
 Trk::TrackScore InDet::InDetAmbiScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const
 {
-   if (!track.trackSummary()) {
-      // @TODO this is not thread safe. Should fail when being called in MT
-      ATH_MSG_DEBUG("Track without track summary. Compute summary to score track.");
-      std::unique_ptr<const Trk::TrackSummary> summary;
-      if ( suppressHoleSearch) {
-         ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
-         summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) );
-      } else {
-         ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
-         summary.reset( m_trkSummaryTool->createSummary(track) );
-      }
+   std::unique_ptr<const Trk::TrackSummary> summary;
+   if ( suppressHoleSearch) {
+     ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
+     summary = m_trkSummaryTool->summaryNoHoleSearch(track);
+   } else {
+     ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
+     summary = m_trkSummaryTool->summary(track);
    }
-   assert( track.trackSummary() );
-   ATH_MSG_VERBOSE ("Track has TrackSummary "<<*track.trackSummary());
-   Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) );
+
+   ATH_MSG_VERBOSE ("Track has TrackSummary "<<*summary);
+   Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) );
    ATH_MSG_DEBUG ("Track has Score: "<<score);
 
    return score;
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx
index e77226739142..ad8a47ca0e01 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetTrackScoringTools/InDetCosmicScoringTool.h"
@@ -60,22 +60,17 @@ StatusCode InDet::InDetCosmicScoringTool::finalize()
 
 Trk::TrackScore InDet::InDetCosmicScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const
 {
-  if (!track.trackSummary()) {
-     // @TODO this is not thread safe. Should fail when being called in MT
-     ATH_MSG_DEBUG("Track without track summary. Compute summary to score track.");
-     std::unique_ptr<const Trk::TrackSummary> summary;
-     if ( suppressHoleSearch) {
-        ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
-        summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) );
-     } else {
-        ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
-        summary.reset( m_trkSummaryTool->createSummary(track) );
-     }
+  std::unique_ptr<const Trk::TrackSummary> summary;
+  if ( suppressHoleSearch) {
+    ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
+    summary = m_trkSummaryTool->summaryNoHoleSearch(track);
+  } else {
+    ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
+    summary = m_trkSummaryTool->summary(track);
   }
-  assert( track.trackSummary() );
 
-  ATH_MSG_VERBOSE( "Track has TrackSummary "<<*track.trackSummary() );
-  Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) );
+  ATH_MSG_VERBOSE( "Track has TrackSummary "<<*summary );
+  Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) );
   ATH_MSG_DEBUG( "Track has Score: "<<score );
   return score;
 }
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
index 7418d8c3df47..30c9ce8c606e 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
@@ -110,22 +110,17 @@ StatusCode InDet::InDetTrtTrackScoringTool::finalize()
 
 Trk::TrackScore InDet::InDetTrtTrackScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const
 {
-  if (!track.trackSummary()) {
-     // @TODO this is not thread safe. Should fail when being called in MT
-     ATH_MSG_DEBUG("Track without track summary. Compute summary to score track.");
-     std::unique_ptr<const Trk::TrackSummary> summary;
-     if ( suppressHoleSearch) {
-        ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
-        summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) );
-     } else {
-        ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
-        summary.reset( m_trkSummaryTool->createSummary(track) );
-     }
+  std::unique_ptr<const Trk::TrackSummary> summary;
+  if ( suppressHoleSearch) {
+    ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch");
+    summary = m_trkSummaryTool->summaryNoHoleSearch(track);
+  } else {
+    ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch");
+    summary = m_trkSummaryTool->summary(track);
   }
-  assert( track.trackSummary() );
 
-  ATH_MSG_VERBOSE("Track has TrackSummary "<<*track.trackSummary());
-  Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) );
+  ATH_MSG_VERBOSE("Track has TrackSummary "<<*summary);
+  Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) );
   ATH_MSG_VERBOSE("Track has Score: "<<score);
   return score;
 }
-- 
GitLab


From b938d67de8cbf6728d9b5d782d1d9bb16d6ebd77 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:25:33 +0200
Subject: [PATCH 182/266] InDetVKalPriVxFinderTool: Use thread-safe track
 summary method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx | 8 +++-----
 .../InDetVKalPriVxFinderTool/src/Utilities.cxx            | 7 ++-----
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
index e4eeaf337014..04ef93792e86 100644
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Header include
@@ -271,7 +271,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 //---------------------------------------------------------
             long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1;
 	    if(m_SummaryToolExist) {
-              const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
+              std::unique_ptr<const Trk::TrackSummary> testSum = m_sumSvc->summary(*(*i_ntrk));
               PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
               SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
               BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
@@ -279,7 +279,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	      if(PixelHits<0)PixelHits=0;
               if(SctHits<0)SctHits=0;
               if(BLayHits<0)BLayHits=0; 
-              delete testSum;
             }
 //---------------------------------------------------------	
             //double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError);  //VK ImpactSignif not needed
@@ -309,7 +308,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 //---------------------------------------------------------
              long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1;
 	     if(m_SummaryToolExist) {
-               const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
+               std::unique_ptr<const Trk::TrackSummary> testSum = m_sumSvc->summary(*(*i_ntrk));
                PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
                SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
                BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
@@ -317,7 +316,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
 	       if(PixelHits<0)PixelHits=0;
                if(SctHits<0)SctHits=0;
                if(BLayHits<0)BLayHits=0; 
-               delete testSum;
              }
 //---------------------------------------------------------	
 	     if(SharedHits>0) SharedHits--;
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
index 3fc7a0bcd309..97ee2b3dbd94 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Header include
@@ -306,13 +306,10 @@ InDetVKalPriVxFinderTool::inpSelector(
        double pmom = std::sin(VectPerig[3])/std::fabs(VectPerig[4]);
 //----------------------------------- Summary tools
        if(m_SummaryToolExist) {
-          const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
+          std::unique_ptr<const Trk::TrackSummary> testSum = m_sumSvc->summary(*(*i_ntrk));
           if( testSum->get(Trk::numberOfInnermostPixelLayerHits) <= 0){
-            delete testSum;
-            testSum=nullptr;
             continue;
           } 
-          delete testSum;
        }
        mapTracks.insert( std::pair<double, const Trk::Track*>(pmom,(*i_ntrk)));
     }
-- 
GitLab


From 2d388090ce82d2ad68cb6f785d5ae34a8429e616 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus712.cern.ch>
Date: Thu, 11 Jun 2020 21:37:08 +0200
Subject: [PATCH 183/266] Add getters to job instead of to a now-defunct PJAlg

---
 .../PhysicsValidation/PhysValMonitoring/python/PhysValUtils.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/python/PhysValUtils.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/python/PhysValUtils.py
index a1783ae2f9f9..ab40a0e50a61 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/python/PhysValUtils.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/python/PhysValUtils.py
@@ -61,7 +61,7 @@ def addAntiKt4TruthJets(algseq):
     algseq += CfgMgr.JetAlgorithm("jetalgTruthPartCopy",Tools=truthtools)
 
     for getter in jtm.gettersMap["truth"]:
-        algseq += CfgMgr.PseudoJetAlgorithm("pjalg_"+getter.Label,PJGetter=getter)
+        algseq += getter
 
     from JetRec.JetRecStandard import jtm
     return [ jtm.addJetFinder("AntiKt4TruthJets", "AntiKt", 0.4, "truth", ptmin= 5000) ]
-- 
GitLab


From e23cd494330dbbbd963ba4c8524606a76626d37d Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Thu, 11 Jun 2020 21:38:19 +0200
Subject: [PATCH 184/266] Updated trigger chain names in TrigEgammaMonitoring
 configuration

---
 .../TrigEgammaMonitoring/python/TrigEgammaMonitCategory.py   | 5 +++--
 .../python/TrigEgammaMonitoringMTConfig.py                   | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategory.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategory.py
index f86c85768005..ff0254222474 100644
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategory.py
+++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategory.py
@@ -62,8 +62,8 @@ monitoring_L1Calo = []
 # Startup and high-pt electrons to monitor from inclusive electrons
 commission_electron = []
 
-monitoring_electron = ['HLT_e60_lhmedium_nod0_L1EM24VHI',
-                       'HLT_e140_lhloose_nod0_L1EM24VHI'
+monitoring_electron = ['HLT_e60_lhmedium_nod0_L1EM22VHI',
+                       'HLT_e140_lhloose_nod0_L1EM22VHI'
                        ]
 # monitoring_electron += commission_electron
 
@@ -75,6 +75,7 @@ commissionTP_electron = [
 
 monitoringTP_electron = [
                          'HLT_e26_lhtight_nod0_ivarloose',                        
+                         'HLT_e28_lhtight_nod0_ivarloose',                        
                          'HLT_e24_lhvloose_nod0_L1EM20VH'
                          ]
 monitoringTP_electron += commissionTP_electron
diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
index 5287ee988a7f..df57fba3030f 100644
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
+++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
@@ -171,7 +171,7 @@ class TrigEgammaMonAlgBuilder:
     # This will be removed for future.
     monitoring_electron = ['HLT_e3_etcut_L1EM3','HLT_e5_etcut_L1EM3','HLT_e7_etcut_L1EM3','HLT_e300_etcut_L1EM24VHI']
     monitoring_photon = ['HLT_g5_etcut_L1EM3','HLT_g5_loose_L1EM3','HLT_g5_medium_L1EM3','HLT_g5_tight_L1EM3','HLT_g140_loose_L1EM24VH']
-    monitoringTP_electron = ['HLT_e26_lhtight_L1EM24VHI','HLT_e60_lhmedium_L1EM24VHI','HLT_e140_lhloose_L1EM24VHI']
+    monitoringTP_electron = ['HLT_e26_lhtight_L1EM22VHI','HLT_e60_lhmedium_L1EM22VHI','HLT_e140_lhloose_L1EM22VHI']
 
 
 
-- 
GitLab


From e2256ed8616fcc66b21dc7d085e5fffe38975b71 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:29:47 +0200
Subject: [PATCH 185/266] InDetAlignGenAlgs: Use thread-safe track summary
 method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../InDetAlignGenAlgs/src/AddTRTMomConstr.cxx               | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
index d9e89f77eaad..310ccd8bae08 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // @file AddTRTMomConstr.cxx
@@ -178,7 +178,8 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) {
 
   float chisqpdof = track.fitQuality()->chiSquared() / track.fitQuality()->numberDoF() ;
   if( m_selChiSqPerDOFMin > 0 && chisqpdof > m_selChiSqPerDOFMin ) rc = false ;
-  const Trk::TrackSummary* summary = m_trackSummaryTool->createSummary( *pTrack ) ;
+  std::unique_ptr<const Trk::TrackSummary> summary
+    = m_trackSummaryTool->summary( *pTrack ) ;
   if( summary->get(Trk::numberOfPixelHits) < m_selNHitPIXMin ) {
     ++m_nRejectPIX ;
     rc = false;
@@ -212,7 +213,6 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) {
         << "\n\t nTRT   = " << summary->get(Trk::numberOfTRTHits)
                ) ;
   ATH_MSG_DEBUG( "leaving accept(.)" ) ;
-  delete summary;
   return rc ;
 } // accept(.)
 
-- 
GitLab


From a57a6479deb55f79636afdd7d38bd37daae47933 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:30:35 +0200
Subject: [PATCH 186/266] InDetAlignNtupleTools: Use thread-safe track summary
 method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx
index 0082ffc3fc80..803d454f5613 100644
--- a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 #include "TrkEventPrimitives/FitQuality.h"
@@ -255,7 +255,8 @@ namespace InDet {
       m_xvtx = aMeasPer->position().x();
       m_yvtx = aMeasPer->position().y();
       m_zvtx = aMeasPer->position().z();
-      const Trk::TrackSummary* summary = m_trackSumTool->createSummary((*alignTrack));
+      std::unique_ptr<const Trk::TrackSummary> summary = 
+        m_trackSumTool->summary((*alignTrack));
       if (not summary) ATH_MSG_ERROR("Could not get Trk::TrackSummary");
       else {
         // hits
@@ -309,7 +310,6 @@ namespace InDet {
           ATH_MSG_DEBUG("  - chi2 propability : " << m_chi2prob);
         }
       }
-      delete summary;
     }
 
     // store information for all hits on this track, including
-- 
GitLab


From 7e2b7c4da1699340344ed9accaaa7ec3b523a9dd Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:33:40 +0200
Subject: [PATCH 187/266] InDetPrepRawDataToxAOD: cmake fix

Library dependency fix.
---
 .../InDetEventCnv/InDetPrepRawDataToxAOD/CMakeLists.txt         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/CMakeLists.txt
index ea949226b0b0..3988dd75e907 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/CMakeLists.txt
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/CMakeLists.txt
@@ -41,7 +41,7 @@ atlas_add_component( InDetPrepRawDataToxAOD
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel AthenaBaseComps StoreGateLib SGtests Identifier InDetByteStreamErrors PixelConditionsData xAODTracking TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry TRT_ReadoutGeometry InDetRawData InDetSimData InDetPrepRawData InDetSimEvent TrkSurfaces TrkTruthData TRT_DriftFunctionToolLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel AthenaBaseComps StoreGateLib SGtests Identifier InDetByteStreamErrors PixelConditionsData xAODTracking TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry TRT_ReadoutGeometry InDetRawData InDetSimData InDetPrepRawData InDetSimEvent TrkSurfaces TrkTruthData TRT_DriftFunctionToolLib PixelCablingLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
-- 
GitLab


From cd2cf5cc8136d513c4309ce3524bedaaef0e4e87 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:33:06 +0200
Subject: [PATCH 188/266] InDetTrackingGeometry: cmake fix

Library dependency fix.
---
 .../InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt
index 89983ec6114c..4768766d2369 100644
--- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt
@@ -37,7 +37,7 @@ atlas_add_component( InDetTrackingGeometry
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetIdentifier TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry BeamPipeGeoModelLib StoreGateLib SGtests Identifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry TrkDetDescrGeoModelCnv TrkSurfaces TrkVolumes )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetIdentifier TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry BeamPipeGeoModelLib StoreGateLib SGtests Identifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry TrkDetDescrGeoModelCnv TrkSurfaces TrkVolumes SubDetectorEnvelopesLib )
 
 # Install files from the package:
 atlas_install_headers( InDetTrackingGeometry )
-- 
GitLab


From e9b365c79f51888a32c09ae22452e0443b90682f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:34:57 +0200
Subject: [PATCH 189/266] SCT_ModuleDistortions: cmake fixes

Define an interface library for headers exported from this package.
---
 .../InDetDetDescr/SCT_ModuleDistortions/CMakeLists.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/CMakeLists.txt
index a9ea09ee3f55..017a2b1f54ab 100644
--- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/CMakeLists.txt
@@ -25,12 +25,19 @@ find_package( CLHEP )
 find_package( Eigen )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
+atlas_add_library( SCT_ModuleDistortionsLib
+                   SCT_ModuleDistortions/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS SCT_ModuleDistortions
+                   LINK_LIBRARIES GaudiKernel GeoPrimitives TrkParameters Identifier AthenaKernel )
+
+
 # Component(s) in the package:
 atlas_add_component( SCT_ModuleDistortions
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives Identifier GaudiKernel InDetReadoutGeometry TrkEventPrimitives TrkParameters AthenaBaseComps StoreGateLib SGtests InDetIdentifier PathResolver )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} SCT_ModuleDistortionsLib InDetReadoutGeometry TrkEventPrimitives AthenaBaseComps StoreGateLib SGtests InDetIdentifier PathResolver )
 
 atlas_add_test( TestSCT_DistortionsTool
                 SCRIPT athena.py --threads=5 SCT_ModuleDistortions/TestSCT_DistortionsTool.py
@@ -38,6 +45,5 @@ atlas_add_test( TestSCT_DistortionsTool
                 ENVIRONMENT THREADS=5 )
 
 # Install files from the package:
-atlas_install_headers( SCT_ModuleDistortions )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/*.txt )
-- 
GitLab


From f8e7952134e682cc59f27b46fdb2851fc4260af5 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 16:48:29 +0200
Subject: [PATCH 190/266] MuonTrackFinderTools: Fix clang warnings.

Unused variables.
---
 .../MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx  | 1 -
 .../MuonTrackFinderTools/src/MuonRefitTool.cxx                | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
index 7042f5318eaa..ab04451d3a0b 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
@@ -147,7 +147,6 @@ namespace Muon {
     states.insert(states.end(), trkstates->begin(), trkstates->end());
     
     std::set<MuonStationIndex::StIndex> stations;
-    Identifier currentMdtChId;
     unsigned int nholes = 0;
     // loop over TSOSs
     std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsit = states.begin();
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
index 9617770599ed..2dfde4fe0f99 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
@@ -776,8 +776,6 @@ namespace Muon {
     std::vector< std::pair<bool,const Trk::TrackStateOnSurface* > > newStates;
     newStates.reserve(states->size()+5);
      
-    Identifier currentMdtChId;
-
     const Trk::TrackParameters* startPars = 0;
     std::map<int,std::set<MuonStationIndex::StIndex> > stationsPerSector;
 
@@ -1167,8 +1165,6 @@ namespace Muon {
     std::vector< std::pair<bool,const Trk::TrackStateOnSurface* > > newStates;
     newStates.reserve(states->size()+5);
      
-    Identifier currentMdtChId;
-
     const Trk::TrackParameters* startPars = 0;
 
     // loop over TSOSs and find start parameters
-- 
GitLab


From 52548de4f6c62e9fc95c2b516501ce7f6de541d8 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 16:49:43 +0200
Subject: [PATCH 191/266] MuonTrackSteeringTools: Fix clang warnings.

Unused variables.
---
 .../MuonTrackSteeringTools/src/MooTrackBuilder.cxx              | 2 --
 1 file changed, 2 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackBuilder.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackBuilder.cxx
index b8e018993787..5d885fecb635 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackBuilder.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooTrackBuilder.cxx
@@ -763,8 +763,6 @@ namespace Muon {
     std::vector< std::pair<bool,const Trk::TrackStateOnSurface* > > newStates;
     newStates.reserve(states->size()+5);
 
-    Identifier currentMdtChId;
-
     // loop over TSOSs
     DataVector<const Trk::TrackStateOnSurface>::const_iterator tsit = states->begin();
     DataVector<const Trk::TrackStateOnSurface>::const_iterator tsit_end = states->end();
-- 
GitLab


From 42d8ab4989fe9fa2ef057e383a3ff0f6b8573270 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 16:51:19 +0200
Subject: [PATCH 192/266] RPC_CondCabling: Fix clang warnings.

Unused variables.
---
 .../MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
index 13836a732b82..e1e05c67e591 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
@@ -617,7 +617,6 @@ StatusCode RpcCablingCondAlg::buildRDOmap(RpcCablingCondData* writeCdo)
     // -----  Initialization of Pad configuration ------ //
     if (m_ApplyFeetPadThresholds) {
       // if using COOL check the existence of a PAD not existing in run-1 cabling
-      Identifier offline_id;
       // if (!giveOffflineID(0,21,7,offline_id)&&m_RPCTriggerRoadsfromCool) {
       //   ATH_MSG_INFO("RUN-1 like cabling, not applying FeetPadThresholds");
       // }else{
-- 
GitLab


From 41f1602154bc06d1fa778f1e1a6bf9c5bc61f206 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 16:56:53 +0200
Subject: [PATCH 193/266] SiClusterizationTool: Fix clang warnings.

Unused variables.
---
 .../SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
index 37fde0838e0a..cacbf884680d 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //***************************************************************************
@@ -303,7 +303,6 @@ void PixelGangedAmbiguitiesFinder::execute(
     std::vector<PixelClusterCollection::iterator>::iterator rmend=rmList.end();
     std::sort(rmit,rmend);
     for ( ; rmit!=rmend ; ++rmit){
-      Identifier gangedID;
       ATH_MSG_DEBUG("Removed " << rmNumber+1 << " cluster: "  
                     << std::hex << (*(*rmit-rmNumber))->identify() << std::dec);
       collection->erase(*rmit-rmNumber); // The position of the iterator
-- 
GitLab


From a6dd0b28e47450c7e288920a5a3802b004d259cf Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 11 Jun 2020 16:54:35 +0200
Subject: [PATCH 194/266] TgcRawDataMonitoring: Fix clang warnings.

Unused variables.
---
 .../TgcRawDataMonitoring/src/TgcRawDataValAlg_Functions.cxx      | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Functions.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Functions.cxx
index a13ff3a709cc..b75089c8e5a2 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Functions.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Functions.cxx
@@ -50,7 +50,6 @@ TgcRawDataValAlg::tgcchamberId(){
 
   IdContext tgcModuleContext = m_idHelperSvc->tgcIdHelper().module_context();
   Identifier Id;
-  IdentifierHash Idhash;
 
   for(std::vector<Identifier>::const_iterator i = m_idHelperSvc->tgcIdHelper().module_begin(); 
       i != idlast; i++){
-- 
GitLab


From 738dc50c3a2beb2cd531dff2435616c3a7cbe010 Mon Sep 17 00:00:00 2001
From: MihaMuskinja <miha.muskinja@gmail.com>
Date: Fri, 10 Apr 2020 00:46:42 +0200
Subject: [PATCH 195/266] propagate MinPt to makeFTagAnalysisSequence

---
 .../python/FTagAnalysisSequence.py             | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
index 505ac45816cf..6fbb2ea46e4a 100644
--- a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
@@ -11,7 +11,8 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
                               kinematicSelection = False,
                               noEfficiency = False,
                               legacyRecommendations = False,
-                              enableCutflow = False ):
+                              enableCutflow = False,
+                              minPt = None ):
     """Create a ftag analysis algorithm sequence
 
     for now the sequence is passed in, I'm unsure if I can concatenate
@@ -26,8 +27,19 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
       noEfficiency -- Wether to run efficiencies calculation
       legacyRecommendations -- Use legacy recommendations without shallow copied containers
       enableCutflow -- Whether or not to dump the cutflow
+      minPt -- Kinematic selection for jet calibration validity (depending on jet collection)
     """
 
+    # Kinematic selection depending on validity of the calibration
+    # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTagCalibrationRecommendationsRelease21
+    if minPt == None:
+        if "EMPFlow" in jetCollection:
+            minPt = 20e3
+        elif "EMTopo" in jetCollection:
+            minPt = 20e3
+        elif "VRTrack" in jetCollection:
+            minPt = 10e3
+
     if dataType not in ["data", "mc", "afii"] :
         raise ValueError ("invalid data type: " + dataType)
 
@@ -48,7 +60,7 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
         # Set up the ftag kinematic selection algorithm(s):
         alg = createAlgorithm( 'CP::AsgSelectionAlg', 'FTagKinSelectionAlg'+postfix )
         addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
-        alg.selectionTool.minPt = 20e3
+        alg.selectionTool.minPt = minPt
         alg.selectionTool.maxEta = 2.5
         alg.selectionDecoration = 'ftag_kin_select'
         seq.append( alg, inputPropName = 'particles',
@@ -69,6 +81,7 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
     alg.selectionTool.OperatingPoint = btagWP
     alg.selectionTool.JetAuthor = jetCollection
     alg.selectionTool.FlvTagCutDefinitionsFileName = bTagCalibFile
+    alg.selectionTool.MinPt = minPt
     if preselection is not None:
         alg.preselection = preselection
     alg.selectionDecoration = 'ftag_select_' + btagger + '_' + btagWP + ',as_char'
@@ -87,6 +100,7 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
         alg.efficiencyTool.JetAuthor = jetCollection
         alg.efficiencyTool.ScaleFactorFileName = bTagCalibFile
         alg.efficiencyTool.SystematicsStrategy = "Envelope"
+        alg.efficiencyTool.MinPt = minPt
         alg.scaleFactorDecoration = 'ftag_effSF_' + btagger + '_' + btagWP + '_%SYS%'
         alg.scaleFactorDecorationRegex = '(^FT_EFF_.*)'
         alg.selectionDecoration = 'ftag_select_' + btagger + '_' + btagWP + ',as_char'
-- 
GitLab


From 18983fbd21597288bc160bbd1ba8b194f2ff865f Mon Sep 17 00:00:00 2001
From: Paul Gessinger <paul.gessinger@cern.ch>
Date: Fri, 22 May 2020 13:12:08 +0200
Subject: [PATCH 196/266] Make EventFlagSelectionAlg init FilterReporterParams

After !31568, this seems to be mandatory, but this algorithm was not
updated to do it. This MR adds the initialize call.
---
 .../AsgAnalysisAlgorithms/Root/EventFlagSelectorAlg.cxx         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/EventFlagSelectorAlg.cxx b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/EventFlagSelectorAlg.cxx
index c2a3b94c5920..2a86966cbf9a 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/EventFlagSelectorAlg.cxx
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/EventFlagSelectorAlg.cxx
@@ -39,6 +39,8 @@ StatusCode CP::EventFlagSelectionAlg::initialize()
     }
   }
 
+  ANA_CHECK(m_filterParams.initialize());
+
   return StatusCode::SUCCESS;
 }
 
-- 
GitLab


From f6a71720ddccba724a40441bdf900a00d892a04c Mon Sep 17 00:00:00 2001
From: Javier Montejo <jmontejo@cern.ch>
Date: Thu, 11 Jun 2020 13:58:24 +0200
Subject: [PATCH 197/266] Allow the muon-pflow ORL to be also b-jet aware

---
 .../AssociationUtils/MuPFJetOverlapTool.h             |  6 ++++++
 .../AssociationUtils/Root/MuPFJetOverlapTool.cxx      | 11 +++++++++++
 .../AssociationUtils/Root/OverlapRemovalInit.cxx      |  1 +
 .../AnalysisCommon/AssociationUtils/python/config.py  |  2 +-
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h
index c89596c8a112..e4d49c7191f8 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h
@@ -16,6 +16,7 @@
 // Local includes
 #include "AssociationUtils/IOverlapTool.h"
 #include "AssociationUtils/BaseOverlapTool.h"
+#include "AssociationUtils/BJetHelper.h"
 #include "AssociationUtils/IObjectAssociator.h"
 
 namespace ORUtils
@@ -100,6 +101,9 @@ namespace ORUtils
       /// @name Configurable properties
       /// @{
 
+      /// Input jet decoration which labels a bjet
+      std::string m_bJetLabel;
+
       /// Minimum number of jet tracks to use the looser jet rejection criteria
       int m_numJetTrk;
       /// The 5 parameters that define the low nTrk criteria for removing jets.
@@ -131,6 +135,8 @@ namespace ORUtils
       /// @name Utilities
       /// @{
 
+      /// BJet helper
+      std::unique_ptr<BJetHelper> m_bJetHelper;
       /// Delta-R matcher for the cone
       std::unique_ptr<IParticleAssociator> m_dRMatchCone;
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx
index 81102ac4420f..d1723a9db725 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx
@@ -27,6 +27,8 @@ namespace ORUtils
   MuPFJetOverlapTool::MuPFJetOverlapTool(const std::string& name)
     : BaseOverlapTool(name)
   {
+    declareProperty("BJetLabel", m_bJetLabel = "",
+                    "Input b-jet flag. Disabled by default.");
     declareProperty("NumJetTrk", m_numJetTrk = 4,
                     "Min number of jet tracks to keep jet and remove muon");
     declareProperty("JetNumTrackDecoration", m_jetNumTrkDec = "",
@@ -59,6 +61,12 @@ namespace ORUtils
     ATH_MSG_DEBUG("Configuring mu-pflow-jet cone size " << m_coneDR);
     m_dRMatchCone = std::make_unique<DeltaRMatcher>(m_coneDR, m_useRapidity);
 
+    // Initialize the b-jet helper
+    if(!m_bJetLabel.empty()) {
+      ATH_MSG_DEBUG("Configuring btag-aware mu-pflow-jet OR with btag label: " << m_bJetLabel);
+      m_bJetHelper = std::make_unique<BJetHelper>(m_bJetLabel);
+    }
+
     // Additional config printouts
     ATH_MSG_DEBUG("PFlow jet removal which are identified as muons config: NumJetTrk " << m_numJetTrk <<
                   " MuPFJet_lowNtrk_x1 " << m_muPFJet_lowNtrk_x1 <<
@@ -132,6 +140,9 @@ namespace ORUtils
       for(const xAOD::Jet* jet : jets){
         if(!m_decHelper->isSurvivingObject(*jet)) continue;
 
+        // Don't reject user-defined b-tagged jets
+        if(m_bJetHelper && m_bJetHelper->isBJet(*jet)) continue;
+
         // Get the number of tracks and the sumPT of those tracks
         int nTrk = getNumTracks(*jet, vtxIdx);
         float sumTrkPt = getSumTrackPt(*jet, vtxIdx);
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
index 911f8eb66d05..3f1e37f4fc9c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
@@ -58,6 +58,7 @@ namespace ORUtils
     if(flags.doMuPFJetOR && tbox.muPFJetORT.empty()) {
       tbox.muPFJetORT.setTypeAndName("ORUtils::MuPFJetOverlapTool/" +
                                    flags.masterName + ".MuPFJetORT");
+      ORT_CHECK( tbox.muPFJetORT.setProperty("BJetLabel", flags.bJetLabel) );
     }
 
     // El-el
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
index 842c6d20ad5c..926e8bb10809 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
@@ -79,7 +79,7 @@ def recommended_tools(masterName='OverlapRemovalTool',
 
     # Muon-PFlow fake-jet
     if doMuPFJetOR:
-        orTool.MuPFJetORT = MuPFJetOverlapTool('MuPFJetORT', **common_args)
+        orTool.MuPFJetORT = MuPFJetOverlapTool('MuPFJetORT', BJetLabel=bJetLabel, **common_args)
 
     # Electron-electron
     if doElectrons and doEleEleOR:
-- 
GitLab


From 3c089a98e976cc18fceec7e0d26d1f495b3d149e Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 11 Jun 2020 22:56:57 +0100
Subject: [PATCH 198/266] start cleaning up obsolete findVertex methods

---
 .../InDetConversionFinderTools.h              |   5 +-
 .../src/InDetConversionFinderTools.cxx        |  18 +-
 .../InDetAdaptiveMultiPriVxFinderTool.h       |   3 -
 .../InDetAdaptivePriVxFinderTool.h            |   3 -
 .../InDetIterativePriVxFinderTool.h           |   5 +-
 .../InDetMultiPriVxFinderTool.h               |   6 +-
 .../InDetPriVxFinderTool.h                    |   9 +-
 .../src/InDetAdaptiveMultiPriVxFinderTool.cxx |  51 +--
 .../src/InDetAdaptivePriVxFinderTool.cxx      |  69 ----
 .../src/InDetIterativePriVxFinderTool.cxx     |  46 +--
 .../src/InDetMultiPriVxFinderTool.cxx         |  51 +--
 .../src/InDetPriVxFinderTool.cxx              | 133 +------
 .../InDetRecToolInterfaces/IVertexFinder.h    |  17 +-
 .../InDetVKalPriVxFinderTool.h                |   6 +-
 .../InDetZVTOPVxFinder/ZVTOP_Tool.h           |   3 -
 .../InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx     | 369 ------------------
 16 files changed, 21 insertions(+), 773 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
index 94f175383f34..d4d79d9a03a3 100755
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
@@ -44,7 +44,7 @@
 
    InDet::InDetConversionFinderTools is a tool which reconstructs conversion
    vertex candidates in the form of xAOD::Vertex using Trk::Track (no longer
-   available) or Trk::TrackParticleBase (default) as an input
+   available) or xAOD::TrackParticle  (default) as an input
 */
 
 namespace InDet {
@@ -74,9 +74,6 @@ public:
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const TrackCollection* trk_coll) const override;
 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const Trk::TrackParticleBaseCollection* trk_coll) const override;
-
   /** Conversion candidate reconstruction for Trk::TrackParticle (default)  */
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const xAOD::TrackParticleContainer* trk_coll) const override;
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
index 251880cb9b55..536101f9bf9b 100755
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx
@@ -16,7 +16,6 @@
 #include "TrkMeasurementBase/MeasurementBase.h"
 #include "AthLinks/ElementLink.h"
 #include "TrkTrack/LinkToTrack.h"
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
 
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
@@ -121,21 +120,6 @@ InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t,
     return StatusCode::SUCCESS;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetConversionFinderTools::findVertex(
-    const Trk::TrackParticleBaseCollection* /*trk_coll*/) const
-  {
-
-    ATH_MSG_ERROR("Using old TrackParticle Container no longer supported returning an empty conatiner");
-
-    // Make collection for conversions.
-    xAOD::VertexContainer* InDetConversionContainer = new xAOD::VertexContainer();
-    xAOD::VertexAuxContainer* InDetConversionContainerAux = new xAOD::VertexAuxContainer();
-    InDetConversionContainer->setStore( InDetConversionContainerAux ); 
-
-    return std::make_pair(InDetConversionContainer,InDetConversionContainerAux);
-  }
-
   //TrackCollection
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetConversionFinderTools::findVertex(const TrackCollection* /*trk_coll*/) const
@@ -151,7 +135,7 @@ InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t,
     return std::make_pair(InDetConversionContainer,InDetConversionContainerAux); 
   }
 
-  // TrackParticleBaseCollection
+  // TrackParticle Collection
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetConversionFinderTools::findVertex(
     const xAOD::TrackParticleContainer* trk_coll) const
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
index f604fcd6c174..4b210fd05f60 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
@@ -142,9 +142,6 @@ public:
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const TrackCollection* trackTES) const override;
 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const override;
-
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const xAOD::TrackParticleContainer* trackParticles) const override;
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
index 7d707e52eb79..3284422e7b3c 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
@@ -105,9 +105,6 @@ public:
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const TrackCollection* trackTES) const override;
  
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    const Trk::TrackParticleBaseCollection* trackTES) const override;
- 
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const override;
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
index 612729553818..81e00e09356c 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h
@@ -42,7 +42,6 @@
 #include "InDetRecToolInterfaces/IVertexFinder.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "TrkParameters/TrackParameters.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
 #include "TrkTrack/TrackCollection.h"                    // type def ...
 /**
  * Forward declarations
@@ -56,7 +55,6 @@
 namespace Trk {
 class IVertexFitter;
 class Track;
-class TrackParticleBase;
 class ITrackLink;
 class IVertexSeedFinder;
 class IImpactPoint3dEstimator;
@@ -101,8 +99,7 @@ public:
   using IVertexFinder::findVertex;
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const TrackCollection* trackTES) const override;
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    const Trk::TrackParticleBaseCollection* trackTES) const override;
+ 
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const override;
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
index f1f64c06e2f4..9d9cebe23f26 100644
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h
@@ -19,7 +19,7 @@
  * EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
  *
  *   findVertex will now always return an xAOD::VertexContainer,
- *   even when using a TrackCollection or a TrackParticleBaseCollection
+ *   even when using a TrackCollection .
  *   as input.
  *
  ***************************************************************************/
@@ -32,7 +32,6 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "TrkTrack/TrackCollection.h" // type def ...
-#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
 #include "TrkParameters/TrackParameters.h"
 
 /**
@@ -48,7 +47,6 @@ namespace Trk
 {
  class IVertexFitter;
  class Track;
- class TrackParticleBase;
  class ITrackLink;
  class IVertexSeedFinder;
  class IImpactPoint3dEstimator;
@@ -91,8 +89,6 @@ public:
    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
      const TrackCollection* trackTES) const override;
 
-   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-     const Trk::TrackParticleBaseCollection* trackTES) const override;
    
    virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
      const xAOD::TrackParticleContainer* trackParticles) const override;
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
index fcf56dc401e5..f92288ac1ef8 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetPriVxFinderTool.h
@@ -22,8 +22,7 @@
              EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
 
                findVertex will now always return an xAOD::VertexContainer,
-               even when using a TrackCollection or a
- TrackParticleBaseCollection as input.
+               even when using a TrackCollection.
  ***************************************************************************/
 
 #ifndef INDETPRIVXFINDERTOOL_INDETPRIVXFINDERTOOL_H
@@ -35,7 +34,6 @@
 #include "InDetRecToolInterfaces/IVertexFinder.h"
 // cannot be forward declared because of typedef
 #include "TrkParameters/TrackParameters.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
 #include "TrkTrack/TrackCollection.h"
 
 #include <vector>
@@ -97,7 +95,6 @@
 namespace Trk {
 class IVertexFitter;
 class Track;
-class TrackParticleBase;
 class IVxCandidateXAODVertex;
 }
 
@@ -120,8 +117,6 @@ public:
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const TrackCollection* trackTES) const override;
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    const Trk::TrackParticleBaseCollection* trackTES) const override;
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const override;
@@ -150,7 +145,7 @@ private:
   /** The maximum chi-squared per track which is allowed in the fit. */
   double m_maxChi2PerTrack;
 
-  /** the common finding code (regardless of Track or TrackParticle(Base) is
+  /** the common finding code (regardless of Track or TrackParticle is
    * here */
   // VxContainer* m_findVertex(std::vector< std::vector<const
   // Trk::TrackParameters*> >& origParameters);
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
index 06c7aba5aeae..baab3314d2cd 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
@@ -43,7 +43,6 @@
 #include "TrkVertexFitters/AdaptiveMultiVertexFitter.h"
 #include "TrkVertexFitterInterfaces/IVertexAnalyticSeedFinder.h"
 #include "TrkTrack/LinkToTrack.h"
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "TrkLinks/LinkToXAODTrackParticle.h"
 
 #include "xAODTracking/Vertex.h"
@@ -190,50 +189,6 @@ namespace InDet
     return returnContainers;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) const{
-    std::vector<const Trk::ITrackLink*> selectedTracks;
-
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
-
-    typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
-
-    bool  selectionPassed;
-    for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
-      if (m_useBeamConstraint) {
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition));
-      } else {
-        Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null)); // TODO: change trkFilter?
-      }
-
-      if (selectionPassed) {
-        ElementLink<Trk::TrackParticleBaseCollection> link;
-        link.setElement(const_cast<Trk::TrackParticleBase*>(*itr));
-        Trk::LinkToTrackParticleBase* linkTT = new Trk::LinkToTrackParticleBase(link);
-        linkTT->setStorableObject(*trackTES);
-        selectedTracks.push_back(linkTT);
-      }
-    }
-
-    ATH_MSG_DEBUG("Of " << trackTES->size() << " tracks "
-                        << selectedTracks.size() << " survived the preselection.");
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(selectedTracks);
-
-    std::vector<const Trk::ITrackLink*>::iterator ibegin = selectedTracks.begin();
-    std::vector<const Trk::ITrackLink*>::iterator iend = selectedTracks.end();
-
-    for (std::vector<const Trk::ITrackLink*>::iterator iiter = ibegin; iiter != iend; ++iiter) {
-      if ((*iiter) != 0) {
-        delete *iiter;
-        *iiter = 0;
-      }
-    }
-
-    return returnContainers;
-  }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetAdaptiveMultiPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) const {
@@ -837,7 +792,8 @@ namespace InDet
       delete MvfFitInfo(*cand);
       std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtxBegin = cand->vxTrackAtVertex().begin();
       std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtxEnd = cand->vxTrackAtVertex().end();
-      for (std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtxIter = trkAtVtxBegin; trkAtVtxIter != trkAtVtxEnd; ) {//++trkAtVtxIter)                                                                                            // {
+      for (std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtxIter = trkAtVtxBegin; trkAtVtxIter != trkAtVtxEnd; ) 
+      {
         //cleaning up incompatible vertices
         if (((*trkAtVtxIter).vtxCompatibility() > m_maxVertexChi2 && m_useFastCompatibility) ||
             (((*trkAtVtxIter).weight() < m_minweight
@@ -868,8 +824,7 @@ namespace InDet
         if (linkToXAODTP) {
           ATH_MSG_VERBOSE("Iterating over new vertex in fixing xAOD::TrackParticle links... ");
           (*vxIter)->addTrackAtVertex(*linkToXAODTP, (*tracksIter).weight());
-        } // TODO: esle write in a warning? (if tracks were TrkTracks or Trk::TrackParticleBase) - sorting tool expects
-          // there to be xAOD::TrackParticleLinks!
+        } 
       }
     }
     std::vector<Trk::TrackToVtxLink*>::iterator begin = myTrackToVtxLinks.begin();
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
index a9bc696a97f5..0a6b08589c31 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
@@ -169,75 +169,6 @@ namespace InDet
     return returnContainers;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(
-    const Trk::TrackParticleBaseCollection* trackTES) const
-  {
-    // TODO: change trkFilter to allow for this replacement
-    /*
-       xAOD::Vertex beamposition;
-       beamposition.makePrivateStore();
-       beamposition.setPosition(beamSpotHandle->beamVtx().position());
-       beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-     */
-
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
-
-    //---- Start of preselection of tracks ---------------//
-    std::vector<const Trk::TrackParameters*> origParameters;
-    origParameters.clear();
-
-    // unsigned int size = trackTES->size();
-    // if (msgLvl(MSG::VERBOSE)) msg() << "TrackParticleBaseContainer @ " << trackTES << endmsg;
-    // if (msgLvl(MSG::VERBOSE)) msg() << "Size of the container: " << size << endmsg;
-    for (Trk::TrackParticleBaseCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (!static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition))) continue;
-      origParameters.push_back(&(*itr)->definingParameters());
-      // std::cout << "originalPerigee at " << & ( *itr )->definingParameters() << std::endl;
-    }
-
-    if (msgLvl(MSG::DEBUG)) msg() << "Of " << trackTES->size() << " tracks "
-                                  << origParameters.size() << " survived the preselection." << endmsg;
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(origParameters);
-
-    // now we have to make the link to the original track ...
-    //     unsigned int count ( 1 );
-    for (xAOD::VertexContainer::iterator vxContItr = returnContainers.first->begin();
-         vxContItr != returnContainers.first->end(); vxContItr++) {
-      // std::cout << "Check vertex " << count << std::endl; count++;
-      std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
-      for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
-        const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::TrackParticleBase* correspondingTrack(nullptr);
-        // find the track to that perigee ...
-        for (Trk::TrackParticleBaseCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end();
-             itr1++) {
-          if (initialPerigee == &((*itr1)->definingParameters())) {
-            // std::cout << "vxtrack has perigee " << *initialPerigee << std::endl;
-            // std::cout << "track has perigee " << *((*itr1)->perigeeParameters()) << std::endl;
-            correspondingTrack = (*itr1);
-            continue;
-          }
-        }
-
-        if (correspondingTrack != nullptr) {
-          Trk::LinkToTrackParticleBase* link = new Trk::LinkToTrackParticleBase;
-          link->setStorableObject(*trackTES);
-          link->setElement(correspondingTrack);
-          (*itr).setOrigTrack(link);
-        } else if (msgLvl(MSG::WARNING)) msg() <<
-          "No corresponding track found for this initial perigee! Vertex will have no link to the track." << endmsg;
-        // TODO: also mention that links stored directly in xAOD::Vertices are not set because a
-        // TrackParticleBaseCollection was given as input
-      }
-    }
-
-    // log << MSG::VERBOSE << "... end findVertex(const Trk::TrackParticleBaseCollection* )" << endmsg;
-    return returnContainers;
-  }
-
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetAdaptivePriVxFinderTool::findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index c43e3a7b9387..ff11c0cc8187 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -12,7 +12,7 @@
               EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
 
                 findVertex will now always return an xAOD::VertexContainer,
-                even when using a TrackCollection or a TrackParticleBaseCollection
+                even when using a TrackCollection.
                 as input.
 ***************************************************************************/
 #include "InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h"
@@ -22,7 +22,6 @@
 #include "TrkEventPrimitives/FitQuality.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include "TrkParameters/TrackParameters.h"
-#include "TrkParticleBase/TrackParticleBase.h"
 #include "TrkEventPrimitives/ParamDefs.h"
 #include <map>
 #include <vector>
@@ -44,7 +43,6 @@
 
 #include "TrkTrackLink/ITrackLink.h"
 #include "TrkTrack/LinkToTrack.h"
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "TrkLinks/LinkToXAODTrackParticle.h"
 #include "TrkVertexFitterInterfaces/IVertexLinearizedTrackFactory.h"
 
@@ -202,48 +200,6 @@ InDetIterativePriVxFinderTool::findVertex(const TrackCollection* trackTES) const
   return returnContainers;
 }
 
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-InDetIterativePriVxFinderTool::findVertex(
-  const Trk::TrackParticleBaseCollection* trackTES) const
-{
-
-  ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackTES->size());
-
-  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-  const InDet::BeamSpotData* beamSpot = *beamSpotHandle;
-
-  std::vector<Trk::ITrackLink*> selectedTracks;
-
-    typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
-
-    bool selectionPassed;
-    for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
-      if (m_useBeamConstraint && beamSpot != nullptr) {
-        Trk::RecVertex beamPosition { beamSpot->beamVtx() };
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamPosition));
-      } else {
-        Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null));
-      }
-
-      if (selectionPassed) {
-        ElementLink<Trk::TrackParticleBaseCollection> link;
-        link.setElement(*itr);
-        Trk::LinkToTrackParticleBase* linkTT = new Trk::LinkToTrackParticleBase(link);
-        linkTT->setStorableObject(*trackTES);
-        selectedTracks.push_back(linkTT);
-      }
-    }
-
-
-    ATH_MSG_DEBUG("Of " << trackTES->size() << " tracks "
-		<< selectedTracks.size() << " survived the preselection.");
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(selectedTracks);
-
-    return returnContainers;
-}
-
 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
 InDetIterativePriVxFinderTool::findVertex(
   const xAOD::TrackParticleContainer* trackParticles) const
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
index 33a251497ded..cc9217335afc 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
@@ -182,54 +182,6 @@ namespace InDet
     return returnContainers;
   }
 
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetMultiPriVxFinderTool::findVertex(
-    const Trk::TrackParticleBaseCollection* trackTES) const
-  {
-    if (msgLvl(MSG::DEBUG)) msg() << " Number of input tracks before track selection: " << trackTES->size() << endmsg;
-
-    std::vector<Trk::ITrackLink*> selectedTracks;
-
-    typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
-
-    bool  selectionPassed{false};
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const InDet::BeamSpotData* beamdata = nullptr;
-    if(m_useBeamConstraint && beamSpotHandle.isValid()) beamdata = beamSpotHandle.retrieve();
-    
-    for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
-      if (m_useBeamConstraint) {
-        // TODO: change trkFilter to allow for this replacement
-        /*
-           xAOD::Vertex beamposition;
-           beamposition.makePrivateStore();
-           beamposition.setPosition(beamdata->beamVtx().position());
-           beamposition.setCovariancePosition(beamdata->beamVtx().covariancePosition());
-         */
-        Trk::RecVertex beamposition(beamdata->beamVtx());
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition));
-      } else {
-        Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null));
-      }
-
-      if (selectionPassed) {
-        ElementLink<Trk::TrackParticleBaseCollection> link;
-        link.setElement(const_cast<Trk::TrackParticleBase*>(*itr));
-        Trk::LinkToTrackParticleBase* linkTT = new Trk::LinkToTrackParticleBase(link);
-        linkTT->setStorableObject(*trackTES);
-        selectedTracks.push_back(linkTT);
-      }
-    }
-
-    if (msgLvl(MSG::DEBUG)) msg() << "Of " << trackTES->size() << " tracks "
-                                  << selectedTracks.size() << " survived the preselection." << endmsg;
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(selectedTracks);
-
-    return returnContainers;
-  }
-
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetMultiPriVxFinderTool::findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const
@@ -466,8 +418,7 @@ namespace InDet
                 // If track is an xAOD::TrackParticle, set directly in xAOD::Vertex
                 if (linkToXAODTP) {
                   myxAODVertex->addTrackAtVertex(*linkToXAODTP, (*tracksIter).weight());
-                } //TODO: else write in a warning? (if tracks were Trk::Tracks or Trk::TrackParticleBase)
-
+                } 
                 cit->erase(linkit);
                 break; //done looking for that link
               }
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
index 96c0e469c988..2f26ea76e42f 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
@@ -16,8 +16,7 @@
               EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
 
                 findVertex will now always return an xAOD::VertexContainer,
-                even when using a TrackCollection or a TrackParticleBaseCollection
-                as input.
+                even when using a TrackCollection.
 
 ***************************************************************************/
 #include "InDetPriVxFinderTool/InDetPriVxFinderTool.h"
@@ -30,7 +29,6 @@
 #include "TrkTrack/LinkToTrack.h"
 #include "TrkTrack/Track.h"
 #include "TrkParameters/TrackParameters.h"
-#include "TrkParticleBase/TrackParticleBase.h"
 
 #include "VxVertex/VxContainer.h"
 #include "VxVertex/VxCandidate.h"
@@ -40,7 +38,6 @@
 #include "TrkVertexFitterInterfaces/IVertexFitter.h"
 #include "InDetRecToolInterfaces/IMultiPVSeedFinder.h"
 
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "TrkLinks/LinkToXAODTrackParticle.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
@@ -233,133 +230,7 @@ namespace InDet
 
     return returnContainers;
   }
-
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) const {
-    //    std::cout<<"Calling find vertex from trackparticles "<<std::endl;
-
-    // TODO: change trkFilter to allow for this replacement
-    /*
-       xAOD::Vertex beamposition;
-       beamposition.makePrivateStore();
-       beamposition.setPosition(beamSpotHandle->beamVtx().position());
-       beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-     */
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
-
-    //---- create a vector of track particle base objects ---------------//
-    std::vector<const Trk::TrackParticleBase*> origTrackParticles;
-    origTrackParticles.clear();
-    for (Trk::TrackParticleBaseCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      // if it should not look for multiple vertices it needs to do the track cuts here
-      if (!m_enableMultipleVertices) {
-        if (!m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition)) continue;
-      }
-      origTrackParticles.push_back(*itr);
-    }//endo of loop over all available trajectories
-
-    std::vector< std::vector<const Trk::TrackParticleBase*> > seedsVector;
-
-    // put all trackparticles in one seed if no seeding is wanted
-    if (!m_enableMultipleVertices) {
-      // std::cout<<"single vertex mode called "<<std::endl;
-
-      //in the case of the split vertices, we should make the splitting first.
-      //well, off we go
-      if (m_createSplitVertices) {
-        // std::cout<<"Split mode called "<<std::endl;
-
-        //checking that we can actually split it at all
-        std::vector<const Trk::TrackParticleBase*> right_seed;
-        std::vector<const Trk::TrackParticleBase*> left_seed;
-        unsigned int rem_size = origTrackParticles.size();
-
-        // std::cout<<"Size of the original vector is: "<<rem_size <<std::endl;
-
-        //loop over all pre-selected tracks
-        for (std::vector<const Trk::TrackParticleBase*>::const_iterator i = origTrackParticles.begin();
-             i != origTrackParticles.end(); ++i) {
-          if (rem_size % m_splitVerticesTrkInvFraction == 0) right_seed.push_back(*i);
-          else left_seed.push_back(*i);
-          --rem_size;
-        }//end of loop over all the pre-selected tracks
-
-        if (!right_seed.empty() && !left_seed.empty()) {
-          seedsVector.push_back(right_seed);
-          seedsVector.push_back(left_seed);
-
-          //       std::cout<<"First seed size: "<< right_seed.size()<<std::endl;
-          //       std::cout<<"Second seed size: "<< left_seed.size()<<std::endl;
-        }
-      } else seedsVector.push_back(origTrackParticles); //pushing back all the trajectories - single vertes
-    } else { // if not enabling multiple vertices
-      // find vertex seeds
-      seedsVector = m_iPriVxSeedFinder->seeds(origTrackParticles);
-    }
-    //     if (msgLvl(MSG::DEBUG)) msg() << "Seed vector has " << seedsVector.size() << " seeds." << endmsg;
-    // fill track particle seeds into a track parameter base format
-    //    std::cout<<"Seeds produced "<<std::endl;
-
-    std::vector< std::vector<const Trk::TrackParameters*> > origParameters;
-    origParameters.clear();
-    for (unsigned int icluster = 0; icluster < seedsVector.size(); icluster++) {
-      //       if (msgLvl(MSG::DEBUG)) msg() << "Seed vector " << icluster << " has " << seedsVector[icluster].size() <<
-      // " tracks." << endmsg;
-      std::vector<const Trk::TrackParameters*> tmpVector;
-      for (unsigned int itrack = 0; itrack < seedsVector[icluster].size(); itrack++) {
-        tmpVector.push_back(&(seedsVector[icluster].at(itrack)->definingParameters()));
-      }
-      //       if (msgLvl(MSG::DEBUG)) msg() << "Orig parameters " << icluster << " has " << tmpVector.size() << "
-      // tracks." << endmsg;
-      origParameters.push_back(tmpVector);
-    }
-
-    //     if (msgLvl(MSG::DEBUG)) msg() << "Orig parameters has " << origParameters.size() << " seeds." << endmsg;
-
-    // find vertices from the seeds
-
-    //    std::cout<<"Calling parameters based find vertices "<<std::endl;
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(origParameters);
-
-    // now we have to make the link to the original track ...
-    //     unsigned int count ( 1 );
-    for (xAOD::VertexContainer::iterator vxContItr = returnContainers.first->begin();
-    vxContItr != returnContainers.first->end(); vxContItr++) {
-      // std::cout << "Check vertex " << count << std::endl; count++;
-      std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
-      for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
-        const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::TrackParticleBase* correspondingTrack(nullptr);
-        // find the track to that perigee ...
-        for (Trk::TrackParticleBaseCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end();
-        itr1++) {
-          if (initialPerigee == &((*itr1)->definingParameters())) {
-            // std::cout << "vxtrack has perigee " << *initialPerigee << std::endl;
-            // std::cout << "track has perigee " << *((*itr1)->perigeeParameters()) << std::endl;
-            correspondingTrack = (*itr1);
-            continue;
-          }
-        }
-
-        if (correspondingTrack != nullptr) {
-          Trk::LinkToTrackParticleBase* link = new Trk::LinkToTrackParticleBase;
-          link->setStorableObject(*trackTES);
-          link->setElement(correspondingTrack);
-          (*itr).setOrigTrack(link);
-        } else if (msgLvl(MSG::WARNING))
-          msg() << "No corresponding track found for this initial perigee! "
-                   "Vertex will have no link to the track."
-                << endmsg;
-        // TODO: also mention that links stored directly in xAOD::Vertices are not set because a
-        // TrackParticleBaseCollection was given as input
-      }
-    }
-
-    // std::cout<<"returning the container back to the user "<<std::endl;
-    return returnContainers;
-  }
-
+  
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   InDetPriVxFinderTool::findVertex(
     const xAOD::TrackParticleContainer* trackParticles) const
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
index c24ab18d84d7..353a12f184d1 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/IVertexFinder.h
@@ -69,14 +69,6 @@ public:
     return findVertex(trackTES);
   }
 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const EventContext& ctx,
-             const Trk::TrackParticleBaseCollection* trackTES) const
-  {
-    (void)(ctx); // We do not use ctx
-    return findVertex(trackTES);
-  }
-
   /** Find vertex from xAOD::TrackParticleContainer.
    * @param EventContext
    * @param trackParticles input track container
@@ -90,17 +82,16 @@ public:
     return findVertex(trackParticles);
   }
 
+  /* 
+   * Non Event context aware methods
+   */
+
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const TrackCollection* trackTES) const
   {
     return findVertex(Gaudi::Hive::currentContext(), trackTES);
   }
 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const
-  {
-    return findVertex(Gaudi::Hive::currentContext(), trackTES);
-  }
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const xAOD::TrackParticleContainer* trackParticles) const
   {
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
index 5447fee83ac7..f8b58aab7ea2 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h
@@ -71,14 +71,16 @@ public:
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const TrackCollection* trackTES) const override;
 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const override;
 
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
   findVertex(const xAOD::TrackParticleContainer* trackTES) const override;
   //
 
 private:
+
+
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+  findVertex(const Trk::TrackParticleBaseCollection* trackTES) const;
   /*  JobOption tunable parameters */
 
   // Beam position
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
index 84ad630ba480..fea8df678cf6 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h
@@ -78,9 +78,6 @@ namespace InDet
       using  IVertexFinder::findVertex;
       virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
         const TrackCollection* trackTES) const override ;
-      
-      virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-        const Trk::TrackParticleBaseCollection* trackTES) const override;
 
       virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
         const xAOD::TrackParticleContainer* trackParticles) const override;
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
index c622d4ffeffe..7799f4eb48d0 100755
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx
@@ -22,8 +22,6 @@
 #include "TrkTrack/LinkToTrack.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
 #include "AthContainers/DataVector.h"
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h"
 #include "TrkTrack/TrackCollection.h"
 #include "VxVertex/VxContainer.h"
 #include "xAODTracking/VertexContainer.h"
@@ -471,373 +469,6 @@ if (!trackTES->empty()) {
     if (msgLvl(MSG::DEBUG)) msg() <<"No tracks in this event, provide to the next event" <<  endmsg;
   }
 
-//return newVxContainer; --David S.
-return std::make_pair(newVertexContainer, newVertexAuxContainer);
-}
-//////////////////////////////////////////////////
-///run on AOD
-/////////////////////////////////////////////////
-//VxContainer* InDet::ZVTOP_Tool::findVertex(const Trk::TrackParticleBaseCollection* trackTES) --David S.
-std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-InDet::ZVTOP_Tool::findVertex(
-  const Trk::TrackParticleBaseCollection* trackTES) const
-{
-//VxContainer* newVxContainer = new VxContainer; --David S.
-xAOD::VertexContainer* newVertexContainer = new xAOD::VertexContainer;
-xAOD::VertexAuxContainer* newVertexAuxContainer = new xAOD::VertexAuxContainer;
-newVertexContainer->setStore( newVertexAuxContainer );
-if (!trackTES->empty()) {
-  //some variables
-  typedef Trk::TrackParticleBaseCollection::const_iterator TrackDataVecIter;
-  const Trk::RecVertex beam_spot = m_iBeamCondSvc->beamVtx();
-
-  // new Fitter EDM takes xAOD::Vertex instead of Trk::RecVertex as beam_spot constraint, so create one out of beamVtx() --David S.
-  xAOD::Vertex theconstraint = xAOD::Vertex(); // Default constructor creates a private store
-  theconstraint.setPosition( beam_spot.position() );
-  theconstraint.setCovariancePosition( beam_spot.covariancePosition() );
-  theconstraint.setFitQuality( beam_spot.fitQuality().chiSquared(), beam_spot.fitQuality().doubleNumberDoF() );
-
-  std::vector<const Trk::TrackParticleBase*> trkColl(0); // the collection of tracks, which are assigned to one spatial point
-  std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_org(0);// vector of tracks and vertices, tracks can be assigned to more than one vertex, these ambiguities will be resolved later
-  std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*> vtxProb_map;
-  //---------------------------------------------------------------------------//  
-  //-------step1: find spatial points & calculate vtx probabilities-------//
-  //--------------------------------------------------------------------------//
-
-  std::vector< std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> > vertex_objects(0); //vector of vtx candidate & track collection pairs
-  
-  if (msgLvl(MSG::DEBUG)) msg() << "step ONE search for the spatial points, number of tracks = "<<(*trackTES).size() <<  endmsg;
-  for (TrackDataVecIter itr_1  = (*trackTES).begin(); itr_1 != (*trackTES).end()-1; itr_1++)
-  {
-    double sum_TrkProbTube = 0.;
-    double sum2_TrkProbTube = 0.;
-    double vtxProb = 0.;
-    // trk-trk combination
-    for (TrackDataVecIter itr_2 = itr_1+1; itr_2 != (*trackTES).end(); itr_2++)
-    {
-      Trk::Vertex* spatialPoint;
-      spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2));
-      if (spatialPoint != nullptr) 
-      {
-         double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
-         double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint);
-         sum_TrkProbTube = TrkProbTube_1 + TrkProbTube_2;
-         sum2_TrkProbTube = pow(TrkProbTube_1,2.) + pow(TrkProbTube_2,2.);
-         if (sum_TrkProbTube != 0. )
-         { 
-            vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube);
-            trkColl.push_back((*itr_1));
-            trkColl.push_back((*itr_2));
-            bool beam_spot = false;
-            if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_TrkPartBaseVertexState(vtxProb, *spatialPoint, beam_spot, trkColl ));
-            trkColl.clear();
-         }
-      }
-      delete spatialPoint;
-    }
-    //trk-IP combination
-    Trk::Vertex* spatialPoint = nullptr;
-    spatialPoint = m_iSpatialPointFinder->findSpatialPoint(beam_spot,(*itr_1));
-    if (spatialPoint != nullptr) 
-    {
-      double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,*spatialPoint);
-      double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint);
-      sum_TrkProbTube = BeamProbTube + TrkProbTube;
-      sum2_TrkProbTube = pow(TrkProbTube,2.) + pow(BeamProbTube,2.);
-      if (sum_TrkProbTube != 0. ) 
-      {
-         vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube);
-         trkColl.push_back((*itr_1));
-         bool beam_spot = true;
-         if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_TrkPartBaseVertexState(vtxProb, *spatialPoint, beam_spot, trkColl ));
-         trkColl.clear();
-      }
-    }
-    delete spatialPoint;
-  }
-  if (msgLvl(MSG::DEBUG)) msg() << " number of spatial points = "<<vtxState_org.size()<<endmsg;
-  //reduce the spatial point collection
-  typedef std::vector<InDet::ZVTOP_TrkPartBaseVertexState*>::iterator Sp_Iter;
-  std::vector< InDet::ZVTOP_TrkPartBaseVertexState*> vtxState;
-  for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++)
-  {
-
-     if (vtxState.empty()) vtxState.push_back(*itr1);
-     else {
-         Trk::Vertex vtx_new = (*itr1)->vertex();
-         bool can_be_resolved = false;
-         for (Sp_Iter itr2 = vtxState.begin(); itr2 != vtxState.end(); itr2++)
-        {
-           Trk::Vertex vtx_in = (*itr2)->vertex();
-            double r_diff = sqrt(pow(vtx_new.position().x(),2.) + pow(vtx_new.position().y(),2.)) - sqrt(pow(vtx_in.position().x(),2.) + pow(vtx_in.position().y(),2.));
-            double z_diff = vtx_new.position().z() - vtx_in.position().z();
-            if (fabs(r_diff) > 0.001 && fabs(z_diff) > 0.001 && r_diff != 0. && z_diff != 0.) can_be_resolved = true;
-            else {
-                for (unsigned int trk_itr = 0; trk_itr < (*itr1)->tracks().size(); trk_itr++) (*itr2)->tracks().push_back((*itr1)->tracks()[trk_itr]); 
-                can_be_resolved = false;
-                break;
-            }
-         }
-         if (can_be_resolved)  vtxState.push_back(*itr1);
-      }
-   }
-   for (Sp_Iter itr_sort = vtxState.begin();  itr_sort!= vtxState.end(); itr_sort++)  vtxProb_map.insert(std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*>::value_type((*itr_sort)->vtx_prob(), *itr_sort));
-
-
-//-------------------------------------------------------------------------------//
-//----step2: vertex clustering, aim: to cluster all vertices together, ----//
-//----which can not be resolved. The found vertex seeds and ---------//
-//----associated tracks are taken as an input for the vertex fit. --------//
-//------------------------------------------------------------------------------//
-
-
-  if (!vtxState.empty() ){
-    if (msgLvl(MSG::DEBUG)) msg() << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg;
-    //sort the vtxState collection, starting with a highest vtx probability
-    std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_sorted;
-    unsigned int IP_counter = 0;
-    std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*>::reverse_iterator s= vtxProb_map.rbegin();
-    for (;  s!=vtxProb_map.rend();  s++)  {
-           InDet::ZVTOP_TrkPartBaseVertexState* vtx_state = (*s).second;
-           if (vtx_state->beam_spot()) IP_counter += 1;
-           if (IP_counter > 1) vtx_state->set_beam_spot(false);
-           vtxState_sorted.push_back(vtx_state);
-     }
-    //store first element in the vertex_objects ---->vector<vector<VertexState>>
-    std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtx_coll;
-    vtx_coll.push_back(*(vtxState_sorted.begin()));
-    vertex_objects.push_back(vtx_coll);//store first seed
-    std::vector< InDet::ZVTOP_TrkPartBaseVertexState*>  vtxState_new(vtxState_sorted); //copy of the vtxState_sorted
-    vtxState_new.erase(vtxState_new.begin()); // without first element
-    //loop over vtxState_sorted
-    for (Sp_Iter org_itr= vtxState_sorted.begin(); org_itr != vtxState_sorted.end(); org_itr++)
-    {
-       Trk::Vertex seed = (*org_itr)->vertex();
-        //found where the seed is already stored
-        bool vtx_is_stored = false;
-        unsigned int vertex_objectsPosition = 0; 
-        for (unsigned int vertex_objectsItr = 0; vertex_objectsItr!= vertex_objects.size(); vertex_objectsItr++)
-        {
-          //stored vertices in the line vertex_objectsItr
-          std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> stored_vertices = vertex_objects[vertex_objectsItr];
-           //---->inner loop
-          for (unsigned int stored_vtx_itr = 0; stored_vtx_itr!= stored_vertices.size(); stored_vtx_itr++)
-          {
-              Trk::Vertex storedVtx = stored_vertices[stored_vtx_itr]->vertex();
-              double diff = ((*org_itr)->vertex().position().x() - storedVtx.position().x()) + ((*org_itr)->vertex().position().y() - storedVtx.position().y()) + ((*org_itr)->vertex().position().z() - storedVtx.position().z());
-              if (fabs(diff) < 0.0001)
-              {
-                 vertex_objectsPosition = vertex_objectsItr;
-                 vtx_is_stored = true;
-                 break; // break inner loop if found
-              }
-            }
-            if (vtx_is_stored) break; // break outer loop if found
-         }
-         if (!vtx_is_stored) {
-                 //if not stored
-                std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> new_vtx_coll;
-                new_vtx_coll.push_back(*org_itr);
-                vertex_objects.push_back(new_vtx_coll);
-                vertex_objectsPosition = vertex_objects.size() - 1;
-         }
-         for (Sp_Iter new_itr = vtxState_new.begin(); new_itr!= vtxState_new.end(); new_itr++)
-         {
-             Trk::Vertex cand = (*new_itr)->vertex();
-             //calculate the vtx prob function for this seed
-             std::multimap<double, Trk::Vertex > vtx_prob_coll;
-             vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*new_itr)->vtx_prob(),(*new_itr)->vertex()));
-             vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*org_itr)->vtx_prob(),(*org_itr)->vertex()));
-             for (double alpha = m_resolvingStep; alpha <1.; alpha += m_resolvingStep)
-             {
-                 Trk::Vertex SP_line = Trk::Vertex((*org_itr)->vertex().position() + alpha*((*new_itr)->vertex().position() - (*org_itr)->vertex().position()));
-                  double sum_TrkProbTube = 0.;
-                  double sum2_TrkProbTube = 0.;
-                  for (TrackDataVecIter trk_itr = (*trackTES).begin(); trk_itr != (*trackTES).end(); trk_itr++)
-                  {
-	              double TrkProbTube = 0.;
-                      TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*trk_itr),SP_line);
-                       sum_TrkProbTube += TrkProbTube;
-                       sum2_TrkProbTube += pow(TrkProbTube,2.);
-                   }
-                   double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,SP_line);
-                   sum_TrkProbTube += BeamProbTube;
-                   sum2_TrkProbTube += pow(BeamProbTube,2.);
-                   double vtx_prob = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube);
-                    vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type(vtx_prob, SP_line));
-               }
-              double vtx_prob_ratio = (*vtx_prob_coll.begin()).first/(*new_itr)->vtx_prob();
-                if (vtx_prob_ratio >= m_resolvingCut)  {
-                       //check if the vertices can be resolved
-                       vertex_objects[vertex_objectsPosition].push_back(*new_itr);
-                       vtxState_new.erase(new_itr);
-                       if (new_itr != vtxState_new.end()) --new_itr;
-                       if (new_itr == vtxState_new.end()) break;
-                } 
-             }
-      }//loop over orig reduced coll
-   }//if spatial point collection size > 0
-
-
-   //--------------------------------------------------------------------------------//
-  //--------------------step3: call vertex fitter----------------------------------//
-  //--------------------------------------------------------------------------------//
-
-    if (msgLvl(MSG::DEBUG)) msg() << " step THREE, vertex fit, vertex_objects size = "<<vertex_objects.size()<< endmsg;
-    //std::vector<Trk::VxCandidate* > theVxContainer; --David S.
-    std::vector< xAOD::Vertex* > theVertexContainer;
-    //prepare trk coll --> remove double tracks
-    std::vector<std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> >::iterator vtx_itr = vertex_objects.begin();
-    for (; vtx_itr!= vertex_objects.end(); vtx_itr++)
-    {
-      bool with_beam_spot = false;
-      std::vector <const Trk::TrackParticleBase*> trk_coll(0); //--->trk_coll for the fit
-      std::vector<InDet::ZVTOP_TrkPartBaseVertexState*>::iterator itr = (*vtx_itr).begin();
-      trk_coll.push_back((*itr)->tracks()[0]);
-      for (; itr != (*vtx_itr).end(); itr++)
-      { 
-        for ( std::vector <const Trk::TrackParticleBase*>::iterator vs_itr = ((*itr)->tracks()).begin(); vs_itr!= ((*itr)->tracks()).end(); vs_itr++)
-        {
-          bool found = false;
-	  for (std::vector <const Trk::TrackParticleBase*>::iterator trk_itr = trk_coll.begin();  trk_itr!= trk_coll.end(); trk_itr++)  {
-             if (*vs_itr == *trk_itr)  found = true;
-          }
-          if (!found)  trk_coll.push_back(*vs_itr);
-        }
-       if ((*itr)->beam_spot()) with_beam_spot = true;
-       }
-       //call the fitter
-       //Trk::VxCandidate * myVxCandidate(0); --David S.
-       xAOD::Vertex * myxAODVertex(nullptr);
-       //const Amg::Vector3D p(0.,0.,0.); --David S.
-       const Amg::Vector3D startingPoint(0.,0.,0.);
-       //Trk::Vertex startingPoint(p); --David S.
-       //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll,beam_spot); --David S.
-       if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll,theconstraint);
-       //else myVxCandidate = m_iVertexFitter->fit(trk_coll,startingPoint); --David S.
-       else myxAODVertex = m_iVertexFitter->fit(trk_coll,startingPoint);
-       bool bad_chi2 = true;
-       //if (myVxCandidate) { --David S.
-       if (myxAODVertex) {
-          while (bad_chi2)
-          {
-             //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(myVxCandidate->vxTrackAtVertex()); --David S.
-             std::vector< Trk::VxTrackAtVertex > trkAtVtx = myxAODVertex->vxTrackAtVertex();
-             //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S.
-             std::vector< Trk::VxTrackAtVertex >::iterator trkAtVtx_Iter = trkAtVtx.begin();
-             std::vector< const Trk::TrackParticleBase*>::iterator trk_Iter = trk_coll.begin();
-             double largest_chi2 = 0.;
-             std::vector< const Trk::TrackParticleBase*>::iterator index;
-             for (; trkAtVtx_Iter!= trkAtVtx.end(); trkAtVtx_Iter++)
-             {
-               double chi2 = (*trkAtVtx_Iter).trackQuality().chiSquared();
-
-               if (chi2 > largest_chi2) {
-                   largest_chi2 = chi2;
-                   index = trk_Iter;
-               }
-               trk_Iter++;
-             }
-             if (largest_chi2 > m_trk_chi2_cut)
-             {
-               if (trk_coll.size() < 3) break;
-               
-                  trk_coll.erase(index);
-                  if (trk_coll.size() >= 2) {
-                    //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S.
-                    if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; }
-                    //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll, beam_spot); --David S.
-                    if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll, theconstraint);
-                    //else myVxCandidate = m_iVertexFitter->fit(trk_coll,startingPoint); --David S.
-                    else myxAODVertex = m_iVertexFitter->fit(trk_coll,startingPoint);
-                  }
-                  //if (myVxCandidate == 0) break; --David S.
-                  if (myxAODVertex == nullptr) break;
-               
-             } else bad_chi2 = false;
-           }
-      }
-      //if (myVxCandidate && bad_chi2 == false && with_beam_spot) newVxContainer->push_back(myVxCandidate); --David S.
-      if (myxAODVertex && !bad_chi2 && with_beam_spot) newVertexContainer->push_back(myxAODVertex);
-      //if (myVxCandidate && bad_chi2 == false && !with_beam_spot) theVxContainer.push_back(myVxCandidate); --David S.
-      if (myxAODVertex && !bad_chi2 && !with_beam_spot) theVertexContainer.push_back(myxAODVertex);
-    }
-    //if (msgLvl(MSG::DEBUG)) msg() <<"vertex container size = "<<theVxContainer.size()<<endmsg; --David S.
-    if (msgLvl(MSG::DEBUG)) msg() << "vertex container size = " << theVertexContainer.size() << endmsg;
-
-   //ambiguity solving for two track vertices
-   //typedef std::vector<Trk::VxCandidate* >::iterator theVxContainerIter; --David S.
-   typedef std::vector< xAOD::Vertex* >::iterator theVertexContainerIter;
-   //theVxContainerIter iter = theVxContainer.begin(); --David S.
-   theVertexContainerIter iter = theVertexContainer.begin();
-   //theVxContainerIter iter_end = theVxContainer.end(); --David S.
-   theVertexContainerIter iter_end = theVertexContainer.end();
-   //std::vector<Trk::VxCandidate*> twoTrkContainer(0); --David S.
-   std::vector< xAOD::Vertex* > twoTrkContainer(0);
-   for (; iter!= iter_end; iter++)
-   {
-     //Trk::VxCandidate* theVxCandidate(*iter); --David S.
-     xAOD::Vertex* thexAODVertex(*iter);
-     //if (theVxCandidate->vxTrackAtVertex()->size() == 2 ) twoTrkContainer.push_back(theVxCandidate); --David S.
-     if (thexAODVertex->vxTrackAtVertex().size() == 2 ) twoTrkContainer.push_back(thexAODVertex);
-     //else newVxContainer->push_back(theVxCandidate); --David S.
-     else newVertexContainer->push_back(thexAODVertex);
-   }
-   //std::vector<Trk::VxCandidate*>::iterator twoTrk_itr = twoTrkContainer.begin(); --David S.
-   std::vector< xAOD::Vertex* >::iterator twoTrk_itr = twoTrkContainer.begin();
-   for (; twoTrk_itr!= twoTrkContainer.end(); twoTrk_itr++)
-   {
-     // TODO: make sure that links are actually set in VxTrackAtVertices! --David S.
-     //Trk::ITrackLink* trklink1 = (*(*twoTrk_itr)->vxTrackAtVertex())[0]->trackOrParticleLink(); --David S.
-     Trk::ITrackLink* trklink1 = (*twoTrk_itr)->vxTrackAtVertex()[0].trackOrParticleLink();
-     Trk::LinkToTrackParticleBase* linkToTrack1 = dynamic_cast<Trk::LinkToTrackParticleBase*>(trklink1);
-     const Trk::TrackParticleBase* first_trk = linkToTrack1->cachedElement();
-     //double first_trk_chi2 = (*(*twoTrk_itr)->vxTrackAtVertex())[0]->trackQuality().chiSquared(); --David S.
-     double first_trk_chi2 = (*twoTrk_itr)->vxTrackAtVertex()[0].trackQuality().chiSquared();
-     //Trk::ITrackLink* trklink2 = (*(*twoTrk_itr)->vxTrackAtVertex())[1]->trackOrParticleLink(); --David S.
-     Trk::ITrackLink* trklink2 = (*twoTrk_itr)->vxTrackAtVertex()[1].trackOrParticleLink();
-     Trk::LinkToTrackParticleBase* linkToTrack2 = dynamic_cast<Trk::LinkToTrackParticleBase*>(trklink2);
-     const Trk::TrackParticleBase* second_trk = linkToTrack2->cachedElement();
-     //double second_trk_chi2 = (*(*twoTrk_itr)->vxTrackAtVertex())[1]->trackQuality().chiSquared(); --David S.
-     double second_trk_chi2 = (*twoTrk_itr)->vxTrackAtVertex()[1].trackQuality().chiSquared();
-     
-     //VxContainer::iterator Citer = newVxContainer->begin(); --David S.
-     xAOD::VertexContainer::iterator Citer = newVertexContainer->begin();
-     //VxContainer::iterator Citer_end = newVxContainer->end(); --David S.
-     xAOD::VertexContainer::iterator Citer_end = newVertexContainer->end();
-     bool first_found = false;
-     bool second_found = false;
-     ////loop over all VxCandidates --David S.
-     //loop over all Vertices
-     for (; Citer != Citer_end; Citer++)
-     {
-       //unsigned int size = (*Citer)->vxTrackAtVertex()->size(); --David S.
-       unsigned int size = (*Citer)->vxTrackAtVertex().size();
-       for (unsigned int counter = 0; counter < size; counter++)
-       {  
-         // TODO: make sure that links are actually set in VxTrackAtVertices! --David S.
-         //Trk::ITrackLink* trklink = (*(*Citer)->vxTrackAtVertex())[counter]->trackOrParticleLink(); --David S.
-         Trk::ITrackLink* trklink = (*Citer)->vxTrackAtVertex()[counter].trackOrParticleLink();
-         Trk::LinkToTrackParticleBase* linkToTrack = dynamic_cast<Trk::LinkToTrackParticleBase*>(trklink);
-         const Trk::TrackParticleBase* trk= linkToTrack->cachedElement();
-         //double trk_chi2 = (*(*Citer)->vxTrackAtVertex())[counter]->trackQuality().chiSquared(); --David S.
-         double trk_chi2 = (*Citer)->vxTrackAtVertex()[counter].trackQuality().chiSquared();
-         if (trk == first_trk && trk_chi2 < first_trk_chi2 ) first_found = true;
-         if (trk == second_trk && trk_chi2 < second_trk_chi2) second_found = true;
-        }
-     }
-     //if (first_found==false && second_found==false) newVxContainer->push_back(*twoTrk_itr); --David S.
-     if (!first_found && !second_found) newVertexContainer->push_back(*twoTrk_itr);
-     else delete *twoTrk_itr;
-   //}//end loop over two track Vx Candidates --David S.
-   }//end loop over two track Vertices
-   //if (msgLvl(MSG::DEBUG)) msg() <<"new VxContainer size = "<<newVxContainer->size()<<endmsg; --David S.
-   if (msgLvl(MSG::DEBUG)) msg() << "new VertexContainer size = " << newVertexContainer->size() << endmsg;
-   for (Sp_Iter iter = vtxState_org.begin(); iter != vtxState_org.end(); iter++) delete *iter;
-} else {
-    if (msgLvl(MSG::DEBUG)) msg() <<"No tracks in this event, provide to the next event" <<  endmsg;
-  }
-
 //return newVxContainer; --David S.
 return std::make_pair(newVertexContainer, newVertexAuxContainer);
 }
-- 
GitLab


From 61d4f00857671fa9bf3d50c58a4964445e3ae434 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 12 Jun 2020 01:30:18 +0200
Subject: [PATCH 199/266] Rec::Particle add Thread safety remove mutable

---
 .../Particle/ATLAS_CHECK_THREAD_SAFETY        |   1 +
 .../Particle/Particle/TrackParticle.h         |  11 +-
 Reconstruction/Particle/src/TrackParticle.cxx | 182 +++++++++---------
 3 files changed, 92 insertions(+), 102 deletions(-)
 create mode 100644 Reconstruction/Particle/Particle/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/Particle/Particle/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/Particle/Particle/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..fde029475d66
--- /dev/null
+++ b/Reconstruction/Particle/Particle/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Reconstruction/Particle
diff --git a/Reconstruction/Particle/Particle/TrackParticle.h b/Reconstruction/Particle/Particle/TrackParticle.h
index c6013233458f..b386a116e5ac 100755
--- a/Reconstruction/Particle/Particle/TrackParticle.h
+++ b/Reconstruction/Particle/Particle/TrackParticle.h
@@ -169,11 +169,6 @@ namespace Rec
     /** @} */
 
 private:
-    /**Cached pointer to the Perigee (if one was used to create this class).
-    It is required that Trk::TrackParticleBase::definingParameters() is actually a Perigee. If not then
-    this call just returns a 0 pointer.*/
-    mutable const Trk::Perigee*       m_cachedPerigee;
-
     AthenaBarCodeImpl m_abc;
     };
 }
@@ -185,10 +180,8 @@ SG_BASES2 (Rec::TrackParticle,
 
 inline const Trk::Perigee* Rec::TrackParticle::measuredPerigee() const
 {
-    if (0==m_cachedPerigee){
-        m_cachedPerigee = dynamic_cast<const Trk::Perigee*>( &definingParameters() );
-    }
-    return m_cachedPerigee;
+  //use the method from Particle Base
+   return this->perigee();
 }
   
   /**
diff --git a/Reconstruction/Particle/src/TrackParticle.cxx b/Reconstruction/Particle/src/TrackParticle.cxx
index 8caa72f3b072..df2219f2ce1b 100755
--- a/Reconstruction/Particle/src/TrackParticle.cxx
+++ b/Reconstruction/Particle/src/TrackParticle.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -21,98 +21,87 @@ TrackParticle.cxx  -  Description
 
 namespace Rec
 {
+
   // Constructor 0
-    TrackParticle::TrackParticle() 
-        :
-        Trk::TrackParticleBase(),
-        P4PxPyPzE(),
-        NavigableTerminalNode(),
-        m_cachedPerigee(0)
+    TrackParticle::TrackParticle()
+      : Trk::TrackParticleBase()
+      , P4PxPyPzE()
+      , NavigableTerminalNode()
+  {}
+
+    TrackParticle::TrackParticle(
+      const Trk::Track* trk,
+      const Trk::TrackParticleOrigin trkPrtOrigin,
+      const Trk::VxCandidate* vxCandidate,
+      const Trk::TrackSummary* trkSummary,
+      std::vector<const Trk::TrackParameters*>& parameters,
+      const Trk::TrackParameters* definingParameter,
+      const Trk::FitQuality* fitQuality)
+      : Trk::TrackParticleBase(trk,
+                               trkPrtOrigin,
+                               vxCandidate,
+                               trkSummary,
+                               parameters,
+                               definingParameter,
+                               fitQuality)
+      , P4PxPyPzE(definingParameter->momentum()[Trk::px],
+                  definingParameter->momentum()[Trk::py],
+                  definingParameter->momentum()[Trk::pz],
+                  sqrt(pow(Trk::ParticleMasses().mass[Trk::pion], 2) +
+                       pow(definingParameter->momentum()[Trk::px], 2) +
+                       pow(definingParameter->momentum()[Trk::py], 2) +
+                       pow(definingParameter->momentum()[Trk::pz], 2)))
+      , NavigableTerminalNode()
     {}
 
-    TrackParticle::TrackParticle(   const Trk::Track*                                       trk, 
-                                    const Trk::TrackParticleOrigin                          trkPrtOrigin, 
-                                    const Trk::VxCandidate*                                 vxCandidate, 
-                                    const Trk::TrackSummary*                                trkSummary, 
-                                    std::vector<const Trk::TrackParameters*>&                parameters,
-                                    const Trk::TrackParameters*                              definingParameter,
-                                    const Trk::FitQuality*                                  fitQuality)
-        :  
-        Trk::TrackParticleBase( trk, 
-                                trkPrtOrigin, 
-                                vxCandidate, 
-                                trkSummary, 
-                                parameters, 
-                                definingParameter, 
-                                fitQuality
-                                ),
-        P4PxPyPzE(  definingParameter->momentum()[Trk::px], 
-                    definingParameter->momentum()[Trk::py],
-                    definingParameter->momentum()[Trk::pz],
-                    sqrt(   pow (Trk::ParticleMasses().mass[Trk::pion],2) +
-                            pow( definingParameter->momentum()[Trk::px],2) + 
-                            pow( definingParameter->momentum()[Trk::py],2) + 
-                            pow( definingParameter->momentum()[Trk::pz],2) ) 
-                ),
-        NavigableTerminalNode(),
-        m_cachedPerigee(0)
-    {
-    }
-
-    TrackParticle::TrackParticle (const ElementLink<TrackCollection>& trackLink,
-                                  const Trk::TrackParticleOrigin trkPrtOrigin, 
-                                  const ElementLink<VxContainer>& vxCandidate,
-                                  std::unique_ptr<Trk::TrackSummary> trkSummary,
-                                  // passes ownership of elements.
-                                  std::vector<const Trk::TrackParameters*>&&  parameters,
-                                  std::unique_ptr<Trk::FitQuality> fitQuality,
-                                  const Trk::TrackInfo& info,
-                                  const P4PxPyPzE& mom)
-         :  
-        Trk::TrackParticleBase( trackLink, 
-                                trkPrtOrigin, 
-                                vxCandidate, 
-                                std::move(trkSummary), 
-                                std::move(parameters), 
-                                std::move(fitQuality),
-                                std::move(info) ),
-        P4PxPyPzE(  mom ),
-        NavigableTerminalNode(),
-        m_cachedPerigee(0)
-    {
-    }
+    TrackParticle::TrackParticle(
+      const ElementLink<TrackCollection>& trackLink,
+      const Trk::TrackParticleOrigin trkPrtOrigin,
+      const ElementLink<VxContainer>& vxCandidate,
+      std::unique_ptr<Trk::TrackSummary> trkSummary,
+      // passes ownership of elements.
+      std::vector<const Trk::TrackParameters*>&& parameters,
+      std::unique_ptr<Trk::FitQuality> fitQuality,
+      const Trk::TrackInfo& info,
+      const P4PxPyPzE& mom)
+      : Trk::TrackParticleBase(trackLink,
+                               trkPrtOrigin,
+                               vxCandidate,
+                               std::move(trkSummary),
+                               std::move(parameters),
+                               std::move(fitQuality),
+                               std::move(info))
+      , P4PxPyPzE(mom)
+      , NavigableTerminalNode()
+    {}
 
-  /**
-    Copy Constructor
-  */
-    TrackParticle::TrackParticle(const TrackParticle& rhs) \
-        :
-	IAthenaBarCode(rhs),
-        INavigable(rhs),
-        I4Momentum(rhs),
-        INavigable4Momentum(rhs),
-        P4PxPyPzEBase(rhs), 
-        Trk::TrackParticleBase(rhs),
-        P4PxPyPzE(rhs), 
-        NavigableTerminalNode(rhs), 
-        m_cachedPerigee(0),
-	m_abc(rhs.m_abc)
-    {
-    }
+    /**
+      Copy Constructor
+    */
+    TrackParticle::TrackParticle(const TrackParticle& rhs)
+      : IAthenaBarCode(rhs)
+      , INavigable(rhs)
+      , I4Momentum(rhs)
+      , INavigable4Momentum(rhs)
+      , P4PxPyPzEBase(rhs)
+      , Trk::TrackParticleBase(rhs)
+      , P4PxPyPzE(rhs)
+      , NavigableTerminalNode(rhs)
+      , m_abc(rhs.m_abc)
+    {}
 
-  /**
-    Assignment operator
-  */
-    TrackParticle& TrackParticle::operator= (const TrackParticle& rhs)
+    /**
+      Assignment operator
+    */
+    TrackParticle&
+    TrackParticle::operator=(const TrackParticle& rhs)
     {
-        if (this!=&rhs)
-        {
-            P4PxPyPzE::operator= (rhs);
-            Trk::TrackParticleBase::operator=(rhs);
-            m_cachedPerigee=0;
-	    m_abc = rhs.m_abc;
-        }
-        return *this;
+      if (this != &rhs) {
+        P4PxPyPzE::operator=(rhs);
+        Trk::TrackParticleBase::operator=(rhs);
+        m_abc = rhs.m_abc;
+      }
+      return *this;
     }
 
     TrackParticle& TrackParticle::operator= (TrackParticle&& rhs)
@@ -122,7 +111,6 @@ namespace Rec
           P4PxPyPzE::operator= (rhs);
           m_abc = rhs.m_abc;
           Trk::TrackParticleBase::operator=(std::move(rhs));
-          m_cachedPerigee=0;
         }
         return *this;
     }
@@ -151,7 +139,10 @@ namespace Rec
 
   void TrackParticle::removeErrorMatrix()
   {
-    for (std::vector<const Trk::TrackParameters*>::iterator iter=this->m_trackParameters.begin(); iter != this->m_trackParameters.end(); ++iter) {
+    for (std::vector<const Trk::TrackParameters*>::iterator iter =
+           this->m_trackParameters.begin();
+         iter != this->m_trackParameters.end();
+         ++iter) {
       /* If this is a measured perigee, then we clone it without error matrix
         and replace the Perigee with its clone */
       const Trk::Perigee* measPg=dynamic_cast<const Trk::Perigee*>(*iter);
@@ -159,7 +150,6 @@ namespace Rec
        *iter=measPg->clone();
        delete measPg;
       }
-
     }
   }
 
@@ -183,7 +173,9 @@ namespace Rec
   /** set 4Momentum (will throw exception if cannot be implemented) */
   void TrackParticle::set4Mom (const I4Momentum * const )
   {
-    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 momentum of the TrackParticle is not allowed! Aborting!" << std::endl ;
+    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 "
+                 "momentum of the TrackParticle is not allowed! Aborting!"
+              << std::endl;
     std::abort();
     return;
   }
@@ -191,7 +183,9 @@ namespace Rec
   /** set 4Momentum (will throw exception if cannot be implemented) */
   void TrackParticle::set4Mom (const I4Momentum & )
   {
-    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 momentum of the TrackParticle is not allowed! Aborting!" << std::endl ;
+    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 "
+                 "momentum of the TrackParticle is not allowed! Aborting!"
+              << std::endl;
     std::abort();
     return;
   }
@@ -199,7 +193,9 @@ namespace Rec
   /** set 4Momentum (will throw exception if cannot be implemented) */
   void TrackParticle::set4Mom (const CLHEP::HepLorentzVector & )
   {
-    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 momentum of the TrackParticle is not allowed! Aborting!" << std::endl ;
+    std::cout << " FATAL ERROR : TrackParticle::set4Mom called. Changing the 4 "
+                 "momentum of the TrackParticle is not allowed! Aborting!"
+              << std::endl;
     std::abort();
     return;
   }
-- 
GitLab


From a715983101a1b2d56a103a3a4bde1b65f12f0310 Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Fri, 12 Jun 2020 08:34:18 +0900
Subject: [PATCH 200/266] cleanup TgcFit (update copyright)

---
 Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h | 2 +-
 Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
index 00090b72f544..1330efbaf682 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef  TRIGL2MUONSA_TGCFIT_H
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
index 6ae25d8da62f..2fdf1347c336 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigL2MuonSA/TgcFit.h"
-- 
GitLab


From 7af70b03a976280673902e114b52da6401a60aaf Mon Sep 17 00:00:00 2001
From: Mark Stockton <mark@cern.ch>
Date: Fri, 12 Jun 2020 02:12:49 +0200
Subject: [PATCH 201/266] Improve handling of Frontier warnings

---
 .../TrigConfigSvc/python/TrigConf2COOLLib.py         | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConf2COOLLib.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConf2COOLLib.py
index b9e28db12d0f..ce0f00dc086a 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConf2COOLLib.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConf2COOLLib.py
@@ -11,6 +11,7 @@
 #
 # Required libs:
 import os
+import re
 import threading
 
 import AthenaCommon.Logging as L
@@ -29,11 +30,19 @@ class TmpThr(threading.Thread):
             line = line.lower()
             if ' warning ' in line:
                 maxlevel = max(1,maxlevel)
-            if ' error ' in line and 'connection refused' not in line:
+            if re.search(r"warn\s*\[frontier",line) is not None:
+                # Catch frontier warnings which could contain the word "error" as
+                # frontier will retry connections - full log shown if run in debug
+                msg.info("Caught warning from frontier: %s", line)
+            elif ' error ' in line and 'connection refused' not in line:
                 maxlevel = max(2,maxlevel)
             elif ' fatal ' in line.lower() or 'exception ' in line.lower():
                 maxlevel = max(3,maxlevel)
         output = ''.join(output)
+        output = ('Log file from execution of command:\n'
+               + output
+               + '========================================'
+               + '\nEnd of log file from TrigConf2COOLLib.py')
         if maxlevel==1:
             msg.warning(output)
         elif maxlevel==2:
@@ -42,6 +51,7 @@ class TmpThr(threading.Thread):
             msg.fatal(output)
         else:
             msg.debug(output)
+            msg.info('Successful execution of command')
 
 class TrigConf2CoolSyncSvc(PyAthena.Svc):
     def __init__(self, name="TrigConf2CoolSyncSvc",**kw):
-- 
GitLab


From a2028f56629f9287f4a4a4620537de1dd9d300f4 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 12 Jun 2020 02:05:29 +0100
Subject: [PATCH 202/266] try to avoid dynamic_cast, run clang-tidy

---
 .../src/BaseTRTPIDCalculator.cxx              |  2 +-
 .../src/TRT_ElectronPidToolRun2.cxx           |  4 +-
 .../src/TRT_LocalOccupancy.cxx                | 41 +++++---
 .../TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx | 98 +++++++++++--------
 4 files changed, 88 insertions(+), 57 deletions(-)

diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx
index 83852efd06ba..702cdd22e20e 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx
@@ -46,7 +46,7 @@ float InDet::BaseTRTPIDCalculator::Limit(float prob){
   if( prob > UpperLimit ){
     return UpperLimit;
   }
-  else if( prob < LowerLimit ){
+  if( prob < LowerLimit ){
     return LowerLimit;
   }
   
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
index 8cb8f9dfe5f5..b58f5b522ea1 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
@@ -75,7 +75,7 @@ InDet::TRT_ElectronPidToolRun2::TRT_ElectronPidToolRun2(const std::string& t, co
 \*****************************************************************************/
 
 InDet::TRT_ElectronPidToolRun2::~TRT_ElectronPidToolRun2()
-{}
+= default;
 
 /*****************************************************************************\
 |*%%%  Initialisation  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*|
@@ -229,7 +229,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con
     if (!driftcircle) continue;
 
     // From now (May 2015) onwards, we ONLY USE MIDDLE HT BIT:
-    bool isHTMB  = ((driftcircle->prepRawData()->getWord() & 0x00020000) > 0) ? true : false;
+    bool isHTMB  = (driftcircle->prepRawData()->getWord() & 0x00020000) > 0;
 
     nTRThits++;
     if (isHTMB) nTRThitsHTMB++;
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
index 75127e291632..97dd2ccb9eee 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
@@ -60,8 +60,7 @@ TRT_LocalOccupancy::TRT_LocalOccupancy(const std::string& t,
 
 // =======================================================================
 TRT_LocalOccupancy::~TRT_LocalOccupancy()
-{
-}
+= default;
 
 // =======================================================================
 StatusCode TRT_LocalOccupancy::initialize()
@@ -118,7 +117,12 @@ std::vector<float> TRT_LocalOccupancy::GlobalOccupancy( ) const {
   output.push_back(	data->m_occ_total[5]*1.e-2	)	;	//	EndcapA A
   output.push_back(	data->m_occ_total[6]*1.e-2	)	;	//	EndcapB A
 
-  ATH_MSG_DEBUG("Compute Global Occupancy: whole TRT: "  << output.at(0) << "\t Barrel C: " <<  output.at(1) << "\t EndcapA C: " << output.at(2) << "\t EndcapB C: " << output.at(3) << "\t Barrel A: " << output.at(4) << "\t EndcapA A: " << output.at(5) << "\t EndcapB A: " << output.at(6));
+  ATH_MSG_DEBUG("Compute Global Occupancy: whole TRT: "
+                << output.at(0) << "\t Barrel C: " << output.at(1)
+                << "\t EndcapA C: " << output.at(2) << "\t EndcapB C: "
+                << output.at(3) << "\t Barrel A: " << output.at(4)
+                << "\t EndcapA A: " << output.at(5)
+                << "\t EndcapB A: " << output.at(6));
   return output;
 }
 
@@ -132,10 +136,22 @@ float TRT_LocalOccupancy::LocalOccupancy(const Trk::Track& track ) const {
   DataVector<const Trk::TrackStateOnSurface>::const_iterator	tsos		=trackStates->begin();
   DataVector<const Trk::TrackStateOnSurface>::const_iterator	tsosEnd		=trackStates->end();
   for (;tsos!=tsosEnd;++tsos) {
-    const Trk::MeasurementBase* mesb=(*tsos)->measurementOnTrack();
-    if (!mesb) continue;
-    const InDet::TRT_DriftCircleOnTrack *driftcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(mesb);
-    if(!driftcircle)  continue;
+    const Trk::MeasurementBase* mesb = (*tsos)->measurementOnTrack();
+    if (!mesb) {
+      continue;
+    }
+    const InDet::TRT_DriftCircleOnTrack* driftcircle = nullptr;
+    if (mesb->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
+      const Trk::RIO_OnTrack* tmpRio = static_cast<const Trk::RIO_OnTrack*>(mesb);
+      if (tmpRio->rioType(Trk::RIO_OnTrackType::TRT_DriftCircle)) {
+        driftcircle = static_cast<const InDet::TRT_DriftCircleOnTrack*>(tmpRio);
+      }
+    }
+
+    if(!driftcircle) { 
+      continue;
+    }
+
     Identifier id=driftcircle->identify();
     int det = m_TRTHelper->barrel_ec(         id)     ;
     int lay = m_TRTHelper->layer_or_wheel(    id)     ;
@@ -202,7 +218,7 @@ std::map<int, double>  TRT_LocalOccupancy::getDetectorOccupancy( const TRT_RDO_C
   for ( ; RDO_collection_iter!= RDO_collection_end; ++RDO_collection_iter) {
     const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection(*RDO_collection_iter);
     if (!RDO_Collection) continue;
-    if (RDO_Collection->size() != 0){
+    if (!RDO_Collection->empty()){
       DataVector<TRT_RDORawData>::const_iterator r,rb=RDO_Collection->begin(),re=RDO_Collection->end(); 
       
       for(r=rb; r!=re; ++r) {
@@ -229,7 +245,7 @@ std::map<int, double>  TRT_LocalOccupancy::getDetectorOccupancy( const TRT_RDO_C
           for(tdcvalue=0;tdcvalue<24;++tdcvalue) 
           { 
             if      (  (word & mask) && SawZero) break; 
-            else if ( !(word & mask) ) SawZero = true; 
+            if ( !(word & mask) ) SawZero = true; 
             mask>>=1; 
             if(tdcvalue==7 || tdcvalue==15) mask>>=1; 
           } 
@@ -285,7 +301,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data,
 	for ( ; RDO_collection_iter!= RDO_collection_end; ++RDO_collection_iter) {
 	  const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection(*RDO_collection_iter);
 	  if (!RDO_Collection) return;
-	  if (RDO_Collection->size() != 0){
+	  if (!RDO_Collection->empty()){
 	    DataVector<TRT_RDORawData>::const_iterator r,rb=RDO_Collection->begin(),re=RDO_Collection->end(); 
 	    
 	    for(r=rb; r!=re; ++r) {
@@ -313,7 +329,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data,
 		int tdcvalue; 
 		for(tdcvalue=0;tdcvalue<24;++tdcvalue) 
 		  { if      (  (word & mask) && SawZero) break; 
-		    else if ( !(word & mask) ) SawZero = true; 
+		    if ( !(word & mask) ) SawZero = true; 
 		    mask>>=1; 
 		    if(tdcvalue==7 || tdcvalue==15) mask>>=1; 
 		  } 
@@ -361,8 +377,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data,
       }
     }
     
-    return;
-}
+    }
 
   float TRT_LocalOccupancy::LocalOccupancy(const double t_eta, const double t_phi) const {
     // take eta, phi of track, RoI, ... what have you
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
index 069992600700..a002bcfba4ca 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
@@ -51,8 +51,8 @@ TRT_ToT_dEdx::TRT_ToT_dEdx(const std::string& t, const std::string& n, const IIn
   
   SetDefaultConfiguration();
 
-  m_timingProfile         = 0;
-  m_trtId                                         = 0;
+  m_timingProfile         = nullptr;
+  m_trtId                                         = nullptr;
 }
 
 
@@ -98,7 +98,7 @@ void TRT_ToT_dEdx::ShowDEDXSetup() const
 
 
 // destructor
-TRT_ToT_dEdx::~TRT_ToT_dEdx() {}
+TRT_ToT_dEdx::~TRT_ToT_dEdx() = default;
 
 
 
@@ -116,9 +116,9 @@ StatusCode TRT_ToT_dEdx::initialize()
     return StatusCode::FAILURE;
   }
 
-  m_timingProfile=0;
+  m_timingProfile=nullptr;
   sc = service("ChronoStatSvc", m_timingProfile);
-  if ( sc.isFailure() || 0 == m_timingProfile) {
+  if ( sc.isFailure() || nullptr == m_timingProfile) {
     ATH_MSG_DEBUG ("Can not find ChronoStatSvc name="<<m_timingProfile );
   }
  
@@ -136,10 +136,10 @@ StatusCode TRT_ToT_dEdx::initialize()
     ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummaryTool);
     ATH_MSG_ERROR ("configure as 'None' to avoid its loading.");
     return sc;
-  } else {
+  } 
     if ( !m_TRTStrawSummaryTool.empty() ) 
       ATH_MSG_INFO ( "Retrieved tool " << m_TRTStrawSummaryTool );
-  }
+  
 
   if (m_useTrackPartWithGasType > EGasType::kUnset || 
       m_useTrackPartWithGasType < EGasType::kXenon) {
@@ -243,7 +243,7 @@ bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideBy
   }
 
   const Trk::TrackParameters* trkP = itr->trackParameters();
-  if(trkP==0)return false; 
+  if(trkP==nullptr)return false; 
 
   SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDetEleHandle(m_trtDetEleContKey);
   const InDetDD::TRT_DetElementCollection* elements(trtDetEleHandle->getElements());
@@ -388,7 +388,7 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
 
       return ToTsum/nhits;
     }
-  else
+  
     if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne)
       {
         std::vector<double> vecToT_Xe;
@@ -535,7 +535,7 @@ double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool divideByL, bool useH
 
       return nhits;
     }
-  else
+  
     if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne)
       {
         int nhits = 0;
@@ -666,7 +666,7 @@ double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::Part
   if( (Pone+Ptwo) != 0){
     ATH_MSG_DEBUG("getTest():: return "<<Pone/(Pone+Ptwo)<<"");
     return Pone/(Pone+Ptwo);
-  }else
+  }
     return 0.5;
 }
 
@@ -718,12 +718,12 @@ double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::Parti
     return dEdxCorrection->paraDivideByLengthDedxP1[gasType]/std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType])  * 
       (dEdxCorrection->paraDivideByLengthDedxP2[gasType] - std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType] ) 
        - log(dEdxCorrection->paraDivideByLengthDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDivideByLengthDedxP5[gasType]) ) ) );
-  }else {
+  } 
     if(dEdxCorrection->paraDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDedxP5[gasType]) )<=0)return 0; 
     return dEdxCorrection->paraDedxP1[gasType]/std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDedxP4[gasType])  * 
       (dEdxCorrection->paraDedxP2[gasType] - std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDedxP4[gasType] ) 
        - log(dEdxCorrection->paraDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDedxP5[gasType]) ) ) );
-  }
+  
   //return 0;  
 }
 
@@ -830,14 +830,17 @@ ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const InDet::TRT_DriftCircl
 
 double TRT_ToT_dEdx::getToT(unsigned int BitPattern) const
 {
-  if(m_whichToTEstimatorAlgo==kToTLargerIsland) 
+  if (m_whichToTEstimatorAlgo == kToTLargerIsland) {
     return getToTlargerIsland(BitPattern);
-  else
-    if(m_whichToTEstimatorAlgo==kToTHighOccupancy) 
-      return getToTHighOccupancy(BitPattern);
-    else
-      if(m_whichToTEstimatorAlgo==kToTHighOccupancySmart)
-        return getToTHighOccupancySmart(BitPattern);
+  }
+
+  if (m_whichToTEstimatorAlgo == kToTHighOccupancy) {
+    return getToTHighOccupancy(BitPattern);
+  }
+
+  if (m_whichToTEstimatorAlgo == kToTHighOccupancySmart) {
+    return getToTHighOccupancySmart(BitPattern);
+  }
 
   ATH_MSG_FATAL("getToT():: No ToT estimator case for m_whichToTEstimatorAlgo"<<m_whichToTEstimatorAlgo<<"");
   throw std::exception();
@@ -908,7 +911,7 @@ TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr,
   if (!driftcircle) {
     return 0;
   }
-  if (driftcircle->prepRawData()==0) {
+  if (driftcircle->prepRawData()==nullptr) {
     return 0;
   }
 
@@ -929,7 +932,7 @@ TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr,
     return 0;
   }  
   
-  if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe)
+  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
     {
       if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
         {     
@@ -1005,9 +1008,9 @@ double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const I
   }
 
         
-  if(trkP==0)return false; 
+  if(trkP==nullptr)return false; 
   if (!driftcircle) return false;
-  if (driftcircle->prepRawData()==0) return 0;
+  if (driftcircle->prepRawData()==nullptr) return 0;
   double HitRtrack = fabs(trkP->parameters()[Trk::locR]);
   double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]);
   if ( m_useZeroRHitCut && Trt_RHit==0) return false;                                     // tube hit
@@ -1028,7 +1031,7 @@ double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const I
   double ToT = getToT(BitPattern);
   if(ToT==0) return false; // If ToT for this hit equal 0, skip it.
 
-  if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe)
+  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
     {
       if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
         {     
@@ -1081,9 +1084,9 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In
                   << " but data type is " << m_isData << ". Ignoring!");
   }
 
-  if(trkP==0)return false; 
+  if(trkP==nullptr)return false; 
   if (!driftcircle) return false;
-  if (driftcircle->prepRawData()==0) return 0;
+  if (driftcircle->prepRawData()==nullptr) return 0;
   double HitRtrack = fabs(trkP->parameters()[Trk::locR]);
   double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]);
   if ( m_useZeroRHitCut && Trt_RHit==0) return false;                                     // tube hit
@@ -1104,7 +1107,7 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In
   double ToT = getToT(BitPattern);
   if(ToT==0) return false; // If ToT for this hit equal 0, skip it.
   
-  if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe)
+  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
     {
       if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
         {     
@@ -1142,11 +1145,10 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In
 
 double TRT_ToT_dEdx::fitFuncBarrel_corrRZ(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const
 {
-  if(Layer==0 && StrawLayer<9)
-    return fitFuncBarrelShort_corrRZ(gasType, driftRadius,zPosition, StrawLayer);
-  else
-    return fitFuncBarrelLong_corrRZ(gasType, driftRadius,zPosition,Layer, StrawLayer);
-  //return 0;
+  if (Layer == 0 && StrawLayer < 9) {
+    return fitFuncBarrelShort_corrRZ(gasType, driftRadius, zPosition, StrawLayer);
+  }
+  return fitFuncBarrelLong_corrRZ(gasType, driftRadius, zPosition, Layer, StrawLayer);
 }
 
 
@@ -1505,7 +1507,7 @@ int TRT_ToT_dEdx::DriftTimeBin_v2(unsigned int BitPattern) const
   for(i=1;i<18;++i)
     { 
       if      (  (word_LE & mask) && SawZero) break;
-      else if ( !(word_LE & mask) ) SawZero = true; 
+      if ( !(word_LE & mask) ) SawZero = true; 
       mask>>=1;
       if(i==7 || i==15) mask>>=1;
     }
@@ -1527,7 +1529,7 @@ int TRT_ToT_dEdx::TrailingEdge_v2(unsigned int BitPattern) const
     {
       if ( (word_TE & mask) && SawZero )
         break;
-      else if ( !(word_TE & mask) )
+      if ( !(word_TE & mask) )
         SawZero = true;
 
       mask <<= 1;
@@ -1587,9 +1589,9 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const
             }
         }
         
-      if(SawZero2 == false) return 19;
+      if(!SawZero2) return 19;
 
-      if(SawZero2 == true){
+      if(SawZero2){
         for (k = j+1; k < 11; ++k)
           {
             mask_last_bit=mask_last_bit<<1;
@@ -1604,7 +1606,7 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const
           } 
       }
         
-      if(SawUnit1 == false && SawZero2 == true) return 19;
+      if(!SawUnit1 && SawZero2) return 19;
         
     }
   
@@ -1621,7 +1623,7 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const
         {  
           if ( (word_TE & mask) && SawZero )
             break;
-          else if ( !(word_TE & mask) )
+          if ( !(word_TE & mask) )
             SawZero = true;
         }
       mask <<= 1;
@@ -1766,9 +1768,23 @@ double TRT_ToT_dEdx::hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr)
   int nHTConfigurations = 2;
   //this subarray exists for shared/non-shared hits, so 12 parameters
   int nSharedConfigurations = 2;
-  int num=layer*nParametersPerLayer+isHT*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer+nBarrelLayers*nParametersPerLayer)+isShared*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer*nHTConfigurations+nBarrelLayers*nParametersPerLayer*nHTConfigurations)+(abs(HitPart)-1)*nParametersPerLayer*nBarrelLayers*nHTConfigurations*nSharedConfigurations;
+  int num =
+    layer * nParametersPerLayer +
+    isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
+              nParametersPerLayer +
+            nBarrelLayers * nParametersPerLayer) +
+    isShared * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
+                  nParametersPerLayer * nHTConfigurations +
+                nBarrelLayers * nParametersPerLayer * nHTConfigurations) +
+    (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers *
+      nHTConfigurations * nSharedConfigurations;
   //number for that given hit for non-shared conditions
-  int num_flat=layer*3+isHT*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer+nBarrelLayers*nParametersPerLayer)+(abs(HitPart)-1)*nParametersPerLayer*nBarrelLayers*nHTConfigurations*nSharedConfigurations;
+  int num_flat = layer * 3 +
+                 isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
+                           nParametersPerLayer +
+                         nBarrelLayers * nParametersPerLayer) +
+                 (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers *
+                   nHTConfigurations * nSharedConfigurations;
 
   p0 = dEdxCorrection->hitOccPar[num];
   p1 = dEdxCorrection->hitOccPar[num+1];
-- 
GitLab


From 45b9ebb581fc0d80e237a07518d292602edb4d42 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 12 Jun 2020 03:42:52 +0100
Subject: [PATCH 203/266] remove usage from InDetZVTOPVxFinder, package seems
 quite obsolete for MT

---
 .../InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx     | 21 +++++--------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx
index 4662d2eb7d30..ef1fe93810a4 100755
--- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx
@@ -80,27 +80,16 @@ StatusCode InDet::InDetZVTOP_Alg::execute()
     {
       const TrackCollection *trackTES(0);
       if (evtStore()->retrieve(trackTES, m_tracksName).isFailure())
-	{
-	  if(msgLvl(MSG::DEBUG)) msg() << "Could not find TrackCollection " << m_tracksName << " in StoreGate." << endmsg;
-	  return StatusCode::SUCCESS;
-	} else if (msgLvl(MSG::VERBOSE)) msg() << "Find TrackCollection " << m_tracksName << " in StoreGate." << endmsg;
+      {
+        if(msgLvl(MSG::DEBUG)) msg() << "Could not find TrackCollection " << m_tracksName << " in StoreGate." << endmsg;
+        return StatusCode::SUCCESS;
+      } else if (msgLvl(MSG::VERBOSE)) msg() << "Find TrackCollection " << m_tracksName << " in StoreGate." << endmsg;
       if (msgLvl(MSG::VERBOSE)) msg() << "Number of tracks  = " << trackTES->size() << endmsg;
       //theVxContainer = m_VertexFinderTool->findVertex(trackTES); --David S.
       theXAODContainers = m_VertexFinderTool->findVertex(trackTES);
     }
-  else if(evtStore()->contains<Trk::TrackParticleBaseCollection>(m_tracksName))
-    {
-      const Trk::TrackParticleBaseCollection *trackParticleBaseCollection(0);
-      if(evtStore()->retrieve(trackParticleBaseCollection, m_tracksName).isFailure())
-	{
-	  if(msgLvl(MSG::DEBUG)) msg() << "Could not find Trk::TrackParticleBaseCollection" << m_tracksName << " in StoreGate." << endmsg;
-	  return StatusCode::SUCCESS;
-	}
-      //theVxContainer = m_VertexFinderTool->findVertex(trackParticleBaseCollection); --David S.
-      theXAODContainers = m_VertexFinderTool->findVertex(trackParticleBaseCollection);
-    }
   else {
-    if (msgLvl(MSG::DEBUG)) msg() << "Neither a TrackCollection nor a TrackParticleBaseCollection with key " << m_tracksName << " exist." << endmsg;
+    if (msgLvl(MSG::DEBUG)) msg() << "Not TrackCollection  with key " << m_tracksName << " exist." << endmsg;
     //add check for xAOD::TrackParticleContainer --David S.
     if(evtStore()->contains<xAOD::TrackParticleContainer>(m_tracksName))
     {
-- 
GitLab


From d81539256be9ec73f7c1aa5016e6d08b90b83fff Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 12 Jun 2020 05:18:48 +0200
Subject: [PATCH 204/266] clean a bit more the egamma configs

---
 .../python/EMGSFCaloExtensionBuilder.py       | 18 ++++---
 .../egammaAlgs/python/EMVertexBuilder.py      | 30 +++++------
 .../python/egammaLargeClusterMakerAlg.py      | 24 +++++----
 .../egammaAlgs/python/egammaRecBuilder.py     | 25 ++++-----
 .../python/egammaSelectedTrackCopy.py         | 38 +++++++-------
 .../python/egammaSuperClusterBuilder.py       | 51 ++++++++++---------
 .../python/egammaTopoClusterCopier.py         | 22 ++++----
 .../egammaAlgs/python/topoEgammaBuilder.py    | 22 ++++----
 8 files changed, 121 insertions(+), 109 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
index fd48f34e3b83..ec3efeba67d6 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
@@ -6,12 +6,14 @@ __author__ = "Christos"
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
 from egammaRec import egammaKeys
-from egammaTrackTools.egammaTrackToolsFactories import EMLastCaloExtensionTool,EMParticleCaloExtensionTool
+from egammaTrackTools.egammaTrackToolsFactories import (
+    EMLastCaloExtensionTool, EMParticleCaloExtensionTool)
 
-EMGSFCaloExtensionBuilder = AlgFactory( egammaAlgsConf.EMGSFCaloExtensionBuilder,
-                                        name = 'EMGSFCaloExtensionBuilder',
-                                        LastCaloExtensionTool=EMLastCaloExtensionTool,
-                                        PerigeeCaloExtensionTool=EMParticleCaloExtensionTool,
-                                        GSFPerigeeCache='GSFPerigeeCaloExtension',
-                                        GSFLastCache='GSFLastCaloExtension',
-                                        GFFTrkPartContainerName=egammaKeys.outputTrackParticleKey()) 
+EMGSFCaloExtensionBuilder = AlgFactory(
+    egammaAlgsConf.EMGSFCaloExtensionBuilder,
+    name='EMGSFCaloExtensionBuilder',
+    LastCaloExtensionTool=EMLastCaloExtensionTool,
+    PerigeeCaloExtensionTool=EMParticleCaloExtensionTool,
+    GSFPerigeeCache='GSFPerigeeCaloExtension',
+    GSFLastCache='GSFLastCaloExtension',
+    GFFTrkPartContainerName=egammaKeys.outputTrackParticleKey())
diff --git a/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py
index b4fd23936050..0738f9e6f45a 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py
@@ -1,6 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate EMVertexBuilder with default configuration"
+__doc__ = """ToolFactory to instantiate EMVertexBuilder
+with default configuration"""
 __author__ = "Bruno Lenzi"
 
 import InDetRecExample.TrackingCommon as TrackingCommon
@@ -14,28 +15,23 @@ from egammaTools.egammaExtrapolators import AtlasPublicExtrapolator
 class VertexFinderToolInstance(FcnWrapper):
     def __call__(self):
 
-        # Loading Configurable HoleSearchTool
-        egammaInDetHoleSearchTool = TrackingCommon.getInDetHoleSearchTool(
-            name="egammaInDetHoleSearchTool",
-            Extrapolator=AtlasPublicExtrapolator()
-        )
-
-        # Load the InDetTrackSummaryHelperTool
-        egammaInDetTrackSummaryHelperTool = (
+        # In reality we do NOT need a summary tool
+        # but the confgured Secondary vertex
+        # still asks for one (TODO)
+        egammaVtxInDetTrackSummaryHelperTool = (
             TrackingCommon.getInDetSummaryHelper(
-                name="egammaInDetSummaryHelper",
+                name="egammaVtxInDetSummaryHelper",
                 AssoTool=None,
+                HoleSearch=None,
                 DoSharedHits=False,
-                HoleSearch=egammaInDetHoleSearchTool,
                 private=True))
 
-        #
-        egammaInDetTrackSummaryTool = (
+        egammaVtxInDetTrackSummaryTool = (
             TrackingCommon.getInDetTrackSummaryTool(
-                name="egammaInDetTrackSummaryTool",
-                InDetSummaryHelperTool=egammaInDetTrackSummaryHelperTool,
+                name="egammaVtxInDetTrackSummaryTool",
+                InDetSummaryHelperTool=egammaVtxInDetTrackSummaryHelperTool,
                 doSharedHits=False,
-                doHolesInDet=True))
+                doHolesInDet=False))
 
         #
         # Configured conversion vertex reconstruction cuts
@@ -55,7 +51,7 @@ class VertexFinderToolInstance(FcnWrapper):
             TrackParticles=egammaKeys.outputTrackParticleKey(),
             SecVertices=egammaKeys.outputConversionKey(),
             Extrapolator=AtlasPublicExtrapolator(),
-            TrackSummaryTool=egammaInDetTrackSummaryTool,
+            TrackSummaryTool=egammaVtxInDetTrackSummaryTool,
             printConfig=False)
 
         return theemvertexfindertool.toolInstance()
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py
index e66be31947dd..19b9c52a87aa 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py
@@ -1,6 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate egammaLargeClusterMaker with default configuration"
+__doc__ = """ToolFactory to instantiate egammaLargeClusterMaker
+with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaTools.egammaToolsFactories import egammaLargeClusterMakerTool
@@ -9,15 +10,18 @@ from egammaRec.Factories import AlgFactory, FcnWrapper
 from egammaRec import egammaKeys
 from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
 
+
 def clusMakerTools():
     return [egammaLargeClusterMakerTool()]
 
-egammaLargeClusterMakerAlg = AlgFactory( CaloRecConf.CaloClusterMaker,
-                                         name = "egammaLargeClusterMaker",
-                                         SaveUncalibratedSignalState = False,
-                                         ClustersOutputName = egammaKeys.EgammaLargeClustersKey(),
-                                         ClusterMakerTools = FcnWrapper(clusMakerTools),
-                                         ClusterCorrectionTools=make_CaloSwCorrections("ele7_11",
-                                                                                       suffix="Nocorr",
-                                                                                       version="none",
-                                                                                       cells_name=egammaKeys.caloCellKey()))
+
+egammaLargeClusterMakerAlg = AlgFactory(
+    CaloRecConf.CaloClusterMaker,
+    name="egammaLargeClusterMaker",
+    SaveUncalibratedSignalState=False,
+    ClustersOutputName=egammaKeys.EgammaLargeClustersKey(),
+    ClusterMakerTools=FcnWrapper(clusMakerTools),
+    ClusterCorrectionTools=make_CaloSwCorrections("ele7_11",
+                                                  suffix="Nocorr",
+                                                  version="none",
+                                                  cells_name=egammaKeys.caloCellKey()))
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
index 5b42f6942030..f80be96ec0f9 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
@@ -1,22 +1,23 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate egammaRecBuilder with default configuration"
+__doc__ = """ToolFactory to instantiate 
+egammaRecBuilder with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
-from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags
+from egammaRec.egammaRecFlags import jobproperties
 from egammaRec import egammaKeys
 
 from egammaTools.egammaToolsFactories import \
     EMTrackMatchBuilder, EMConversionBuilder
 
-egammaRecBuilder = AlgFactory( egammaAlgsConf.egammaRecBuilder,
-                               name = 'egammaRecBuilder' ,
-                               InputTopoClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
-                               egammaRecContainer=egammaKeys.EgammaRecKey(),
-                               # Builder tools
-                               TrackMatchBuilderTool = EMTrackMatchBuilder,
-                               ConversionBuilderTool = EMConversionBuilder
-                               )
-
+egammaRecBuilder = AlgFactory(
+    egammaAlgsConf.egammaRecBuilder,
+    name='egammaRecBuilder',
+    InputTopoClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
+    egammaRecContainer=egammaKeys.EgammaRecKey(),
+    # Builder tools
+    TrackMatchBuilderTool=EMTrackMatchBuilder,
+    ConversionBuilderTool=EMConversionBuilder
+)
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py
index 8de23bed1293..95249d385d67 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py
@@ -1,6 +1,7 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate egammaSelectedTrackCopy with default configuration"
+__doc__ = """ToolFactory to instantiate
+egammaSelectedTrackCopy with default configuration"""
 __author__ = "Christos"
 
 from egammaAlgs import egammaAlgsConf
@@ -8,21 +9,24 @@ from egammaRec.Factories import ToolFactory, AlgFactory
 # to set jobproperties.egammaRecFlags
 from egammaRec.egammaRecFlags import jobproperties
 from InDetRecExample.InDetKeys import InDetKeys
-from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools, EMExtrapolationToolsCommonCache
+from egammaTrackTools.egammaTrackToolsFactories import (
+    EMExtrapolationTools, EMExtrapolationToolsCommonCache)
 from egammaCaloTools import egammaCaloToolsConf
 
-egammaCaloClusterGSFSelector = ToolFactory(egammaCaloToolsConf.egammaCaloClusterSelector,
-                                           name='caloClusterGSFSelector',
-                                           EMEtCut=2250.,
-                                           EMEtSplittingFraction = 0.7,
-                                           EMFCut=0.5
-                                           )
+egammaCaloClusterGSFSelector = ToolFactory(
+    egammaCaloToolsConf.egammaCaloClusterSelector,
+    name='caloClusterGSFSelector',
+    EMEtCut=2250.,
+    EMEtSplittingFraction=0.7,
+    EMFCut=0.5
+)
 
-egammaSelectedTrackCopy = AlgFactory(egammaAlgsConf.egammaSelectedTrackCopy,
-                                     name='egammaSelectedTrackCopy',
-                                     ExtrapolationTool=EMExtrapolationTools,
-                                     ExtrapolationToolCommonCache=EMExtrapolationToolsCommonCache,
-                                     ClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
-                                     TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(),
-                                     egammaCaloClusterSelector=egammaCaloClusterGSFSelector
-                                     )
+egammaSelectedTrackCopy = AlgFactory(
+    egammaAlgsConf.egammaSelectedTrackCopy,
+    name='egammaSelectedTrackCopy',
+    ExtrapolationTool=EMExtrapolationTools,
+    ExtrapolationToolCommonCache=EMExtrapolationToolsCommonCache,
+    ClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
+    TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(),
+    egammaCaloClusterSelector=egammaCaloClusterGSFSelector
+)
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
index 1f4b3f4fc2f0..0de10c4dee17 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
@@ -1,35 +1,38 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate the two supercluster builders with default configuration"
+__doc__ = """ToolFactory to instantiate the
+two supercluster builders with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
-from egammaRec.egammaRecFlags import jobproperties # noqa: F401 # to set jobproperties.egammaRecFlags
 from egammaRec import egammaKeys
 
-from egammaTools.egammaToolsFactories import \
-    EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVASvc
+from egammaTools.egammaToolsFactories import (
+    EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVASvc)
 
-from egammaCaloTools.egammaCaloToolsFactories import egammaCheckEnergyDepositTool
+from egammaCaloTools.egammaCaloToolsFactories import (
+    egammaCheckEnergyDepositTool)
 
-electronSuperClusterBuilder = AlgFactory( egammaAlgsConf.electronSuperClusterBuilder,
-                                          name = 'electronSuperClusterBuilder',
-                                          InputEgammaRecContainerName=egammaKeys.EgammaRecKey(),
-                                          SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
-                                          ClusterCorrectionTool=egammaSwTool,
-                                          egammaCheckEnergyDepositTool = egammaCheckEnergyDepositTool,
-                                          MVACalibSvc=egammaMVASvc,
-                                          EtThresholdCut=1000,
-                                          TrackMatchBuilderTool = EMTrackMatchBuilder
-                                         )
+electronSuperClusterBuilder = AlgFactory(
+    egammaAlgsConf.electronSuperClusterBuilder,
+    name='electronSuperClusterBuilder',
+    InputEgammaRecContainerName=egammaKeys.EgammaRecKey(),
+    SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
+    ClusterCorrectionTool=egammaSwTool,
+    egammaCheckEnergyDepositTool=egammaCheckEnergyDepositTool,
+    MVACalibSvc=egammaMVASvc,
+    EtThresholdCut=1000,
+    TrackMatchBuilderTool=EMTrackMatchBuilder
+)
 
-photonSuperClusterBuilder = AlgFactory( egammaAlgsConf.photonSuperClusterBuilder,
-                                        name = 'photonSuperClusterBuilder',
-                                        InputEgammaRecContainerName=egammaKeys.EgammaRecKey(),
-                                        SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
-                                        ClusterCorrectionTool=egammaSwTool,
-                                        egammaCheckEnergyDepositTool = egammaCheckEnergyDepositTool,
-                                        MVACalibSvc= egammaMVASvc,
-                                        ConversionBuilderTool = EMConversionBuilder
-                                        )
+photonSuperClusterBuilder = AlgFactory(
+    egammaAlgsConf.photonSuperClusterBuilder,
+    name='photonSuperClusterBuilder',
+    InputEgammaRecContainerName=egammaKeys.EgammaRecKey(),
+    SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
+    ClusterCorrectionTool=egammaSwTool,
+    egammaCheckEnergyDepositTool=egammaCheckEnergyDepositTool,
+    MVACalibSvc=egammaMVASvc,
+    ConversionBuilderTool=EMConversionBuilder
+)
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
index a127a20457af..3b314af0653a 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
@@ -1,16 +1,18 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate egammaTopoClusterCopier with default configuration"
+__doc__ = """
+ToolFactory to instantiate egammaTopoClusterCopier with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
-from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags
-
-egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier,
-                                      name = 'egammaTopoClusterCopier' ,
-                                      InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(),
-                                      OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
-                                      OutputTopoCollectionShallow="tmp_"+jobproperties.egammaRecFlags.egammaTopoClusterCollection()
-                                      )
+from egammaRec.egammaRecFlags import jobproperties
 
+egammaTopoClusterCopier = AlgFactory(
+    egammaAlgsConf.egammaTopoClusterCopier,
+    name='egammaTopoClusterCopier',
+    InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(),
+    OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
+    OutputTopoCollectionShallow="tmp_" +
+    jobproperties.egammaRecFlags.egammaTopoClusterCollection()
+)
diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py
index 82351fa7dbfc..21ef1e92eefd 100644
--- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py
@@ -1,21 +1,21 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate the two supercluster builders with default configuration"
+__doc__ = """ToolFactory to instantiate the
+two supercluster builders with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
-from egammaRec.egammaRecFlags import jobproperties # noqa: F401  # to set jobproperties.egammaRecFlags
 from egammaRec import egammaKeys
 
 from egammaTools.egammaToolsFactories import EGammaAmbiguityTool
 
-topoEgammaBuilder = AlgFactory( egammaAlgsConf.topoEgammaBuilder,
-                                name = 'topoEgammaBuilder',
-                                SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
-                                SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
-                                ElectronOutputName = egammaKeys.outputElectronKey(),
-                                PhotonOutputName = egammaKeys.outputPhotonKey(),  
-                                AmbiguityTool = EGammaAmbiguityTool
-                                )
-
+topoEgammaBuilder = AlgFactory(
+    egammaAlgsConf.topoEgammaBuilder,
+    name='topoEgammaBuilder',
+    SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(),
+    SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(),
+    ElectronOutputName=egammaKeys.outputElectronKey(),
+    PhotonOutputName=egammaKeys.outputPhotonKey(),
+    AmbiguityTool=EGammaAmbiguityTool
+)
-- 
GitLab


From be17316240e7161e85d9a284c59ec51095718320 Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Fri, 12 Jun 2020 13:11:44 +0900
Subject: [PATCH 205/266] cleanup TgcDataPreparator

---
 .../TrigL2MuonSA/TgcDataPreparator.h          | 25 ++----
 .../TrigL2MuonSA/src/TgcDataPreparator.cxx    | 84 ++++++-------------
 2 files changed, 32 insertions(+), 77 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
index 0ec663e82cdf..46aea41df360 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
@@ -24,7 +24,6 @@
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 namespace MuonGM {
-  class MuonDetectorManager;
   class TgcReadoutElement;
 }
 
@@ -44,26 +43,20 @@ class TgcDataPreparator: public AthAlgTool
     unsigned short int bitpos;
   };
 
-  public:
-      
-      static const InterfaceID& interfaceID();
-
    public:
 
       TgcDataPreparator(const std::string& type, 
 			const std::string& name,
 			const IInterface*  parent);
     
-      ~TgcDataPreparator()=default;
-    
-      virtual StatusCode initialize();
+      virtual StatusCode initialize() override;
     
       StatusCode prepareData(const LVL1::RecMuonRoI*  p_roi,
 			     TrigL2MuonSA::TgcHits&   tgcHits);
 
       void setOptions(const TrigL2MuonSA::TgcDataPreparatorOptions& options) { m_options = options; };
 
-      void setRoIBasedDataAccess(bool use_RoIBasedDataAccess);
+      void setRoIBasedDataAccess(bool use_RoIBasedDataAccess){ m_use_RoIBasedDataAccess = use_RoIBasedDataAccess; };
 
    private:
 
@@ -74,21 +67,19 @@ class TgcDataPreparator: public AthAlgTool
 
    private:
 
-      const MuonGM::MuonDetectorManager* m_muonMgr;
       const MuonGM::TgcReadoutElement* m_tgcReadout;
       ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
-      //ActiveStoreSvc* m_activeStore;
-      ServiceHandle<ActiveStoreSvc> m_activeStore;
-
       // Cabling (new)
       MuonTGC_CablingSvc* m_tgcCabling;	
 
       // Tool handles for BS conversion and Rdo to Prep Data conversion
-      ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool;
+      ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool{
+        this, "TgcRawDataProvider", "Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool"};
 
       // Tool for Rdo to Prep Data conversion
-      ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider;
+      ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider{
+        this, "TgcPrepDataProvider", "Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"};
 
       // Region Selector
       ServiceHandle<IRegSelSvc> m_regionSelector;
@@ -97,10 +88,10 @@ class TgcDataPreparator: public AthAlgTool
       ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
       // option
-      TrigL2MuonSA::TgcDataPreparatorOptions m_options;
+      TrigL2MuonSA::TgcDataPreparatorOptions m_options{};
 
       // utils
-      TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils;
+      TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils{};
 
       SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcContainerKey{
 	this, "TGCPrepDataContainer", "TGC_Measurements", "Name of the TGCContainer to read in"};
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
index 97403ea9ae04..b9ef3b0e525b 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
@@ -2,9 +2,9 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigL2MuonSA/TgcDataPreparator.h"
+#include <cmath>
 
-#include "CLHEP/Units/PhysicalConstants.h"
+#include "TrigL2MuonSA/TgcDataPreparator.h"
 #include "TrigL2MuonSA/TgcData.h"
 #include "TrigL2MuonSA/RecMuonRoIUtils.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
@@ -13,15 +13,6 @@
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-using namespace MuonGM;
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_TgcDataPreparator("IID_TgcDataPreparator", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::TgcDataPreparator::interfaceID() { return IID_TgcDataPreparator; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -29,16 +20,9 @@ TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator(const std::string& type,
 						   const std::string& name,
 						   const IInterface*  parent): 
   AthAlgTool(type,name,parent),
-   m_activeStore( "ActiveStoreSvc", name ), 
-   m_rawDataProviderTool("Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool"),
-   m_tgcPrepDataProvider("Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"),
    m_regionSelector( "RegSelSvc", name ), 
-   m_robDataProvider( "ROBDataProviderSvc", name ),
-   m_options(), m_recMuonRoIUtils()
+   m_robDataProvider( "ROBDataProviderSvc", name )
 {
-   declareInterface<TrigL2MuonSA::TgcDataPreparator>(this);
-   declareProperty("TgcRawDataProvider", m_rawDataProviderTool);
-   declareProperty("TgcPrepDataProvider", m_tgcPrepDataProvider);
 }
 
 // --------------------------------------------------------------------------------
@@ -55,18 +39,12 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize()
 
    ATH_CHECK(m_idHelperSvc.retrieve());
 
-   ATH_CHECK( m_activeStore.retrieve() ); 
-   ATH_MSG_DEBUG("Retrieved ActiveStoreSvc." );
-
    // Retreive TGC raw data provider tool
    ATH_MSG_DEBUG(m_decodeBS);
    ATH_MSG_DEBUG(m_doDecoding);
    // disable TGC Raw data provider if we either don't decode BS or don't decode TGCs
-   if (m_rawDataProviderTool.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding}).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 || !m_doDecoding}) );
+   ATH_MSG_DEBUG("Retrieved Tool " << m_rawDataProviderTool);
 
    // Disable PRD converter if we don't do the data decoding
    ATH_CHECK( m_tgcPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) );
@@ -84,30 +62,21 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize()
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-void TrigL2MuonSA::TgcDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess)
-{
-  m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;
-  return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*  p_roi,
 							TrigL2MuonSA::TgcHits&  tgcHits)
 {
    float roi_eta = p_roi->eta();
    float roi_phi = p_roi->phi();
-   if (roi_phi < 0) roi_phi += 2.0 * CLHEP::pi;
+   if (roi_phi < 0) roi_phi += 2.0 * M_PI;
    
    double etaMin = p_roi->eta() - 0.2;
    double etaMax = p_roi->eta() + 0.2;
    double phiMin = p_roi->phi() - 0.1;
    double phiMax = p_roi->phi() + 0.1;
-   if( phiMin < 0 ) phiMin += 2*CLHEP::pi;
-   if( phiMax < 0 ) phiMax += 2*CLHEP::pi;
-   if( phiMin > 2*CLHEP::pi ) phiMin -= 2*CLHEP::pi;
-   if( phiMax > 2*CLHEP::pi ) phiMax -= 2*CLHEP::pi;
+   if( phiMin < 0 ) phiMin += 2*M_PI;
+   if( phiMax < 0 ) phiMax += 2*M_PI;
+   if( phiMin > 2*M_PI ) phiMin -= 2*M_PI;
+   if( phiMax > 2*M_PI ) phiMax -= 2*M_PI;
 
    TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); 
    const IRoiDescriptor* iroi = (IRoiDescriptor*) roi;
@@ -117,15 +86,15 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    int gasGap;
    int channel;
    
-   bool isLowPt = m_recMuonRoIUtils.isLowPt(p_roi);
+   const bool isLowPt = m_recMuonRoIUtils.isLowPt(p_roi);
 
    // Select the eta cut based on ROI Pt.
-   double mid_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtMiddleForLowPt()
+   const double mid_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtMiddleForLowPt()
      : m_options.roadParameters().deltaEtaAtMiddleForHighPt();
-   double inn_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtInnerForLowPt()
+   const double inn_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtInnerForLowPt()
      : m_options.roadParameters().deltaEtaAtInnerForHighPt();
-   double mid_phi_test = m_options.roadParameters().deltaPhiAtMiddle();
-   double inn_phi_test = m_options.roadParameters().deltaPhiAtInner();
+   const double mid_phi_test = m_options.roadParameters().deltaPhiAtMiddle();
+   const double inn_phi_test = m_options.roadParameters().deltaPhiAtInner();
    
    if(m_doDecoding) {
      std::vector<IdentifierHash> tgcHashList;
@@ -149,19 +118,14 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
      }
    }//doDecoding
    
-   if ( m_activeStore ) {
-     auto tgcContainerHandle = SG::makeHandle(m_tgcContainerKey);
-     tgcPrepContainer = tgcContainerHandle.cptr();
-     if (!tgcContainerHandle.isValid()) { 
-       ATH_MSG_ERROR("Could not retrieve PrepDataContainer key:" << m_tgcContainerKey.key());
-       return StatusCode::FAILURE;
-     } else {
-       ATH_MSG_DEBUG("Retrieved PrepDataContainer: " << tgcPrepContainer->numberOfCollections());
-     }
-   } else {
-     ATH_MSG_ERROR("Null pointer to ActiveStore");
+   auto tgcContainerHandle = SG::makeHandle(m_tgcContainerKey);
+   tgcPrepContainer = tgcContainerHandle.cptr();
+   if (!tgcContainerHandle.isValid()) { 
+     ATH_MSG_ERROR("Could not retrieve PrepDataContainer key:" << m_tgcContainerKey.key());
      return StatusCode::FAILURE;
-   }  
+   } else {
+     ATH_MSG_DEBUG("Retrieved PrepDataContainer: " << tgcPrepContainer->numberOfCollections());
+   }
  
    //Find closest wires in Middle
    Muon::TgcPrepDataContainer::const_iterator wi = tgcPrepContainer->begin();
@@ -249,8 +213,8 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
        if (stationNum==-1) stationNum=3;
        if (m_idHelperSvc->tgcIdHelper().isStrip(prepData.identify())) {
 	 double dphi = fabs(prepData.globalPosition().phi() - roi_phi);
-	 if( dphi > CLHEP::pi*2 ) dphi = dphi - CLHEP::pi*2;
-	 if( dphi > CLHEP::pi ) dphi = CLHEP::pi*2 - dphi;
+	 if( dphi > M_PI*2 ) dphi = dphi - M_PI*2;
+	 if( dphi > M_PI ) dphi = M_PI*2 - dphi;
 	 // For strips, apply phi cut
 	 if     ( stationNum < 3  && dphi < mid_phi_test ) { isInRoad = true; }
 	 else if( stationNum == 3 && dphi < inn_phi_test ) { isInRoad = true; }
-- 
GitLab


From dcf4f4c4f5ff755bc5e006aa2ff280c16aa38ebd Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Fri, 12 Jun 2020 14:52:42 +0900
Subject: [PATCH 206/266] cleanup SagittaRadiusEstimate and change to range
 based loop in TgcFit

---
 .../TrigL2MuonSA/SagittaRadiusEstimate.h      | 15 +---
 .../TrigL2MuonSA/TrigL2MuonSA/TgcFit.h        |  7 +-
 .../TrigL2MuonSA/src/RpcRoadDefiner.cxx       |  3 +-
 .../src/SagittaRadiusEstimate.cxx             | 73 +++----------------
 .../TrigL2MuonSA/src/TgcDataPreparator.cxx    | 48 +++++-------
 5 files changed, 38 insertions(+), 108 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h
index 9fbe6566596e..51f36afad5ca 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef  TRIGL2MUONSA_SAGITTARADIUSESTIMATE_H
@@ -23,21 +23,14 @@ namespace TrigL2MuonSA {
 {
  public:
   
-  static const InterfaceID& interfaceID();
-
   SagittaRadiusEstimate(const std::string& type, 
 			const std::string& name,
 			const IInterface*  parent);
   
-  ~SagittaRadiusEstimate();
-  
-  virtual StatusCode initialize();
-  virtual StatusCode finalize  ();
-
   void setMCFlag(BooleanProperty use_mcLUT,
 		 const AlignmentBarrelLUTSvc* alignmentBarrelLUTSvc);
 
-  void setUseEndcapInner( BooleanProperty use_endcapInner );
+  void setUseEndcapInner( BooleanProperty use_endcapInner ){ m_use_endcapInner = use_endcapInner; };
   
  public:
   
@@ -47,9 +40,9 @@ namespace TrigL2MuonSA {
   
  private:
   
-  BooleanProperty  m_use_mcLUT;
+  BooleanProperty  m_use_mcLUT{0};
 
-  BooleanProperty  m_use_endcapInner;
+  BooleanProperty  m_use_endcapInner{0};
 
   const ToolHandle<AlignmentBarrelLUT>*    m_alignmentBarrelLUT;
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
index 1330efbaf682..d4feeae668ec 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h
@@ -157,6 +157,7 @@ class TgcFit: public AthAlgTool
 	 const std::string& name,
 	 const IInterface*  parent);
 
+  // not used
   void setFitParameters(double CHI2_TEST,
 			unsigned MIN_WIRE_POINTS,
 			unsigned MIN_STRIP_POINTS);
@@ -191,9 +192,9 @@ class TgcFit: public AthAlgTool
  protected:
   PointArray m_superPoints;           /**< List of wire (eta) super-points. */
   
-  double m_CHI2_TEST { 10.0 };                 /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */
-  unsigned m_MIN_WIRE_POINTS { 4 };         /**< Minimum number of wire points for linear fit. */
-  unsigned m_MIN_STRIP_POINTS { 3 };        /**< Minimum number of strip points for linear fit. */
+  double m_CHI2_TEST { 10.0 };        /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */
+  unsigned m_MIN_WIRE_POINTS { 4 };   /**< Minimum number of wire points for linear fit. */
+  unsigned m_MIN_STRIP_POINTS { 3 };  /**< Minimum number of strip points for linear fit. */
   
   void printDebug(const std::string& str){ ATH_MSG_DEBUG(str); };
 };
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
index 8946711e88d6..fff6cdeee23c 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
@@ -9,7 +9,8 @@
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-// --------------------------------------------------------------------------------                 // --------------------------------------------------------------------------------                  
+// --------------------------------------------------------------------------------                 
+// --------------------------------------------------------------------------------                  
 static const InterfaceID IID_RpcRoadDefiner("IID_RpcRoadDefiner", 1, 0);
 
 const InterfaceID& TrigL2MuonSA::RpcRoadDefiner::interfaceID() { return IID_RpcRoadDefiner; }
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx
index 973db86ee3ae..30dc9b737ad2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx
@@ -1,59 +1,24 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include <cmath>
+
 #include "TrigL2MuonSA/SagittaRadiusEstimate.h"
 
 #include "xAODTrigMuon/TrigMuonDefs.h"
 
-#include "CLHEP/Units/PhysicalConstants.h"
-
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_SagittaRadiusEstimate("IID_SagittaRadiusEstimate", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::SagittaRadiusEstimate::interfaceID() { return IID_SagittaRadiusEstimate; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
 TrigL2MuonSA::SagittaRadiusEstimate::SagittaRadiusEstimate(const std::string& type,
 							   const std::string& name,
 							   const IInterface*  parent):
-  AthAlgTool(type, name, parent), 
-  m_use_mcLUT(0),
-  m_alignmentBarrelLUT(0)
-{
-  declareInterface<TrigL2MuonSA::SagittaRadiusEstimate>(this);
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::SagittaRadiusEstimate::~SagittaRadiusEstimate() 
-{
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::SagittaRadiusEstimate::initialize()
+  AthAlgTool(type, name, parent)
 {
-  ATH_MSG_DEBUG("Initializing SagittaRadiusEstimate - package version " << PACKAGE_VERSION) ;
-   
-  StatusCode sc;
-  sc = AthAlgTool::initialize();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-    return sc;
-  }
-
-  // 
-  return StatusCode::SUCCESS; 
 }
 
 // --------------------------------------------------------------------------------
@@ -64,14 +29,6 @@ void TrigL2MuonSA::SagittaRadiusEstimate::setMCFlag(BooleanProperty use_mcLUT,
 {
   m_use_mcLUT = use_mcLUT;
   if ( alignmentBarrelLUTSvc ) m_alignmentBarrelLUT = alignmentBarrelLUTSvc->alignmentBarrelLUT();
-
-  return;
-}
-
-void TrigL2MuonSA::SagittaRadiusEstimate::setUseEndcapInner( BooleanProperty use_endcapInner )
-{
-  m_use_endcapInner = use_endcapInner;
-  return;
 }
 
 // --------------------------------------------------------------------------------
@@ -84,7 +41,8 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
   const int MAX_STATION = 4;
   const float ZERO_LIMIT = 1e-5;
 
-  int nit,nitmx=10;
+  int nit;
+  const int nitmx=10;
   int count=0;
   double a3,theta,rad,phi,one,phim=0,signZ;
   
@@ -94,7 +52,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
   double x0 = 0., y0 = 0., x1 = 0., y1 = 0., x2 = 0., y2 = 0., x3 = 0., y3 = 0.;
   double tm = 0.;
   double xn = 0.;
-  double eps = 0.005;
+  const double eps = 0.005;
   
   TrigL2MuonSA::SuperPoint* superPoints[4];
 
@@ -177,7 +135,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
     }
     phi = atan2(trackPattern.phiMSDir*one,one);
 
-    if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi;
+    if(phim>=M_PI+0.1) phim = phim - 2*M_PI;
     
     if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi);
     else trackPattern.phiMap = phi - phim;
@@ -217,7 +175,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
       one = (cos(p_roi->phi())>0)? 1: -1;
     }
     phi = atan2(trackPattern.phiMSDir*one,one);
-    if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi;
+    if(phim>=M_PI+0.1) phim = phim - 2*M_PI;
 
     if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi);
     else trackPattern.phiMap = phi - phim;
@@ -328,7 +286,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
     }
     phi = atan2(trackPattern.phiMSDir*one,one);
 
-    if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi;
+    if(phim>=M_PI+0.1) phim = phim - 2*M_PI;
 
     if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi);
     else trackPattern.phiMap = phi - phim;
@@ -366,14 +324,3 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-StatusCode TrigL2MuonSA::SagittaRadiusEstimate::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing SagittaRadiusEstimate - package version " << PACKAGE_VERSION);
-   
-  StatusCode sc = AthAlgTool::finalize(); 
-  return sc;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
index b9ef3b0e525b..259ddf74e076 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
@@ -128,25 +128,21 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    }
  
    //Find closest wires in Middle
-   Muon::TgcPrepDataContainer::const_iterator wi = tgcPrepContainer->begin();
-   Muon::TgcPrepDataContainer::const_iterator wi_end = tgcPrepContainer->end();
    float min_dphi_wire=1000.;
    float second_dphi_wire=1000.;
    std::vector<float> ov_dphi;
    ov_dphi.clear();
-   for( ; wi!=wi_end; ++wi ) { // loop over collections
-     const Muon::TgcPrepDataCollection* colwi = *wi;
+   for( const Muon::TgcPrepDataCollection* wi : *tgcPrepContainer ) { // loop over collections
+     const Muon::TgcPrepDataCollection* colwi = wi;
      if( !colwi ) continue;
-     Muon::TgcPrepDataCollection::const_iterator cwi = colwi->begin();
-     Muon::TgcPrepDataCollection::const_iterator cwi_end = colwi->end();
-     for( ;cwi!=cwi_end;++cwi ){ // loop over data in the collection
-       if( !*cwi ) continue;
-       const Muon::TgcPrepData& prepDataWi = **cwi;
+     for( const Muon::TgcPrepData* cwi : *colwi ){ // loop over data in the collection
+       if( !cwi ) continue;
+       const Muon::TgcPrepData& prepDataWi = *cwi;
        if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataWi.identify())) {//wire
          int stationNumWi = m_idHelperSvc->tgcIdHelper().stationRegion(prepDataWi.identify())-1;
          if (stationNumWi==-1) stationNumWi=3;
          if (stationNumWi<3 && fabs(prepDataWi.globalPosition().eta() - roi_eta) < mid_eta_test ) {
-           float dphi = acos(cos(prepDataWi.globalPosition().phi()-roi_phi));
+           const float dphi = acos(cos(prepDataWi.globalPosition().phi()-roi_phi));
            bool overlap=false;
            for (unsigned int ov=0;ov<ov_dphi.size();ov++)
              if (fabs(dphi-ov_dphi[ov])<1e-5) overlap=true;
@@ -165,23 +161,19 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    }
 
    //Check if there are enough number of hits
-   Muon::TgcPrepDataContainer::const_iterator hit = tgcPrepContainer->begin();
-   Muon::TgcPrepDataContainer::const_iterator hit_end = tgcPrepContainer->end();
    int num_min_hits=0;
    int num_second_hits=0;
-   for( ; hit!=hit_end; ++hit ) { // loop over collections
-     const Muon::TgcPrepDataCollection* colhit = *hit;
+   for( const Muon::TgcPrepDataCollection* hit : *tgcPrepContainer ) { // loop over collections
+     const Muon::TgcPrepDataCollection* colhit = hit;
      if( !colhit ) continue;
-     Muon::TgcPrepDataCollection::const_iterator chit = colhit->begin();
-     Muon::TgcPrepDataCollection::const_iterator chit_end = colhit->end();
-     for( ;chit!=chit_end;++chit ){ // loop over data in the collection
-       if( !*chit ) continue;
-       const Muon::TgcPrepData& prepDataHit = **chit;
+     for( const Muon::TgcPrepData* chit : *colhit ){ // loop over data in the collection
+       if( !chit ) continue;
+       const Muon::TgcPrepData& prepDataHit = *chit;
        if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataHit.identify())) {//strip
          int stationNumHit = m_idHelperSvc->tgcIdHelper().stationRegion(prepDataHit.identify())-1;
          if (stationNumHit==-1) stationNumHit=3;
          if (stationNumHit<3 && fabs(prepDataHit.globalPosition().eta() - roi_eta) < mid_eta_test ) {
-           float dphi = acos(cos(prepDataHit.globalPosition().phi()-roi_phi));
+           const float dphi = acos(cos(prepDataHit.globalPosition().phi()-roi_phi));
            if (fabs(dphi-min_dphi_wire)<1e-5) num_min_hits++;
            if (fabs(dphi-second_dphi_wire)<1e-5) num_second_hits++;
          }
@@ -196,17 +188,13 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
      else useDefault=true;
    }
 
-   Muon::TgcPrepDataContainer::const_iterator it = tgcPrepContainer->begin();
-   Muon::TgcPrepDataContainer::const_iterator it_end = tgcPrepContainer->end();
-   for( ; it!=it_end; ++it ) { // loop over collections
-     const Muon::TgcPrepDataCollection* col = *it;
+   for( const Muon::TgcPrepDataCollection* it : *tgcPrepContainer ) { // loop over collections
+     const Muon::TgcPrepDataCollection* col = it;
      if( !col ) continue;
-     Muon::TgcPrepDataCollection::const_iterator cit = col->begin();
-     Muon::TgcPrepDataCollection::const_iterator cit_end = col->end();
-     for( ;cit!=cit_end;++cit ){ // loop over data in the collection
-       if( !*cit ) continue;
+     for( const Muon::TgcPrepData* cit : *col ){ // loop over data in the collection
+       if( !cit ) continue;
        
-       const Muon::TgcPrepData& prepData = **cit;
+       const Muon::TgcPrepData& prepData = *cit;
        
        bool isInRoad = false;
        int stationNum = m_idHelperSvc->tgcIdHelper().stationRegion(prepData.identify())-1;
@@ -221,7 +209,7 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
        }
        else {
 	 // For wires, apply eta cut.
-         float dphi = acos(cos(prepData.globalPosition().phi()-roi_phi));
+         const float dphi = acos(cos(prepData.globalPosition().phi()-roi_phi));
 	 if     ( stationNum < 3  && fabs(prepData.globalPosition().eta() - roi_eta) < mid_eta_test ) {
            if (useDefault) isInRoad = true;//default
            else if (fabs(dphi-dphi_wire)<1e-5) isInRoad = true;//for close-by muon 
-- 
GitLab


From 5fab363906fd19294d995d158ec7add7423065ea Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Fri, 12 Jun 2020 16:23:42 +0900
Subject: [PATCH 207/266] cleanup RpcRoadDefiner

---
 .../TrigL2MuonSA/RpcRoadDefiner.h             | 18 ++---
 .../TrigL2MuonSA/src/RpcRoadDefiner.cxx       | 77 +++++--------------
 2 files changed, 26 insertions(+), 69 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
index 9b7a9cf9c024..a3d3e6e81cee 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
@@ -30,15 +30,13 @@ namespace TrigL2MuonSA {
 class RpcRoadDefiner: public AthAlgTool
 {
  public:
-  static const InterfaceID& interfaceID();
 
   RpcRoadDefiner(const std::string& type,
                  const std::string& name,
                  const IInterface*  parent);
-  ~RpcRoadDefiner()=default;
 
-  virtual StatusCode initialize();
-  virtual StatusCode finalize  ();
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize  () override;
   
  public:
   StatusCode defineRoad(const LVL1::RecMuonRoI*      p_roi,
@@ -51,19 +49,19 @@ class RpcRoadDefiner: public AthAlgTool
 			double                       roiEtaMinHigh,
 			double                       roiEtaMaxHigh);
 
-  void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector);
-  void setRoadWidthForFailure(double rWidth_RPC_Failed);
-  void setRpcGeometry(bool use_rpc);
+  void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector){ m_regionSelector = regionSelector; };
+  void setRoadWidthForFailure(double rWidth_RPC_Failed){ m_rWidth_RPC_Failed = rWidth_RPC_Failed; };
+  void setRpcGeometry(bool use_rpc){ m_use_rpc = use_rpc; };
 
  protected:
   float f(float x, float c0, float c1, float c2, float c3) const;
   float fp(float x, float c33, float c22, float c1) const;
 
  private:
-  const BarrelRoadData*  m_roadData;
+  const BarrelRoadData*  m_roadData{nullptr};
 
-  double m_rWidth_RPC_Failed;
-  bool m_use_rpc;
+  double m_rWidth_RPC_Failed{0};
+  bool m_use_rpc{true};
 
   ServiceHandle<IRegSelSvc> m_regionSelector;
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
index fff6cdeee23c..dbf9f5136de6 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
@@ -2,19 +2,12 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigL2MuonSA/RpcRoadDefiner.h"
-#include "CLHEP/Units/PhysicalConstants.h"
+#include <cmath>
 
+#include "TrigL2MuonSA/RpcRoadDefiner.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-// --------------------------------------------------------------------------------                 
-// --------------------------------------------------------------------------------                  
-static const InterfaceID IID_RpcRoadDefiner("IID_RpcRoadDefiner", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::RpcRoadDefiner::interfaceID() { return IID_RpcRoadDefiner; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -22,20 +15,15 @@ TrigL2MuonSA::RpcRoadDefiner::RpcRoadDefiner(const std::string& type,
                                              const std::string& name,
                                              const IInterface*  parent):
   AthAlgTool(type, name, parent),
-  m_roadData(0),
-  m_rWidth_RPC_Failed(0), m_use_rpc(true),
   m_regionSelector( "RegSelSvc", name )
 {
-  declareInterface<TrigL2MuonSA::RpcRoadDefiner>(this);
 }
 
-// --------------------------------------------------------------------------------                  
+// -------------------------------------------------------------------------------- 
 // --------------------------------------------------------------------------------                  
 
 StatusCode TrigL2MuonSA::RpcRoadDefiner::initialize()
 {
-  ATH_MSG_DEBUG("Initializing RpcRoadDefiner - package version " << PACKAGE_VERSION) ;
-  ATH_CHECK(AthAlgTool::initialize());
   ATH_CHECK(m_idHelperSvc.retrieve());
   return StatusCode::SUCCESS;
 }
@@ -43,32 +31,6 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::initialize()
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-void TrigL2MuonSA::RpcRoadDefiner::setRoadWidthForFailure(double rWidth_RPC_Failed)
-{
-  m_rWidth_RPC_Failed = rWidth_RPC_Failed;
-  return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::RpcRoadDefiner::setRpcGeometry(bool use_rpc)
-{
-   m_use_rpc = use_rpc;
-   return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::RpcRoadDefiner::setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector)
-{
-  m_regionSelector = regionSelector;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*      p_roi,
 						    TrigL2MuonSA::MuonRoad&      muonRoad,
 						    TrigL2MuonSA::RpcHits&       /*rpcHits*/,
@@ -127,7 +89,7 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
   muonRoad.side       = (p_roi->phi()<0.)? 0 : 1;
   muonRoad.LargeSmall = ((p_roi->sectorID() + 1)/2 )%2;
   
-  int PhysicsSector = ((p_roi->sectorID() + 1)/4 )%8 + 1;
+  const int PhysicsSector = ((p_roi->sectorID() + 1)/4 )%8 + 1;
   
   int special = 0;
   if (muonRoad.LargeSmall == 0 && (PhysicsSector == 6 || PhysicsSector == 8 ))
@@ -171,8 +133,8 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
   double etaMax =  p_roi->eta()+.02;
   double phiMin = muonRoad.phiMiddle-.01;
   double phiMax = muonRoad.phiMiddle+.01;
-  if(phiMax > CLHEP::pi) phiMax -= CLHEP::pi*2.;
-  if(phiMin < CLHEP::pi*-1) phiMin += CLHEP::pi*2.;
+  if(phiMax > M_PI) phiMax -= M_PI*2.;
+  if(phiMin < M_PI*-1) phiMin += M_PI*2.;
 
   TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); 
 
@@ -183,15 +145,15 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
 
   if(roi) delete roi;
   
-  for(int i_hash=0; i_hash < (int)mdtHashList.size(); i_hash++){
+  for( const IdentifierHash& hash : mdtHashList){
     
     Identifier id;
-    int convert = m_idHelperSvc->mdtIdHelper().get_id(mdtHashList[i_hash], id, &context);
+    const int convert = m_idHelperSvc->mdtIdHelper().get_id(hash, id, &context);
 
     if(convert!=0) ATH_MSG_ERROR("problem converting hash list to id");
     
     muonRoad.stationList.push_back(id);
-    int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id);
+    const int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id);
     std::string name = m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(id));
     
     if ( name[1]=='M' && name[2]=='E' ) continue;//exclude BME
@@ -199,14 +161,14 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     
     int LargeSmall = 0;
     if(name[2]=='S' || name[2]=='F' || name[2]=='G' ) LargeSmall = 1;
-    int sector = (stationPhi-1)*2 + LargeSmall;
+    const int sector = (stationPhi-1)*2 + LargeSmall;
     if(sector_trigger == 99)
       sector_trigger = sector;
     else if(sector_trigger != sector)
       sector_overlap = sector;
   }
   
-  int MDT_tr = (PhysicsSector - 1)*2 + muonRoad.LargeSmall;
+  const int MDT_tr = (PhysicsSector - 1)*2 + muonRoad.LargeSmall;
   if (MDT_tr == sector_overlap) {
     sector_overlap = sector_trigger;
     sector_trigger = MDT_tr;
@@ -232,12 +194,12 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
     }
    
   } else {
-    double roiEtaLow = (roiEtaMinLow + roiEtaMaxLow) * 0.5;
-    double roiEtaHigh = (roiEtaMinHigh + roiEtaMaxHigh) * 0.5;
-    double thetaLow  = atan(exp(-fabs(roiEtaLow)))*2.;
-    double thetaHigh  = atan(exp(-fabs(roiEtaHigh)))*2.;
-    double awLow     = (fabs(roiEtaLow) > ZERO_LIMIT)? tan(thetaLow)*(fabs(roiEtaLow)/roiEtaLow): 0.;
-    double awHigh     = (fabs(roiEtaHigh) > ZERO_LIMIT)? tan(thetaHigh)*(fabs(roiEtaHigh)/roiEtaHigh): 0.;
+    const double roiEtaLow = (roiEtaMinLow + roiEtaMaxLow) * 0.5;
+    const double roiEtaHigh = (roiEtaMinHigh + roiEtaMaxHigh) * 0.5;
+    const double thetaLow  = atan(exp(-fabs(roiEtaLow)))*2.;
+    const double thetaHigh  = atan(exp(-fabs(roiEtaHigh)))*2.;
+    const double awLow     = (fabs(roiEtaLow) > ZERO_LIMIT)? tan(thetaLow)*(fabs(roiEtaLow)/roiEtaLow): 0.;
+    const double awHigh     = (fabs(roiEtaHigh) > ZERO_LIMIT)? tan(thetaHigh)*(fabs(roiEtaHigh)/roiEtaHigh): 0.;
     
     for (int i_station=0; i_station<N_LAYER; i_station++) {
       for (int i_sector=0; i_sector<N_SECTOR; i_sector++) {
@@ -259,11 +221,8 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
 
 StatusCode TrigL2MuonSA::RpcRoadDefiner::finalize()
 {
-  ATH_MSG_DEBUG("Finalizing RpcRoadDefiner - package version " << PACKAGE_VERSION);
-
   if (m_roadData) delete m_roadData;
-
-  return AthAlgTool::finalize();
+  return StatusCode::SUCCESS;
 }
 
 // --------------------------------------------------------------------------------                  
-- 
GitLab


From 6a7900b9f797a6ec6c6a4e6424bf8e6c1be7ecff Mon Sep 17 00:00:00 2001
From: Ke Li <ke.li@cern.ch>
Date: Fri, 12 Jun 2020 07:56:53 +0000
Subject: [PATCH 208/266] enable thread-safety checker for HepMCWeightSvc

---
 .../HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY   |  1 +
 Generators/HepMCWeightSvc/src/HepMCWeightSvc.cxx   | 14 +++++++-------
 Generators/HepMCWeightSvc/src/HepMCWeightSvc.h     |  6 ++++--
 3 files changed, 12 insertions(+), 9 deletions(-)
 create mode 100644 Generators/HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Generators/HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY b/Generators/HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..6e28e617db7f
--- /dev/null
+++ b/Generators/HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Generators/HepMCWeightSvc/src/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.cxx b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.cxx
index 6e357b23f557..6a2610106c04 100644
--- a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.cxx
+++ b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -131,7 +131,7 @@ StatusCode HepMCWeightSvc::loadWeights() {
 
 }
 
-StatusCode HepMCWeightSvc::setWeightNames(const std::map<std::string, std::size_t>& weightNames) {
+StatusCode HepMCWeightSvc::setWeightNames (const std::map<std::string, std::size_t>& weightNames) {
 
    //ignore any attempt to set 'nothing' for the weight names
    if(weightNames.size()==0 || (weightNames.size()==1 && weightNames.begin()->first=="0") ) return StatusCode::SUCCESS;
@@ -148,9 +148,9 @@ StatusCode HepMCWeightSvc::setWeightNames(const std::map<std::string, std::size_
       CHECK( m_metaDataTool->registerFolder("/Generation/Parameters","Metadata created during Event Generation") );
 
       //create a new attributelist collection for it ...
-      CondAttrListCollection* cont = new CondAttrListCollection(true /* use regular timestamps, not run-lumiblock timestamps */);
+      ATLAS_THREAD_SAFE CondAttrListCollection* cont = new CondAttrListCollection(true /* use regular timestamps, not run-lumiblock timestamps */) ;
       //create a single attribute list
-      CondAttrListCollection::AttributeList  myAttributes;
+      ATLAS_THREAD_SAFE CondAttrListCollection::AttributeList  myAttributes;
 
       //store as strings ... when read back in we use a gaudi parser to parse the list
       myAttributes.extend("HepMCWeightNames","string");
@@ -173,9 +173,9 @@ StatusCode HepMCWeightSvc::setWeightNames(const std::map<std::string, std::size_
       //nsTime += evt->event_ID()->time_stamp_ns_offset();
       //evtTime.setTimestamp(nsTime);
       //cont->addNewStart(evtTime);
-      cont->add(evt->event_ID()->run_number(),myAttributes);
-
-
+      bool add_status ATLAS_THREAD_SAFE = cont->add(evt->event_ID()->run_number(),myAttributes);
+      if (!add_status)
+	ATH_MSG_INFO("Failed to add AttributeList for weight " << stringToStore);
 
       ATH_MSG_INFO("Storing /Generation/Parameters :: WeightNames = " << stringToStore);
 
diff --git a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
index 60eb6878e7d4..bb017c1dacd0 100644
--- a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
+++ b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef EVGENPRODTOOLS_HEPMCWEIGHTSVC_H
@@ -20,6 +20,8 @@
 ///  author: will buttinger , NLAA
 /// 
 ///
+/// not thread-safe but it should be ok since it's only used in TPconverter and run in serial mode,
+/// need further investigation together with TPConverter in future
 class HepMCWeightSvc : public AthService , public IHepMCWeightSvc, virtual public IIncidentListener  {
 public:
 
@@ -31,7 +33,7 @@ public:
   ~HepMCWeightSvc() {;}
 
   ///checks for any changes to weightnames ... none are allowed. Then records to metadata
-  virtual StatusCode setWeightNames(const std::map<std::string, std::size_t>& weightNames);
+  virtual StatusCode setWeightNames (const std::map<std::string, std::size_t>& weightNames);
 
    ///returns the current weight names ... will only change at file boudaries, it is assumed all events in a given file will have same weights in SAME ORDER
    virtual const std::map<std::string, std::size_t>& weightNames();
-- 
GitLab


From 7b6d8fb4bf1bca4967185b718b8e5aaca735ceda Mon Sep 17 00:00:00 2001
From: Daniel Louis Noel <daniel.louis.noel@cern.ch>
Date: Fri, 12 Jun 2020 08:03:28 +0000
Subject: [PATCH 209/266] create AGDD2Geo service upon adding it

---
 .../MuonConfig/python/MuonGeometryConfig.py   | 22 ++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
index 49e06d18e393..069266886703 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
@@ -106,16 +106,18 @@ def MuonGeoModelCfg(flags):
         if flags.Detector.SimulateMuon:
             detTool.FillCacheInitTime = 0
 
-            ## Additional material in the muon system
-            AGDD2Geo = AGDDtoGeoSvc()
-            muonAGDDTool = MuonAGDDTool("MuonSpectrometer", BuildNSW=False)
-            AGDD2Geo.Builders += [ muonAGDDTool ]
-            if (flags.Detector.GeometrysTGC and flags.Detector.GeometryMM):
-                nswAGDDTool = NSWAGDDTool("NewSmallWheel", Locked=False)
-                nswAGDDTool.Volumes = ["NewSmallWheel"]
-                nswAGDDTool.DefaultDetector = "Muon"
-                AGDD2Geo.Builders += [ nswAGDDTool ]
-            acc.addService(AGDD2Geo)
+    ## Additional material in the muon system
+    AGDD2Geo = AGDDtoGeoSvc()
+    muonAGDDTool = MuonAGDDTool("MuonSpectrometer", BuildNSW=False)
+    AGDD2Geo.Builders += [ muonAGDDTool ]
+    if (flags.Detector.GeometrysTGC and flags.Detector.GeometryMM):
+        nswAGDDTool = NSWAGDDTool("NewSmallWheel", Locked=False)
+        nswAGDDTool.Volumes = ["NewSmallWheel"]
+        nswAGDDTool.DefaultDetector = "Muon"
+        AGDD2Geo.Builders += [ nswAGDDTool ]
+    #create=True is needed for the service to be initialised in the new style
+    acc.addService(AGDD2Geo, create=True)
+    
     # call fill cache of MuonDetectorTool such that all MdtReadoutElement caches are filled
     # already during initialize() -> this will increase memory -> needs to be measured
     detTool.FillCacheInitTime = 1
-- 
GitLab


From 58654f46cafb43d50c6870ada0332a6b3b9092a8 Mon Sep 17 00:00:00 2001
From: Anil Sonay <anil.sonay@cern.ch>
Date: Fri, 12 Jun 2020 08:47:19 +0000
Subject: [PATCH 210/266] Resolve ATR-21357 "L1topo histograming "

---
 .../L1TopoAlgorithms/DeltaEtaPhiIncl1.h       |   4 +
 .../L1TopoAlgorithms/DeltaEtaPhiIncl2.h       |   5 +-
 .../L1TopoAlgorithms/DeltaPhiIncl1.h          |   3 +
 .../DeltaRApproxBoxCutIncl1.h                 |   4 +
 .../DeltaRApproxBoxCutIncl2.h                 |   5 +-
 .../L1TopoAlgorithms/DeltaRSqrIncl1.h         |   6 +-
 .../L1TopoAlgorithms/DeltaRSqrIncl2.h         |   3 +-
 .../L1TopoAlgorithms/EtaPhiWindow.h           |   5 +
 .../L1TopoAlgorithms/ExclusiveJets.h          |  21 +--
 ...ve.h => InvariantMassDeltaPhiInclusive2.h} |  18 +-
 ...=> InvariantMassInclusiveDeltaRSqrIncl1.h} |  20 +--
 ...=> InvariantMassInclusiveDeltaRSqrIncl2.h} |  20 +--
 .../TransverseMassInclusive1.h                |   2 +
 .../Root/DeltaEtaPhiIncl1.cxx                 |  56 ++++--
 .../Root/DeltaEtaPhiIncl2.cxx                 |  48 ++++-
 .../L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx   |  56 +++++-
 .../L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx   |  59 +++---
 .../Root/DeltaRApproxBoxCutIncl1.cxx          |  30 +++-
 .../Root/DeltaRApproxBoxCutIncl2.cxx          |  30 +++-
 .../L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx  |  59 ++++--
 .../L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx  |  58 ++++--
 .../L1TopoAlgorithms/Root/EtaPhiWindow.cxx    |  36 +++-
 .../L1TopoAlgorithms/Root/ExclusiveJets.cxx   | 158 ++++++++--------
 ...xx => InvariantMassDeltaPhiInclusive2.cxx} |  72 ++++----
 ... InvariantMassInclusiveDeltaRSqrIncl1.cxx} |  59 +++---
 ... InvariantMassInclusiveDeltaRSqrIncl2.cxx} |  63 +++----
 .../Root/TransverseMassInclusive1.cxx         |  53 ++++--
 .../L1Topo/L1TopoCoreSim/CMakeLists.txt       |   5 +-
 .../L1Topo/L1TopoSimulation/CMakeLists.txt    |   2 +-
 .../Root/AthenaL1TopoHistSvc.cxx              | 150 ----------------
 .../share/L1TopoSimulationTest.py             |  28 ++-
 .../src/AthenaL1TopoHistSvc.cxx               | 170 ++++++++++++++++++
 .../AthenaL1TopoHistSvc.h                     |   0
 .../L1TopoSimulation/src/L1TopoSimulation.cxx |   2 +-
 .../src/test/L1TopoSimulationTest.cxx         |   2 +-
 .../python/L1/Config/TopoAlgoDef.py           |  22 +--
 .../python/L1/Config/TopoAlgoDefLegacy.py     |  22 +--
 37 files changed, 822 insertions(+), 534 deletions(-)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/{InvariantMassDeltaPhiInclusive.h => InvariantMassDeltaPhiInclusive2.h} (78%)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/{InvariantMassInclusive1DeltaRSqrIncl1.h => InvariantMassInclusiveDeltaRSqrIncl1.h} (73%)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/{InvariantMassInclusive2DeltaRSqrIncl2.h => InvariantMassInclusiveDeltaRSqrIncl2.h} (72%)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/{InvariantMassDeltaPhiInclusive.cxx => InvariantMassDeltaPhiInclusive2.cxx} (78%)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/{InvariantMassInclusive1DeltaRSqrIncl1.cxx => InvariantMassInclusiveDeltaRSqrIncl1.cxx} (79%)
 rename Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/{InvariantMassInclusive2DeltaRSqrIncl2.cxx => InvariantMassInclusiveDeltaRSqrIncl2.cxx} (75%)
 delete mode 100644 Trigger/TrigT1/L1Topo/L1TopoSimulation/Root/AthenaL1TopoHistSvc.cxx
 create mode 100644 Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.cxx
 rename Trigger/TrigT1/L1Topo/L1TopoSimulation/{L1TopoSimulation => src}/AthenaL1TopoHistSvc.h (100%)

diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl1.h
index 8d89ad81f8e4..a2c8c720b06e 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl1.h
@@ -11,6 +11,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
    class DeltaEtaPhiIncl1 : public DecisionAlg {
@@ -40,6 +42,8 @@ namespace TCS {
       parType_t      p_MinET1[3] = { 0,0,0 };
       parType_t      p_MinET2[3] = { 0,0,0 };
 
+      TH2 * m_histAccept[3] = {};
+      TH2 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl2.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl2.h
index 8508fc319d5e..eb4210f4c5b7 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl2.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaEtaPhiIncl2.h
@@ -11,6 +11,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
    class DeltaEtaPhiIncl2 : public DecisionAlg {
@@ -40,7 +42,8 @@ namespace TCS {
       parType_t      p_MinET1[3] = { 0,0,0 };
       parType_t      p_MinET2[3] = { 0,0,0 };
 
- 
+      TH2 * m_histAccept[3] = {};
+      TH2 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaPhiIncl1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaPhiIncl1.h
index b3707e2d65ef..ac91c479fc92 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaPhiIncl1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaPhiIncl1.h
@@ -37,6 +37,9 @@ namespace TCS {
       parType_t      p_DeltaPhiMax[2] = {0, 0};
       parType_t      p_MinET1[2] = { 0,0 };
       parType_t      p_MinET2[2] = { 0,0 };
+
+      TH1 * m_histAcceptDPhi2[2] = {};
+      TH1 * m_histRejectDPhi2[2] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h
index 3c963c0ab5e8..29909d87d60d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h
@@ -11,6 +11,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
    class DeltaRApproxBoxCutIncl1 : public DecisionAlg {
@@ -42,6 +44,8 @@ namespace TCS {
       parType_t      p_MinET1 = { 0 };
       parType_t      p_MinET2 = { 0 };
 
+      TH2 * m_histAccept[3] = {};
+      TH2 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h
index 70dde42b74f7..72a5340a2faa 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h
@@ -11,6 +11,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
    class DeltaRApproxBoxCutIncl2 : public DecisionAlg {
@@ -42,7 +44,8 @@ namespace TCS {
       parType_t      p_MinET1 = { 0 };
       parType_t      p_MinET2 = { 0 };
 
- 
+      TH2 * m_histAccept[3] = {};
+      TH2 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1.h
index 3d6907080560..ff0bb5a9e02d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1.h
@@ -11,6 +11,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
    class DeltaRSqrIncl1 : public DecisionAlg {
@@ -39,7 +41,9 @@ namespace TCS {
       parType_t      p_MinET1 = { 0 };
       parType_t      p_MinET2 = { 0 };
       parType_t      p_OneBarrel = { 0 };
-
+     
+      TH1 * m_histAccept[3] = {};
+      TH1 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl2.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl2.h
index f41d07a57a40..0d6a6d90163a 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl2.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl2.h
@@ -38,7 +38,8 @@ namespace TCS {
       parType_t      p_MinET1[3] = { 0,0,0 };
       parType_t      p_MinET2[3] = { 0,0,0 };
 
-
+      TH1 * m_histAccept[3] = {};
+      TH1 * m_histReject[3] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/EtaPhiWindow.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/EtaPhiWindow.h
index a35d60b79795..1052ac618e52 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/EtaPhiWindow.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/EtaPhiWindow.h
@@ -13,6 +13,8 @@
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
 /**
    @brief Select TOBs that fall in a given eta/phi region
@@ -43,6 +45,9 @@ private:
     parType_t      p_EtaMax = { 0 };
     parType_t      p_PhiMax = { 0 };
     parType_t      p_PhiMin = { 0 };
+
+    TH2 * m_histAccept[1] = {};
+    TH2 * m_histReject[1] = {};
 };
 
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/ExclusiveJets.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/ExclusiveJets.h
index 988642a4664a..f72a0c33d874 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/ExclusiveJets.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/ExclusiveJets.h
@@ -4,22 +4,17 @@
 //  ExclusiveJets.h
 //  TopoCore
 //  Created by Carlos Moreno based on InvariantMassInclusive1 by Joerg Stelzer on 11/16/12.
-
 #ifndef __TopoCore__ExclusiveJets__
 #define __TopoCore__ExclusiveJets__
-
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
-
 namespace TCS {
    
    class ExclusiveJets : public DecisionAlg {
    public:
       ExclusiveJets(const std::string & name);
       virtual ~ExclusiveJets();
-
       virtual StatusCode initialize() override final;
-
       virtual StatusCode processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                                   const std::vector<TCS::TOBArray *> & output,
                                   Decision & decison ) override final;
@@ -28,19 +23,21 @@ namespace TCS {
                                   const std::vector<TCS::TOBArray *> & output,
                                   Decision & decison ) override final;
       
-
    private:
-
       parType_t      p_NumberLeading1 = { 0 };
       parType_t      p_MinET1[6] = { 0 ,0,0,0,0,0};
       parType_t      p_XiMin[6] = { 0,0,0,0,0,0 };
       parType_t      p_XiMax[6] = { 0,0,0,0,0,0 };
-
-      TH1 * m_histAcceptExclusiveJets[6] = {};
-      TH1 * m_histRejectExclusiveJets[6] = {};
-
+      parType_t      p_ApplyEtaCut[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MinEta1[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MaxEta1[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MinEta2[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MaxEta2[6] = { 0,0,0,0,0,0 };
+      TH2F * m_histAcceptExclusiveJets[6] = {};
+      TH2F * m_histRejectExclusiveJets[6] = {};
+      TH2F * m_histAcceptEta1Eta2[6] = {};
+      TH2F * m_histRejectEta1Eta2[6] = {};
    };
    
 }
-
 #endif
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2.h
similarity index 78%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive.h
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2.h
index 451a05afd5e3..d2f8ad41c6e3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2.h
@@ -1,13 +1,13 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
-//  InvariantMassDeltaPhiInclusive.h
+//  InvariantMassDeltaPhiInclusive2.h
 //  TopoCore
 //  Based on InvariantMassInclusive2 and DeltaPhiIncl2 by Joerg Stelzer on 19/02/2019. For questions contact atlas-trig-l1topo-algcom@cern.ch. 
 //  TO DO size of the input list to be possbly refined 
 
-#ifndef __TopoCore__InvariantMassDeltaPhiInclusive__
-#define __TopoCore__InvariantMassDeltaPhiInclusive__
+#ifndef __TopoCore__InvariantMassDeltaPhiInclusive2__
+#define __TopoCore__InvariantMassDeltaPhiInclusive2__
 
 #include "L1TopoInterfaces/DecisionAlg.h"
 
@@ -15,10 +15,10 @@ class TH2;
 
 namespace TCS {
    
-   class InvariantMassDeltaPhiInclusive : public DecisionAlg {
+   class InvariantMassDeltaPhiInclusive2 : public DecisionAlg {
    public:
-      InvariantMassDeltaPhiInclusive(const std::string & name);
-      virtual ~InvariantMassDeltaPhiInclusive();
+      InvariantMassDeltaPhiInclusive2(const std::string & name);
+      virtual ~InvariantMassDeltaPhiInclusive2();
 
       virtual StatusCode initialize() override final;
  
@@ -48,10 +48,8 @@ namespace TCS {
       parType_t      p_DeltaPhiMin[6] = { 0,0,0,0,0,0 };
       parType_t      p_DeltaPhiMax[6] = { 0,0,0,0,0,0 };
 
-      TH1 * m_histAcceptM[6] = {};
-      TH1 * m_histRejectM[6] = {};
-      TH1 * m_histAcceptDPhi[6] = {};
-      TH1 * m_histRejectDPhi[6] = {};
+      TH2 * m_histAcceptM[6] = {};
+      TH2 * m_histRejectM[6] = {};
       TH2 * m_histAcceptEta1Eta2[6] = {};
       TH2 * m_histRejectEta1Eta2[6] = {};
    };
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive1DeltaRSqrIncl1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1.h
similarity index 73%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive1DeltaRSqrIncl1.h
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1.h
index 48bd2bb07409..ef091aaf6408 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive1DeltaRSqrIncl1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1.h
@@ -1,22 +1,24 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
-//  InvariantMassInclusive1DeltaRSqrIncl1.h
+//  InvariantMassInclusiveDeltaRSqrIncl1.h
 //  TopoCore
 //  Based on InvariantMassInclusive1 and DeltaRSqrIncl1 created by Joerg Stelzer and V Sorin. 01/03/2019.
 //  For questions contact atlas-trig-l1topo-algcom@cern.ch. 
 
-#ifndef __TopoCore__InvariantMassInclusive1DeltaRSqrIncl1__
-#define __TopoCore__InvariantMassInclusive1DeltaRSqrIncl1__
+#ifndef __TopoCore__InvariantMassInclusiveDeltaRSqrIncl1__
+#define __TopoCore__InvariantMassInclusiveDeltaRSqrIncl1__
 
 #include "L1TopoInterfaces/DecisionAlg.h"
 
+class TH2;
+
 namespace TCS {
    
-   class InvariantMassInclusive1DeltaRSqrIncl1 : public DecisionAlg {
+   class InvariantMassInclusiveDeltaRSqrIncl1 : public DecisionAlg {
    public:
-      InvariantMassInclusive1DeltaRSqrIncl1(const std::string & name);
-      virtual ~InvariantMassInclusive1DeltaRSqrIncl1();
+      InvariantMassInclusiveDeltaRSqrIncl1(const std::string & name);
+      virtual ~InvariantMassInclusiveDeltaRSqrIncl1();
 
       virtual StatusCode initialize() override final;
 
@@ -41,10 +43,8 @@ namespace TCS {
       parType_t      p_DeltaRMin[6] = { 0,0,0,0,0,0 };
       parType_t      p_DeltaRMax[6] = { 0,0,0,0,0,0 };
 
-      TH1 * m_histAcceptM[6] = {};
-      TH1 * m_histRejectM[6] = {};
-      TH1 * m_histAcceptDR[6] = {};
-      TH1 * m_histRejectDR[6] = {};
+      TH2 * m_histAcceptM[6] = {};
+      TH2 * m_histRejectM[6] = {};
 
    };
    
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive2DeltaRSqrIncl2.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl2.h
similarity index 72%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive2DeltaRSqrIncl2.h
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl2.h
index 06d945f2e2d4..6d26d069e1bc 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusive2DeltaRSqrIncl2.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl2.h
@@ -1,13 +1,13 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
-//  InvariantMassInclusive2DeltaRSqrIncl2.h
+//  InvariantMassInclusiveDeltaRSqrIncl2.h
 //  TopoCore
 //  Based on InvariantMassInclusive2 and DeltaRSqrIncl2 created by Joerg Stelzer and V Sorin. 01/03/2019/
 //  For questions contact atlas-trig-l1topo-algcom@cern.ch. 
 
-#ifndef __TopoCore__InvariantMassInclusive2DeltaRSqrIncl2__
-#define __TopoCore__InvariantMassInclusive2DeltaRSqrIncl2__
+#ifndef __TopoCore__InvariantMassInclusiveDeltaRSqrIncl2__
+#define __TopoCore__InvariantMassInclusiveDeltaRSqrIncl2__
 
 #include "L1TopoInterfaces/DecisionAlg.h"
 
@@ -15,10 +15,10 @@ class TH2;
 
 namespace TCS {
    
-   class InvariantMassInclusive2DeltaRSqrIncl2 : public DecisionAlg {
+   class InvariantMassInclusiveDeltaRSqrIncl2 : public DecisionAlg {
    public:
-      InvariantMassInclusive2DeltaRSqrIncl2(const std::string & name);
-      virtual ~InvariantMassInclusive2DeltaRSqrIncl2();
+      InvariantMassInclusiveDeltaRSqrIncl2(const std::string & name);
+      virtual ~InvariantMassInclusiveDeltaRSqrIncl2();
 
       virtual StatusCode initialize() override final;
  
@@ -48,12 +48,8 @@ namespace TCS {
       parType_t      p_DeltaRMin[6] = { 0,0,0,0,0,0 };
       parType_t      p_DeltaRMax[6] = { 0,0,0,0,0,0 };
 
-      TH1 * m_histAcceptM[6] = {};
-      TH1 * m_histRejectM[6] = {};
-      TH1 * m_histAcceptDR[6] = {};
-      TH1 * m_histRejectDR[6] = {};
-      TH2 * m_histAcceptEta1Eta2[6] = {};
-      TH2 * m_histRejectEta1Eta2[6] = {};
+      TH2 * m_histAcceptM[6] = {};
+      TH2 * m_histRejectM[6] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/TransverseMassInclusive1.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/TransverseMassInclusive1.h
index 106205fa92e1..a0a58c9294ff 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/TransverseMassInclusive1.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/TransverseMassInclusive1.h
@@ -36,6 +36,8 @@ namespace TCS {
       parType_t      p_MinET1[6] = { 0,0,0,0,0,0 };
       parType_t      p_MinET2[6] = { 0,0,0,0,0,0 };
 
+      TH1 * m_histAcceptM[6] = {};
+      TH1 * m_histRejectM[6] = {};
    };
    
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
index cac99d09e2f9..e42160376316 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
@@ -12,6 +12,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaEtaPhiIncl1.h"
 #include "L1TopoCommon/Exception.h"
@@ -81,7 +83,19 @@ TCS::DeltaEtaPhiIncl1::initialize() {
    TRG_MSG_INFO("NumberLeading1 : " << p_NumberLeading1);  // note that the reading of generic parameters doesn't work yet
    TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);
    TRG_MSG_INFO("number output : " << numberOutputBits());
-   
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int EtaPhi_bin=100;
+       float EtaPhi_min=0;
+       float EtaPhi_max=70;
+       // eta2 vs. eta1
+       snprintf(hname_accept, buf_len, "Accept_DeltaEtaPhiIncl1_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaEtaPhiIncl1_bit%d", i);
+       registerHist(m_histAccept[i] = new TH2F(hname_accept, hname_accept, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+       registerHist(m_histReject[i] = new TH2F(hname_reject, hname_reject, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+   }   
    return StatusCode::SUCCESS;
 }
 
@@ -90,7 +104,7 @@ TCS::DeltaEtaPhiIncl1::initialize() {
 TCS::StatusCode
 TCS::DeltaEtaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 1) {
        TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -118,11 +132,19 @@ TCS::DeltaEtaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const
                        if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                        if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                        accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i];
-                       if( accept ) {
-                           decison.setBit(i, true);  
-                           output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                       }
-                       msgss << (accept?"pass":"fail") << "|";
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
+                        if( accept ) {
+			  decision.setBit(i, true);  
+			  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+			}
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaEtaPhiIncl1 alg bit" << i << (accept?" pass":" fail") << "|";
                    }
                    TRG_MSG_DEBUG(msgss.str());
                }
@@ -136,7 +158,7 @@ TCS::DeltaEtaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const
 TCS::StatusCode
 TCS::DeltaEtaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 1) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -168,12 +190,20 @@ TCS::DeltaEtaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input
                         if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                         if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                         accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i];
-                        if( accept ) {
-                            decison.setBit(i, true);  
-                            output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
+			if( accept ) {
+			  decision.setBit(i, true);  
+			  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
-                    }
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaEtaPhiIncl1 alg bit" << i << (accept?" pass":" fail") << "|";
+                     }
                     TRG_MSG_DEBUG(msgss.str());
                 }
             }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
index 01458d4c54d5..a78706b0d031 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
@@ -11,6 +11,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaEtaPhiIncl2.h"
 #include "L1TopoCommon/Exception.h"
@@ -82,7 +84,19 @@ TCS::DeltaEtaPhiIncl2::initialize() {
    TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);
 
    TRG_MSG_INFO("number output : " << numberOutputBits());
-   
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int EtaPhi_bin=100;
+       float EtaPhi_min=0;
+       float EtaPhi_max=70;
+       // eta2 vs. eta1
+       snprintf(hname_accept, buf_len, "Accept_DeltaEtaPhiIncl2_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaEtaPhiIncl2_bit%d", i);
+       registerHist(m_histAccept[i] = new TH2F(hname_accept, hname_accept, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+       registerHist(m_histReject[i] = new TH2F(hname_reject, hname_reject, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+   }      
    return StatusCode::SUCCESS;
 }
 
@@ -91,7 +105,7 @@ TCS::DeltaEtaPhiIncl2::initialize() {
 TCS::StatusCode
 TCS::DeltaEtaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 2) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -117,11 +131,19 @@ TCS::DeltaEtaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i] ) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i]; 
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);  
-                            output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+			  decision.setBit(i, true);  
+			  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?" pass":" fail") << "|";
                     }
                     TRG_MSG_DEBUG(msgss.str());
                 }
@@ -136,7 +158,7 @@ TCS::DeltaEtaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
 TCS::StatusCode
 TCS::DeltaEtaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 2) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -162,11 +184,19 @@ TCS::DeltaEtaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i] ) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i]; 
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);  
-                            output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+			  decision.setBit(i, true);  
+			  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?" pass":" fail") << "|";
                     }
                     TRG_MSG_DEBUG(msgss.str());
                 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
index af1988ba1298..c2f3500f901d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
@@ -12,6 +12,7 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
 
 #include "L1TopoAlgorithms/DeltaPhiIncl1.h"
 #include "L1TopoCommon/Exception.h"
@@ -70,6 +71,27 @@ TCS::DeltaPhiIncl1::initialize() {
    TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);
    TRG_MSG_INFO("number output : " << numberOutputBits());
    
+   // create strings for histogram names
+   std::vector<std::ostringstream> MyAcceptHist(numberOutputBits());
+   std::vector<std::ostringstream> MyRejectHist(numberOutputBits());
+   int dphi_bin=100;
+   float dphi_min=0;
+   float dphi_max=3.4;
+   
+   for (unsigned int i=0;i<numberOutputBits();i++) {
+     MyAcceptHist[i] << "Accept" << p_DeltaPhiMin[i] << "DPHI" << p_DeltaPhiMax[i];
+     MyRejectHist[i] << "Reject" << p_DeltaPhiMin[i] << "DPHI" << p_DeltaPhiMax[i];
+   }
+
+
+   for (unsigned int i=0; i<numberOutputBits();i++) {
+
+     const std::string& MyTitle1 = MyAcceptHist[i].str();
+     const std::string& MyTitle2 = MyRejectHist[i].str();
+     
+     registerHist(m_histAcceptDPhi2[i] = new TH1F(MyTitle1.c_str(),MyTitle1.c_str(),dphi_bin,dphi_min,dphi_max));
+     registerHist(m_histRejectDPhi2[i] = new TH1F(MyTitle2.c_str(),MyTitle2.c_str(),dphi_bin,dphi_min,dphi_max));
+   }
    return StatusCode::SUCCESS;
 }
 
@@ -78,7 +100,7 @@ TCS::DeltaPhiIncl1::initialize() {
 TCS::StatusCode
 TCS::DeltaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 1) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -103,13 +125,21 @@ TCS::DeltaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                         if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                         if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                         accept = deltaPhi >= p_DeltaPhiMin[i] && deltaPhi <= p_DeltaPhiMax[i];
+ 			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);  
+                            decision.setBit(i, true);  
                             output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+ 			if(fillAccept and not alreadyFilled) {
+			  fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
+			} else if(fillReject) {
+			  fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
+			}
+                        TRG_MSG_DEBUG("DeltaPhiIncl1 = " << deltaPhi << " -> " 
+                                      << (accept?"pass":"fail"));
                     }
-                    TRG_MSG_DEBUG(msgss.str());
                 }
             }
     } else {
@@ -121,7 +151,7 @@ TCS::DeltaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
 TCS::StatusCode
 TCS::DeltaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 1) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -149,13 +179,21 @@ TCS::DeltaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                         if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                         if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                         accept = deltaPhi >= p_DeltaPhiMin[i] && deltaPhi <= p_DeltaPhiMax[i];
-                        if( accept ) {
-                            decison.setBit(i, true);  
+ 			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
+			if( accept ) {
+                            decision.setBit(i, true);  
                             output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+ 			if(fillAccept and not alreadyFilled) {
+			  fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
+			} else if(fillReject) {
+			  fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
+			}
+                        TRG_MSG_DEBUG("DeltaPhiIncl1 = " << deltaPhi << " -> " 
+                                      << (accept?"pass":"fail"));
                     }
-                    TRG_MSG_DEBUG(msgss.str());
                 }
             }
     } else {
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
index f1b26f2ad21b..9977142d1cd9 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
@@ -74,6 +74,9 @@ TCS::DeltaPhiIncl2::initialize() {
    // create strings for histogram names
    std::vector<std::ostringstream> MyAcceptHist(numberOutputBits());
    std::vector<std::ostringstream> MyRejectHist(numberOutputBits());
+   int dphi_bin=100;
+   float dphi_min=0;
+   float dphi_max=3.4;
    
    for (unsigned int i=0;i<numberOutputBits();i++) {
      MyAcceptHist[i] << "Accept" << p_DeltaPhiMin[i] << "DPHI" << p_DeltaPhiMax[i];
@@ -86,8 +89,8 @@ TCS::DeltaPhiIncl2::initialize() {
      const std::string& MyTitle1 = MyAcceptHist[i].str();
      const std::string& MyTitle2 = MyRejectHist[i].str();
      
-     registerHist(m_histAcceptDPhi2[i] = new TH1F(MyTitle1.c_str(),MyTitle1.c_str(),100,0,3.4));
-     registerHist(m_histRejectDPhi2[i] = new TH1F(MyTitle2.c_str(),MyTitle2.c_str(),100,0,3.4));
+     registerHist(m_histAcceptDPhi2[i] = new TH1F(MyTitle1.c_str(),MyTitle1.c_str(),dphi_bin,dphi_min,dphi_max));
+     registerHist(m_histRejectDPhi2[i] = new TH1F(MyTitle2.c_str(),MyTitle2.c_str(),dphi_bin,dphi_min,dphi_max));
    }
    return StatusCode::SUCCESS;
 }
@@ -97,7 +100,7 @@ TCS::DeltaPhiIncl2::initialize() {
 TCS::StatusCode
 TCS::DeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if( input.size() == 2) {
         std::vector<bool> iaccept (numberOutputBits());
@@ -115,21 +118,19 @@ TCS::DeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = deltaPhi >= p_DeltaPhiMin[i] && deltaPhi <= p_DeltaPhiMax[i];
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);
+                            decision.setBit(i, true);
                             output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
-                            //if (i == 0) {
-                            if (!iaccept[i]) {
-                                iaccept[i]=1;
-                                fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
-                            }
-                            //}
-                        }
-                        else {
-                            //if (i==0)
-                            fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
-                        }
-                        TRG_MSG_DEBUG("DeltaPhi = " << deltaPhi << " -> " 
+			}
+ 			if(fillAccept and not alreadyFilled) {
+			  fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
+			} else if(fillReject) {
+			  fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
+			}
+                       TRG_MSG_DEBUG("DeltaPhiIncl2 = " << deltaPhi << " -> " 
                                       << (accept?"pass":"fail"));
                     }
                 }
@@ -144,7 +145,7 @@ TCS::DeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
 TCS::StatusCode
 TCS::DeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if( input.size() == 2) {
         std::vector<bool> iaccept (numberOutputBits());
@@ -162,21 +163,19 @@ TCS::DeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = deltaPhi >= p_DeltaPhiMin[i] && deltaPhi <= p_DeltaPhiMax[i];
+ 			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);
+                            decision.setBit(i, true);
                             output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
-                            //if (i == 0) {
-                            if (!iaccept[i]) {
-                                iaccept[i]=1;
-                                fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
-                            }
-                            //}
-                        }
-                        else {
-                            //if (i==0)
-                            fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
-                        }
-                        TRG_MSG_DEBUG("DeltaPhi = " << deltaPhi << " -> " 
+			}
+ 			if(fillAccept and not alreadyFilled) {
+			  fillHist1D(m_histAcceptDPhi2[i]->GetName(),deltaPhi);
+			} else if(fillReject) {
+			  fillHist1D(m_histRejectDPhi2[i]->GetName(),deltaPhi);
+			}
+                        TRG_MSG_DEBUG("DeltaPhiIncl2 = " << deltaPhi << " -> " 
                                       << (accept?"pass":"fail"));
                     }
                 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx
index 75854ce226cd..fbf50fdc782f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx
@@ -12,6 +12,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h"
 #include "L1TopoCommon/Exception.h"
@@ -94,7 +96,19 @@ TCS::DeltaRApproxBoxCutIncl1::initialize() {
    TRG_MSG_INFO("MinET1          : " << p_MinET1);
    TRG_MSG_INFO("MinET2          : " << p_MinET2);
    TRG_MSG_INFO("number output : " << numberOutputBits());
-   
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int EtaPhi_bin=100;
+       float EtaPhi_min=0;
+       float EtaPhi_max=70;
+       // eta2 vs. eta1
+       snprintf(hname_accept, buf_len, "Accept_DeltaRApproxBoxCutIncl1_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaRApproxBoxCutIncl1_bit%d", i);
+       registerHist(m_histAccept[i] = new TH2F(hname_accept, hname_accept, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+       registerHist(m_histReject[i] = new TH2F(hname_reject, hname_reject, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+   }   
    return StatusCode::SUCCESS;
 }
 
@@ -112,7 +126,7 @@ TCS::DeltaRApproxBoxCutIncl1::processBitCorrect( const std::vector<TCS::TOBArray
 TCS::StatusCode
 TCS::DeltaRApproxBoxCutIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                                        const std::vector<TCS::TOBArray *> & output,
-                                       Decision & decison )
+                                       Decision & decision )
 {
     if(input.size() == 1) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -144,11 +158,19 @@ TCS::DeltaRApproxBoxCutIncl1::process( const std::vector<TCS::TOBArray const *>
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                         bool accept = false;
                         accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i];
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);  
+                            decision.setBit(i, true);  
                             output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaRApproxBoxCutIncl1 alg bit" << i << (accept?" pass":" fail") << "|";
                     }
                     TRG_MSG_DEBUG(msgss.str());
                 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx
index 2569d6c767b5..e1deabde6e3f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx
@@ -11,6 +11,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h"
 #include "L1TopoCommon/Exception.h"
@@ -96,7 +98,19 @@ TCS::DeltaRApproxBoxCutIncl2::initialize() {
    TRG_MSG_INFO("MinET2          : " << p_MinET2);
 
    TRG_MSG_INFO("number output : " << numberOutputBits());
-   
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int EtaPhi_bin=100;
+       float EtaPhi_min=0;
+       float EtaPhi_max=70;
+       // eta2 vs. eta1
+       snprintf(hname_accept, buf_len, "Accept_DeltaRApproxBoxCutIncl2_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaRApproxBoxCutIncl2_bit%d", i);
+       registerHist(m_histAccept[i] = new TH2F(hname_accept, hname_accept, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+       registerHist(m_histReject[i] = new TH2F(hname_reject, hname_reject, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+   }      
    return StatusCode::SUCCESS;
 }
 
@@ -114,7 +128,7 @@ TCS::DeltaRApproxBoxCutIncl2::processBitCorrect( const std::vector<TCS::TOBArray
 TCS::StatusCode
 TCS::DeltaRApproxBoxCutIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 2) {
         TRG_MSG_DEBUG("input size     : " << input[0]->size());
@@ -144,11 +158,19 @@ TCS::DeltaRApproxBoxCutIncl2::process( const std::vector<TCS::TOBArray const *>
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                         bool accept = false;
                         accept = ( deltaEta >= p_DeltaEtaMin[i] ||  deltaPhi >= p_DeltaPhiMin[i] ) && deltaPhi <= p_DeltaPhiMax[i] && deltaEta <= p_DeltaEtaMax[i]; 
+			const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+			const bool fillReject = fillHistos() and not fillAccept;
+			const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
-                            decison.setBit(i, true);  
+                            decision.setBit(i, true);  
                             output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                         }
-                        msgss << (accept?"pass":"fail") << "|";
+			if(fillAccept and not alreadyFilled) {
+			  fillHist2D(m_histAccept[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			} else if(fillReject) {
+			  fillHist2D(m_histReject[i]->GetName(),(float)deltaEta,(float)deltaPhi);
+			}
+                        msgss << "DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?" pass":" fail") << "|";
                     }
                     TRG_MSG_DEBUG(msgss.str());
                 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
index 7ad084a1dae5..24afe630d30d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
@@ -11,6 +11,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaRSqrIncl1.h"
 #include "L1TopoCommon/Exception.h"
@@ -74,7 +76,16 @@ TCS::DeltaRSqrIncl1::initialize() {
    TRG_MSG_INFO("MinET2          : " << p_MinET2);
 
    TRG_MSG_INFO("number output : " << numberOutputBits());
- 
+   for (unsigned int i=0; i<numberOutputBits();i++) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int deltaR_max = sqrt(p_DeltaRMax[i]);
+       // mass
+       snprintf(hname_accept, buf_len, "Accept_DeltaRSqrIncl1_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaRSqrIncl1_bit%d", i);
+       registerHist(m_histAccept[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*deltaR_max));
+       registerHist(m_histReject[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*deltaR_max));
+   }
    return StatusCode::SUCCESS;
 }
 
@@ -83,7 +94,7 @@ TCS::DeltaRSqrIncl1::initialize() {
 TCS::StatusCode
 TCS::DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if(input.size() == 1) {
@@ -103,13 +114,21 @@ TCS::DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                   // DeltaR2 cuts
                   unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                   for(unsigned int i=0; i<numberOutputBits(); ++i) {
-                      bool accept = false;
-                      accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
-                      if( accept ) {
-                          decison.setBit(i, true);  
-                          output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                      }
-                      TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
+		    bool accept = false;
+		    accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
+		    const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		    const bool fillReject = fillHistos() and not fillAccept;
+		    const bool alreadyFilled = decision.bit(i);
+		    if( accept ) {
+		      decision.setBit(i, true);  
+		      output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+		    }
+		    if(fillAccept and not alreadyFilled) {
+		      fillHist1D(m_histAccept[i]->GetName(),sqrt((float)deltaR2));
+		    } else if(fillReject) {
+		      fillHist1D(m_histReject[i]->GetName(),sqrt((float)deltaR2));
+		    }
+		    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
                   }
               }
           }
@@ -122,7 +141,7 @@ TCS::DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
 TCS::StatusCode
 TCS::DeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if(input.size() == 1) {
         for( TOBArray::const_iterator tob1 = input[0]->begin(); 
@@ -141,13 +160,21 @@ TCS::DeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                     // DeltaR2 cuts
                     unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
-                    bool accept = false;
-                    accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
-                    if( accept ) {
-                        decison.setBit(i, true);  
+		      bool accept = false;
+		      accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
+		      const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		      const bool fillReject = fillHistos() and not fillAccept;
+		      const bool alreadyFilled = decision.bit(i);
+		      if( accept ) {
+                        decision.setBit(i, true);  
                         output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                    }
-                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
+		      }
+		      if(fillAccept and not alreadyFilled) {
+			fillHist1D(m_histAccept[i]->GetName(),sqrt((float)deltaR2));
+		      } else if(fillReject) {
+			fillHist1D(m_histReject[i]->GetName(),sqrt((float)deltaR2));
+		      }
+		      TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
                     }
                 }
             }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
index ab193155c7cb..ee55070db2f3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
@@ -11,6 +11,8 @@
 **********************************/
 
 #include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
 
 #include "L1TopoAlgorithms/DeltaRSqrIncl2.h"
 #include "L1TopoCommon/Exception.h"
@@ -74,8 +76,16 @@ TCS::DeltaRSqrIncl2::initialize() {
    TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);  
 
    TRG_MSG_INFO("number output : " << numberOutputBits());
-
-   
+   for (unsigned int i=0; i<numberOutputBits();i++) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int deltaR_max = sqrt(p_DeltaRMax[i]);
+       // mass
+       snprintf(hname_accept, buf_len, "Accept_DeltaRSqrIncl2_bit%d", i);
+       snprintf(hname_reject, buf_len, "Reject_DeltaRSqrIncl2_bit%d", i);
+       registerHist(m_histAccept[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*deltaR_max));
+       registerHist(m_histReject[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*deltaR_max));
+   }   
    return StatusCode::SUCCESS;
 }
 
@@ -83,7 +93,7 @@ TCS::DeltaRSqrIncl2::initialize() {
 TCS::StatusCode
 TCS::DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                               const std::vector<TCS::TOBArray *> & output,
-                              Decision & decison )
+                              Decision & decision )
 {
 
    if( input.size() == 2) {
@@ -103,10 +113,18 @@ TCS::DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                    if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                    if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                    accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
+		   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		   const bool fillReject = fillHistos() and not fillAccept;
+		   const bool alreadyFilled = decision.bit(i);
                    if( accept ) {
-                       decison.setBit(i, true);
-                       output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
+		     decision.setBit(i, true);
+		     output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
                    }
+		   if(fillAccept and not alreadyFilled) {
+		     fillHist1D(m_histAccept[i]->GetName(),sqrt((float)deltaR2));
+		   } else if(fillReject) {
+		     fillHist1D(m_histReject[i]->GetName(),sqrt((float)deltaR2));
+		   }
                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
                  }
              }
@@ -120,7 +138,7 @@ TCS::DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
 TCS::StatusCode
 TCS::DeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                               const std::vector<TCS::TOBArray *> & output,
-                              Decision & decison )
+                              Decision & decision )
 {
 
    if( input.size() == 2) {
@@ -134,22 +152,28 @@ TCS::DeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input,
             for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); 
                  tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                  ++tob2) {
-
-
                // test DeltaR2Min, DeltaR2Max
                unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
 
                TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", deltaR2 = " << deltaR2);
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
-                   bool accept = false;
-               if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
-               if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
-               accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
-               if( accept ) {
-                   decison.setBit(i, true);
-                   output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
-               }
-               TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
+		 bool accept = false;
+		 if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
+		 if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
+		 accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
+		 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		 const bool fillReject = fillHistos() and not fillAccept;
+		 const bool alreadyFilled = decision.bit(i);
+		 if( accept ) {
+		   decision.setBit(i, true);
+		   output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
+		 }
+		 if(fillAccept and not alreadyFilled) {
+		   fillHist1D(m_histAccept[i]->GetName(),sqrt((float)deltaR2));
+		 } else if(fillReject) {
+		   fillHist1D(m_histReject[i]->GetName(),sqrt((float)deltaR2));
+		 }
+		 TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
                }
             }
          }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx
index 61742c067ee3..da1cfb5169d7 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx
@@ -11,6 +11,9 @@
 
 #include <cmath>
 #include <iterator>
+//
+#include "TH1F.h"
+#include "TH2F.h"
 
 REGISTER_ALG_TCS(EtaPhiWindow)
 
@@ -58,7 +61,19 @@ TCS::EtaPhiWindow::initialize()
     TRG_MSG_INFO("PhiMin   : "<<p_PhiMin);
     TRG_MSG_INFO("PhiMax   : "<<p_PhiMax);
     TRG_MSG_INFO("number of output bits : "<<numberOutputBits());
-
+    // book histograms
+    for(unsigned int i=0; i<numberOutputBits(); ++i) {
+      const int buf_len = 512;
+      char hname_accept[buf_len], hname_reject[buf_len];
+      int EtaPhi_bin=100;
+      float EtaPhi_min=-50;
+      float EtaPhi_max=50;
+      // eta2 vs. eta1
+      snprintf(hname_accept, buf_len, "Accept_EtaPhiWindow_bit%d", i);
+      snprintf(hname_reject, buf_len, "Reject_EtaPhiWindow_bit%d", i);
+      registerHist(m_histAccept[i] = new TH2F(hname_accept, hname_accept, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+      registerHist(m_histReject[i] = new TH2F(hname_reject, hname_reject, EtaPhi_bin, EtaPhi_min, EtaPhi_max, EtaPhi_bin, EtaPhi_min, EtaPhi_max));
+    }
     return StatusCode::SUCCESS;
 }
 //----------------------------------------------------------
@@ -83,8 +98,15 @@ TCS::EtaPhiWindow::processBitCorrect(const std::vector<TCS::TOBArray const *> &i
                 if( (int)parType_t((*tob1)->phi()) <  (int)p_PhiMin ) continue;
                 if( (int)parType_t((*tob1)->phi()) >= (int)p_PhiMax ) continue;
                 accept = true;
+		const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(0) : accept);
+		const bool fillReject = fillHistos() and not fillAccept;
+		const bool alreadyFilled = decision.bit(0);
                 output[0]->push_back(TCS::CompositeTOB(*tob1));
-
+		if(fillAccept and not alreadyFilled) {
+		  fillHist2D(m_histAccept[0]->GetName(),(float)(*tob1)->eta(),(float)(*tob1)->phi());
+		} else if(fillReject) {
+		  fillHist2D(m_histReject[0]->GetName(),(float)(*tob1)->eta(),(float)(*tob1)->phi());
+		}
                 TRG_MSG_DEBUG("TOB "<<iTob
                               <<" ET = "<<(*tob1)->Et()
                               <<" Eta = "<<(*tob1)->eta()
@@ -117,8 +139,16 @@ TCS::EtaPhiWindow::process(const std::vector<TCS::TOBArray const *> &input,
             if( (int)parType_t((*tob1)->phi()) <  (int)p_PhiMin ) continue;
             if( (int)parType_t((*tob1)->phi()) >= (int)p_PhiMax ) continue;
             accept = true;
+	    const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(0) : accept);
+	    const bool fillReject = fillHistos() and not fillAccept;
+	    const bool alreadyFilled = decision.bit(0);
             output[0]->push_back(TCS::CompositeTOB(*tob1));
-            TRG_MSG_DEBUG("TOB "<<iTob
+	    if(fillAccept and not alreadyFilled) {
+	      fillHist2D(m_histAccept[0]->GetName(),(float)(*tob1)->eta(),(float)(*tob1)->phi());
+	    } else if(fillReject) {
+	      fillHist2D(m_histReject[0]->GetName(),(float)(*tob1)->eta(),(float)(*tob1)->phi());
+	    }
+             TRG_MSG_DEBUG("TOB "<<iTob
                           <<" ET = "<<(*tob1)->Et()
                           <<" Eta = "<<(*tob1)->eta()
                           <<" phi = "<<(*tob1)->phi());
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx
index 3623816bb2c8..31341667e561 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx
@@ -11,7 +11,6 @@
  * @param NumberLeading 
  *
 **********************************/
-
 #include <cmath>
 #include <string>
 #include <iostream>
@@ -19,7 +18,6 @@
 #include <vector>
 #include "TH1F.h"
 #include "TH2F.h"
-
 #include "L1TopoAlgorithms/ExclusiveJets.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
@@ -28,43 +26,29 @@
 #include "L1TopoSimulationUtils/Trigo.h"
 #include "L1TopoSimulationUtils/Hyperbolic.h"
 #include "L1TopoSimulationUtils/Kinematics.h"
-
 //
-
 REGISTER_ALG_TCS(ExclusiveJets)
-
 using namespace std;
-
 TCS::ExclusiveJets::ExclusiveJets(const string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 3);
    defineParameter("MaxTob", 0); 
    defineParameter("NumResultBits", 6);
-   defineParameter("MinXi",  0, 0);
-   defineParameter("MaxXi", 999, 0);
-   defineParameter("MinXi",  0, 1);
-   defineParameter("MaxXi",  999, 1);
-   defineParameter("MinXi", 0, 2);
-   defineParameter("MaxXi", 999, 2);
-   defineParameter("MinXi", 0, 3);
-   defineParameter("MaxXi", 999, 3);
-   defineParameter("MinXi", 0, 4);
-   defineParameter("MaxXi", 999, 4);
-   defineParameter("MinXi", 0, 5);
-   defineParameter("MaxXi", 999, 5);
-   defineParameter("MinET1",0,0);
-   defineParameter("MinET1",0,1);
-   defineParameter("MinET1",0,2);
-   defineParameter("MinET1",0,3);
-   defineParameter("MinET1",0,4);
-   defineParameter("MinET1",0,5);
- 
    setNumberOutputBits(6);
-}
-
-TCS::ExclusiveJets::~ExclusiveJets(){}
 
+   for (unsigned int i=0;i<numberOutputBits();i++){
+     defineParameter("MinXi",  0, i);
+     defineParameter("MaxXi", 999, i);
+     defineParameter("MinET1",0,i);
+     defineParameter("ApplyEtaCut",0,i);
+     defineParameter("MinEta1",0,i);
+     defineParameter("MaxEta1",999,i);
+     defineParameter("MinEta2",0,i);
+     defineParameter("MaxEta2",999,i);
+   }
 
+}
+TCS::ExclusiveJets::~ExclusiveJets(){}
 TCS::StatusCode
 TCS::ExclusiveJets::initialize() {
   if(parameter("MaxTob").value() > 0) {
@@ -72,47 +56,63 @@ TCS::ExclusiveJets::initialize() {
    } else {
       p_NumberLeading1 = parameter("InputWidth").value();
    }
-
    for(unsigned int i=0; i<numberOutputBits(); ++i) {
-      p_XiMin[i] = parameter("MinXi", i).value();
-      p_XiMax[i] = parameter("MaxXi", i).value();
-   
-      p_MinET1[i] = parameter("MinET1",i).value();
+     p_XiMin[i] = parameter("MinXi", i).value();
+     p_XiMax[i] = parameter("MaxXi", i).value();
+     
+     p_MinET1[i] = parameter("MinET1",i).value();
+     
+     p_ApplyEtaCut[i] = parameter("ApplyEtaCut",i).value();
+     p_MinEta1[i]     = parameter("MinEta1"    ,i).value();
+     p_MaxEta1[i]     = parameter("MaxEta1"    ,i).value();
+     p_MinEta2[i]     = parameter("MinEta2"    ,i).value();
+     p_MaxEta2[i]     = parameter("MaxEta2"    ,i).value();
    }
    TRG_MSG_INFO("NumberLeading1 : " << p_NumberLeading1);
-
    for(unsigned int i=0; i<numberOutputBits(); ++i) {
-      TRG_MSG_INFO("XiMin   : " << p_XiMin[i]);
-      TRG_MSG_INFO("XiMax   : " << p_XiMax[i]);
+     TRG_MSG_INFO("XiMin   : " << p_XiMin[i]);
+     TRG_MSG_INFO("XiMax   : " << p_XiMax[i]);
+   
+     TRG_MSG_INFO("MinET1          : " << p_MinET1[i]);
+     
+     TRG_MSG_INFO("ApplyEtaCut : "<<p_ApplyEtaCut[i] );
+     
+     TRG_MSG_INFO("MinEta1     : "<<p_MinEta1[i]     );
+     TRG_MSG_INFO("MaxEta1     : "<<p_MaxEta1[i]     );
+     TRG_MSG_INFO("MinEta2     : "<<p_MinEta2[i]     );
+     TRG_MSG_INFO("MaxEta2     : "<<p_MaxEta2[i]     );
+  }
    
-      TRG_MSG_INFO("MinET1          : " << p_MinET1[i]);
-   }
    TRG_MSG_INFO("number output : " << numberOutputBits());
-
    for (unsigned int i=0; i<numberOutputBits();i++) {
        const int buf_len = 512;
        char hname_accept[buf_len], hname_reject[buf_len];
+       int eta1_min = p_MinEta1[i];
+       int eta1_max = p_MaxEta1[i];
+       int eta2_min = p_MinEta1[i];
+       int eta2_max = p_MaxEta1[i];
+       int et_min = p_MinET1[i];
        int xi_min = p_XiMin[i];
        int xi_max = p_XiMax[i];
        // mass histograms
-       snprintf(hname_accept, buf_len, "Accept_%s_%s_bit%d_%dM%d", name().c_str(), className().c_str(), i, xi_min, xi_max);
-       snprintf(hname_reject, buf_len, "Reject_%s_%s_bit%d_%dM%d", name().c_str(), className().c_str(), i, xi_min, xi_max);
-       registerHist(m_histAcceptExclusiveJets[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*xi_max));
-       registerHist(m_histRejectExclusiveJets[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*xi_max));
+       snprintf(hname_accept, buf_len, "Accept_%s-J%d-%dETA%d-%dETA%d_%s_bit%d_%dM%d", name().c_str(), et_min, eta1_min, eta1_max, eta2_min, eta2_max, className().c_str(), i, xi_min, xi_max);
+       snprintf(hname_reject, buf_len, "Reject_%s-J%d-%dETA%d-%dETA%d_%s_bit%d_%dM%d", name().c_str(), et_min, eta1_min, eta1_max, eta2_min, eta2_max, className().c_str(), i, xi_min, xi_max);
+       registerHist(m_histAcceptExclusiveJets[i] = new TH2F(hname_accept, hname_accept, 100, 0.0, 2*xi_max, 100, 0.0, 2*xi_max));
+       registerHist(m_histRejectExclusiveJets[i] = new TH2F(hname_reject, hname_reject, 100, 0.0, 2*xi_max, 100, 0.0, 2*xi_max));
+       // eta2 vs. eta1
+       snprintf(hname_accept, buf_len, "Accept_%s-J%d-%dETA%d-%dETA%d_%s_bit%d_%dM%d_Eta1Eta2", name().c_str(), et_min, eta1_min, eta1_max, eta2_min, eta2_max, className().c_str(), i, xi_min, xi_max);
+       snprintf(hname_reject, buf_len, "Reject_%s-J%d-%dETA%d-%dETA%d_%s_bit%d_%dM%d_Eta1Eta2", name().c_str(), et_min, eta1_min, eta1_max, eta2_min, eta2_max, className().c_str(), i, xi_min, xi_max);
+       registerHist(m_histAcceptEta1Eta2[i] = new TH2F(hname_accept, hname_accept, 100, -50.0, +50.0, 100, -50.0, +50.0));
+       registerHist(m_histRejectEta1Eta2[i] = new TH2F(hname_reject, hname_reject, 100, -50.0, +50.0, 100, -50.0, +50.0));
    }
-
  
    return StatusCode::SUCCESS;
 }
-
-
-
 TCS::StatusCode
 TCS::ExclusiveJets::processBitCorrect( const vector<TCS::TOBArray const *> & input,
 				       const vector<TCS::TOBArray *> & output,
 				       Decision & decision ) // Not really bitwise, keep the name for the future
 {
-
    if(input.size() == 1) {     
      
       for( TOBArray::const_iterator tob1 = input[0]->begin(); 
@@ -124,14 +124,23 @@ TCS::ExclusiveJets::processBitCorrect( const vector<TCS::TOBArray const *> & inp
             for( ;
                  tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading1;
                  ++tob2) {
-               
-	      double xi_1 = (1.4*parType_t((*tob1)->Et())+20.)*exp(parType_t((*tob1)->eta()))+(1.4*parType_t((*tob2)->Et())+20.)*exp(parType_t((*tob2)->eta()));
-	      double xi_2 = (1.4*parType_t((*tob1)->Et())+20.)*exp(-1.*parType_t((*tob1)->eta()))+(1.4*parType_t((*tob2)->Et())+20.)*exp(-1.*parType_t((*tob2)->eta()));
-
+	      
+	      //In the ticket ATR-17320, pT_offline were defined as A*pT_L1+B, where A=1.4 and B=20 for run2
+	      //A and B definition might change according to run3 configuration.               
+	      double xi_1 = (1.4*parType_t((*tob1)->Et())+20.)*exp((*tob1)->etaDouble())+(1.4*parType_t((*tob2)->Et())+20.)*exp((*tob2)->etaDouble());
+	      double xi_2 = (1.4*parType_t((*tob1)->Et())+20.)*exp(-1.*(*tob1)->etaDouble())+(1.4*parType_t((*tob2)->Et())+20.)*exp(-1.*(*tob2)->etaDouble());
+	      
+	      const int eta1 = (*tob1)->eta();
+	      const int eta2 = (*tob2)->eta();
+	      const unsigned int aeta1 = std::abs(eta1);
+	      const unsigned int aeta2 = std::abs(eta2);
 	      for(unsigned int i=0; i<numberOutputBits(); ++i) {
 		bool accept = false;
 		if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
 		if( parType_t((*tob2)->Et()) <= p_MinET1[i]) continue; // ET cut
+		if(p_ApplyEtaCut[i] &&
+		   ((aeta1 < p_MinEta1[i] || aeta1 > p_MaxEta1[i] ) ||
+		    (aeta2 < p_MinEta2[i] || aeta2 > p_MaxEta2[i] ) ))  continue;
 		
 		accept = (xi_1 >p_XiMin[i]) && (xi_1 < p_XiMax[i]) && (xi_2 > p_XiMin[i]) && (xi_2 < p_XiMax[i]); //
 		const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
@@ -142,31 +151,27 @@ TCS::ExclusiveJets::processBitCorrect( const vector<TCS::TOBArray const *> & inp
 		  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
 		}
 		if(fillAccept and not alreadyFilled) {
-		  fillHist1D(m_histAcceptExclusiveJets[i]->GetName(),xi_1);
-		} else if(fillReject) {
-		  fillHist1D(m_histRejectExclusiveJets[i]->GetName(),xi_1);
+		  fillHist2D(m_histAcceptExclusiveJets[i]->GetName(),xi_1,xi_2);
+		  fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
+		  } else if(fillReject) {
+		  fillHist2D(m_histRejectExclusiveJets[i]->GetName(),xi_1,xi_2);
+		  fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
 		}
-		TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " xi_1 = " << xi_1);
+		TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " xi_1 = " << xi_1);
 		
 	      }
 	    }
 	 }
    } else {
-
       TCS_EXCEPTION("ExclusiveJets alg must have 1 input list, but got " << input.size());
-
    }
-
    return TCS::StatusCode::SUCCESS;
-
 }
-
 TCS::StatusCode
 TCS::ExclusiveJets::process( const vector<TCS::TOBArray const *> & input,
 			     const vector<TCS::TOBArray *> & output,
 			     Decision & decision )
 {
-
    if(input.size() == 1) {     
      
       for( TOBArray::const_iterator tob1 = input[0]->begin(); 
@@ -178,16 +183,25 @@ TCS::ExclusiveJets::process( const vector<TCS::TOBArray const *> & input,
             for( ;
                  tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading1;
                  ++tob2) {
-               
-	      double xi_1 = (1.4*parType_t((*tob1)->Et())+20.)*exp(parType_t((*tob1)->eta()))+(1.4*parType_t((*tob2)->Et())+20.)*exp(parType_t((*tob2)->eta()));
-	      double xi_2 = (1.4*parType_t((*tob1)->Et())+20.)*exp(-1.*parType_t((*tob1)->eta()))+(1.4*parType_t((*tob2)->Et())+20.)*exp(-1.*parType_t((*tob2)->eta()));
 
+	      //In the ticket ATR-17320, pT_offline were defined as A*pT_L1+B, where A=1.4 and B=20 for run2
+	      //A and B definition might change according to run3 configuration.
+	      double xi_1 = (1.4*parType_t((*tob1)->Et())+20.)*exp((*tob1)->etaDouble())+(1.4*parType_t((*tob2)->Et())+20.)*exp((*tob2)->etaDouble());
+	      double xi_2 = (1.4*parType_t((*tob1)->Et())+20.)*exp(-1.*(*tob1)->etaDouble())+(1.4*parType_t((*tob2)->Et())+20.)*exp(-1.*(*tob2)->etaDouble());
+	      
+	      const int eta1 = (*tob1)->eta();
+	      const int eta2 = (*tob2)->eta();
+	      const unsigned int aeta1 = std::abs(eta1);
+	      const unsigned int aeta2 = std::abs(eta2);
 	      for(unsigned int i=0; i<numberOutputBits(); ++i) {
 		bool accept = false;
 		if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
 		if( parType_t((*tob2)->Et()) <= p_MinET1[i]) continue; // ET cut
+		if(p_ApplyEtaCut[i] &&
+		   ((aeta1 < p_MinEta1[i] || aeta1 > p_MaxEta1[i] ) ||
+		    (aeta2 < p_MinEta2[i] || aeta2 > p_MaxEta2[i] ) )) continue;
 		
-		accept = (xi_1 > p_XiMin[i]) && (xi_1 < p_XiMax[i]) && (xi_2 > p_XiMin[i]) && (xi_2 < p_XiMax[i]); //
+		accept = (xi_1 >p_XiMin[i]) && (xi_1 < p_XiMax[i]) && (xi_2 > p_XiMin[i]) && (xi_2 < p_XiMax[i]); //
 		const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
 		const bool fillReject = fillHistos() and not fillAccept;
 		const bool alreadyFilled = decision.bit(i);
@@ -196,21 +210,19 @@ TCS::ExclusiveJets::process( const vector<TCS::TOBArray const *> & input,
 		  output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
 		}
 		if(fillAccept and not alreadyFilled) {
-		  fillHist1D(m_histAcceptExclusiveJets[i]->GetName(),xi_1);
+		  fillHist2D(m_histAcceptExclusiveJets[i]->GetName(),xi_1,xi_2);
+		  fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
 		  } else if(fillReject) {
-		  fillHist1D(m_histRejectExclusiveJets[i]->GetName(),xi_1);
+		  fillHist2D(m_histRejectExclusiveJets[i]->GetName(),xi_1,xi_2);
+		  fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
 		}
-		TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " xi_1 = " << xi_1);
+		TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " xi_1 = " << xi_1);
 		  
 	      }
 	    }
 	 }
    } else {
-
       TCS_EXCEPTION("ExclusiveJets alg must have 1 input list, but got " << input.size());
-
    }
-
-
    return TCS::StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx
similarity index 78%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive.cxx
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx
index 5117a3f2bfa4..6684d5863f05 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 /*********************************
- * InvariantMassDeltaPhiInclusive.cxx
+ * InvariantMassDeltaPhiInclusive2.cxx
  * Based on V Sorin 2014 implementation of InvariantMassInclusive2. For questions contact atlas-trig-l1topo-algcom@cern.ch.
  *
  * @brief algorithm calculates the sqr of the INVMASS between two lists and applies invmass criteria. For pairs passing the INVMASS cut a further requirement based on DeltaPhi
@@ -11,7 +11,7 @@
 **********************************/
 //  TO DO size of the input list to be possbly refined 
 
-#include "L1TopoAlgorithms/InvariantMassDeltaPhiInclusive.h"
+#include "L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
 // Bitwise implementation utils
@@ -25,12 +25,12 @@
 
 #include <cmath>
 
-REGISTER_ALG_TCS(InvariantMassDeltaPhiInclusive)
+REGISTER_ALG_TCS(InvariantMassDeltaPhiInclusive2)
 
 using namespace std;
 
 
-TCS::InvariantMassDeltaPhiInclusive::InvariantMassDeltaPhiInclusive(const std::string & name) : DecisionAlg(name)
+TCS::InvariantMassDeltaPhiInclusive2::InvariantMassDeltaPhiInclusive2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
    defineParameter("InputWidth2", 9);
@@ -82,11 +82,11 @@ TCS::InvariantMassDeltaPhiInclusive::InvariantMassDeltaPhiInclusive(const std::s
    setNumberOutputBits(6);
 }
 
-TCS::InvariantMassDeltaPhiInclusive::~InvariantMassDeltaPhiInclusive(){}
+TCS::InvariantMassDeltaPhiInclusive2::~InvariantMassDeltaPhiInclusive2(){}
 
 
 TCS::StatusCode
-TCS::InvariantMassDeltaPhiInclusive::initialize() {
+TCS::InvariantMassDeltaPhiInclusive2::initialize() {
    p_NumberLeading1 = parameter("InputWidth1").value();
    p_NumberLeading2 = parameter("InputWidth2").value();
    if(parameter("MaxTob1").value() > 0) p_NumberLeading1 = parameter("MaxTob1").value();
@@ -129,25 +129,29 @@ TCS::InvariantMassDeltaPhiInclusive::initialize() {
    for(unsigned int i=0; i<numberOutputBits(); ++i) {
        const int buf_len = 512;
        char hname_accept[buf_len], hname_reject[buf_len];
+       int n_bin = 100;
+       int MassEta_min = 0;
+       int EtaEta_min = -50;
+       int EtaEta_max = 50;
        int mass_min = sqrt(p_InvMassMin[i]);
        int mass_max = sqrt(p_InvMassMax[i]);
-       int delta_phi_min = sqrt(p_DeltaPhiMin[i]);
-       int delta_phi_max = sqrt(p_DeltaPhiMax[i]);
+       // if minimum mass requirement less than twice of bin length,
+       // adjust to range by changing maximum mass with the 10 time of bin length.
+       // This is necessary when range is too wide and minimum cut unvisible.
+       // Later will be changed with more automated way.
+       if ( 2*(mass_max-mass_min)/n_bin > mass_min && mass_min != 0.0 )
+	 { mass_max=10*(mass_max-mass_min)/n_bin; }
+       int delta_phi_max = p_DeltaPhiMax[i];
        // mass
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassDeltaPhiInclusive_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassDeltaPhiInclusive_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       registerHist(m_histAcceptM[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*mass_max));
-       registerHist(m_histRejectM[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*mass_max));
-       // delta phi
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassDeltaPhiInclusive_bit%d_%dDPHI%d_Mass", i, delta_phi_min, delta_phi_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassDeltaPhiInclusive_bit%d_%dDPHI%d_Mass", i, delta_phi_min, delta_phi_max);
-       registerHist(m_histAcceptDPhi[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*delta_phi_max));
-       registerHist(m_histRejectDPhi[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*delta_phi_max));
+       snprintf(hname_accept, buf_len, "Accept_InvariantMassDeltaPhiInclusive2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       snprintf(hname_reject, buf_len, "Reject_InvariantMassDeltaPhiInclusive2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       registerHist(m_histAcceptM[i] = new TH2F(hname_accept, hname_accept, n_bin, MassEta_min, 2*mass_max, 2*delta_phi_max, MassEta_min, 2*delta_phi_max));
+       registerHist(m_histRejectM[i] = new TH2F(hname_reject, hname_reject, n_bin, MassEta_min, 2*mass_max, 2*delta_phi_max, MassEta_min, 2*delta_phi_max));
        // eta2 vs. eta1
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassDeltaPhiInclusive_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassDeltaPhiInclusive_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
-       registerHist(m_histAcceptEta1Eta2[i] = new TH2F(hname_accept, hname_accept, 100, -50.0, +50.0, 100, -50.0, +50.0));
-       registerHist(m_histRejectEta1Eta2[i] = new TH2F(hname_reject, hname_reject, 100, -50.0, +50.0, 100, -50.0, +50.0));
+       snprintf(hname_accept, buf_len, "Accept_InvariantMassDeltaPhiInclusive2_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
+       snprintf(hname_reject, buf_len, "Reject_InvariantMassDeltaPhiInclusive2_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
+       registerHist(m_histAcceptEta1Eta2[i] = new TH2F(hname_accept, hname_accept, n_bin, EtaEta_min, EtaEta_max, n_bin, EtaEta_min, EtaEta_max));
+       registerHist(m_histRejectEta1Eta2[i] = new TH2F(hname_reject, hname_reject, n_bin, EtaEta_min, EtaEta_max, n_bin, EtaEta_min, EtaEta_max));
    }
    return StatusCode::SUCCESS;
 }
@@ -155,7 +159,7 @@ TCS::InvariantMassDeltaPhiInclusive::initialize() {
 
 
 TCS::StatusCode
-TCS::InvariantMassDeltaPhiInclusive::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassDeltaPhiInclusive2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -194,13 +198,11 @@ TCS::InvariantMassDeltaPhiInclusive::processBitCorrect( const std::vector<TCS::T
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-		       fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-		       fillHist1D(m_histAcceptDPhi[i]->GetName(),sqrt((float)deltaPhi));
+		       fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),(float)deltaPhi);
 		       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
                    } else if(fillReject) {
-		       fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-		       fillHist1D(m_histRejectDPhi[i]->GetName(),sqrt((float)deltaPhi));
-		       fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
+		       fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),(float)deltaPhi);
+		       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
                    }
                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
                }
@@ -208,7 +210,7 @@ TCS::InvariantMassDeltaPhiInclusive::processBitCorrect( const std::vector<TCS::T
          }
    } else {
 
-      TCS_EXCEPTION("InvariantMassDeltaPhiInclusive alg must have  2 inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassDeltaPhiInclusive2 alg must have  2 inputs, but got " << input.size());
 
    }
    return TCS::StatusCode::SUCCESS;
@@ -216,7 +218,7 @@ TCS::InvariantMassDeltaPhiInclusive::processBitCorrect( const std::vector<TCS::T
 }
 
 TCS::StatusCode
-TCS::InvariantMassDeltaPhiInclusive::process( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassDeltaPhiInclusive2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -253,20 +255,18 @@ TCS::InvariantMassDeltaPhiInclusive::process( const std::vector<TCS::TOBArray co
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-		       fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histAcceptDPhi[i]->GetName(),sqrt((float)deltaPhi));
-                       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
+		       fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),(float)deltaPhi);
+		       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
                    } else if(fillReject) {
-                       fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histRejectDPhi[i]->GetName(),sqrt((float)deltaPhi));
-                       fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
+		       fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),(float)deltaPhi);
+		       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
                    }
                   TRG_MSG_DEBUG("Decision " << i << ": " << (accept ?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
          }
    } else {
-      TCS_EXCEPTION("InvariantMassDeltaPhiInclusive alg must have  2 inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassDeltaPhiInclusive2 alg must have  2 inputs, but got " << input.size());
    }
    return TCS::StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1DeltaRSqrIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx
similarity index 79%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1DeltaRSqrIncl1.cxx
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx
index 833840828224..9b570754bdb0 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1DeltaRSqrIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx
@@ -17,8 +17,9 @@
 #include <sstream>
 #include <vector>
 #include "TH1F.h"
+#include "TH2F.h"
 
-#include "L1TopoAlgorithms/InvariantMassInclusive1DeltaRSqrIncl1.h"
+#include "L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
 // Bitwise implementation utils
@@ -29,11 +30,11 @@
 
 //
 
-REGISTER_ALG_TCS(InvariantMassInclusive1DeltaRSqrIncl1)
+REGISTER_ALG_TCS(InvariantMassInclusiveDeltaRSqrIncl1)
 
 using namespace std;
 
-TCS::InvariantMassInclusive1DeltaRSqrIncl1::InvariantMassInclusive1DeltaRSqrIncl1(const std::string & name) : DecisionAlg(name)
+TCS::InvariantMassInclusiveDeltaRSqrIncl1::InvariantMassInclusiveDeltaRSqrIncl1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 3);
    defineParameter("MaxTob", 0); 
@@ -80,11 +81,11 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::InvariantMassInclusive1DeltaRSqrIncl
    setNumberOutputBits(6);
 }
 
-TCS::InvariantMassInclusive1DeltaRSqrIncl1::~InvariantMassInclusive1DeltaRSqrIncl1(){}
+TCS::InvariantMassInclusiveDeltaRSqrIncl1::~InvariantMassInclusiveDeltaRSqrIncl1(){}
 
 
 TCS::StatusCode
-TCS::InvariantMassInclusive1DeltaRSqrIncl1::initialize() {
+TCS::InvariantMassInclusiveDeltaRSqrIncl1::initialize() {
    if(parameter("MaxTob").value() > 0) {
       p_NumberLeading1 = parameter("MaxTob").value();
       p_NumberLeading2 = parameter("MaxTob").value();
@@ -120,20 +121,22 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::initialize() {
    for (unsigned int i=0; i<numberOutputBits();i++) {
        const int buf_len = 512;
        char hname_accept[buf_len], hname_reject[buf_len];
+       int n_bin = 100;
+       int MassDeltaR_min = 0;
        int mass_min = sqrt(p_InvMassMin[i]);
        int mass_max = sqrt(p_InvMassMax[i]);
-       int deltaR_min = sqrt(p_DeltaRMin[i]);
+       // if minimum mass requirement less than twice of bin length,
+       // adjust to range by changing maximum mass with the 10 time of bin length.
+       // This is necessary when range is too wide and minimum cut unvisible.
+       // Later will be changed with more automated way.
+       if ( 2*(mass_max-mass_min)/n_bin > mass_min && mass_min != 0.0 )
+	 { mass_max=10*(mass_max-mass_min)/n_bin; }
        int deltaR_max = sqrt(p_DeltaRMax[i]);
        // mass
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusive1DeltaRSqrIncl1_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusive1DeltaRSqrIncl1_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       registerHist(m_histAcceptM[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*mass_max));
-       registerHist(m_histRejectM[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*mass_max));
-       // delta R
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusive1DeltaRSqrIncl1_bit%d_%dDR%d_DR", i, deltaR_min, deltaR_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusive1DeltaRSqrIncl1_bit%d_%dDR%d_DR", i, deltaR_min, deltaR_max);
-       registerHist(m_histAcceptDR[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*deltaR_max));
-       registerHist(m_histRejectDR[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*deltaR_max));
+       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusiveDeltaRSqrIncl1_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusiveDeltaRSqrIncl1_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       registerHist(m_histAcceptM[i] = new TH2F(hname_accept, hname_accept, n_bin, MassDeltaR_min, 2*mass_max, n_bin, MassDeltaR_min, 2*deltaR_max));
+       registerHist(m_histRejectM[i] = new TH2F(hname_reject, hname_reject, n_bin, MassDeltaR_min, 2*mass_max, n_bin, MassDeltaR_min, 2*deltaR_max));
   }
 
  
@@ -143,7 +146,7 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::initialize() {
 
 
 TCS::StatusCode
-TCS::InvariantMassInclusive1DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassInclusiveDeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -184,11 +187,9 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::processBitCorrect( const std::vector
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-                       fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histAcceptDR[i]->GetName(),sqrt((float)deltaR2));
+		     fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    } else if(fillReject) {
-                       fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histRejectDR[i]->GetName(),sqrt((float)deltaR2));
+		     fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    }
                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
                }
@@ -196,7 +197,7 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::processBitCorrect( const std::vector
          }
    } else {
 
-      TCS_EXCEPTION("InvariantMassInclusive1 alg must have either 1  inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl1 alg must have either 1  inputs, but got " << input.size());
 
    }
 
@@ -205,7 +206,7 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::processBitCorrect( const std::vector
 }
 
 TCS::StatusCode
-TCS::InvariantMassInclusive1DeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassInclusiveDeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -245,20 +246,18 @@ TCS::InvariantMassInclusive1DeltaRSqrIncl1::process( const std::vector<TCS::TOBA
                       decision.setBit(i, true);
                       output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                   }
-                  if(fillAccept and not alreadyFilled) {
-                      fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-                      fillHist1D(m_histAcceptDR[i]->GetName(),sqrt((float)deltaR2));
-                  } else if(fillReject) {
-                      fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-                      fillHist1D(m_histRejectDR[i]->GetName(),sqrt((float)deltaR2));
-                  }
+                   if(fillAccept and not alreadyFilled) {
+		     fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
+                   } else if(fillReject) {
+		     fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
+                   }
                   TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
                }
             }
          }
    } else {
 
-      TCS_EXCEPTION("InvariantMassInclusive1 alg must have either 1  inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl1 alg must have either 1  inputs, but got " << input.size());
 
    }
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2DeltaRSqrIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx
similarity index 75%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2DeltaRSqrIncl2.cxx
rename to Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx
index e1662362497d..73fb49af41d0 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2DeltaRSqrIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx
@@ -13,7 +13,7 @@
 **********************************/
 
 
-#include "L1TopoAlgorithms/InvariantMassInclusive2DeltaRSqrIncl2.h"
+#include "L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
 // Bitwise implementation utils
@@ -27,12 +27,12 @@
 
 #include <cmath>
 
-REGISTER_ALG_TCS(InvariantMassInclusive2DeltaRSqrIncl2)
+REGISTER_ALG_TCS(InvariantMassInclusiveDeltaRSqrIncl2)
 
 using namespace std;
 
 
-TCS::InvariantMassInclusive2DeltaRSqrIncl2::InvariantMassInclusive2DeltaRSqrIncl2(const std::string & name) : DecisionAlg(name)
+TCS::InvariantMassInclusiveDeltaRSqrIncl2::InvariantMassInclusiveDeltaRSqrIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
    defineParameter("InputWidth2", 9);
@@ -84,11 +84,11 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::InvariantMassInclusive2DeltaRSqrIncl
    setNumberOutputBits(6);
 }
 
-TCS::InvariantMassInclusive2DeltaRSqrIncl2::~InvariantMassInclusive2DeltaRSqrIncl2(){}
+TCS::InvariantMassInclusiveDeltaRSqrIncl2::~InvariantMassInclusiveDeltaRSqrIncl2(){}
 
 
 TCS::StatusCode
-TCS::InvariantMassInclusive2DeltaRSqrIncl2::initialize() {
+TCS::InvariantMassInclusiveDeltaRSqrIncl2::initialize() {
 
    p_NumberLeading1 = parameter("InputWidth1").value();
    p_NumberLeading2 = parameter("InputWidth2").value();
@@ -132,25 +132,22 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::initialize() {
    for(unsigned int i=0; i<numberOutputBits(); ++i) {
        const int buf_len = 512;
        char hname_accept[buf_len], hname_reject[buf_len];
+       int n_bin = 100;
+       int MassDeltaR_min = 0;
        int mass_min = sqrt(p_InvMassMin[i]);
        int mass_max = sqrt(p_InvMassMax[i]);
-       int deltaR_min = sqrt(p_DeltaRMin[i]);
+       // if minimum mass requirement less than twice of bin length,
+       // adjust to range by changing maximum mass with the 10 time of bin length.
+       // This is necessary when range is too wide and minimum cut unvisible.
+       // Later will be changed with more automated way.
+       if ( 2*(mass_max-mass_min)/n_bin > mass_min && mass_min != 0.0 )
+	 { mass_max=10*(mass_max-mass_min)/n_bin; }
        int deltaR_max = sqrt(p_DeltaRMax[i]);
        // mass
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusive2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusive2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
-       registerHist(m_histAcceptM[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*mass_max));
-       registerHist(m_histRejectM[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*mass_max));
-       // delta R
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusive2DeltaRSqrIncl2_bit%d_%dDR%d_DR", i, deltaR_min, deltaR_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusive2DeltaRSqrIncl2_bit%d_%dDR%d_DR", i, deltaR_min, deltaR_max);
-       registerHist(m_histAcceptDR[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*deltaR_max));
-       registerHist(m_histRejectDR[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*deltaR_max));
-       // eta2 vs. eta1
-       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusive2_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
-       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusive2_bit%d_%dM%d_Eta1Eta2", i, mass_min, mass_max);
-       registerHist(m_histAcceptEta1Eta2[i] = new TH2F(hname_accept, hname_accept, 100, -50.0, +50.0, 100, -50.0, +50.0));
-       registerHist(m_histRejectEta1Eta2[i] = new TH2F(hname_reject, hname_reject, 100, -50.0, +50.0, 100, -50.0, +50.0));
+       snprintf(hname_accept, buf_len, "Accept_InvariantMassInclusiveDeltaRSqrIncl2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       snprintf(hname_reject, buf_len, "Reject_InvariantMassInclusiveDeltaRSqrIncl2_bit%d_%dM%d_Mass", i, mass_min, mass_max);
+       registerHist(m_histAcceptM[i] = new TH2F(hname_accept, hname_accept, n_bin, MassDeltaR_min, 2*mass_max, n_bin, MassDeltaR_min, 2*deltaR_max));
+       registerHist(m_histRejectM[i] = new TH2F(hname_reject, hname_reject, n_bin, MassDeltaR_min, 2*mass_max, n_bin, MassDeltaR_min, 2*deltaR_max));
    }
    return StatusCode::SUCCESS;
 }
@@ -158,7 +155,7 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::initialize() {
 
 
 TCS::StatusCode
-TCS::InvariantMassInclusive2DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassInclusiveDeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -182,7 +179,7 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::processBitCorrect( const std::vector
                 const int eta2 = (*tob2)->eta();
                 const unsigned int aeta1 = std::abs(eta1);
                 const unsigned int aeta2 = std::abs(eta2);
-               for(unsigned int i=0; i<numberOutputBits(); ++i) {
+		for(unsigned int i=0; i<numberOutputBits(); ++i) {
                    bool accept = false;
                    if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                    if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
@@ -198,13 +195,9 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::processBitCorrect( const std::vector
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-                       fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histAcceptDR[i]->GetName(),sqrt((float)deltaR2));
-                       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
+		     fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    } else if(fillReject) {
-                       fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histRejectDR[i]->GetName(),sqrt((float)deltaR2));
-                       fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
+		     fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    }
                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
                }
@@ -212,7 +205,7 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::processBitCorrect( const std::vector
          }
    } else {
 
-      TCS_EXCEPTION("InvariantMassInclusive2DeltaRSqrIncl2 alg must have  2 inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl2 alg must have  2 inputs, but got " << input.size());
 
    }
    return TCS::StatusCode::SUCCESS;
@@ -220,7 +213,7 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::processBitCorrect( const std::vector
 }
 
 TCS::StatusCode
-TCS::InvariantMassInclusive2DeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input,
+TCS::InvariantMassInclusiveDeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
                              Decision & decision )
 {
@@ -258,20 +251,16 @@ TCS::InvariantMassInclusive2DeltaRSqrIncl2::process( const std::vector<TCS::TOBA
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-                       fillHist1D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histAcceptDR[i]->GetName(),sqrt((float)deltaR2));
-                       fillHist2D(m_histAcceptEta1Eta2[i]->GetName(),eta1, eta2);
+		     fillHist2D(m_histAcceptM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    } else if(fillReject) {
-                       fillHist1D(m_histRejectM[i]->GetName(),sqrt((float)invmass2));
-                       fillHist1D(m_histRejectDR[i]->GetName(),sqrt((float)deltaR2));
-                       fillHist2D(m_histRejectEta1Eta2[i]->GetName(),eta1, eta2);
+		     fillHist2D(m_histRejectM[i]->GetName(),sqrt((float)invmass2),sqrt((float)deltaR2));
                    }
 		  TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
                }
             }
          }
    } else {
-      TCS_EXCEPTION("InvariantMassInclusive2DeltaRSqrIncl2 alg must have  2 inputs, but got " << input.size());
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl2 alg must have  2 inputs, but got " << input.size());
    }
    return TCS::StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx
index 73c5249ef198..ed473fb2fcc3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx
@@ -11,6 +11,10 @@
 **********************************/
 
 #include <cmath>
+#include <string>
+#include <sstream>
+#include <vector>
+#include "TH1F.h"
 
 #include "L1TopoAlgorithms/TransverseMassInclusive1.h"
 #include "L1TopoCommon/Exception.h"
@@ -19,6 +23,7 @@
 #include "L1TopoSimulationUtils/L1TopoDataTypes.h"
 #include "L1TopoSimulationUtils/Trigo.h"
 #include "L1TopoSimulationUtils/Hyperbolic.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 //
 REGISTER_ALG_TCS(TransverseMassInclusive1)
@@ -107,6 +112,18 @@ TCS::TransverseMassInclusive1::initialize() {
    }
    TRG_MSG_INFO("NumberLeading1 : " << p_NumberLeading1);   
    TRG_MSG_INFO("number output : " << numberOutputBits());
+
+   for (unsigned int i=0; i<numberOutputBits();i++) {
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int Tmass_min = p_TMassMin[i];
+       int Tmass_max = 1000;
+       // Tmass
+       snprintf(hname_accept, buf_len, "Accept_TransverseMassInclusive1_bit%d_%dM%d_Mass", i, Tmass_min, Tmass_max);
+       snprintf(hname_reject, buf_len, "Reject_TransverseMassInclusive1_bit%d_%dM%d_Mass", i, Tmass_min, Tmass_max);
+       registerHist(m_histAcceptM[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*Tmass_max));
+       registerHist(m_histRejectM[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*Tmass_max));
+  }
  
    return StatusCode::SUCCESS;
 }
@@ -116,7 +133,7 @@ TCS::TransverseMassInclusive1::initialize() {
 TCS::StatusCode
 TCS::TransverseMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if(input.size() == 2) { // 2 lists because one is always MET
@@ -143,10 +160,18 @@ TCS::TransverseMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArra
                    if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                    if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                    accept = tmass2 >= p_TMassMin[i] ; // 
-                   if(accept) {
-                       decison.setBit(i, true);  
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
+		   if(accept) {
+                       decision.setBit(i, true);  
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
+                   if(fillAccept and not alreadyFilled) {
+		     fillHist1D(m_histAcceptM[i]->GetName(),(float)tmass2);
+                   } else if(fillReject) {
+		     fillHist1D(m_histRejectM[i]->GetName(),(float)tmass2);
+                   }
                    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " tmass2 = " << tmass2);
                }
             }
@@ -163,7 +188,7 @@ TCS::TransverseMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArra
 TCS::StatusCode
 TCS::TransverseMassInclusive1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if(input.size() == 2) { // 2 lists because one is always MET
@@ -184,20 +209,26 @@ TCS::TransverseMassInclusive1::process( const std::vector<TCS::TOBArray const *>
              
 	       unsigned int tmass2 = calcTMass( *tob1, *tob2 );
 
-
-               bool accept[6];
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
-
+		  bool accept = false;
 		  if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
 
                   if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
 
-                  accept[i] = tmass2 >= p_TMassMin[i] ; // 
-                  if( accept[i] ) {
-                     decison.setBit(i, true);  
+                  accept = tmass2 >= p_TMassMin[i] ; // 
+                  const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                  const bool fillReject = fillHistos() and not fillAccept;
+                  const bool alreadyFilled = decision.bit(i);
+                  if( accept ) {
+                     decision.setBit(i, true);  
                      output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                   }
-                  TRG_MSG_DEBUG("Decision " << i << ": " << (accept[i]?"pass":"fail") << " tmass2 = " << tmass2);
+                   if(fillAccept and not alreadyFilled) {
+		     fillHist1D(m_histAcceptM[i]->GetName(),(float)tmass2);
+                   } else if(fillReject) {
+		     fillHist1D(m_histRejectM[i]->GetName(),(float)tmass2);
+                   }
+                  TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " tmass2 = " << tmass2);
 
                }
             }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/CMakeLists.txt
index 5d7c49c7fda8..87c2a1940909 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/CMakeLists.txt
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/CMakeLists.txt
@@ -7,7 +7,6 @@ atlas_subdir( L1TopoCoreSim )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
                           Trigger/TrigT1/L1Topo/L1TopoCommon
                           Trigger/TrigT1/L1Topo/L1TopoConfig
                           Trigger/TrigT1/L1Topo/L1TopoEvent
@@ -28,13 +27,13 @@ atlas_add_library( L1TopoCoreSim
                    PUBLIC_HEADERS L1TopoCoreSim
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   LINK_LIBRARIES GaudiKernel L1TopoCommon L1TopoConfig L1TopoEvent L1TopoInterfaces ${ROOT_LIBRARIES}
+                   LINK_LIBRARIES L1TopoCommon L1TopoConfig L1TopoEvent L1TopoInterfaces ${ROOT_LIBRARIES}
                    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfBase L1TopoAlgorithms L1TopoHardware )
 
 atlas_add_executable( TrigConfTopoStandAlone
                       src/test/TopoStandAlone.cxx
                       INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel L1TopoCommon L1TopoConfig L1TopoEvent L1TopoInterfaces TrigConfBase L1TopoAlgorithms L1TopoHardware L1TopoCoreSim )
+                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} L1TopoCommon L1TopoConfig L1TopoEvent L1TopoInterfaces TrigConfBase L1TopoAlgorithms L1TopoHardware L1TopoCoreSim )
 
 atlas_add_executable( TrigConfTopoTestSteeringConfig
                       src/test/TopoTestSteeringConfig.cxx
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
index aeaaecd1333f..c9aab2bc2571 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
@@ -48,7 +48,7 @@ atlas_add_component( L1TopoSimulation
    TrigT1Result TrigConfInterfaces )
 
 atlas_add_component( L1TopoSimulationTest
-   src/test/*.h src/test/*.cxx src/test/components/*.cxx
+   src/test/*.h src/test/*.cxx src/test/components/*.cxx src/AthenaL1TopoHistSvc.h src/AthenaL1TopoHistSvc.cxx
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel L1TopoCoreSim L1TopoEvent L1TopoInterfaces L1TopoAlgorithms L1TopoSimulationLib)
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/Root/AthenaL1TopoHistSvc.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/Root/AthenaL1TopoHistSvc.cxx
deleted file mode 100644
index 07c10a12ddd0..000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/Root/AthenaL1TopoHistSvc.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "L1TopoSimulation/AthenaL1TopoHistSvc.h"
-#include "TH1.h"
-#include "TH2.h"
-
-#include "TrigConfBase/TrigConfMessaging.h"
-
-#include <iostream>
-using namespace std;
-
-
-class AthenaL1TopoHistSvc::AthenaL1TopoHistSvcImpl : public TrigConf::TrigConfMessaging
-{
-public:
-   
-   AthenaL1TopoHistSvcImpl(ServiceHandle<ITHistSvc> histSvc) :
-      TrigConfMessaging("AthenaL1TopoHistSvc"),
-      m_histSvc(histSvc)
-   {
-      TRG_MSG_INFO("Activating");
-   }
-
-   ~AthenaL1TopoHistSvcImpl()
-   {}
-
-
-   void registerHist(TH1 * h) {
-      TRG_MSG_DEBUG("Registration of " << h->GetName() );
-      if(m_histSvc) {
-         string fullName( m_baseDir + h->GetName() );
-         auto colPos = fullName.find_last_of('/');
-         string histName = fullName.substr(colPos+1);
-         h->SetName(histName.c_str());
-	 std::unique_ptr<TH1> uhist(h);
-	 LockedHandle<TH1> lh;
-         if( ! m_histSvc->regShared(fullName, std::move(uhist), lh).isSuccess() ) {
-	   TRG_MSG_WARNING("Could not register histogram " << fullName << " with " << m_histSvc->name() );
-         }  
-      } else {
-         TRG_MSG_WARNING("No THistSvc available, can't register histogram");
-      }
-   }
-
-   void registerHist(TH2 * h) {
-      TRG_MSG_DEBUG("Registration of " << h->GetName() );
-      if(m_histSvc) {
-         string fullName( m_baseDir + h->GetName() );
-         auto colPos = fullName.find_last_of('/');
-         string histName = fullName.substr(colPos+1);
-         h->SetName(histName.c_str());
-	 std::unique_ptr<TH2> uhist(h);
-	 LockedHandle<TH2> lh;
-         if( ! m_histSvc->regShared(fullName, std::move(uhist), lh).isSuccess() ) {
-	   TRG_MSG_WARNING("Could not register histogram " << fullName << " with " << m_histSvc->name() );
-         }  
-      } else {
-         TRG_MSG_WARNING("No THistSvc available, can't register histogram");
-      }
-   }
-
-   TH1 * findHist(const std::string & histName) {
-      TH1 * h;
-      string fullName( m_baseDir + histName );
-      if ( ! m_histSvc->getHist(fullName, h).isSuccess() )
-	{ TRG_MSG_WARNING("Could not find histogram with name : " << fullName  ); }
-      else
-	{ TRG_MSG_DEBUG("findHist(" << histName << ") found: " << (void*)h); }
-      return h;
-   }
-
-   void fillHist1D(const std::string & histName,double x) {
-      LockedHandle<TH1> lh;
-      string fullName( m_baseDir + histName );
-      if( ! m_histSvc->getShared(fullName, lh).isSuccess())
-	{ TRG_MSG_WARNING("No histogram found for " << fullName); }
-      else
-	{ lh->Fill(x); }
-   }
-
-   void fillHist2D(const std::string & histName,double x,double y) {
-      LockedHandle<TH2> lh;
-      string fullName( m_baseDir + histName );
-      if( ! m_histSvc->getShared(fullName, lh).isSuccess())
-	{ TRG_MSG_WARNING("No histogram found for " << fullName); }
-      else
-	{ lh->Fill(x,y); }
-   }
-
-   void setBaseDir(const std::string & baseDir) {
-      auto colPos = baseDir.find_last_of(':');
-      if( colPos != string::npos ) {
-         m_baseDir = baseDir.substr(colPos+1);
-      } else {
-         m_baseDir = baseDir;
-      }
-      if( '/' != m_baseDir[m_baseDir.size()-1] ) {
-         // add a '/' at the end
-         m_baseDir += "/";
-      }
-   }
-
-private:
-   ServiceHandle<ITHistSvc>   m_histSvc;
-   string                     m_baseDir {""};
-
-};
-
-
-AthenaL1TopoHistSvc::AthenaL1TopoHistSvc(ServiceHandle<ITHistSvc> histSvc) :
-   m_impl(new AthenaL1TopoHistSvc::AthenaL1TopoHistSvcImpl(histSvc))
-{}
-
-AthenaL1TopoHistSvc::~AthenaL1TopoHistSvc()
-{}
-
-void
-AthenaL1TopoHistSvc::registerHist(TH1 * h) {
-   m_impl->registerHist(h);
-}
-
-void
-AthenaL1TopoHistSvc::registerHist(TH2 * h) {
-   m_impl->registerHist(h);
-}
-
-TH1 *
-AthenaL1TopoHistSvc::findHist(const std::string & histName) {
-   return m_impl->findHist( histName );
-}
-
-void AthenaL1TopoHistSvc::fillHist1D(const std::string & histName, double x) {
-  m_impl->fillHist1D(histName,x);
-}
-
-void AthenaL1TopoHistSvc::fillHist2D(const std::string & histName, double x, double y) {
-  m_impl->fillHist2D(histName,x,y);
-}
-
-void
-AthenaL1TopoHistSvc::setBaseDir(const std::string & baseDir) {
-   m_impl->setBaseDir( baseDir );
-}
-
-void
-AthenaL1TopoHistSvc::save() {
-   // not implemented
-}
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1TopoSimulationTest.py b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1TopoSimulationTest.py
index 89b71198f9de..f2f9f3000032 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1TopoSimulationTest.py
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1TopoSimulationTest.py
@@ -1,16 +1,21 @@
+#!/bin/env python
+
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-import os,psutil
+import os,psutil,sys
 
 from AthenaCommon.Logging import logging
-log = logging.getLogger('L1TopoSimStandAlone.py')
+log = logging.getLogger('L1TopoSimulationTest.py')
+         
+fmenu ,fTOBs = 'L1Topoconfig_MC_pp_v8_NewNaming.xml','eventdump_new.txt'
 
+print ('File for menu :',fmenu)
+print ('File for TOBs :',fTOBs)
+   
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr, theApp
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
-from AthenaCommon.AlgSequence import AthSequencer 
-condSeq = AthSequencer("AthCondSeq") 
 
 #---------------------------------------------------------------------------------#
 # MT-specific code
@@ -28,29 +33,22 @@ if nThreads >=1 :
 
    # Support for the MT-MP hybrid mode
    if (nProc > 0) :
-
       from AthenaCommon.Logging import log as msg
       if (theApp.EvtMax == -1) : 
          msg.fatal('EvtMax must be >0 for hybrid configuration')
          sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
-
          if ( theApp.EvtMax % nProc != 0 ) :
             msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
-
          chunkSize = int (theApp.EvtMax / nProc)
-
          from AthenaMP.AthenaMPFlags import jobproperties as jps 
          jps.AthenaMPFlags.ChunkSize= chunkSize
-         
          msg.info('AthenaMP workers will process %s events each',chunkSize)
-
+            
    ## force loading of data. make sure this alg is at the front of the
    ## AlgSequence
    #
    from SGComps.SGCompsConf import SGInputLoader
    topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
-
-   
    # ThreadPoolService thread local initialization
    from GaudiHive.GaudiHiveConf import ThreadPoolSvc
    svcMgr += ThreadPoolSvc("ThreadPoolSvc")
@@ -58,13 +56,11 @@ if nThreads >=1 :
 
 # MT-specific code
 #---------------------------------------------------------------------------------#
-
 from L1TopoSimulation.L1TopoSimulationTestConfig import L1TopoSimulationTest
 
 topSequence += L1TopoSimulationTest()
-topSequence.L1TopoSimulationTest.InputASCIIFile = 'eventdump_new.txt'
-topSequence.L1TopoSimulationTest.InputXMLFile = 'L1Topoconfig_MC_pp_v8_recent.xml'
-
+topSequence.L1TopoSimulationTest.InputASCIIFile = fTOBs
+topSequence.L1TopoSimulationTest.InputXMLFile = fmenu
 
 from GaudiSvc.GaudiSvcConf import THistSvc
 svcMgr += THistSvc()
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.cxx
new file mode 100644
index 000000000000..e5d88c86b194
--- /dev/null
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.cxx
@@ -0,0 +1,170 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "./AthenaL1TopoHistSvc.h"
+#include "TH1.h"
+#include "TH2.h"
+
+#include "TrigConfBase/TrigConfMessaging.h"
+
+
+#include "AthenaMonitoring/IMonitorToolBase.h"
+
+#include "TrigConfInterfaces/IL1TopoConfigSvc.h"
+#include "GaudiKernel/ITHistSvc.h"
+
+#include "StoreGate/ReadHandleKey.h"
+
+
+#include <iostream>
+using namespace std;
+
+
+class AthenaL1TopoHistSvc::AthenaL1TopoHistSvcImpl : public TrigConf::TrigConfMessaging
+{
+public:
+   
+   AthenaL1TopoHistSvcImpl(ServiceHandle<ITHistSvc> histSvc) :
+      TrigConfMessaging("AthenaL1TopoHistSvc"),
+      m_histSvc(histSvc)
+   {
+      TRG_MSG_INFO("Activating");
+   }
+
+   ~AthenaL1TopoHistSvcImpl()
+   {}
+
+
+  void registerHist(TH1 * h) {
+     TRG_MSG_DEBUG("Registration of " << h->GetName() );
+     if(m_histSvc) {
+       string fullName( m_baseDir + h->GetName() );
+       auto colPos = fullName.find_last_of('/');
+       auto colPos2 = fullName.find_last_of('/',colPos-1);
+       string histName = fullName.substr(colPos+1);
+       string key = fullName.substr(colPos2+1);
+       h->SetName(histName.c_str());
+       std::unique_ptr<TH1> uhist(h);
+       LockedHandle<TH1> lh;
+       if( ! m_histSvc->regShared(fullName, std::move(uhist), lh).isSuccess() ) {
+     	TRG_MSG_WARNING("Could not register histogram " << fullName << " with " << m_histSvc->name() );
+       }
+       else
+     	{ m_hist1D[key] = lh; }
+     } else {
+       TRG_MSG_WARNING("No THistSvc available, can't register histogram");
+     }
+  }
+
+   void registerHist(TH2 * h) {
+      TRG_MSG_DEBUG("Registration of " << h->GetName() );
+      if(m_histSvc) {
+        string fullName( m_baseDir + h->GetName() );
+        auto colPos = fullName.find_last_of('/');
+        auto colPos2 = fullName.find_last_of('/',colPos-1);
+        string histName = fullName.substr(colPos+1);
+        string key = fullName.substr(colPos2+1);
+        h->SetName(histName.c_str());
+        std::unique_ptr<TH2> uhist(h);
+        LockedHandle<TH2> lh;
+        if( ! m_histSvc->regShared(fullName, std::move(uhist), lh).isSuccess() ) {
+      	 TRG_MSG_WARNING("Could not register histogram " << fullName << " with " << m_histSvc->name() );
+        }
+        else
+      	 { m_hist2D[key] = lh; }
+      } else {
+        TRG_MSG_WARNING("No THistSvc available, can't register histogram");
+      }
+   }
+
+   TH1 * findHist(const std::string & histName) {
+      TH1 * h;
+      string fullName( m_baseDir + histName );
+      if ( ! m_histSvc->getHist(fullName, h).isSuccess() )
+	{ TRG_MSG_WARNING("Could not find histogram with name : " << fullName  ); }
+      else
+	{ TRG_MSG_DEBUG("findHist(" << histName << ") found: " << (void*)h); }
+      return h;
+   }
+
+   void fillHist1D(const std::string & histName,double x) {
+      if(m_hist1D.find(histName) == m_hist1D.end()) {
+	TRG_MSG_ERROR("1D-hist with registration key " << histName << " does not exist");
+      }
+      else { m_hist1D[histName]->Fill(x); }
+   }
+
+   void fillHist2D(const std::string & histName,double x,double y) {
+      if(m_hist2D.find(histName) == m_hist2D.end()) {
+	TRG_MSG_ERROR("2D-hist with registration key " << histName << " does not exist");
+      }
+      else
+	{ m_hist2D[histName]->Fill(x,y); }
+   }
+
+   void setBaseDir(const std::string & baseDir) {
+      auto colPos = baseDir.find_last_of(':');
+      if( colPos != string::npos ) {
+         m_baseDir = baseDir.substr(colPos+1);
+      } else {
+         m_baseDir = baseDir;
+      }
+      if( '/' != m_baseDir[m_baseDir.size()-1] ) {
+         // add a '/' at the end
+         m_baseDir += "/";
+      }
+   }
+
+private:
+   ServiceHandle<ITHistSvc>   m_histSvc;
+   string                     m_baseDir {""};
+
+   std::unordered_map<std::string, LockedHandle<TH1>> m_hist1D  ATLAS_THREAD_SAFE;
+   std::unordered_map<std::string, LockedHandle<TH2>> m_hist2D  ATLAS_THREAD_SAFE;
+
+
+};
+
+
+AthenaL1TopoHistSvc::AthenaL1TopoHistSvc(ServiceHandle<ITHistSvc> histSvc) :
+   m_impl(new AthenaL1TopoHistSvc::AthenaL1TopoHistSvcImpl(histSvc))
+{}
+
+AthenaL1TopoHistSvc::~AthenaL1TopoHistSvc()
+{}
+
+void
+AthenaL1TopoHistSvc::registerHist(TH1 * h) {
+   m_impl->registerHist(h);
+}
+
+void
+AthenaL1TopoHistSvc::registerHist(TH2 * h) {
+   m_impl->registerHist(h);
+}
+
+TH1 *
+AthenaL1TopoHistSvc::findHist(const std::string & histName) {
+   return m_impl->findHist( histName );
+}
+
+void
+AthenaL1TopoHistSvc::fillHist1D(const std::string & histName, double x) {
+   m_impl->fillHist1D(histName,x);
+}
+
+void
+AthenaL1TopoHistSvc::fillHist2D(const std::string & histName, double x, double y) {
+   m_impl->fillHist2D(histName,x,y);
+}
+
+void
+AthenaL1TopoHistSvc::setBaseDir(const std::string & baseDir) {
+   m_impl->setBaseDir( baseDir );
+}
+
+void
+AthenaL1TopoHistSvc::save() {
+   // not implemented
+}
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/L1TopoSimulation/AthenaL1TopoHistSvc.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.h
similarity index 100%
rename from Trigger/TrigT1/L1Topo/L1TopoSimulation/L1TopoSimulation/AthenaL1TopoHistSvc.h
rename to Trigger/TrigT1/L1Topo/L1TopoSimulation/src/AthenaL1TopoHistSvc.h
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
index a688375890cf..f41904b66e48 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "./L1TopoSimulation.h"
-#include "L1TopoSimulation/AthenaL1TopoHistSvc.h"
+#include "./AthenaL1TopoHistSvc.h"
 //#include "./getAthenaTopoHistSvc.h"
 
 #include "TH1F.h"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/test/L1TopoSimulationTest.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/test/L1TopoSimulationTest.cxx
index e3490e761e9c..4526ffdc87c0 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/test/L1TopoSimulationTest.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/test/L1TopoSimulationTest.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "./L1TopoSimulationTest.h"
-#include "L1TopoSimulation/AthenaL1TopoHistSvc.h"
+#include "../AthenaL1TopoHistSvc.h"
 
 #include "L1TopoCoreSim/TopoSteering.h"
 #include "L1TopoConfig/L1TopoMenu.h"
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDef.py
index 3718d0784c9e..0276461d26f3 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDef.py
@@ -1919,7 +1919,7 @@ class TopoAlgoDef:
                                                                  d.otype1, str(d.ocut1) , d.olist1, str(d.nleading1) if d.olist1=="s" else "",
                                                                  d.otype2, str(d.ocut2) , d.olist2, str(d.nleading2) if d.olist2=="s" else ""))
 
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = 'INVM_DPHI_NFF', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = 'INVM_DPHI_NFF', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
             currentAlgoId += 1
 
 
@@ -1965,7 +1965,7 @@ class TopoAlgoDef:
    
             inputList = ['EMabi','MUab']
 
-            alg = AlgConf.InvariantMassInclusive2DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSelectEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU)
@@ -1992,7 +1992,7 @@ class TopoAlgoDef:
 
             inputList = ['EMabi','MUab']
 
-            alg = AlgConf.InvariantMassInclusive2DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSelectEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU)
@@ -2041,7 +2041,7 @@ class TopoAlgoDef:
                                                                  str(d.ocut2) , str(d.nleading2) , d.minEta2, d.maxEta2))
             
 
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = 'ZAFB_DPHI', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = 'ZAFB_DPHI', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
             currentAlgoId += 1
 
 
@@ -2070,7 +2070,7 @@ class TopoAlgoDef:
             toponame = "0INVM70-27DPHI32-EM10his1-EM10his6"
             log.debug("Define %s", toponame)
             inputList = ['EMshi','EMshi']
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSortEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSortEM)
@@ -2094,7 +2094,7 @@ class TopoAlgoDef:
             toponame = "0INVM70-27DPHI32-EM12his1-EM12his6"
             log.debug("Define %s", toponame)
             inputList = ['EMshi','EMshi']
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSortEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSortEM)
@@ -2122,7 +2122,7 @@ class TopoAlgoDef:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2142,7 +2142,7 @@ class TopoAlgoDef:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2162,7 +2162,7 @@ class TopoAlgoDef:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2182,7 +2182,7 @@ class TopoAlgoDef:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2202,7 +2202,7 @@ class TopoAlgoDef:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefLegacy.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefLegacy.py
index 7668c27306d1..4da56a4ec697 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefLegacy.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/TopoAlgoDefLegacy.py
@@ -1946,7 +1946,7 @@ class TopoAlgoDefLegacy:
                                                                  d.otype1, str(d.ocut1) , d.olist1, str(d.nleading1) if d.olist1=="s" else "",
                                                                  d.otype2, str(d.ocut2) , d.olist2, str(d.nleading2) if d.olist2=="s" else ""))
 
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = 'INVM_DPHI_NFF', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = 'INVM_DPHI_NFF', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
             currentAlgoId += 1
 
 
@@ -1992,7 +1992,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['EMabi','MUab']
 
-            alg = AlgConf.InvariantMassInclusive2DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSelectEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU)
@@ -2019,7 +2019,7 @@ class TopoAlgoDefLegacy:
 
             inputList = ['EMabi','MUab']
 
-            alg = AlgConf.InvariantMassInclusive2DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSelectEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU)
@@ -2068,7 +2068,7 @@ class TopoAlgoDefLegacy:
                                                                  str(d.ocut2) , str(d.nleading2) , d.minEta2, d.maxEta2))
             
 
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = 'ZAFB_DPHI', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = 'ZAFB_DPHI', inputs = inputList, outputs = toponames, algoId = currentAlgoId)
             currentAlgoId += 1
 
 
@@ -2097,7 +2097,7 @@ class TopoAlgoDefLegacy:
             toponame = "0INVM70-27DPHI32-EM10his1-EM10his6"
             log.debug("Define %s", toponame)
             inputList = ['EMshi','EMshi']
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSortEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSortEM)
@@ -2121,7 +2121,7 @@ class TopoAlgoDefLegacy:
             toponame = "0INVM70-27DPHI32-EM12his1-EM12his6"
             log.debug("Define %s", toponame)
             inputList = ['EMshi','EMshi']
-            alg = AlgConf.InvariantMassDeltaPhiInclusive( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth1', HW.OutputWidthSortEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSortEM)
@@ -2149,7 +2149,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2169,7 +2169,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2189,7 +2189,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2209,7 +2209,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
@@ -2229,7 +2229,7 @@ class TopoAlgoDefLegacy:
    
             inputList = ['MUab']
 
-            alg = AlgConf.InvariantMassInclusive1DeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
+            alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId )
             currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
-- 
GitLab


From a4a935882e00f94b6552c5cd41e247eea6019da9 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 12 Jun 2020 09:08:15 +0000
Subject: [PATCH 211/266] Remove delete from SCT_CalibAlgs package using
 std::unique_ptr or automatic allocation

---
 .../SCT_CalibAlgs/SCTCalibWriteTool.h         | 25 ++++++-----
 .../SCT_CalibAlgs/src/SCTCalibWriteTool.cxx   | 45 ++++++++-----------
 .../SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx | 12 ++---
 .../SCT_CalibAlgs/src/SCT_CalibHitmapTool.h   |  8 ++--
 4 files changed, 39 insertions(+), 51 deletions(-)

diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
index 2212068db431..490fe83ef7cb 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
@@ -18,6 +18,7 @@
 // Athena includes
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "AthenaKernel/IOVTime.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "EventInfo/EventInfo.h"
 #include "Identifier/Identifier.h"
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
@@ -33,18 +34,18 @@
 #include "GaudiKernel/ClassID.h"
 
 //STL
-#include <string>
-#include <map>
-#include <set>
 #include <list>
+#include <map>
+#include <memory>
 #include <mutex>
+#include <set>
+#include <string>
 
 //forward declarations
 class IdentifierHash;
 class SCT_ID;
 class IIOVRegistrationSvc;
 class IAthenaOutputStreamTool;
-class CondAttrListCollection;
 
 /**
  ** Algorithm to test writing conditions data and reading them back.
@@ -176,14 +177,14 @@ class SCTCalibWriteTool : public AthAlgTool {
       // cache for the Collections, access by foldername
       mutable std::mutex m_mutex{};
       mutable std::map<const std::string, const CondAttrListCollection*>  m_attrListCollectionMap ATLAS_THREAD_SAFE; // Guarded by m_mutex
-      CondAttrListCollection*      m_attrListColl{nullptr};
-      CondAttrListCollection*      m_attrListColl_deadStrip{nullptr};
-      CondAttrListCollection*      m_attrListColl_deadChip{nullptr};
-      CondAttrListCollection*      m_attrListColl_eff{nullptr};
-      CondAttrListCollection*      m_attrListColl_no{nullptr};
-      CondAttrListCollection*      m_attrListColl_RawOccu{nullptr};
-      CondAttrListCollection*      m_attrListColl_BSErr{nullptr};
-      CondAttrListCollection*      m_attrListColl_LA{nullptr};
+      std::unique_ptr<CondAttrListCollection> m_attrListColl;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_deadStrip;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_deadChip;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_eff;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_no;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_RawOccu;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_BSErr;
+      std::unique_ptr<CondAttrListCollection> m_attrListColl_LA;
       BooleanProperty              m_writeCondObjs{this, "WriteCondObjs", true};
       BooleanProperty              m_regIOV{this, "RegisterIOV", true};
       BooleanProperty              m_readWriteCool{this, "ReadWriteCool", true};
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
index 2d2d35aeab17..f3754b93ef76 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
@@ -18,7 +18,6 @@
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
 #include "CoralBase/Attribute.h"
 
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
 
@@ -34,10 +33,10 @@
 #include "GaudiKernel/IToolSvc.h"
 
 #include <fstream>
-#include <iterator>
-#include <sstream>
 #include <iostream>
 #include <istream>
+#include <iterator>
+#include <sstream>
 
 using std::string;
 /////////////////////////////////////////////////////////////////////////////
@@ -88,14 +87,14 @@ SCTCalibWriteTool::initialize() {
    // The following is required for writing out something to COOL
 
    // CondAttrListCollection to store table temporarily
-   m_attrListColl = new CondAttrListCollection{true};
-   m_attrListColl_deadStrip = new CondAttrListCollection{true};
-   m_attrListColl_deadChip = new CondAttrListCollection{true};
-   m_attrListColl_eff = new CondAttrListCollection{true};
-   m_attrListColl_no = new CondAttrListCollection{true};
-   m_attrListColl_RawOccu = new CondAttrListCollection{true};
-   m_attrListColl_BSErr = new CondAttrListCollection{true};
-   m_attrListColl_LA = new CondAttrListCollection{true};
+   m_attrListColl = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_deadStrip = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_deadChip = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_eff = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_no = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_RawOccu = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_BSErr = std::make_unique<CondAttrListCollection>(true);
+   m_attrListColl_LA = std::make_unique<CondAttrListCollection>(true);
 
    // Get the IOVRegistrationSvc when needed
    if (m_regIOV) {
@@ -112,14 +111,6 @@ SCTCalibWriteTool::initialize() {
 
 StatusCode
 SCTCalibWriteTool::finalize() {
-   delete m_attrListColl;
-   delete m_attrListColl_deadStrip;
-   delete m_attrListColl_deadChip;
-   delete m_attrListColl_eff;
-   delete m_attrListColl_no;
-   delete m_attrListColl_RawOccu;
-   delete m_attrListColl_BSErr;
-   delete m_attrListColl_LA;
    return StatusCode::SUCCESS;
 }
 
@@ -482,7 +473,7 @@ SCTCalibWriteTool::stringToInt(const std::string& s) const {
 
 StatusCode
 SCTCalibWriteTool::wrapUpNoisyChannel() {
-   if (recordAndStream(m_attrListColl, s_defectFolderName, m_defectRecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl.get(), s_defectFolderName, m_defectRecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_defectFolderName, m_tagID4NoisyStrips).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -491,7 +482,7 @@ SCTCalibWriteTool::wrapUpNoisyChannel() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpDeadStrips() {
-   if (recordAndStream(m_attrListColl_deadStrip, s_deadStripFolderName, m_deadStripRecorded).isFailure()) return  StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_deadStrip.get(), s_deadStripFolderName, m_deadStripRecorded).isFailure()) return  StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_deadStripFolderName, m_tagID4DeadStrips).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -500,7 +491,7 @@ SCTCalibWriteTool::wrapUpDeadStrips() {
 StatusCode
 
 SCTCalibWriteTool::wrapUpDeadChips() {
-   if (recordAndStream(m_attrListColl_deadChip, s_deadChipFolderName, m_deadChipRecorded).isFailure())  return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_deadChip.get(), s_deadChipFolderName, m_deadChipRecorded).isFailure())  return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_deadChipFolderName, m_tagID4DeadChips).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -509,7 +500,7 @@ SCTCalibWriteTool::wrapUpDeadChips() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpEfficiency() {
-   if (recordAndStream(m_attrListColl_eff, s_effFolderName, m_effRecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_eff.get(), s_effFolderName, m_effRecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_effFolderName, m_tagID4Efficiency).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -518,7 +509,7 @@ SCTCalibWriteTool::wrapUpEfficiency() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpNoiseOccupancy() {
-   if (recordAndStream(m_attrListColl_no, s_noFolderName, m_noRecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_no.get(), s_noFolderName, m_noRecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_noFolderName, m_tagID4NoiseOccupancy).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -527,7 +518,7 @@ SCTCalibWriteTool::wrapUpNoiseOccupancy() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpRawOccupancy() {
-   if (recordAndStream(m_attrListColl_RawOccu, s_RawOccuFolderName, m_RawOccuRecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_RawOccu.get(), s_RawOccuFolderName, m_RawOccuRecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_RawOccuFolderName, m_tagID4RawOccupancy).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -536,7 +527,7 @@ SCTCalibWriteTool::wrapUpRawOccupancy() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpBSErrors() {
-   if (recordAndStream(m_attrListColl_BSErr, s_BSErrFolderName, m_BSErrRecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_BSErr.get(), s_BSErrFolderName, m_BSErrRecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_BSErrFolderName, m_tagID4BSErrors).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
@@ -545,7 +536,7 @@ SCTCalibWriteTool::wrapUpBSErrors() {
 
 StatusCode
 SCTCalibWriteTool::wrapUpLorentzAngle() {
-   if (recordAndStream(m_attrListColl_LA, s_LAFolderName, m_LARecorded).isFailure()) return StatusCode::FAILURE;
+   if (recordAndStream(m_attrListColl_LA.get(), s_LAFolderName, m_LARecorded).isFailure()) return StatusCode::FAILURE;
    if (registerCondObjectsWithErrMsg(s_LAFolderName, m_tagID4LorentzAngle).isFailure()) return StatusCode::FAILURE;
    return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx
index 1ea03f4dade6..98a94824c0d8 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx
@@ -56,10 +56,6 @@ StatusCode
 SCT_CalibHitmapTool::finalize() {
    ATH_MSG_VERBOSE("SCT_CalibHitmapSvc::finalize()");
 
-   delete m_sct_waferHash;
-   delete m_sct_rdoGroupSize;
-   delete m_sct_firstStrip;
-
    return StatusCode::SUCCESS;
 }
 
@@ -142,11 +138,11 @@ SCT_CalibHitmapTool::fill(const bool fromData) {
    m_numberOfEventsHisto->Fill(1);
 
    //--- Fill hitmap
-   const int MaxEntry{static_cast<int>(m_sct_waferHash->size())};
+   const int MaxEntry{static_cast<int>(m_sct_waferHash.size())};
    for (int i{0}; i != MaxEntry; ++i) {
-      const int theFirstStrip{(*m_sct_firstStrip)[i]};
-      const int endStrip{(*m_sct_rdoGroupSize)[i] + theFirstStrip};
-      const int index{(*m_sct_waferHash)[i]};
+      const int theFirstStrip{m_sct_firstStrip[i]};
+      const int endStrip{m_sct_rdoGroupSize[i] + theFirstStrip};
+      const int index{m_sct_waferHash[i]};
       TH1F* pThisHisto{m_phistoVector[index]};
       for (int strip{theFirstStrip}; strip!=endStrip; ++strip) {
          pThisHisto->Fill(strip);
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h
index 83e57e3aacab..436c84497e0c 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -56,9 +56,9 @@ class SCT_CalibHitmapTool : public extends<AthAlgTool, ISCT_CalibHistoTool>
       SCT_ID::const_id_iterator m_waferItrBegin;
       SCT_ID::const_id_iterator m_waferItrEnd;
       typedef std::vector<int> VecInt;
-      VecInt* m_sct_waferHash{nullptr};
-      VecInt* m_sct_firstStrip{nullptr};
-      VecInt* m_sct_rdoGroupSize{nullptr};
+      VecInt m_sct_waferHash;
+      VecInt m_sct_firstStrip;
+      VecInt m_sct_rdoGroupSize;
 
       SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainerKey{this, "RDOContainer", "SCT_RDOs"};
 
-- 
GitLab


From 60f569f368898cd968e0b316871ec912676f95da Mon Sep 17 00:00:00 2001
From: Micael Verissimo De Araujo <micael.verissimo.de.araujo@cern.ch>
Date: Fri, 12 Jun 2020 09:16:50 +0000
Subject: [PATCH 212/266] Remove test_trigUpgr_egamma_ringer_cf_build.sh from
 TrigUpgradeTest

---
 .../python/TrigL2CaloRingerHypoTool.py        | 56 +++++------
 .../TrigUpgradeTest/share/egammaRinger.py     | 96 -------------------
 .../test_trigUpgr_egamma_ringer_cf_build.sh   | 17 ----
 3 files changed, 25 insertions(+), 144 deletions(-)
 delete mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh

diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerHypoTool.py b/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerHypoTool.py
index dea77fc55d37..4d9e5ec9278b 100644
--- a/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerHypoTool.py
@@ -92,39 +92,33 @@ def _MultTool(name):
 
 
 def TrigL2CaloRingerHypoToolFromDict( d ):
-    """ Use menu decoded chain dictionary to configure the tool """
-    cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
+  """ Use menu decoded chain dictionary to configure the tool """
+  cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
     
-    from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
-    LuminosityCondAlgOnlineDefault()
+  from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
+  LuminosityCondAlgOnlineDefault()
     
-    def __mult(cpart):
-        return int( cpart['multiplicity'] )
+  def __mult(cpart):
+    return int( cpart['multiplicity'] )
 
-    def __th(cpart):
-        return cpart['threshold']
+  def __th(cpart):
+    return cpart['threshold']
     
-    def __sel(cpart):
-        return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
+  def __sel(cpart):
+    return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
     
-    def __cand(cpart):
-        return cpart['trigType']
-
-    name = d['chainName']
-
-    
-    # do we need to configure high multiplicity selection, either NeX or ex_ey_ez etc...?
-    if len(cparts) > 1 or __mult(cparts[0]) > 1:
-        tool = _MultTool(name)
-        for cpart in cparts:
-            for cutNumber in range( __mult( cpart ) ):
-                tool.SubTools += [ _IncTool( cpart['chainPartName']+"_"+str(cutNumber), __cand(cpart), __th(cpart), __sel(cpart) ) ]
-
-        return tool
-    else:        
-        return _IncTool( name, __cand(cparts[0]), __th(cparts[0]), __sel(cparts[0]) )
-
-
-
-
-
+  def __cand(cpart):
+    return cpart['trigType']
+
+  name = d['chainName']
+
+  # do we need to configure high multiplicity selection, either NeX or ex_ey_ez etc...?
+  if len(cparts) > 1 or __mult(cparts[0]) > 1:
+    tool = _MultTool(name)
+    for cpart in cparts:
+      for cutNumber in range( __mult( cpart ) ):
+        tool.SubTools += [ _IncTool( cpart['chainPartName']+"_"+str(cutNumber), __cand(cpart), __th(cpart), __sel(cpart) ) ]
+    # return the tool with all subtools
+    return tool
+  else:        
+    return _IncTool( name, __cand(cparts[0]), __th(cparts[0]), __sel(cparts[0]) )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
deleted file mode 100644
index 8700567ede6c..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-#  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, ViewCreatorInitialROITool
-
-
-doWriteRDOTrigger = False
-doWriteBS = False
-include("TriggerJobOpts/runHLT_standalone.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)
-
-from L1Decoder.L1DecoderConfig import mapThresholdToL1DecisionCollection
-
-filterL1RoIsAlg = RoRSeqFilter( "filterL1RoIsAlg")
-filterL1RoIsAlg.Input = [mapThresholdToL1DecisionCollection("EM")]
-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_FastCaloRinger")
-fastCaloInViewSequence = seqAND( 'fastCaloInViewSequence', [clusterMaker] )
-fastCaloViewsMaker = EventViewCreatorAlgorithm( "fastCaloViewsMaker", OutputLevel=DEBUG)
-fastCaloViewsMaker.ViewFallThrough = True
-fastCaloViewsMaker.InputMakerInputDecisions =  [ "FilteredEMRoIDecisions" ]
-fastCaloViewsMaker.RoIsLink = "initialRoI"
-fastCaloViewsMaker.RoITool = ViewCreatorInitialROITool()
-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_FastCaloRinger")
-
-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 #   __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_trigUpgr_egamma_ringer_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh
deleted file mode 100755
index 7e42273e51d8..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-# art-description: athenaMT trigger test of egamma sequence with ringer
-# art-type: build
-# art-include: master/Athena
-# Skipping art-output which has no effect for build tests.
-# If you create a grid version, check art-output in existing grid tests.
-
-export EVENTS=20
-export THREADS=1
-export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/egammaRinger.py"
-
-# 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
-- 
GitLab


From 55375d0fe20658dbdf69ff142cf2b6af81d5625e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 12 Jun 2020 11:20:50 +0200
Subject: [PATCH 213/266] PyUtils: Delete scripts to create package

Delete `cmake.newanalysisalg`, `cmake.newpkg`, `cmake_newskeleton` and
`cmt_newjobo` helper commands. They were outdated and not clear anybody
is using them. If yes, they can be updated/resurrected.

Fixes ATLASG-1414.
---
 Tools/PyUtils/python/scripts/__init__.py      |   7 +-
 .../python/scripts/cmake_newanalysisalg.py    | 408 ------------------
 Tools/PyUtils/python/scripts/cmake_newpkg.py  | 154 -------
 .../python/scripts/cmake_newskeleton.py       | 131 ------
 Tools/PyUtils/python/scripts/cmt_newjobo.py   | 139 ------
 5 files changed, 2 insertions(+), 837 deletions(-)
 delete mode 100644 Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
 delete mode 100644 Tools/PyUtils/python/scripts/cmake_newpkg.py
 delete mode 100644 Tools/PyUtils/python/scripts/cmake_newskeleton.py
 delete mode 100644 Tools/PyUtils/python/scripts/cmt_newjobo.py

diff --git a/Tools/PyUtils/python/scripts/__init__.py b/Tools/PyUtils/python/scripts/__init__.py
index dbf2414bfc45..55cac552735d 100644
--- a/Tools/PyUtils/python/scripts/__init__.py
+++ b/Tools/PyUtils/python/scripts/__init__.py
@@ -4,20 +4,17 @@
 
 import PyUtils.acmdlib as acmdlib
 acmdlib.register('chk-file', 'PyUtils.scripts.check_file')
+acmdlib.register('chk-sg', 'PyUtils.scripts.check_sg')
+acmdlib.register('chk-rflx', 'PyUtils.scripts.check_reflex')
 acmdlib.register('diff-pool', 'PyUtils.scripts.diff_pool_files')
 acmdlib.register('diff-root', 'PyUtils.scripts.diff_root_files')
 acmdlib.register('dump-root', 'PyUtils.scripts.dump_root_file')
-acmdlib.register('chk-sg', 'PyUtils.scripts.check_sg')
 acmdlib.register('ath-dump', 'PyUtils.scripts.ath_dump')
-acmdlib.register('chk-rflx', 'PyUtils.scripts.check_reflex')
 acmdlib.register('gen-klass', 'PyUtils.scripts.gen_klass')
 
 acmdlib.register('merge-files', 'PyUtils.scripts.merge_files')
 acmdlib.register('filter-files', 'PyUtils.scripts.filter_files')
 
-acmdlib.register('cmake.new-skeleton', 'PyUtils.scripts.cmake_newskeleton')
-acmdlib.register('cmake.new-pkg', 'PyUtils.scripts.cmake_newpkg')
-acmdlib.register('cmake.new-analysisalg', 'PyUtils.scripts.cmake_newanalysisalg')
 acmdlib.register('cmake.depends', 'PyUtils.scripts.cmake_depends')
 
 acmdlib.register('jira.issues', 'PyUtils.scripts.jira_issues')
diff --git a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py b/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
deleted file mode 100644
index db945efeb73b..000000000000
--- a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py
+++ /dev/null
@@ -1,408 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newanalysisalg
-# @purpose streamline and ease the creation of new athena algs
-# @author Will Buttinger
-# @date February 2017
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement, print_function
-
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-from future import standard_library
-standard_library.install_aliases()
-import subprocess
-
-class Templates:
-    alg_hdr_template = """\
-#ifndef %(guard)s
-#define %(guard)s 1
-
-#include "AthAnalysisBaseComps/AthAnalysisAlgorithm.h"
-
-//Example ROOT Includes
-//#include "TTree.h"
-//#include "TH1D.h"
-
-%(namespace_begin)s
-
-class %(klass)s: public ::AthAnalysisAlgorithm { 
- public: 
-  %(klass)s( const std::string& name, ISvcLocator* pSvcLocator );
-  virtual ~%(klass)s(); 
-
-  ///uncomment and implement methods as required
-
-                                        //IS EXECUTED:
-  virtual StatusCode  initialize();     //once, before any input is loaded
-  virtual StatusCode  beginInputFile(); //start of each input file, only metadata loaded
-  //virtual StatusCode  firstExecute();   //once, after first eventdata is loaded (not per file)
-  virtual StatusCode  execute();        //per event
-  //virtual StatusCode  endInputFile();   //end of each input file
-  //virtual StatusCode  metaDataStop();   //when outputMetaStore is populated by MetaDataTools
-  virtual StatusCode  finalize();       //once, after all events processed
-  
-
-  ///Other useful methods provided by base class are:
-  ///evtStore()        : ServiceHandle to main event data storegate
-  ///inputMetaStore()  : ServiceHandle to input metadata storegate
-  ///outputMetaStore() : ServiceHandle to output metadata storegate
-  ///histSvc()         : ServiceHandle to output ROOT service (writing TObjects)
-  ///currentFile()     : TFile* to the currently open input file
-  ///retrieveMetadata(...): See twiki.cern.ch/twiki/bin/view/AtlasProtected/AthAnalysisBase#ReadingMetaDataInCpp
-
-
- private: 
-
-   //Example algorithm property, see constructor for declaration:
-   //int m_nProperty = 0;
-
-   //Example histogram, see initialize method for registration to output histSvc
-   //TH1D* m_myHist = 0;
-   //TTree* m_myTree = 0;
-
-}; 
-%(namespace_end)s
-#endif //> !%(guard)s
-"""
-
-    alg_cxx_template = """\
-// %(pkg)s includes
-#include "%(namespace_klass)s.h"
-
-//#include "xAODEventInfo/EventInfo.h"
-
-
-%(namespace_begin)s
-
-%(klass)s::%(klass)s( const std::string& name, ISvcLocator* pSvcLocator ) : AthAnalysisAlgorithm( name, pSvcLocator ){
-
-  //declareProperty( "Property", m_nProperty = 0, "My Example Integer Property" ); //example property declaration
-
-}
-
-
-%(klass)s::~%(klass)s() {}
-
-
-StatusCode %(klass)s::initialize() {
-  ATH_MSG_INFO ("Initializing " << name() << "...");
-  //
-  //This is called once, before the start of the event loop
-  //Retrieves of tools you have configured in the joboptions go here
-  //
-
-  //HERE IS AN EXAMPLE
-  //We will create a histogram and a ttree and register them to the histsvc
-  //Remember to configure the histsvc stream in the joboptions
-  //
-  //m_myHist = new TH1D("myHist","myHist",100,0,100);
-  //CHECK( histSvc()->regHist("/MYSTREAM/myHist", m_myHist) ); //registers histogram to output stream
-  //m_myTree = new TTree("myTree","myTree");
-  //CHECK( histSvc()->regTree("/MYSTREAM/SubDirectory/myTree", m_myTree) ); //registers tree to output stream inside a sub-directory
-
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::finalize() {
-  ATH_MSG_INFO ("Finalizing " << name() << "...");
-  //
-  //Things that happen once at the end of the event loop go here
-  //
-
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::execute() {  
-  ATH_MSG_DEBUG ("Executing " << name() << "...");
-  setFilterPassed(false); //optional: start with algorithm not passed
-
-
-
-  //
-  //Your main analysis code goes here
-  //If you will use this algorithm to perform event skimming, you
-  //should ensure the setFilterPassed method is called
-  //If never called, the algorithm is assumed to have 'passed' by default
-  //
-
-
-  //HERE IS AN EXAMPLE
-  //const xAOD::EventInfo* ei = 0;
-  //CHECK( evtStore()->retrieve( ei , "EventInfo" ) );
-  //ATH_MSG_INFO("eventNumber=" << ei->eventNumber() );
-  //m_myHist->Fill( ei->averageInteractionsPerCrossing() ); //fill mu into histogram
-
-
-  setFilterPassed(true); //if got here, assume that means algorithm passed
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::beginInputFile() { 
-  //
-  //This method is called at the start of each input file, even if
-  //the input file contains no events. Accumulate metadata information here
-  //
-
-  //example of retrieval of CutBookkeepers: (remember you will need to include the necessary header files and use statements in requirements file)
-  // const xAOD::CutBookkeeperContainer* bks = 0;
-  // CHECK( inputMetaStore()->retrieve(bks, "CutBookkeepers") );
-
-  //example of IOVMetaData retrieval (see https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_access_file_metadata_in_C)
-  //float beamEnergy(0); CHECK( retrieveMetadata("/TagInfo","beam_energy",beamEnergy) );
-  //std::vector<float> bunchPattern; CHECK( retrieveMetadata("/Digitiation/Parameters","BeamIntensityPattern",bunchPattern) );
-
-
-
-  return StatusCode::SUCCESS;
-}
-
-%(namespace_end)s
-"""
-    testxml_template = """\
-   <TEST name="%(namespace_klass)s" type="athena" suite="ASGTests">
-      <options_atn>%(pkg)s/%(namespace_klass)sJobOptions.py</options_atn>
-      <timelimit>5</timelimit>
-      <author> PLEASE ENTER A NAME </author>
-      <mailto> PLEASEENTER@cern.ch </mailto>
-      <expectations>
-         <errorMessage> Athena exited abnormally </errorMessage>
-         <errorMessage>FAILURE (ERROR)</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-"""
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmake.new-analysisalg'
-    )
-@acmdlib.argument(
-    'algname',
-    help="name of the new alg"
-    )
-@acmdlib.argument(
-    '--newJobo',
-    action='store_true',
-    default=False,
-    help='Create a skeleton joboption for execution of the new algorithm'
-    )
-
-def main(args):
-    """create a new AthAnalysisAlgorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmake new-analysisalg MyAlg
-    """
-    sc = 0
-    
-    full_alg_name = args.algname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that src dir exists and CMakeLists.txt exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/src") or not os.path.isfile(cwd+"/CMakeLists.txt"):
-        print ("ERROR you must call new-analysisalg from within the package you want to add the algorithm to")
-        return -1
-   
-   
-    full_pkg_name = os.path.basename(cwd)
-    print (textwrap.dedent("""\
-    ::: create alg [%(full_alg_name)s] in pkg [%(full_pkg_name)s]""" %locals()))
-
-    
-    #first we must check that CMakeLists.txt file has the AthAnalysisBaseComps dependency in it
-    foundBaseComps=False
-    hasxAODEventInfo=False
-    hasAtlasROOT=False
-    hasAsgTools=False
-    lastUse=0 
-    lineCount=0
-    hasLibraryLine=False
-    hasComponentLine=False
-    for line in open('CMakeLists.txt'):
-        lineCount +=1 
-        if "atlas_add_library" in line: hasLibraryLine=True
-        if "atlas_add_component" in line: hasComponentLine=True
-
-#GOT THIS FAR WITH EDITING
-
-        
-        
-
-    
-    #following code borrowed from gen_klass
-    hdr = getattr(Templates, 'alg_hdr_template')
-    cxx = getattr(Templates, 'alg_cxx_template')
-    
-    namespace_klass = full_alg_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_alg_name.count("::")>0:
-        namespace    = full_alg_name.split("::")[0]
-        full_alg_name = full_alg_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper())
-
-    d = dict( pkg=full_pkg_name,
-              klass=full_alg_name,
-              guard=guard,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace
-              )
-    fname = os.path.splitext("src/%s"%namespace_klass)[0]
-    #first check doesn't exist 
-    if os.path.isfile(fname+'.h'):
-       print (":::  ERROR %s.h already exists" % fname)
-       return -1
-    print (":::  INFO Creating %s.h" % fname)
-    o_hdr = open(fname+'.h', 'w')
-    o_hdr.writelines(hdr%d)
-    o_hdr.flush()
-    o_hdr.close()
-
-    if os.path.isfile(fname+'.cxx'):
-       print (":::  ERROR %s.cxx already exists" % fname)
-       return -1
-    print (":::  INFO Creating %s.cxx" % fname)
-    o_cxx = open(fname+'.cxx', 'w')
-    o_cxx.writelines(cxx%d)
-    o_cxx.flush()
-    o_cxx.close()
-
-    #now add the algorithm to the _entries.cxx file in the components folder 
-    #first check they exist
-    if not os.path.exists("src/components"): os.mkdir("src/components")
-    if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name):
-       print (":::  INFO Creating src/components/%s_load.cxx"%full_pkg_name)
-       loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w')
-       loadFile.writelines(""" 
-#include "GaudiKernel/LoadFactoryEntries.h"
-LOAD_FACTORY_ENTRIES(%(pkg)s)
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-      
-    if not os.path.isfile("src/components/%s_entries.cxx"%full_pkg_name):
-       print (":::  INFO Creating src/components/%s_entries.cxx"%full_pkg_name)
-       loadFile = open("src/components/%s_entries.cxx"%full_pkg_name,'w')
-       if len(namespace_begin)>0:
-          d["namespace"] = args.algname.split("::")[0]
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_NAMESPACE_ALGORITHM_FACTORY(%(namespace)s, %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );
-}
-"""%d)
-       else:
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_ALGORITHM( %(klass)s );
-}
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-    else:
-       #first check algorithm not already in _entries file 
-       inFile=False
-       for line in open("src/components/%s_entries.cxx"%full_pkg_name):
-          if len(namespace_begin)==0 and "DECLARE_ALGORITHM" in line and d["klass"] in line: inFile=True
-          if len(namespace_begin)>0 and "DECLARE_NAMESPACE_ALGORITHM" in line and d["klass"] in line and d["namespace"]: inFile=True
-          
-       if not inFile:
-         print (":::  INFO Adding %s to src/components/%s_entries.cxx"% (args.algname,full_pkg_name))
-         nextAdd=False
-         for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1):
-            if nextAdd and "{" not in line:
-               nextAdd=False
-               if len(namespace_begin)>0:
-                  print ("""  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );"""%d)
-               else:
-                  print ("""  DECLARE_ALGORITHM( %(klass)s );"""%d)
-            if line.startswith("DECLARE_FACTORY_ENTRIES"):
-               nextAdd=True
-               if len(namespace_begin)>0:
-                  
-                  print ("""
-#include "../%(namespace_klass)s.h"
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( %(namespace)s, %(klass)s )
-"""%d)
-               else:
-                  print ("""
-#include "../%(namespace_klass)s.h"
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-"""%d)
-            print (line, end='')
-   
-   
-    if args.newJobo:
-      #make the joboptions file too
-      full_jobo_name = namespace_klass + "JobOptions"
-      full_alg_name = namespace_klass
-   
-      print (textwrap.dedent("""\
-      ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals()))
-   
-      #following code borrowed from gen_klass
-      from cmt_newjobo import Templates as joboTemplates
-      jobo = getattr(joboTemplates, 'jobo_template')
-   
-      e = dict( klass=full_alg_name,
-               inFile=os.environ['ASG_TEST_FILE_MC'],
-               )
-      fname = 'share/%s.py' % full_jobo_name
-      #first check doesn't exist 
-      if os.path.isfile(fname):
-         print (":::  WARNING %s already exists .. will not overwrite" % fname)
-      else:
-         o_hdr = open(fname, 'w')
-         o_hdr.writelines(jobo%e)
-         o_hdr.flush()
-         o_hdr.close()
-
-    #need to reconfigure cmake so it knows about the new files
-    #rely on the WorkDir_DIR env var for this
-    workDir = os.environ.get("WorkDir_DIR")
-    if workDir is None:
-        print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
-        print ("::: ERROR Please do this and reconfigure cmake manually!")
-    else:
-        print (":::  INFO Reconfiguring cmake %s/../." % workDir)
-        res = subprocess.getstatusoutput('cmake %s/../.' % workDir)
-        if res[0]!=0:
-            print (":::  WARNING reconfigure unsuccessful. Please reconfigure manually!")
-        
-
-    print (":::  INFO Please ensure your CMakeLists.txt file has ")
-    print (":::       atlas_add_component( %s src/component/*.cxx ... )" % full_pkg_name)
-    print (":::  INFO and necessary dependencies declared ")
-    print (":::  INFO Minimum dependency is: Control/AthAnalysisBaseComps")
-
diff --git a/Tools/PyUtils/python/scripts/cmake_newpkg.py b/Tools/PyUtils/python/scripts/cmake_newpkg.py
deleted file mode 100644
index 3451bd557cb1..000000000000
--- a/Tools/PyUtils/python/scripts/cmake_newpkg.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmake_newpkg
-# @purpose streamline and ease the creation of new cmake packages
-# @author Will Buttinger
-# @date Feb 2017
-
-from __future__ import with_statement, print_function
-
-__author__ = "Will buttinger"
-__doc__ = "streamline and ease the creation of new cmake packages"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import PyUtils.acmdlib as acmdlib
-
-from future import standard_library
-standard_library.install_aliases()
-import subprocess
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmake.new-pkg'
-    )
-@acmdlib.argument(
-    'pkgname',
-    help="(fully qualified) name of the new package"
-    )
-@acmdlib.argument(
-    '--author',
-    default='${USER}',
-    help='name of the author of this new package'
-    )
-
-def main(args):
-    """create a new cmake package with sensible atlas-oriented defaults
-
-    ex:
-     $ acmd cmake new-pkg Control/MyContainer/NewPackage
-    """
-    sc = 0
-    
-    full_pkg_name = args.pkgname
-    if full_pkg_name[0] == '/':
-        full_pkg_name = full_pkg_name[1:]
-    
-    pkg_path = os.path.dirname(os.getcwd() + "/" + full_pkg_name)
-    pkg_name = os.path.basename(full_pkg_name)
-    pkg_vers = '%s-00-00-00' % pkg_name
-    author = os.path.expanduser(os.path.expandvars(args.author))
-
-    if os.path.exists(pkg_path+"/"+pkg_name):
-        print ("ERROR: %s package already exists" % full_pkg_name)
-        return 1
-        
-    print (textwrap.dedent("""\
-    ::: creating package [%(full_pkg_name)s]...
-    :::   - pkg name:    %(pkg_name)s
-    :::   - pkg version: %(pkg_vers)s
-    :::   - pkg path:    %(pkg_path)s
-    :::   - author:      %(author)s""" % locals()))
-
-
-    #create the directories
-    try:
-        os.makedirs(pkg_path+"/"+pkg_name+"/src")
-        os.makedirs(pkg_path+"/"+pkg_name+"/share")
-        os.makedirs(pkg_path+"/"+pkg_name+"/python")
-        os.makedirs(pkg_path+"/"+pkg_name+"/data")
-        os.makedirs(pkg_path+"/"+pkg_name+"/util")
-    except OSError:
-        print ("ERROR while making directories for " % (pkg_path+"/"+pkg_name+"/src"))
-        return -1
-
-
-    with open(os.path.join(pkg_path+"/"+pkg_name,'CMakeLists.txt'), 'w') as req:
-        print (textwrap.dedent("""\
-        ## automatically generated CMakeLists.txt file
-
-        # Declare the package
-        atlas_subdir( %(pkg_name)s )
-
-        # Declare external dependencies ... default here is to include ROOT
-        find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist )
-
-        # Declare public and private dependencies
-        # Public dependencies are anything that appears in the headers in public include dir
-        # Private is anything else
-        
-        # An example is included
-        atlas_depends_on_subdirs(
-            PUBLIC
-   
-            PRIVATE
-            # Control/AthAnalysisBaseComps
-        )
-
-        # Declare package as a library
-        # Note the convention that library names get "Lib" suffix
-        # Any package you add to dependencies above, you should add
-        # to LINK_LIBRARIES line below (see the example)
-        atlas_add_library( %(pkg_name)sLib src/*.cxx
-                           PUBLIC_HEADERS %(pkg_name)s
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES}
-                                            #AthAnalysisBaseCompsLib
-        )
-
-        # if you add components (tools, algorithms) to this package
-        # uncomment the next lines
-        # atlas_add_component( %(pkg_name)s src/components/*.cxx
-        #                      LINK_LIBRARIES %(pkg_name)sLib 
-        # )
-      
-        # if you add an application (exe) to this package
-        # declare it like this (note convention that apps live in util dir)
-        # atlas_add_executable( MyApp util/myApp.cxx
-        #                       LINK_LIBRARIES %(pkg_name)sLib
-        # )
-
-        # Install python modules, joboptions, and share content
-        atlas_install_python_modules( python/*.py )
-        atlas_install_joboptions( share/*.py )
-        atlas_install_data( data/* )
-        # You can access your data from code using path resolver, e.g.
-        # PathResolverFindCalibFile("%(pkg_name)s/file.txt")
-
-        
-        """%locals()), file=req)
-    
-    #also create a version.cmake file with PackageName-00-00-01 in it
-    with open(os.path.join(pkg_path+"/"+pkg_name,'version.cmake'), 'w') as req:
-        print (("%s-00-00-01" % pkg_name), file=req)
-
-    #need to reconfigure cmake so it knows about the new files
-    #rely on the WorkDir_DIR env var for this
-    workDir = os.environ.get("WorkDir_DIR")
-    if workDir is None:
-        print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
-        print ("::: ERROR Please do this and reconfigure cmake manually!")
-    else:
-        print (":::  INFO Reconfiguring cmake %s/../." % workDir)
-        res = subprocess.getstatusoutput('cmake %s/../.' % workDir)
-        if res[0]!=0:
-            print (":::  WARNING reconfigure unsuccessful. Please reconfigure manually!")
-
-
-    print ("::: creating package [%(full_pkg_name)s]... [done]" % locals())
-    
-    
-    
-    return sc
-
diff --git a/Tools/PyUtils/python/scripts/cmake_newskeleton.py b/Tools/PyUtils/python/scripts/cmake_newskeleton.py
deleted file mode 100644
index b48dd07188cc..000000000000
--- a/Tools/PyUtils/python/scripts/cmake_newskeleton.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newanalysisalg
-# @purpose streamline and ease the creation of new athena algs
-# @author Will Buttinger
-# @date February 2017
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement, print_function
-
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm in a new package"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import PyUtils.acmdlib as acmdlib
-
-from future import standard_library
-standard_library.install_aliases()
-import subprocess
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmake.new-skeleton'
-    )
-@acmdlib.argument(
-    'pkgname',
-    help="name of the new pkg"
-    )
-
-
-def main(args):
-    """create a new skeleton package
-
-    ex:
-     $ acmd cmake new-skeleton MyPackage
-    """
-    sc = 0
-    
-    full_pkg_name = args.pkgname
-
-    #make new package
-    res = subprocess.getstatusoutput('acmd cmake new-pkg %s' % full_pkg_name)
-    if res[0]!=0:
-        print (":::  ERROR could not create new package")
-        return -1
-
-
-    #add algorithm
-    res = subprocess.getstatusoutput('cd %s;acmd cmake new-analysisalg --newJobo %sAlg' % (full_pkg_name,full_pkg_name))
-    if res[0]!=0:
-        print (":::  ERROR could not create new alg")
-        return -1
-
-    pkg_name = full_pkg_name
-
-    # overwrite CMakeLists with our skeleton
-    with open(os.path.join(full_pkg_name,'CMakeLists.txt'), 'w') as req:
-        print (textwrap.dedent("""\
-        ## automatically generated CMakeLists.txt file
-
-        # Declare the package
-        atlas_subdir( %(pkg_name)s )
-
-        # Declare external dependencies ... default here is to include ROOT
-        find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist )
-
-        # Declare public and private dependencies
-        # Public dependencies are anything that appears in the headers in public include dir
-        # Private is anything else
-        
-        # An example is included
-        atlas_depends_on_subdirs(
-            PUBLIC
-   
-            PRIVATE
-            Control/AthAnalysisBaseComps
-        )
-
-        # Declare package as a library
-        # Note the convention that library names get "Lib" suffix
-        # Any package you add to dependencies above, you should add
-        # to LINK_LIBRARIES line below (see the example)
-        atlas_add_library( %(pkg_name)sLib src/*.cxx
-                           PUBLIC_HEADERS %(pkg_name)s
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES}
-                                            AthAnalysisBaseCompsLib
-        )
-
-        # if you add components (tools, algorithms) to this package
-        # these lines are needed so you can configure them in joboptions
-        atlas_add_component( %(pkg_name)s src/components/*.cxx
-                              LINK_LIBRARIES %(pkg_name)sLib 
-        )
-      
-        # if you add an application (exe) to this package
-        # declare it like this (note convention that apps go in the util dir)
-        # atlas_add_executable( MyApp util/myApp.cxx
-        #                       LINK_LIBRARIES %(pkg_name)sLib
-        # )
-
-        # Install python modules, joboptions, and share content
-        atlas_install_python_modules( python/*.py )
-        atlas_install_joboptions( share/*.py )
-        atlas_install_data( data/* )
-        # You can access your data from code using path resolver, e.g.
-        # PathResolverFindCalibFile("%(pkg_name)s/file.txt")
-
-        
-        """%locals()), file=req)
-
-
-
-
-    #need to reconfigure cmake so it knows about the new files
-    #rely on the WorkDir_DIR env var for this
-    workDir = os.environ.get("WorkDir_DIR")
-    if workDir is None:
-        print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?")
-        print ("::: ERROR Please do this and reconfigure cmake manually!")
-    else:
-        print (":::  INFO Reconfiguring cmake %s/../." % workDir)
-        res = subprocess.getstatusoutput('cmake %s/../.' % workDir)
-        if res[0]!=0:
-            print (":::  WARNING reconfigure unsuccessful. Please reconfigure manually!")
-        
-
diff --git a/Tools/PyUtils/python/scripts/cmt_newjobo.py b/Tools/PyUtils/python/scripts/cmt_newjobo.py
deleted file mode 100644
index 4d09dd880f44..000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newjobo.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newalg
-# @purpose streamline and ease the creation of a skeleton joboption
-# @author Will Buttinger
-# @date March 2015
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement, print_function
-
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new skeleton joboption for analysis"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import PyUtils.acmdlib as acmdlib
-
-class Templates:
-    jobo_template = """\
-#Skeleton joboption for a simple analysis job
-
-#---- Minimal joboptions -------
-
-theApp.EvtMax=10                                         #says how many events to run over. Set to -1 for all events
-jps.AthenaCommonFlags.FilesInput = ["%(inFile)s"]   #insert your list of input files here (do this before next lines)
-
-#Now choose your read mode (POOL, xAOD, or TTree):
-
-#POOL:
-#import AthenaPoolCnvSvc.ReadAthenaPool                   #sets up reading of any POOL files (but POOL is slow)
-
-#xAOD:
-import AthenaRootComps.ReadAthenaxAODHybrid               #FAST xAOD reading!
-
-#TTree:
-#import AthenaRootComps.ReadAthenaRoot                    #read a flat TTree, very fast, but no EDM objects
-#svcMgr.EventSelector.TupleName="MyTree"                  #You usually must specify the name of the tree (default: CollectionTree)
-
-algseq = CfgMgr.AthSequencer("AthAlgSeq")                #gets the main AthSequencer
-algseq += CfgMgr.%(klass)s()                                 #adds an instance of your alg to it
-
-#-------------------------------
-
-
-#note that if you edit the input files after this point you need to pass the new files to the EventSelector:
-#like this: svcMgr.EventSelector.InputCollections = ["new","list"] 
-
-
-
-
-
-##--------------------------------------------------------------------
-## This section shows up to set up a HistSvc output stream for outputing histograms and trees
-## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_output_trees_and_histogra for more details and examples
-
-#if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() #only add the histogram service if not already present (will be the case in this jobo)
-#svcMgr.THistSvc.Output += ["MYSTREAM DATAFILE='myfile.root' OPT='RECREATE'"] #add an output root file stream
-
-##--------------------------------------------------------------------
-
-
-##--------------------------------------------------------------------
-## The lines below are an example of how to create an output xAOD
-## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_create_an_output_xAOD for more details and examples
-
-#from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-#xaodStream = MSMgr.NewPoolRootStream( "StreamXAOD", "xAOD.out.root" )
-
-##EXAMPLE OF BASIC ADDITION OF EVENT AND METADATA ITEMS
-##AddItem and AddMetaDataItem methods accept either string or list of strings
-#xaodStream.AddItem( ["xAOD::JetContainer#*","xAOD::JetAuxContainer#*"] ) #Keeps all JetContainers (and their aux stores)
-#xaodStream.AddMetaDataItem( ["xAOD::TriggerMenuContainer#*","xAOD::TriggerMenuAuxContainer#*"] )
-#ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool("TriggerMenuMetaDataTool") #MetaDataItems needs their corresponding MetaDataTool
-#svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] #Add the tool to the MetaDataSvc to ensure it is loaded
-
-##EXAMPLE OF SLIMMING (keeping parts of the aux store)
-#xaodStream.AddItem( ["xAOD::ElectronContainer#Electrons","xAOD::ElectronAuxContainer#ElectronsAux.pt.eta.phi"] ) #example of slimming: only keep pt,eta,phi auxdata of electrons
-
-##EXAMPLE OF SKIMMING (keeping specific events)
-#xaodStream.AddAcceptAlgs( "%(klass)s" ) #will only keep events where 'setFilterPassed(false)' has NOT been called in the given algorithm
-
-##--------------------------------------------------------------------
-
-
-include("AthAnalysisBaseComps/SuppressLogging.py")              #Optional include to suppress as much athena output as possible. Keep at bottom of joboptions so that it doesn't suppress the logging of the things you have configured above
-
-"""
-
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-jobo'
-    )
-@acmdlib.argument(
-    'joboName',
-    help="name of the joboption"
-    )
-@acmdlib.argument(
-    'alg',
-    default='MyAlg',
-    help='name of the algorithm to add to sequence'
-    )
-@acmdlib.argument(
-    '--inFile',
-    default='my.pool.root',
-    help='name of an input file to add to EventSelector'
-    )
-def main(args):
-    """create a new algorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-jobo myJobo MyAlg
-    """
-
-    full_jobo_name = args.joboName
-    full_alg_name = args.alg
-
-    print (textwrap.dedent("""\
-    ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals()))
-
-    #following code borrowed from gen_klass
-    jobo = getattr(Templates, 'jobo_template')
-
-    d = dict( klass=args.alg,
-              inFile=args.inFile,
-              )
-    fname = args.joboName+'.py'
-    #first check doesn't exist 
-    if os.path.isfile(fname):
-       print (":::  ERROR %s already exists" % fname)
-       return -1
-    o_hdr = open(fname, 'w')
-    o_hdr.writelines(jobo%d)
-    o_hdr.flush()
-    o_hdr.close()
-
-- 
GitLab


From 7e22dcfe4d35914ed585ca46b57dc04453ce9e69 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 12 Jun 2020 11:23:21 +0200
Subject: [PATCH 214/266] PyUtils: Update help messages

---
 Tools/PyUtils/bin/checkMetaSG.py                |  1 -
 Tools/PyUtils/bin/checkTP.py                    |  1 -
 Tools/PyUtils/bin/checkxAOD.py                  |  1 -
 Tools/PyUtils/bin/diff-jobo-cfg.py              |  1 -
 Tools/PyUtils/bin/filter-and-merge-d3pd.py      |  1 -
 Tools/PyUtils/bin/print_auditor_callgraph.py    |  9 ++++-----
 Tools/PyUtils/python/Logging.py                 |  1 -
 Tools/PyUtils/python/scripts/cmake_depends.py   |  1 +
 Tools/PyUtils/python/scripts/diff_pool_files.py |  8 +++-----
 Tools/PyUtils/python/scripts/diff_root_files.py |  6 +++---
 Tools/PyUtils/python/scripts/filter_files.py    |  6 +++---
 Tools/PyUtils/python/scripts/merge_files.py     | 10 ++++------
 12 files changed, 18 insertions(+), 28 deletions(-)

diff --git a/Tools/PyUtils/bin/checkMetaSG.py b/Tools/PyUtils/bin/checkMetaSG.py
index 26211f16f569..66e6e22f2598 100755
--- a/Tools/PyUtils/bin/checkMetaSG.py
+++ b/Tools/PyUtils/bin/checkMetaSG.py
@@ -15,7 +15,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 724150 $"
 __author__  = "Will Buttinger <will@cern.ch>"
 
 import sys
diff --git a/Tools/PyUtils/bin/checkTP.py b/Tools/PyUtils/bin/checkTP.py
index 325faa77b50f..5494a43340ac 100755
--- a/Tools/PyUtils/bin/checkTP.py
+++ b/Tools/PyUtils/bin/checkTP.py
@@ -20,7 +20,6 @@ from __future__ import print_function
 import sys
 import os
 
-__version__ = "$Revision: 1.3 $"
 __author__  = "Sebastien Binet"
 
 # MN: this has no effect when using RootType 
diff --git a/Tools/PyUtils/bin/checkxAOD.py b/Tools/PyUtils/bin/checkxAOD.py
index cd09a7b28653..c694d0a0bcd5 100755
--- a/Tools/PyUtils/bin/checkxAOD.py
+++ b/Tools/PyUtils/bin/checkxAOD.py
@@ -10,7 +10,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 776263 $"
 __author__  = "Sebastien Binet <binet@cern.ch>, " \
     "Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>, " \
     "RD Schaffer R.D.Schaffer@cern.ch"
diff --git a/Tools/PyUtils/bin/diff-jobo-cfg.py b/Tools/PyUtils/bin/diff-jobo-cfg.py
index bd2d7009a02a..8b6d464d6f6f 100755
--- a/Tools/PyUtils/bin/diff-jobo-cfg.py
+++ b/Tools/PyUtils/bin/diff-jobo-cfg.py
@@ -16,7 +16,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 298860 $"
 __author__  = "Sebastien Binet, Adrien Renaud"
 
 import sys
diff --git a/Tools/PyUtils/bin/filter-and-merge-d3pd.py b/Tools/PyUtils/bin/filter-and-merge-d3pd.py
index f53ff2638255..6cae1e2dfa6c 100755
--- a/Tools/PyUtils/bin/filter-and-merge-d3pd.py
+++ b/Tools/PyUtils/bin/filter-and-merge-d3pd.py
@@ -747,7 +747,6 @@ Accepted command line options:
 # @author http://code.activestate.com/recipes/573463
 #         slightly adapted to follow PEP8 conventions
 
-__version__ = "$Revision: 547442 $"
 __doc__ = """\
 functions to convert an XML file into a python dict, back and forth
 """
diff --git a/Tools/PyUtils/bin/print_auditor_callgraph.py b/Tools/PyUtils/bin/print_auditor_callgraph.py
index e3bf1cc952c8..5d4c72751b17 100755
--- a/Tools/PyUtils/bin/print_auditor_callgraph.py
+++ b/Tools/PyUtils/bin/print_auditor_callgraph.py
@@ -16,7 +16,6 @@
 
 from __future__ import print_function
 
-__version__ = "$Revision: 1.1 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 import os
@@ -30,11 +29,11 @@ class Steps:
     ALLOWED = ('ini', 'exe', 'fin')
     
 def parse_log_file(fname, step=Steps.ini):
-    beg_pat = re.compile(r"NameAuditor.*?About to Enter "\
-                         r"(?P<CompName>.*?) "\
+    beg_pat = re.compile(r"NameAuditor.*?About to Enter "
+                         r"(?P<CompName>.*?) "
                          r"%s Method"%step)
-    end_pat = re.compile(r"NameAuditor.*?Just Exited "\
-                         r"(?P<CompName>.*?) "\
+    end_pat = re.compile(r"NameAuditor.*?Just Exited "
+                         r"(?P<CompName>.*?) "
                          r"%s Method"%step)
 
     stack = 0
diff --git a/Tools/PyUtils/python/Logging.py b/Tools/PyUtils/python/Logging.py
index 5459479b4db3..4646514d3140 100644
--- a/Tools/PyUtils/python/Logging.py
+++ b/Tools/PyUtils/python/Logging.py
@@ -5,7 +5,6 @@
 ## @purpose: try to import Logging from AthenaCommon.
 ##           falls back on stdlib's one
 
-__version__ = "$Revision$"
 __author__  = "Sebastien Binet"
 
 __all__ = ['msg', 'logging']
diff --git a/Tools/PyUtils/python/scripts/cmake_depends.py b/Tools/PyUtils/python/scripts/cmake_depends.py
index b0ab8de345e6..d598e41b0966 100644
--- a/Tools/PyUtils/python/scripts/cmake_depends.py
+++ b/Tools/PyUtils/python/scripts/cmake_depends.py
@@ -186,6 +186,7 @@ class AthGraph:
 @acmdlib.argument('--cmakedot', help=argparse.SUPPRESS)
 
 def main(args):
+   """Inspect cmake build dependencies"""
 
    # Find packages.dot:
    if not args.cmakedot:
diff --git a/Tools/PyUtils/python/scripts/diff_pool_files.py b/Tools/PyUtils/python/scripts/diff_pool_files.py
index 5f9de6453525..90db00dbcd32 100644
--- a/Tools/PyUtils/python/scripts/diff_pool_files.py
+++ b/Tools/PyUtils/python/scripts/diff_pool_files.py
@@ -1,12 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.diff_pool_files
 # @purpose check that 2 POOL files have same content (containers and sizes).
 # @author Sebastien Binet
 # @date February 2010
 
-__version__ = "$Revision: 276362 $"
-__doc__ = "check that 2 POOL files have same content (containers and sizes)."
+__doc__ = "diff two POOL files (containers and sizes)"
 __author__ = "Sebastien Binet"
 
 
@@ -23,8 +22,7 @@ import PyUtils.acmdlib as acmdlib
                   default=False,
                   help="""Enable verbose printout""")
 def main(args):
-    """check that 2 POOL files have same content (containers and sizes)
-    """
+    """diff two POOL files (containers and sizes)"""
 
     import os.path as osp
     old = osp.expandvars(osp.expanduser(args.old))
diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py
index 33797a6742ef..f5c785f992ec 100644
--- a/Tools/PyUtils/python/scripts/diff_root_files.py
+++ b/Tools/PyUtils/python/scripts/diff_root_files.py
@@ -5,7 +5,7 @@
 # @author Sebastien Binet
 # @date February 2010
 
-__doc__ = "check that 2 ROOT files have same content (containers and sizes)."
+__doc__ = "diff two ROOT files (containers and sizes)"
 __author__ = "Sebastien Binet"
 
 ### imports -------------------------------------------------------------------
@@ -96,8 +96,8 @@ allowed: %(choices)s
                   help="""Compare nan as equal to nan""")
 
 def main(args):
-    """check that 2 ROOT files have same content (containers and sizes)
-    """
+    """diff two ROOT files (containers and sizes)"""
+
     global g_args
     g_args = args
     
diff --git a/Tools/PyUtils/python/scripts/filter_files.py b/Tools/PyUtils/python/scripts/filter_files.py
index 4c93e976cb0d..207a731a4aea 100644
--- a/Tools/PyUtils/python/scripts/filter_files.py
+++ b/Tools/PyUtils/python/scripts/filter_files.py
@@ -7,7 +7,7 @@
 # @date March 2010
 from __future__ import with_statement
 
-__doc__ = "take a bunch of input (pool/bs) files and produce a filtered one"
+__doc__ = "filter multiple input (pool/bs) files"
 __author__ = "Sebastien Binet"
 
 
@@ -33,8 +33,8 @@ import PyUtils.acmdlib as acmdlib
     help='comma separated list of tuples (run,event) numbers to select or an ascii file containg a list of such run+event numbers to select'
     )
 def main(args):
-    """take a bunch of input (pool/bs) files and produce a filtered one
-    """
+    """filter multiple input (pool/bs) files"""
+
     exitcode = 0
 
     import PyUtils.Logging as L
diff --git a/Tools/PyUtils/python/scripts/merge_files.py b/Tools/PyUtils/python/scripts/merge_files.py
index b87db3b1ac58..58a6ebed1a09 100644
--- a/Tools/PyUtils/python/scripts/merge_files.py
+++ b/Tools/PyUtils/python/scripts/merge_files.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file PyUtils.scripts.merge_files
 # @purpose take a bunch of input (pool/bs) files and produce a single one
@@ -6,8 +6,7 @@
 # @author Sebastien Binet
 # @date February 2010
 
-__version__ = "$Revision: 310812 $"
-__doc__ = "take a bunch of input (pool/bs) files and produce a single one"
+__doc__ = "merge multiple input (pool/bs) files"
 __author__ = "Sebastien Binet"
 
 
@@ -39,8 +38,8 @@ import PyUtils.acmdlib as acmdlib
     help = "Path to a file where to put athena job's logfile"
     )
 def main(args):
-    """take a bunch of input (pool/bs) files and produce a single one
-    """
+    """merge multiple input (pool/bs) files"""
+
     exitcode = 0
 
     import PyUtils.Logging as L
@@ -48,7 +47,6 @@ def main(args):
     msg.setLevel(L.logging.INFO)
 
     msg.info(':'*40)
-    msg.info('welcome to merge-files version %s', __version__)
 
     import os.path as osp
     args.files = [ osp.expandvars(osp.expanduser(fname))
-- 
GitLab


From 074ba207be4c39fed6495f183baa71d2123476ef Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Fri, 12 Jun 2020 09:31:45 +0000
Subject: [PATCH 215/266] Switch to HepMC3/HepMC2 compatible loops

---
 Generators/AtlasHepMC/AtlasHepMC/GenEvent.h   |  4 ++
 .../GeneratorFilters/BSignalFilter.h          | 10 +--
 .../GeneratorFilters/BSubstruct.h             |  8 +--
 .../GeneratorFilters/MissingEtFilter.h        |  4 +-
 .../TTbarPlusHeavyFlavorFilter.h              | 24 +++----
 .../GeneratorFilters/src/AsymJetFilter.cxx    | 24 +++----
 .../GeneratorFilters/src/BSignalFilter.cxx    | 46 ++++++-------
 .../GeneratorFilters/src/BSubstruct.cxx       | 14 ++--
 .../src/BoostedHadTopAndTopPair.cxx           |  6 +-
 .../src/ChargedTracksFilter.cxx               | 12 ++--
 .../GeneratorFilters/src/DiBjetFilter.cxx     | 13 ++--
 .../src/DiLeptonMassFilter.cxx                |  6 +-
 .../GeneratorFilters/src/DiPhotonFilter.cxx   | 14 ++--
 .../GeneratorFilters/src/ElectronFilter.cxx   |  6 +-
 .../src/ForwardProtonFilter.cxx               | 14 ++--
 .../src/FourLeptonInvMassFilter.cxx           |  5 +-
 .../src/FourLeptonMassFilter.cxx              |  4 +-
 .../GeneratorFilters/src/GapJetFilter.cxx     | 11 ++-
 .../src/HeavyFlavorHadronFilter.cxx           | 44 ++++++------
 Generators/GeneratorFilters/src/JetFilter.cxx | 22 +++---
 .../src/JetFilterWithTruthPhoton.cxx          | 68 +++++--------------
 .../src/LeadingPhotonFilter.cxx               |  8 +--
 .../GeneratorFilters/src/LeptonFilter.cxx     | 11 ++-
 .../GeneratorFilters/src/MassRangeFilter.cxx  |  4 +-
 .../GeneratorFilters/src/MissingEtFilter.cxx  | 27 +++-----
 .../src/MultiElectronFilter.cxx               |  8 +--
 .../src/MultiLeptonFilter.cxx                 |  8 +--
 .../GeneratorFilters/src/MultiMuonFilter.cxx  | 10 ++-
 .../src/MultiObjectsFilter.cxx                | 22 +++---
 .../GeneratorFilters/src/MuonFilter.cxx       | 10 ++-
 .../GeneratorFilters/src/PhotonFilter.cxx     | 10 +--
 .../src/PtmissAndOrLeptonFilter.cxx           | 25 ++++---
 .../src/TTbarPhotonWhizardHwgFilter.cxx       | 13 ++--
 .../src/TTbarPlusHeavyFlavorFilter.cxx        | 44 ++++++------
 .../src/TrimuMassRangeFilter.cxx              |  4 +-
 .../src/XtoVVDecayFilterExtended.cxx          |  8 +--
 36 files changed, 254 insertions(+), 317 deletions(-)

diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
index cb9bceff26c1..8d574751cca9 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
@@ -7,6 +7,10 @@
 #include "HepMC/GenVertex.h"
 #include "AtlasHepMC/GenVertex.h"
 namespace HepMC {
+inline GenEvent::particle_iterator  begin(HepMC::GenEvent& e){ return e.particles_begin(); }
+inline GenEvent::particle_iterator  end(HepMC::GenEvent& e){ return e.particles_end(); }
+inline GenEvent::particle_const_iterator  begin(const HepMC::GenEvent& e){ return e.particles_begin(); }
+inline GenEvent::particle_const_iterator  end(const HepMC::GenEvent& e){ return e.particles_end(); }
 inline GenEvent* newGenEvent(const int a, const int b ){ return new GenEvent(a,b); }
 inline GenVertex* signal_process_vertex(const GenEvent* e) { return e->signal_process_vertex(); }
 inline GenVertex* barcode_to_vertex(const GenEvent* e, int id ){return  e->barcode_to_vertex(id);}
diff --git a/Generators/GeneratorFilters/GeneratorFilters/BSignalFilter.h b/Generators/GeneratorFilters/GeneratorFilters/BSignalFilter.h
index c0731cdfc0c0..39aacb5bb5b1 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/BSignalFilter.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/BSignalFilter.h
@@ -65,23 +65,23 @@ class BSignalFilter : public GenFilter
   // ** Private member functions **
 
   // Find child
-  void FindAllChildren(const HepMC::GenParticlePtr mother,std::string treeIDStr,  
+  void FindAllChildren(HepMC::ConstGenParticlePtr mother,std::string treeIDStr,  
 		       bool fromFinalB, bool &foundSignal, bool &passedAllCuts,
 		       TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB) const;
 
   // Check whether child has pass cuts
-  bool FinalStatePassedCuts(const HepMC::GenParticlePtr child) const; 
+  bool FinalStatePassedCuts(HepMC::ConstGenParticlePtr child) const; 
 
   // Test whether final states pass cuts
    bool test_cuts(const double myPT, const double testPT,
 		 const double myEta, const double testEta) const;
   
   // LVL1 and LVL2 cuts
-  bool LVL1_Mu_Trigger(const HepMC::GenParticlePtr child) const;
-  bool LVL2_eMu_Trigger(const HepMC::GenParticlePtr child) const;
+  bool LVL1_Mu_Trigger(HepMC::ConstGenParticlePtr child) const;
+  bool LVL2_eMu_Trigger(HepMC::ConstGenParticlePtr child) const;
   
   // Print child (for debug)
-  void PrintChild(const HepMC::GenParticlePtr child, const std::string treeIDStr, const bool fromFinalB) const; 
+  void PrintChild(HepMC::ConstGenParticlePtr child, const std::string treeIDStr, const bool fromFinalB) const; 
   
 };
 
diff --git a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
index ab0c3a86200e..4ab32c7eb9a5 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
@@ -9,7 +9,7 @@
 #include "xAODJet/Jet.h"
 class TH1;
 
-typedef std::vector<HepMC::GenParticlePtr> Particles;
+typedef std::vector<HepMC::ConstGenParticlePtr> Particles;
 
 class BSubstruct : public GenFilter{
 public:
@@ -31,14 +31,14 @@ private:
    *  Recursively calls itself to return a list of all particles earlier in the
    *  decay chain that are c or b-flavoured.
    */
-  Particles ancestorCBs(const HepMC::GenParticlePtr p)const;
+  Particles ancestorCBs(HepMC::ConstGenParticlePtr p)const;
 
   /// the delta-r between two vectors at y, phi
   double deltaR(double y1, double phi1, double y2, double phi2)const;
   /// the delta-r between a jet an a hadron
-  double deltaR(const HepMC::GenParticlePtr particle, const xAOD::Jet *jet)const;
+  double deltaR(HepMC::ConstGenParticlePtr particle, const xAOD::Jet *jet)const;
   /// the delta-r between two hadrons
-  double deltaR(const HepMC::GenParticlePtr particle1, const HepMC::GenParticlePtr particle2)const;
+  double deltaR(HepMC::ConstGenParticlePtr particle1, HepMC::ConstGenParticlePtr particle2)const;
   /// the delta-r between two jets
   double deltaR(const xAOD::Jet*, const xAOD::Jet*)const;
   // the delta-phi of two angles, returned in the range 0-Pi
diff --git a/Generators/GeneratorFilters/GeneratorFilters/MissingEtFilter.h b/Generators/GeneratorFilters/GeneratorFilters/MissingEtFilter.h
index bfe99b0ba369..8fbedf46ae40 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/MissingEtFilter.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/MissingEtFilter.h
@@ -15,8 +15,8 @@ public:
   MissingEtFilter(const std::string& name, ISvcLocator* pSvcLocator);
   virtual StatusCode filterEvent();
 
-  bool fromTau( const HepMC::GenParticlePtr tp ) const;
-  bool fromWZ( const HepMC::GenParticlePtr tp ) const;
+  bool fromTau( HepMC::ConstGenParticlePtr tp ) const;
+  bool fromWZ( HepMC::ConstGenParticlePtr tp ) const;
 
  private:
 
diff --git a/Generators/GeneratorFilters/GeneratorFilters/TTbarPlusHeavyFlavorFilter.h b/Generators/GeneratorFilters/GeneratorFilters/TTbarPlusHeavyFlavorFilter.h
index e6b088910771..963228c93dc7 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/TTbarPlusHeavyFlavorFilter.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/TTbarPlusHeavyFlavorFilter.h
@@ -47,28 +47,28 @@ private:
   bool m_excludeCFromTop;
 
 
-  bool passBSelection(const HepMC::GenParticlePtr part) const;
-  bool passCSelection(const HepMC::GenParticlePtr part) const;
+  bool passBSelection(HepMC::ConstGenParticlePtr part) const;
+  bool passCSelection(HepMC::ConstGenParticlePtr part) const;
 
   int hadronType(int pdgid) const;
-  bool isBHadron(const HepMC::GenParticlePtr part) const;
-  bool isCHadron(const HepMC::GenParticlePtr part) const;
+  bool isBHadron(HepMC::ConstGenParticlePtr part) const;
+  bool isCHadron(HepMC::ConstGenParticlePtr part) const;
 
-  bool isInitialHadron(const HepMC::GenParticlePtr part) const;
-  bool isFinalHadron(const HepMC::GenParticlePtr part) const;
+  bool isInitialHadron(HepMC::ConstGenParticlePtr part) const;
+  bool isFinalHadron(HepMC::ConstGenParticlePtr part) const;
 
-  bool isQuarkFromHadron(const HepMC::GenParticlePtr part) const;
-  bool isCHadronFromB(const HepMC::GenParticlePtr part) const;
+  bool isQuarkFromHadron(HepMC::ConstGenParticlePtr part) const;
+  bool isCHadronFromB(HepMC::ConstGenParticlePtr part) const;
 
   /// init_part needed to detect looping graphs (sherpa) and to switch on using barcode to resolve it without affecting pythia8
   /// up to know only seen at parton level
-  bool isLooping(const HepMC::GenParticlePtr part, std::set<HepMC::GenParticlePtr> init_part = std::set<HepMC::GenParticlePtr>()) const;
+  bool isLooping(HepMC::ConstGenParticlePtr part, std::set<HepMC::ConstGenParticlePtr> init_part = std::set<HepMC::ConstGenParticlePtr>()) const;
 
   HepMC::ConstGenParticlePtr  findInitial(HepMC::ConstGenParticlePtr part, bool looping) const;
 
-  bool isFromTop(const HepMC::GenParticlePtr part, bool looping) const;
-  bool isDirectlyFromTop(const HepMC::GenParticlePtr part, bool looping) const;
-  bool isDirectlyFromWTop(const HepMC::GenParticlePtr part, bool looping) const;
+  bool isFromTop(HepMC::ConstGenParticlePtr part, bool looping) const;
+  bool isDirectlyFromTop(HepMC::ConstGenParticlePtr part, bool looping) const;
+  bool isDirectlyFromWTop(HepMC::ConstGenParticlePtr part, bool looping) const;
 
 
 
diff --git a/Generators/GeneratorFilters/src/AsymJetFilter.cxx b/Generators/GeneratorFilters/src/AsymJetFilter.cxx
index 92f0ed4f788e..2a55f5580440 100644
--- a/Generators/GeneratorFilters/src/AsymJetFilter.cxx
+++ b/Generators/GeneratorFilters/src/AsymJetFilter.cxx
@@ -94,20 +94,18 @@ StatusCode AsymJetFilter::filterEvent() {
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     // Loop over all particles in the event and build up the grid
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ){
-      if ( (*pitr)->status() == 1 ){// stables only
-        if ( ((*pitr)->pdg_id() != 13 ) &&  ((*pitr)->pdg_id() != -13 )
-             &&((*pitr)->pdg_id() != 12 ) && ((*pitr)->pdg_id() != -12 )
-             &&((*pitr)->pdg_id() != 14 ) && ((*pitr)->pdg_id() != -14 )
-             &&((*pitr)->pdg_id() != 16 ) && ((*pitr)->pdg_id() != -16 )
-             && (fabs((*pitr)->momentum().pseudoRapidity()) <= m_emaxeta)
+    for (auto part: *genEvt){
+      if ( part->status() == 1 ){// stables only
+        if ( (part->pdg_id() != 13 ) &&  (part->pdg_id() != -13 )
+             &&(part->pdg_id() != 12 ) && (part->pdg_id() != -12 )
+             &&(part->pdg_id() != 14 ) && (part->pdg_id() != -14 )
+             &&(part->pdg_id() != 16 ) && (part->pdg_id() != -16 )
+             && (fabs(part->momentum().pseudoRapidity()) <= m_emaxeta)
              ){ // no neutrinos or muons and particles must be in active range
           int ip,ie;
-          //      std::cout << (*pitr)->momentum().phi() << "eta" << (*pitr)->momentum().pseudoRapidity() << std::endl;
-          ip=(int) ((m_twopi/2.+ (*pitr)->momentum().phi())/m_edphi); //phi is in range -CLHEP::pi to CLHEP::pi
-          ie=(int) (((*pitr)->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
-          //          std::cout << ip << "   "<< ie <<std::endl;
-          //          std::cout << " true rap " << (*pitr)->momentum().pseudoRapidity() << "false rap " << (ie+0.5)*m_edeta-m_emaxeta << " True phi " <<  (*pitr)->momentum().phi() << "  false phi  "  << -m_twopi/2.+(ip+0.5)*m_edphi << std::endl;
+          //      std::cout << part->momentum().phi() << "eta" << part->momentum().pseudoRapidity() << std::endl;
+          ip=(int) ((m_twopi/2.+ part->momentum().phi())/m_edphi); //phi is in range -CLHEP::pi to CLHEP::pi
+          ie=(int) ((part->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
 
           if ( (ie<0) || (ie>=  m_greta)) { // outside the ends so we should not be here
             ATH_MSG_FATAL("  Jet too close to end");
@@ -117,7 +115,7 @@ StatusCode AsymJetFilter::filterEvent() {
             ip+=m_grphi; //fix phi wrapping note that this is done after rr is calculated
           while (ip>m_grphi-1)
             ip-=m_grphi; //fix phi wrapping note that this is done after rr is calculated
-          etgrid[ip][ie]=etgrid[ip][ie]+(*pitr)->momentum().perp(); // fortran had pt here
+          etgrid[ip][ie]=etgrid[ip][ie]+part->momentum().perp(); // fortran had pt here
         }
       }
     }
diff --git a/Generators/GeneratorFilters/src/BSignalFilter.cxx b/Generators/GeneratorFilters/src/BSignalFilter.cxx
index 62b96f3828a3..0fbf3a9b420d 100644
--- a/Generators/GeneratorFilters/src/BSignalFilter.cxx
+++ b/Generators/GeneratorFilters/src/BSignalFilter.cxx
@@ -116,12 +116,12 @@ StatusCode BSignalFilter::filterEvent()
       if ( m_localLVL1MuonCutOn )
         {
 	  //
-	  for(auto pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ){
-	      bool LVL1Result = LVL1_Mu_Trigger( (*pitr) );
+	  for(auto part: *genEvt){
+	      bool LVL1Result = LVL1_Mu_Trigger( part );
 	      if ( LVL1Result )
                 {
 		  LVL1Passed = true;
-		  LVL1MuonBarcode = HepMC::barcode(*pitr);  // Remember the muon for LVL2 testing
+		  LVL1MuonBarcode = HepMC::barcode(part);  // Remember the muon for LVL2 testing
 		  break;
                 }
             }
@@ -133,12 +133,12 @@ StatusCode BSignalFilter::filterEvent()
       //
       if ( LVL1Passed && (m_localLVL2MuonCutOn || m_localLVL2ElectronCutOn) )
         {
-	  for(auto pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr )
+	  for(auto part: *genEvt)
             {
-	      bool LVL2Result = LVL2_eMu_Trigger( (*pitr) );
+	      bool LVL2Result = LVL2_eMu_Trigger( part );
 	      if ( LVL2Result )
                 {
-		  if ( HepMC::barcode(*pitr) != LVL1MuonBarcode ) // Check the particle triggering LVL2 isn't
+		  if ( HepMC::barcode(part) != LVL1MuonBarcode ) // Check the particle triggering LVL2 isn't
 		    LVL2Passed = true;	                       // the muon that triggered LVL1 --> Artificial,
 		                                               // since, effectively, LVL2 trigger is not applied.
                                                                // This is needed to "trigger" the 2nd muon!
@@ -172,14 +172,14 @@ StatusCode BSignalFilter::filterEvent()
 
       // ** Reject event if an undecayed quark is found **
       //
-      for(auto pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr )
+      for(auto part: *genEvt)
         {
-	  if ( abs((*pitr)->pdg_id()) <= 6 && (*pitr)->status() == 1 )
+	  if ( abs(part->pdg_id()) <= 6 && part->status() == 1 )
             {
 	      acceptEvent = false;
-	      const int pID = (*pitr)->pdg_id();
+	      const int pID = part->pdg_id();
 	      ATH_MSG_WARNING(" Undecayed quark " << pID << " found"
-			      << " , status = " << (*pitr)->status());
+			      << " , status = " << part->status());
             }
         }
 
@@ -189,23 +189,23 @@ StatusCode BSignalFilter::filterEvent()
       if ( LVL1Passed && LVL2Passed )
         {
 	  // ** Loop on all particles **
-	  for(auto pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr )
+	  for(auto part: *genEvt)
             {
-	      const int particleID = (*pitr)->pdg_id();
+	      const int particleID = part->pdg_id();
 	      //
 	      bool motherIsB = false;
 	      bool newBChain = false;
 
 	      if( ( MC::PID::isBottomMeson(particleID) || MC::PID::isBottomBaryon(particleID) )
-		  && (*pitr)->status()!=3 ) // p->status()!=3 excludes the partons
+		  && part->status()!=3 ) // p->status()!=3 excludes the partons
 		                            // including immediate decays of resonances.
                 {
 		  // ** Reject whole event if any of B-hadrons in the event is not decayed **
-		  if( (*pitr)->status() == 1 || (*pitr)->status() == 899 ) { acceptEvent = false; }
+		  if( part->status() == 1 || part->status() == 899 ) { acceptEvent = false; }
 
 		  HepMC::GenVertex::particle_iterator firstParent, lastParent, thisParent;
-		  firstParent = (*pitr)->production_vertex()->particles_begin(HepMC::parents);
-		  lastParent  = (*pitr)->production_vertex()->particles_end(HepMC::parents);
+		  firstParent = part->production_vertex()->particles_begin(HepMC::parents);
+		  lastParent  = part->production_vertex()->particles_end(HepMC::parents);
 
 		  for( thisParent = firstParent; thisParent != lastParent++; ++thisParent )
                     {
@@ -234,7 +234,7 @@ StatusCode BSignalFilter::filterEvent()
 		  ATH_MSG_DEBUG(" *** BSignalFilter.cxx: B-signal found ***  ");
 		  ATH_MSG_DEBUG(" ------------------------------------------ ");
 		  ATH_MSG_DEBUG("");
-		  ATH_MSG_DEBUG(" Event " << m_EventCnt << " --> B-hadron/B-meson id " << particleID << " (" << HadronName << ") , status " << (*pitr)->status());
+		  ATH_MSG_DEBUG(" Event " << m_EventCnt << " --> B-hadron/B-meson id " << particleID << " (" << HadronName << ") , status " << part->status());
 		  ATH_MSG_DEBUG("");
 
 		  // ** Looping on all children checking if they have passed the selection cuts defined by the user **
@@ -251,7 +251,7 @@ StatusCode BSignalFilter::filterEvent()
 		      bool havePassedCuts=true;
 		      TLorentzVector CandPart1, CandPart2;
 		      //
-		      FindAllChildren((*pitr),"",false,isSignal,havePassedCuts,CandPart1,CandPart2,false);
+		      FindAllChildren(part,"",false,isSignal,havePassedCuts,CandPart1,CandPart2,false);
 		      //
 		      ATH_MSG_DEBUG("");
 		      ATH_MSG_DEBUG(" ------------------------------- ");
@@ -361,7 +361,7 @@ bool BSignalFilter::test_cuts(const double myPT, const double testPT,
 }
 
 
-bool BSignalFilter::LVL1_Mu_Trigger(const HepMC::GenParticlePtr child) const
+bool BSignalFilter::LVL1_Mu_Trigger(HepMC::ConstGenParticlePtr child) const
 {
   bool accept = false;
   int pID = child->pdg_id();
@@ -376,7 +376,7 @@ bool BSignalFilter::LVL1_Mu_Trigger(const HepMC::GenParticlePtr child) const
 }
 
 
-bool BSignalFilter::LVL2_eMu_Trigger(const HepMC::GenParticlePtr child) const
+bool BSignalFilter::LVL2_eMu_Trigger(HepMC::ConstGenParticlePtr child) const
 {
   bool accept = false;
   int pID = child->pdg_id();
@@ -392,7 +392,7 @@ bool BSignalFilter::LVL2_eMu_Trigger(const HepMC::GenParticlePtr child) const
 }
 
 
-void BSignalFilter::FindAllChildren(const HepMC::GenParticlePtr mother,std::string treeIDStr,
+void BSignalFilter::FindAllChildren(HepMC::ConstGenParticlePtr mother,std::string treeIDStr,
 				    bool fromFinalB, bool &foundSignal, bool &passedAllCuts,
 				    TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB) const
 {
@@ -460,7 +460,7 @@ void BSignalFilter::FindAllChildren(const HepMC::GenParticlePtr mother,std::stri
 }
 
 
-bool BSignalFilter::FinalStatePassedCuts(const HepMC::GenParticlePtr child) const
+bool BSignalFilter::FinalStatePassedCuts(HepMC::ConstGenParticlePtr child) const
 {
   bool accept = true;
 
@@ -593,7 +593,7 @@ bool BSignalFilter::FinalStatePassedCuts(const HepMC::GenParticlePtr child) cons
 }
 
 
-void BSignalFilter::PrintChild(const HepMC::GenParticlePtr child,
+void BSignalFilter::PrintChild(HepMC::ConstGenParticlePtr child,
 			       const std::string treeIDStr, const bool fromFinalB) const
 {
   int pID = child->pdg_id();
diff --git a/Generators/GeneratorFilters/src/BSubstruct.cxx b/Generators/GeneratorFilters/src/BSubstruct.cxx
index 5d210e163bf4..8fe8c53f7873 100644
--- a/Generators/GeneratorFilters/src/BSubstruct.cxx
+++ b/Generators/GeneratorFilters/src/BSubstruct.cxx
@@ -64,7 +64,7 @@ inline double BSubstruct::deltaR(double y1, double phi1, double y2, double phi2)
 }
 
 
-inline  double BSubstruct::deltaR(const HepMC::GenParticlePtr particle1, const HepMC::GenParticlePtr particle2) const {
+inline  double BSubstruct::deltaR(HepMC::ConstGenParticlePtr particle1, HepMC::ConstGenParticlePtr  particle2) const {
   double rap1 = 0.5 * log((particle1->momentum().e() + particle1->momentum().pz()) /
                           (particle1->momentum().e() - particle1->momentum().pz()));
   double rap2 = 0.5 * log((particle2->momentum().e() + particle2->momentum().pz()) /
@@ -73,7 +73,7 @@ inline  double BSubstruct::deltaR(const HepMC::GenParticlePtr particle1, const H
 }
 
 
-inline double BSubstruct::deltaR(const HepMC::GenParticlePtr particle, const xAOD::Jet* jet) const {
+inline double BSubstruct::deltaR(HepMC::ConstGenParticlePtr  particle, const xAOD::Jet* jet) const {
   // GenParticle does not provide rapidity (only pseudo-rapidity)
   // Since we are likely dealing with massive b-hadrons and massive jets
   // and the jet-clustering alg uses rapidity, I think we should use that
@@ -88,9 +88,9 @@ inline double BSubstruct::deltaR(const xAOD::Jet* jet1, const xAOD::Jet* jet2) c
 }
 
 
-inline Particles BSubstruct::ancestorCBs(const HepMC::GenParticlePtr p) const {
+inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr  p) const {
   Particles parentBs;
-  const HepMC::GenVertexPtr vtx = p->production_vertex();
+  auto vtx = p->production_vertex();
 
   // If the particle has no production vertex then can only assume it is beam or similar
   // therefore return empty set of parents.
@@ -164,7 +164,7 @@ StatusCode BSubstruct::filterInitialize() {
 
 StatusCode BSubstruct::filterEvent() {
   ++m_nEvents;
-  std::vector<HepMC::GenParticlePtr> bHadrons;
+  std::vector<HepMC::ConstGenParticlePtr> bHadrons;
   for (McEventCollection::const_iterator evt = events()->begin(); evt != events()->end(); ++evt) {
     if ((*evt) == 0) { // WTF?
       ++m_nRejected;
@@ -173,8 +173,8 @@ StatusCode BSubstruct::filterEvent() {
     }
 
     if (!m_doHeavyHadrons) continue;
-    for (HepMC::GenEvent::particle_const_iterator p = (*evt)->particles_begin(); p != (*evt)->particles_end(); ++p) {
-      if (hasCBQuark((*p)->pdg_id())) bHadrons.push_back(*p);
+    for (auto p: **evt) {
+      if (hasCBQuark(p->pdg_id())) bHadrons.push_back(p);
     }
   }
 
diff --git a/Generators/GeneratorFilters/src/BoostedHadTopAndTopPair.cxx b/Generators/GeneratorFilters/src/BoostedHadTopAndTopPair.cxx
index eea4606a4c5b..4b799ed9f476 100644
--- a/Generators/GeneratorFilters/src/BoostedHadTopAndTopPair.cxx
+++ b/Generators/GeneratorFilters/src/BoostedHadTopAndTopPair.cxx
@@ -47,11 +47,7 @@ StatusCode BoostedHadTopAndTopPair::filterEvent() {
     const HepMC::GenEvent* genEvt = *itr;
 
     
-    // Loop over all truth particles in the event
-    HepMC::GenEvent::particle_const_iterator pitr;
-    for (pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ) {
-
-      HepMC::GenParticle* part = (*pitr);
+  for (auto part: *genEvt){
       int pdgId = part->pdg_id();
   
       // pdgId t quark = 6
diff --git a/Generators/GeneratorFilters/src/ChargedTracksFilter.cxx b/Generators/GeneratorFilters/src/ChargedTracksFilter.cxx
index 77062a319d0d..703ebf8eb836 100644
--- a/Generators/GeneratorFilters/src/ChargedTracksFilter.cxx
+++ b/Generators/GeneratorFilters/src/ChargedTracksFilter.cxx
@@ -23,19 +23,17 @@ StatusCode ChargedTracksFilter::filterEvent() {
   for (McEventCollection::const_iterator itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
 
-    // Loop over all particles in event
-    HepMC::GenEvent::particle_const_iterator pitr;
-    for (pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
+  for (auto part: *genEvt){
       // We only care about stable particles
-      if (!MC::isGenStable(*pitr)) continue;
+      if (!MC::isGenStable(part)) continue;
 
       // Particle's charge
-      int pID = (*pitr)->pdg_id();
+      int pID = part->pdg_id();
       double pCharge = MC::PID::charge(pID);
 
       // Count tracks in specified acceptance
-      const double pT = (*pitr)->momentum().perp();
-      const double eta = (*pitr)->momentum().pseudoRapidity();
+      const double pT = part->momentum().perp();
+      const double eta = part->momentum().pseudoRapidity();
       if (pT >= m_Ptmin && fabs(eta) <= m_EtaRange && pCharge != 0) {
         ATH_MSG_DEBUG("Found particle, " <<
                       " pT = " << pT <<
diff --git a/Generators/GeneratorFilters/src/DiBjetFilter.cxx b/Generators/GeneratorFilters/src/DiBjetFilter.cxx
index d14ed7ec2e7d..1d4790fac8ea 100644
--- a/Generators/GeneratorFilters/src/DiBjetFilter.cxx
+++ b/Generators/GeneratorFilters/src/DiBjetFilter.cxx
@@ -124,17 +124,16 @@ StatusCode DiBjetFilter::filterEvent() {
   double weight = 1;
   for (const HepMC::GenEvent* genEvt : *events()) {
     weight = genEvt->weights().front();
-    HepMC::GenEvent::particle_const_iterator pitr;
-    std::vector< HepMC::GenEvent::particle_const_iterator > bHadrons;
-    for(pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ) {  
-      if( !isBwithWeakDK( (*pitr)->pdg_id()) ) continue;
-      if( (*pitr)->momentum().perp() < m_bottomPtMin ) continue;
-      if( fabs( (*pitr)->momentum().pseudoRapidity() ) > m_bottomEtaMax) continue;
+    std::vector< HepMC::ConstGenParticlePtr > bHadrons;
+    for(auto pitr: *genEvt) {  
+      if( !isBwithWeakDK( pitr->pdg_id()) ) continue;
+      if( pitr->momentum().perp() < m_bottomPtMin ) continue;
+      if( std::abs( pitr->momentum().pseudoRapidity() ) > m_bottomEtaMax) continue;
       bHadrons.push_back(pitr);     
     }    
     for(uint i = 0; i < jets.size(); i++){   
       for(uint j = 0; j < bHadrons.size(); j++){
-	HepMC::FourVector tmp = (*bHadrons[j])->momentum();
+	HepMC::FourVector tmp = bHadrons[j]->momentum();
 	TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
 	double dR = (*jets[i])->p4().DeltaR(genpart);
 	if(dR<m_deltaRFromTruth){ 
diff --git a/Generators/GeneratorFilters/src/DiLeptonMassFilter.cxx b/Generators/GeneratorFilters/src/DiLeptonMassFilter.cxx
index 6369f7be6817..86b097331517 100644
--- a/Generators/GeneratorFilters/src/DiLeptonMassFilter.cxx
+++ b/Generators/GeneratorFilters/src/DiLeptonMassFilter.cxx
@@ -35,9 +35,7 @@ StatusCode DiLeptonMassFilter::filterEvent() {
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
     // Loop over all particles in the event
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_begin=genEvt->particles_begin();
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_end=genEvt->particles_end();
-    for (auto pitr1 = genEvt_particles_begin; pitr1 != genEvt_particles_end; ++pitr1 ){
+    for (auto pitr1 = HepMC::begin(*genEvt);  pitr1!=HepMC::end(*genEvt); ++pitr1 ){
       int pdgId1((*pitr1)->pdg_id());
       if((*pitr1)->status()!=1) continue;
 
@@ -49,7 +47,7 @@ StatusCode DiLeptonMassFilter::filterEvent() {
           auto pitr2 = pitr1;
           pitr2++;
 
-          for(; pitr2 != genEvt_particles_end; ++pitr2){
+          for(; pitr2 != HepMC::end(*genEvt); ++pitr2){
             int pdgId2((*pitr2)->pdg_id());
             //if((*pitr2)->status()!=1 && pitr1 != pitr2) continue;
             if((*pitr2)->status()!=1 || pitr1 == pitr2) continue;
diff --git a/Generators/GeneratorFilters/src/DiPhotonFilter.cxx b/Generators/GeneratorFilters/src/DiPhotonFilter.cxx
index a9a9cf519003..2c3d5b181230 100644
--- a/Generators/GeneratorFilters/src/DiPhotonFilter.cxx
+++ b/Generators/GeneratorFilters/src/DiPhotonFilter.cxx
@@ -10,7 +10,7 @@
 /// @todo Move to a sorting utils module
 class High2LowByGenParticleClassPt {
 public:
-  bool operator() (const HepMC::GenParticlePtr t1, const HepMC::GenParticlePtr t2) const {
+  bool operator() (HepMC::ConstGenParticlePtr t1, HepMC::ConstGenParticlePtr t2) const {
     return t1->momentum().perp2() > t2->momentum().perp2();
   }
 };
@@ -56,15 +56,15 @@ StatusCode DiPhotonFilter::filterEvent() {
   ATH_MSG_DEBUG("min pt(photon) = " << ptcut << " (CLHEP::MeV)");
 
   // find truth photons
-  std::vector<HepMC::GenParticlePtr> MCTruthPhotonList;
+  std::vector<HepMC::ConstGenParticlePtr> MCTruthPhotonList;
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     // Loop over all particles in the event
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ) {
-      if ( ((*pitr)->pdg_id() == 22) ) {
-        if ( (*pitr)->status() == 1 && ((*pitr)->momentum().perp() >= ptcut) ) {
-          MCTruthPhotonList.push_back((*pitr));
+    for (auto part: *genEvt) {
+      if ( (part->pdg_id() == 22) ) {
+        if ( part->status() == 1 && (part->momentum().perp() >= ptcut) ) {
+          MCTruthPhotonList.push_back(part);
         }
       }
     }
@@ -79,7 +79,7 @@ StatusCode DiPhotonFilter::filterEvent() {
   if (MCTruthPhotonList.size() < 2) {
     isOK = false;
   } else {
-    std::vector<HepMC::GenParticlePtr> MCTruthPhotonList2;
+    std::vector<HepMC::ConstGenParticlePtr> MCTruthPhotonList2;
     // check pT and eta to select truth photons
     for (size_t i = 0; i < MCTruthPhotonList.size(); ++i) {
       ATH_MSG_DEBUG(i << ": pT=" << MCTruthPhotonList[i]->momentum().perp() << ", eta=" << MCTruthPhotonList[i]->momentum().pseudoRapidity());
diff --git a/Generators/GeneratorFilters/src/ElectronFilter.cxx b/Generators/GeneratorFilters/src/ElectronFilter.cxx
index 1bfeb5d42665..5f8f65f194a7 100644
--- a/Generators/GeneratorFilters/src/ElectronFilter.cxx
+++ b/Generators/GeneratorFilters/src/ElectronFilter.cxx
@@ -16,9 +16,9 @@ ElectronFilter::ElectronFilter(const std::string& name, ISvcLocator* pSvcLocator
 StatusCode ElectronFilter::filterEvent() {
   for (McEventCollection::const_iterator itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
-    for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ) {
-      if ((*pitr)->status() == 1 && abs((*pitr)->pdg_id()) == 11) { // electron
-        if ((*pitr)->momentum().perp() >= m_Ptmin && fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) {
+    for (auto part: *genEvt) {
+      if (part->status() == 1 && abs(part->pdg_id()) == 11) { // electron
+        if (part->momentum().perp() >= m_Ptmin && fabs(part->momentum().pseudoRapidity()) <= m_EtaRange) {
           return StatusCode::SUCCESS;
         }
       }
diff --git a/Generators/GeneratorFilters/src/ForwardProtonFilter.cxx b/Generators/GeneratorFilters/src/ForwardProtonFilter.cxx
index 8ecbe5d6132c..425cf7835ef8 100644
--- a/Generators/GeneratorFilters/src/ForwardProtonFilter.cxx
+++ b/Generators/GeneratorFilters/src/ForwardProtonFilter.cxx
@@ -37,19 +37,17 @@ StatusCode ForwardProtonFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
-    HepMC::GenEvent::particle_const_iterator pitr;
-    for (pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ) {
-
+    for (auto part: *genEvt) {
       // We're only interested in stable (status == 1) particles
-      if ( (*pitr)->status() != 1) continue;
+      if ( part->status() != 1) continue;
 
       // We are specifically looking for protons
-      const long pid = (*pitr)->pdg_id();
+      const long pid = part->pdg_id();
       if (pid != 2212 ) continue;
 
-      const double E = (*pitr)->momentum().e();
-      const double pz = (*pitr)->momentum().pz();
-      const double pt = (*pitr)->momentum().perp();
+      const double E = part->momentum().e();
+      const double pz = part->momentum().pz();
+      const double pt = part->momentum().perp();
       const double xi = (m_E0-E)/m_E0;
       if (m_xiMin <= xi && xi <= m_xiMax && m_ptMin <= pt && pt <= m_ptMax) {
         accepted_C = (pz > 0);
diff --git a/Generators/GeneratorFilters/src/FourLeptonInvMassFilter.cxx b/Generators/GeneratorFilters/src/FourLeptonInvMassFilter.cxx
index ff14bdd5036c..f70572cd14c4 100644
--- a/Generators/GeneratorFilters/src/FourLeptonInvMassFilter.cxx
+++ b/Generators/GeneratorFilters/src/FourLeptonInvMassFilter.cxx
@@ -36,9 +36,8 @@ StatusCode FourLeptonInvMassFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_begin = genEvt->particles_begin();
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_end = genEvt->particles_end();
-      
+     auto genEvt_particles_begin = HepMC::begin(*genEvt);
+     auto genEvt_particles_end = HepMC::end(*genEvt);
     // Loop over all particles in the event
     for (auto  pitr1 = genEvt_particles_begin; pitr1 != genEvt_particles_end; ++pitr1 ){
       if((*pitr1)->status()!=1) continue;
diff --git a/Generators/GeneratorFilters/src/FourLeptonMassFilter.cxx b/Generators/GeneratorFilters/src/FourLeptonMassFilter.cxx
index aa906eb2abeb..39e8afba9d6b 100644
--- a/Generators/GeneratorFilters/src/FourLeptonMassFilter.cxx
+++ b/Generators/GeneratorFilters/src/FourLeptonMassFilter.cxx
@@ -36,8 +36,8 @@ StatusCode FourLeptonMassFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_begin = genEvt->particles_begin();
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_end = genEvt->particles_end();
+    auto genEvt_particles_begin = HepMC::begin(*genEvt);
+    auto genEvt_particles_end = HepMC::begin(*genEvt);
     for (auto  pitr1 = genEvt_particles_begin; pitr1 != genEvt_particles_end; ++pitr1) {
 	  if ((*pitr1)->status() != 1) continue;
 
diff --git a/Generators/GeneratorFilters/src/GapJetFilter.cxx b/Generators/GeneratorFilters/src/GapJetFilter.cxx
index 3804d7a052e7..76d0ccb601db 100644
--- a/Generators/GeneratorFilters/src/GapJetFilter.cxx
+++ b/Generators/GeneratorFilters/src/GapJetFilter.cxx
@@ -250,13 +250,10 @@ GapJetFilter::filterEvent()
   for (HepMC::GenEvent* genEvt : *events()) {
 
     // Loop over all particles in event
-    HepMC::GenEvent::particle_const_iterator pitr;
-    for (pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ) {
-
-//particles must be stable 
-      ptpart = (*pitr)->momentum().perp();
-      etapart = (*pitr)->momentum().pseudoRapidity();
-      if((*pitr)->status()==1 && ptpart >m_PtCut && fabs(etapart) < m_EtaCut){
+    for (auto pitr: *genEvt ) {
+      ptpart = pitr->momentum().perp();
+      etapart = pitr->momentum().pseudoRapidity();
+      if(pitr->status()==1 && ptpart >m_PtCut && std::abs(etapart) < m_EtaCut){
 	Clustag=1; 
       if (etapart>cl_maxeta) cl_maxeta=etapart;
       if (etapart<cl_mineta) cl_mineta=etapart;
diff --git a/Generators/GeneratorFilters/src/HeavyFlavorHadronFilter.cxx b/Generators/GeneratorFilters/src/HeavyFlavorHadronFilter.cxx
index e7a95fcd3dbf..a258095fa630 100644
--- a/Generators/GeneratorFilters/src/HeavyFlavorHadronFilter.cxx
+++ b/Generators/GeneratorFilters/src/HeavyFlavorHadronFilter.cxx
@@ -88,7 +88,7 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
     const HepMC::GenEvent* genEvt = *itr;
 
     // Loop over all truth particles in the event
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
+    for (auto part: *genEvt) {
       /// @todo This could be so much more efficient! And with so much less code duplication...
 
       // b-quarks
@@ -97,11 +97,11 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
       // between the final quark in the decay chain and intermediates
       // That means the code is NOT appropriate for counting the number
       // of heavy flavor quarks!
-      if (m_Request_bQuark && std::abs((*pitr)->pdg_id())==5 &&
-          (*pitr)->momentum().perp()>m_bPtMin &&
-          fabs((*pitr)->momentum().pseudoRapidity())<m_bEtaMax) {
+      if (m_Request_bQuark && std::abs(part->pdg_id())==5 &&
+          part->momentum().perp()>m_bPtMin &&
+          fabs(part->momentum().pseudoRapidity())<m_bEtaMax) {
         if (m_RequireTruthJet) {
-          HepMC::FourVector tmp = (*pitr)->momentum();
+          HepMC::FourVector tmp = part->momentum();
           TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
           for (uint i=0; i<jets.size(); i++) {
             double dR = (*jets[i])->p4().DeltaR(genpart);
@@ -119,11 +119,11 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
       // That means the code is NOT appropriate for counting the number
       // of heavy flavor quarks!
       if (m_Request_cQuark &&
-          std::abs((*pitr)->pdg_id())==4 &&
-          (*pitr)->momentum().perp()>m_cPtMin &&
-          fabs((*pitr)->momentum().pseudoRapidity())<m_cEtaMax) {
+          std::abs(part->pdg_id())==4 &&
+          part->momentum().perp()>m_cPtMin &&
+          fabs(part->momentum().pseudoRapidity())<m_cEtaMax) {
         if (m_RequireTruthJet) {
-          HepMC::FourVector tmp = (*pitr)->momentum();
+          HepMC::FourVector tmp = part->momentum();
           TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
           for (uint i=0; i<jets.size(); i++) {
             double dR = (*jets[i])->p4().DeltaR(genpart);
@@ -137,11 +137,11 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
       // B hadrons
       // =========
       if (m_RequestBottom &&
-          isBwithWeakDK((*pitr)->pdg_id()) &&
-          (*pitr)->momentum().perp()>m_bottomPtMin &&
-          fabs((*pitr)->momentum().pseudoRapidity())<m_bottomEtaMax) {
+          isBwithWeakDK(part->pdg_id()) &&
+          part->momentum().perp()>m_bottomPtMin &&
+          fabs(part->momentum().pseudoRapidity())<m_bottomEtaMax) {
         if (m_RequireTruthJet) {
-          HepMC::FourVector tmp = (*pitr)->momentum();
+          HepMC::FourVector tmp = part->momentum();
           TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
           for (uint i=0; i<jets.size(); i++) {
             double dR = (*jets[i])->p4().DeltaR(genpart);
@@ -155,11 +155,11 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
       // Charm Hadrons
       // ==============
       if (m_RequestCharm &&
-          isDwithWeakDK((*pitr)->pdg_id()) &&
-          (*pitr)->momentum().perp()>m_charmPtMin &&
-          fabs((*pitr)->momentum().pseudoRapidity())<m_charmEtaMax) {
+          isDwithWeakDK(part->pdg_id()) &&
+          part->momentum().perp()>m_charmPtMin &&
+          fabs(part->momentum().pseudoRapidity())<m_charmEtaMax) {
         if (m_RequireTruthJet) {
-          HepMC::FourVector tmp = (*pitr)->momentum();
+          HepMC::FourVector tmp = part->momentum();
           TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
           for (uint i=0; i<jets.size(); i++) {
             double dR = (*jets[i])->p4().DeltaR(genpart);
@@ -173,12 +173,12 @@ StatusCode HeavyFlavorHadronFilter::filterEvent() {
       // Request Specific PDGID
       // =========================
       bool pdgok = m_RequestSpecificPDGID &&
-        ((*pitr)->pdg_id() == m_PDGID ||
-         (m_PDGAntiParticleToo && std::abs((*pitr)->pdg_id()) == m_PDGID));
-      if (pdgok && (*pitr)->momentum().perp() > m_PDGPtMin &&
-          fabs((*pitr)->momentum().pseudoRapidity()) < m_PDGEtaMax) {
+        (part->pdg_id() == m_PDGID ||
+         (m_PDGAntiParticleToo && std::abs(part->pdg_id()) == m_PDGID));
+      if (pdgok && part->momentum().perp() > m_PDGPtMin &&
+          fabs(part->momentum().pseudoRapidity()) < m_PDGEtaMax) {
         if (m_RequireTruthJet) {
-          HepMC::FourVector tmp = (*pitr)->momentum();
+          HepMC::FourVector tmp = part->momentum();
           TLorentzVector genpart(tmp.x(), tmp.y(), tmp.z(), tmp.t());
           for (size_t i = 0; i < jets.size(); ++i) {
             double dR = (*jets[i])->p4().DeltaR(genpart);
diff --git a/Generators/GeneratorFilters/src/JetFilter.cxx b/Generators/GeneratorFilters/src/JetFilter.cxx
index d895e9f7ceaf..3951a7a25b46 100644
--- a/Generators/GeneratorFilters/src/JetFilter.cxx
+++ b/Generators/GeneratorFilters/src/JetFilter.cxx
@@ -78,25 +78,25 @@ StatusCode JetFilter::filterEvent() {
 
   // Loop over all particles in the event and build up the grid
   const HepMC::GenEvent* genEvt = event();
-  for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
+  for (auto part: *genEvt) {
     /// @todo Use MCPID to identify leptons
-    // if ( (*pitr)->status() == 1 ) {// stables only
-      if(MC::isGenStable(*pitr)) { //stables only
-      if ( ((*pitr)->pdg_id() != 13 ) &&  ((*pitr)->pdg_id() != -13 ) &&
-           ((*pitr)->pdg_id() != 12 ) && ((*pitr)->pdg_id() != -12 ) &&
-           ((*pitr)->pdg_id() != 14 ) && ((*pitr)->pdg_id() != -14 ) &&
-           ((*pitr)->pdg_id() != 16 ) && ((*pitr)->pdg_id() != -16 ) &&
-           (fabs((*pitr)->momentum().pseudoRapidity()) <= m_emaxeta) ) { // no neutrinos or muons and particles must be in active range
+    // if ( part->status() == 1 ) {// stables only
+      if(MC::isGenStable(part)) { //stables only
+      if ( (part->pdg_id() != 13 ) &&  (part->pdg_id() != -13 ) &&
+           (part->pdg_id() != 12 ) && (part->pdg_id() != -12 ) &&
+           (part->pdg_id() != 14 ) && (part->pdg_id() != -14 ) &&
+           (part->pdg_id() != 16 ) && (part->pdg_id() != -16 ) &&
+           (fabs(part->momentum().pseudoRapidity()) <= m_emaxeta) ) { // no neutrinos or muons and particles must be in active range
         int ip, ie;
-        ip = (int) ((m_twopi/2.+ (*pitr)->momentum().phi())/m_edphi); //phi is in range -CLHEP::pi to CLHEP::pi
-        ie = (int) (((*pitr)->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
+        ip = (int) ((m_twopi/2.+ part->momentum().phi())/m_edphi); //phi is in range -CLHEP::pi to CLHEP::pi
+        ie = (int) ((part->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
         if (ie < 0 || (ie >= m_greta)) { // its outside the ends so we should not be here
           ATH_MSG_FATAL("Jet too close to end");
           return StatusCode::FAILURE;
         }
         while (ip < 0) ip += m_grphi; //fix phi wrapping note that this is done after rr is calculated
         while (ip > m_grphi-1) ip -= m_grphi; //fix phi wrapping note that this is done after rr is calculated
-        etgrid[ip][ie] = etgrid[ip][ie]+(*pitr)->momentum().perp(); // fortran had pt here
+        etgrid[ip][ie] = etgrid[ip][ie]+part->momentum().perp(); // fortran had pt here
       }
     }
   }
diff --git a/Generators/GeneratorFilters/src/JetFilterWithTruthPhoton.cxx b/Generators/GeneratorFilters/src/JetFilterWithTruthPhoton.cxx
index d69dd29b79d3..10ca6430a269 100644
--- a/Generators/GeneratorFilters/src/JetFilterWithTruthPhoton.cxx
+++ b/Generators/GeneratorFilters/src/JetFilterWithTruthPhoton.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // -------------------------------------------------------------
@@ -54,11 +54,8 @@ JetFilterWithTruthPhoton::JetFilterWithTruthPhoton(const std::string& name,
    m_nphicell2 = 0;
    m_netacell2 = 0;
 }
-//--------------------------------------------------------------------------
  JetFilterWithTruthPhoton::~JetFilterWithTruthPhoton(){
-//--------------------------------------------------------------------------
 }
-//---------------------------------------------------------------------------
 StatusCode JetFilterWithTruthPhoton::filterInitialize() {
 //---------------------------------------------------------------------------
   msg( MSG:: INFO) << " JetFilterWithTruthPhoton INITIALISING.  \n"  << endmsg;
@@ -130,28 +127,24 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
     }
   }
 
-  std::vector<HepMC::GenParticlePtr> MCTruthPhotonList;
+  std::vector<HepMC::ConstGenParticlePtr> MCTruthPhotonList;
   MCTruthPhotonList.clear();
 
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     // Loop over all particles in the event and build up the grid
     const HepMC::GenEvent* genEvt = (*itr);
-    for(HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin();
-	pitr!=genEvt->particles_end(); ++pitr ){
-      if( (*pitr)->status() == 1 ){// stables only
-	if( ((*pitr)->pdg_id() != 13 ) &&  ((*pitr)->pdg_id() != -13 ) 
-	    &&((*pitr)->pdg_id() != 12 ) && ((*pitr)->pdg_id() != -12 ) 
-	    &&((*pitr)->pdg_id() != 14 ) && ((*pitr)->pdg_id() != -14 ) 
-	    &&((*pitr)->pdg_id() != 16 ) && ((*pitr)->pdg_id() != -16 ) 
-	    && (fabs((*pitr)->momentum().pseudoRapidity()) <= m_emaxeta) 
+    for(auto part: *genEvt){
+      if( part->status() == 1 ){// stables only
+	if( (part->pdg_id() != 13 ) &&  (part->pdg_id() != -13 ) 
+	    &&(part->pdg_id() != 12 ) && (part->pdg_id() != -12 ) 
+	    &&(part->pdg_id() != 14 ) && (part->pdg_id() != -14 ) 
+	    &&(part->pdg_id() != 16 ) && (part->pdg_id() != -16 ) 
+	    && (fabs(part->momentum().pseudoRapidity()) <= m_emaxeta) 
 	     ){	// no neutrinos or muons and particles must be in active range
 	  int ip,ie;
-	  //	  std::cout << (*pitr)->momentum().phi() << "eta" << (*pitr)->momentum().pseudoRapidity() << std::endl;
-	  ip=(int) ((m_twopi/2.+ (*pitr)->momentum().phi())/m_edphi); //phi is in range -pi to pi
-	  ie=(int) (((*pitr)->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
-	  //	  	  std::cout << ip << "   "<< ie <<std::endl;
-	  //		  std::cout << " true rap " << (*pitr)->momentum().pseudoRapidity() << "false rap " << (ie+0.5)*m_edeta-m_emaxeta << " True phi " <<  (*pitr)->momentum().phi() << "  false phi  "  << -m_twopi/2.+(ip+0.5)*m_edphi << std::endl;
+	  ip=(int) ((m_twopi/2.+ part->momentum().phi())/m_edphi); //phi is in range -pi to pi
+	  ie=(int) ((part->momentum().pseudoRapidity()+m_emaxeta)/m_edeta);
 	  if( (ie<0) || (ie>=  m_greta)){ // its outside the ends so we should not be here
 	    msg( MSG::FATAL) << "  Jet too close to end"  << endmsg;
 	    return StatusCode::FAILURE;
@@ -162,22 +155,21 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
 	    ip-=m_grphi; //fix phi wrapping note that this is done after rr is calculated
 	  
 
-	  etgrid[ip][ie]=etgrid[ip][ie]+(*pitr)->momentum().perp(); // fortran had pt here
-	  if ((*pitr)->pdg_id() == 22 && 
-	      (*pitr)->momentum().perp() > m_photonPt && 
-	      fabs((*pitr)->momentum().pseudoRapidity()) < m_photonEta) {
-	    MCTruthPhotonList.push_back((*pitr));
+	  etgrid[ip][ie]=etgrid[ip][ie]+part->momentum().perp(); // fortran had pt here
+	  if (part->pdg_id() == 22 && 
+	      part->momentum().perp() > m_photonPt && 
+	      fabs(part->momentum().pseudoRapidity()) < m_photonEta) {
+	    MCTruthPhotonList.push_back(part);
 	  }
 #if 0
-	  if ((*pitr)->pdg_id() == 22) {
-	    msg(MSG::DEBUG) << "Truth photon pt = " << (*pitr)->momentum().perp() << " eta = " << (*pitr)->momentum().pseudoRapidity() << endmsg;
+	  if (part->pdg_id() == 22) {
+	    msg(MSG::DEBUG) << "Truth photon pt = " << part->momentum().perp() << " eta = " << part->momentum().pseudoRapidity() << endmsg;
 	  }
 #endif
 	}
       }
     }	
   }
-  //
   // find the highest cell
   // we loop here until we cannot find more jets
   double ethigh=2.*m_Stop; // et of highest cell
@@ -196,19 +188,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
 	}
       }
     }
-    //std::cout << "Highest cell eta phi  " << etahigh << " , " << phihigh << "energy " << ethigh << std::endl;
-    //std::cout << "interesting cells  83 and 129  "<< etgrid[83][129] << "   " <<  etgrid[84][129] << std::endl;
-    /*
-    if(ltest<1 ){
-      for (int ie0=1+m_netacell; ie0< m_greta-m_netacell-1; ++ie0){// only look away from the edges
-	for (int ip0=0; ip0<m_grphi; ++ip0){
-	  std::cout << "ip  " <<ip0 << "ie " <<ie0 << "energy  "<<etgrid[ip0][ie0]/GeV << std::endl;
-	}
-      } 
-      std::cout << "Highest cell "<< ethigh/Gaudi::Units::GeV  << "eta " << etahigh*m_edeta-m_emaxeta << "phi  " << -m_twopi/2.+m_edphi*phihigh << std::endl;
-      ltest++;
-    }
-    */
     if(ethigh>m_Stop){ // this passes only if there is tower above threshold
       // new jet
       CLHEP::HepLorentzVector FoundJet;
@@ -216,10 +195,8 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
       double jetpy=0.;
       double jetpz=0.;
       double jete=0.;
-      //      std::cout <<" cell dimensions"  << m_netacell<< "   " << m_nphicell<< "   " <<m_netacell2<< "   " <<m_nphicell2 << std::endl ;    //  std::cout <<" high cell"  << etahigh<< "   " << phihigh<<  std::endl ;
 
       if(!m_Type){//grid handle differantly if there are an even number of cells
-	//std::cout << "etacall, phicell" << m_netacell2 << m_netacell2%2 << m_nphicell2 << m_nphicell2%2 << std::endl;
 	if(m_netacell2%2 == 0 && m_nphicell2%2 == 1){ //eta even
 	  double sum=0.;
 	  double sum1=0.;
@@ -249,13 +226,10 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
 	  double sum1=0.;
 	  double sum2=0.;
 	  double sum3=0.;
-	  //std::cout << "insdie mover" << m_netacell2 <<  m_nphicell2 << std::endl;
 	  for(int ie0=0; ie0<m_netacell2; ie0++){
-	    //std::cout << " ie0 " << ie0 << std::endl;
 	    for(int ip0=0; ip0<m_nphicell2 ; ip0++){
 	      int ip1=ip0-m_nphicell+phihigh;
 	      int ie1=ie0-m_netacell+etahigh;
-	      //std::cout << "checking loop " << ip1 << "   "<< ie1 << std::endl;
 	      if(!etgridused[ip1][ie1]) sum=sum+etgrid[ip1][ie1];
 	      if(!etgridused[ip1][ie1+1]) sum1=sum1+etgrid[ip1][ie1+1];
 	      if(!etgridused[ip1+1][ie1]) sum2=sum2+etgrid[(ip1+1)%m_grphi][ie1];
@@ -268,7 +242,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
 	    etahigh=etahigh+1;
 	    phihigh=(phihigh+1)%m_grphi;
 	  }
-	  //std::cout << "shifting phihigh " << phihigh << "  etahigh " <<etahigh<< "list of cells" << sum << sum1 <<sum2 <<sum3 << std::endl;
 	}
       }
       //add up stuff around high cell 
@@ -301,7 +274,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
       }
       FoundJet.setPx(jetpx);  
       FoundJet.setPy(jetpy);  
-      //std::cout << "long p" << jetpz << std::endl;
       FoundJet.setPz(jetpz);  
       FoundJet.setE(jete); 
       if(fabs(FoundJet.pseudoRapidity())< m_UserEta && 
@@ -342,7 +314,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
   }
   int isOK = 1;
   if (m_UserNumber >= 2 && m_UserLeadingThresh > m_UserThresh && !hasLeadingJet) isOK = 0;
-  //std::cout << "# of jets = " << m_Jets.size() << std::endl;
   if (m_UserNumber >= 2 && m_Jets.size()>=2 && m_massDijet >= 0.) {
     isOK = 0;
     if (hasLeadingJet) {
@@ -350,7 +321,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
 	for (unsigned j=i+1;j<m_Jets.size();++j) {
 	  CLHEP::HepLorentzVector pjj = m_Jets[i].P()+m_Jets[j].P();
 	  double mjj = pjj.m();
-	  //std::cout << i << " " << j << " mjj = " << mjj << std::endl;
 	  if (mjj > m_massDijet && (m_Jets[i].P().perp() > m_UserLeadingThresh || m_Jets[j].P().perp() > m_UserLeadingThresh)) {
 	    isOK = 1;
 	    break;
@@ -360,7 +330,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
       }
     }
   }
-  //std::cout << "isOK = " << isOK << std::endl;
 
 #if 0
   if (0) {
@@ -382,7 +351,6 @@ StatusCode JetFilterWithTruthPhoton::filterEvent() {
       return StatusCode::SUCCESS; 
     }
   }
-  //std::cout << "FAIL" << std::endl;
   setFilterPassed(false); // it failed to find any useful jets
   m_Jets.clear(); //clean out the found jets
   return StatusCode::SUCCESS;
diff --git a/Generators/GeneratorFilters/src/LeadingPhotonFilter.cxx b/Generators/GeneratorFilters/src/LeadingPhotonFilter.cxx
index f4219d31c0a6..c9f83aa9fd26 100644
--- a/Generators/GeneratorFilters/src/LeadingPhotonFilter.cxx
+++ b/Generators/GeneratorFilters/src/LeadingPhotonFilter.cxx
@@ -16,10 +16,10 @@ LeadingPhotonFilter::LeadingPhotonFilter(const std::string& name, ISvcLocator* p
 StatusCode LeadingPhotonFilter::filterEvent() {
   const HepMC::GenEvent* genEvt = (*(events()->begin()));
   double ptmax = 0;
-  for (HepMC::GenEvent::particle_const_iterator p = genEvt->particles_begin(); p != genEvt->particles_end(); ++p) {
-    if ((*p)->pdg_id() != 22 || (*p)->status() != 1) continue;
-    if (fabs((*p)->momentum().pseudoRapidity()) > m_EtaRange) continue;
-    ptmax = std::max((*p)->momentum().perp(), ptmax);
+  for (auto p: *genEvt) {
+    if (p->pdg_id() != 22 || p->status() != 1) continue;
+    if (fabs(p->momentum().pseudoRapidity()) > m_EtaRange) continue;
+    ptmax = std::max(p->momentum().perp(), ptmax);
   }
   setFilterPassed(ptmax >= m_Ptmin && ptmax < m_Ptmax);
   return StatusCode::SUCCESS;
diff --git a/Generators/GeneratorFilters/src/LeptonFilter.cxx b/Generators/GeneratorFilters/src/LeptonFilter.cxx
index 5650d5ee3401..561a35df4113 100644
--- a/Generators/GeneratorFilters/src/LeptonFilter.cxx
+++ b/Generators/GeneratorFilters/src/LeptonFilter.cxx
@@ -34,18 +34,17 @@ StatusCode LeptonFilter::filterEvent() {
     const HepMC::GenEvent* genEvt = *itr;
 
     // Loop over all particles in event
-    HepMC::GenEvent::particle_const_iterator pitr;
-    for (pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ) {
+    for (auto part: *genEvt) {
 
       // We're only interested in stable (status == 1) particles
-      if ( (*pitr)->status() != 1) continue;
+      if ( part->status() != 1) continue;
 
       // We are specifically looking for electrons (+-11) and muons (+-13)
-      const long pid = (*pitr)->pdg_id();
+      const long pid = part->pdg_id();
       const long apid = std::abs(pid);
       if (apid == 11 || apid == 13) {
-        const double pT = (*pitr)->momentum().perp();
-        const double eta = (*pitr)->momentum().pseudoRapidity();
+        const double pT = part->momentum().perp();
+        const double eta = part->momentum().pseudoRapidity();
         const std::string pname = ((apid == 11) ? "electron" : "muon");
         ATH_MSG_DEBUG( "Found " << pname
 		       << ": pT, eta = " << pT << ", " << eta );
diff --git a/Generators/GeneratorFilters/src/MassRangeFilter.cxx b/Generators/GeneratorFilters/src/MassRangeFilter.cxx
index a3e0feab85e0..f4e383ec1861 100644
--- a/Generators/GeneratorFilters/src/MassRangeFilter.cxx
+++ b/Generators/GeneratorFilters/src/MassRangeFilter.cxx
@@ -39,8 +39,8 @@ StatusCode MassRangeFilter::filterEvent() {
   for (McEventCollection::const_iterator itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
     int n = 0;
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_begin=genEvt->particles_begin();
-    HepMC::GenEvent::particle_const_iterator genEvt_particles_end= genEvt->particles_end();
+    auto genEvt_particles_begin=HepMC::begin(*genEvt);
+    auto genEvt_particles_end=HepMC::end(*genEvt);
     for ( auto pitr1 = genEvt_particles_begin; pitr1 != genEvt_particles_end; ++pitr1) {
       n++;
       if ((*pitr1)->status() != m_PartStatus ) continue; //status of the particle
diff --git a/Generators/GeneratorFilters/src/MissingEtFilter.cxx b/Generators/GeneratorFilters/src/MissingEtFilter.cxx
index 67acf7d99d49..c15a979a9fb6 100644
--- a/Generators/GeneratorFilters/src/MissingEtFilter.cxx
+++ b/Generators/GeneratorFilters/src/MissingEtFilter.cxx
@@ -21,22 +21,13 @@ StatusCode MissingEtFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if (!MC::isGenStable(*pitr)) continue;
-
-      // Consider all non-interacting particles
-      // We want Missing Transverse Momentum, not "Missing Transverse Energy"
-      if (MC::isNonInteracting(*pitr)) {
-	bool addpart = true;
-	if(!m_useHadronicNu && MC::isNeutrino(*pitr) && !(fromWZ(*pitr) || fromTau(*pitr)) ) {
-	  addpart = false; // ignore neutrinos from hadron decays
-	}
-	if(addpart) {
-	  ATH_MSG_VERBOSE("Found noninteracting particle: ID = " << (*pitr)->pdg_id() << " PX = " << (*pitr)->momentum().px() << " PY = "<< (*pitr)->momentum().py());
-	  sumx += (*pitr)->momentum().px();
-	  sumy += (*pitr)->momentum().py();
-	}
-      }
+    for (auto pitr: *genEvt) {
+      if (!MC::isGenStable(pitr)) continue;
+      if (!MC::isNonInteracting(pitr)) continue;
+      if(!m_useHadronicNu && MC::isNeutrino(pitr) && !(fromWZ(pitr) || fromTau(pitr)) ) continue;
+      ATH_MSG_VERBOSE("Found noninteracting particle: ID = " << pitr->pdg_id() << " PX = " << pitr->momentum().px() << " PY = "<< pitr->momentum().py());
+      sumx += pitr->momentum().px();
+      sumy += pitr->momentum().py();
     }
   }
 
@@ -47,7 +38,7 @@ StatusCode MissingEtFilter::filterEvent() {
   return StatusCode::SUCCESS;
 }
 
-bool MissingEtFilter::fromWZ( const HepMC::GenParticlePtr part ) const
+bool MissingEtFilter::fromWZ( HepMC::ConstGenParticlePtr part ) const
 {
   // !!! IMPORTANT !!! This is a TEMPORARY function
   //  it's used in place of code in MCTruthClassifier as long as this package is not dual-use
@@ -72,7 +63,7 @@ bool MissingEtFilter::fromWZ( const HepMC::GenParticlePtr part ) const
   return false;
 }
 
-bool MissingEtFilter::fromTau( const HepMC::GenParticlePtr part ) const
+bool MissingEtFilter::fromTau( HepMC::ConstGenParticlePtr part ) const
 {
   // !!! IMPORTANT !!! This is a TEMPORARY function
   //  it's used in place of code in MCTruthClassifier as long as this package is not dual-use
diff --git a/Generators/GeneratorFilters/src/MultiElectronFilter.cxx b/Generators/GeneratorFilters/src/MultiElectronFilter.cxx
index f68de37fe870..a73352684382 100644
--- a/Generators/GeneratorFilters/src/MultiElectronFilter.cxx
+++ b/Generators/GeneratorFilters/src/MultiElectronFilter.cxx
@@ -19,10 +19,10 @@ StatusCode MultiElectronFilter::filterEvent() {
   int numElectrons = 0;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if ( (*pitr)->status() != 1) continue;
-      if ( abs((*pitr)->pdg_id()) != 11) continue;
-	  if ( ((*pitr)->momentum().perp() >= m_Ptmin) && fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) {
+    for (auto part: *genEvt) {
+      if ( part->status() != 1) continue;
+      if ( abs(part->pdg_id()) != 11) continue;
+	  if ( (part->momentum().perp() >= m_Ptmin) && fabs(part->momentum().pseudoRapidity()) <= m_EtaRange) {
 	    numElectrons++;
 	  }
 	}
diff --git a/Generators/GeneratorFilters/src/MultiLeptonFilter.cxx b/Generators/GeneratorFilters/src/MultiLeptonFilter.cxx
index 79ac23288687..0e62fc746465 100644
--- a/Generators/GeneratorFilters/src/MultiLeptonFilter.cxx
+++ b/Generators/GeneratorFilters/src/MultiLeptonFilter.cxx
@@ -19,10 +19,10 @@ StatusCode MultiLeptonFilter::filterEvent() {
   int numLeptons = 0;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin();	pitr != genEvt->particles_end(); ++pitr) {
-      if ( (*pitr)->status() != 1) continue;
-	  if ( abs((*pitr)->pdg_id()) == 11 || abs((*pitr)->pdg_id()) == 13 ) {
-	    if ((*pitr)->momentum().perp() >= m_Ptmin && fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) {
+    for (auto part: *genEvt) {
+      if ( part->status() != 1) continue;
+	  if ( abs(part->pdg_id()) == 11 || abs(part->pdg_id()) == 13 ) {
+	    if (part->momentum().perp() >= m_Ptmin && fabs(part->momentum().pseudoRapidity()) <= m_EtaRange) {
 	      numLeptons += 1;
 	    }
 	  }
diff --git a/Generators/GeneratorFilters/src/MultiMuonFilter.cxx b/Generators/GeneratorFilters/src/MultiMuonFilter.cxx
index 9d3cda83581c..882b004d3f56 100644
--- a/Generators/GeneratorFilters/src/MultiMuonFilter.cxx
+++ b/Generators/GeneratorFilters/src/MultiMuonFilter.cxx
@@ -19,12 +19,10 @@ StatusCode MultiMuonFilter::filterEvent() {
   int numMuons = 0;
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = *itr;
-    for(HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if ( (*pitr)->status() == 1 && abs((*pitr)->pdg_id()) == 13) {
-        if ( ((*pitr)->momentum().perp() >= m_Ptmin) && fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) {
-          numMuons++;
-        }
-      }
+    for( auto pitr: *genEvt) {
+     if (pitr->status() != 1 || std::abs(pitr->pdg_id()) != 13)  continue;
+     if ( (pitr->momentum().perp() < m_Ptmin) || std::abs(pitr->momentum().pseudoRapidity()) > m_EtaRange) continue;
+     numMuons++;
     }
   }
 
diff --git a/Generators/GeneratorFilters/src/MultiObjectsFilter.cxx b/Generators/GeneratorFilters/src/MultiObjectsFilter.cxx
index 0680803f5a1a..9b2d1fb64c4b 100644
--- a/Generators/GeneratorFilters/src/MultiObjectsFilter.cxx
+++ b/Generators/GeneratorFilters/src/MultiObjectsFilter.cxx
@@ -61,20 +61,20 @@ StatusCode MultiObjectsFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if ((*pitr)->status()==1 && (*pitr)->momentum().perp() > m_PtCut && fabs((*pitr)->momentum().pseudoRapidity()) < m_EtaCut) {
+    for (auto part: *genEvt) {
+      if (part->status()==1 && part->momentum().perp() > m_PtCut && fabs(part->momentum().pseudoRapidity()) < m_EtaCut) {
         //electrons
-        if (m_useEle && abs((*pitr)->pdg_id()) == 11) {
-          ATH_MSG_DEBUG("Found electron: PT,ETA,PHI " << (*pitr)->momentum().perp()/Gaudi::Units::GeV << "GeV, " << (*pitr)->momentum().pseudoRapidity() << " " << (*pitr)->momentum().phi());
-          pt.push_back((*pitr)->momentum().perp());
+        if (m_useEle && abs(part->pdg_id()) == 11) {
+          ATH_MSG_DEBUG("Found electron: PT,ETA,PHI " << part->momentum().perp()/Gaudi::Units::GeV << "GeV, " << part->momentum().pseudoRapidity() << " " << part->momentum().phi());
+          pt.push_back(part->momentum().perp());
         //muons
-        } else if (m_useMuo && abs((*pitr)->pdg_id()) == 13) {
-          ATH_MSG_DEBUG("Found muon: PT,ETA,PHI " << (*pitr)->momentum().perp()/Gaudi::Units::GeV << "GeV, " << (*pitr)->momentum().pseudoRapidity() << " " << (*pitr)->momentum().phi());
-          pt.push_back((*pitr)->momentum().perp());
+        } else if (m_useMuo && abs(part->pdg_id()) == 13) {
+          ATH_MSG_DEBUG("Found muon: PT,ETA,PHI " << part->momentum().perp()/Gaudi::Units::GeV << "GeV, " << part->momentum().pseudoRapidity() << " " << part->momentum().phi());
+          pt.push_back(part->momentum().perp());
         //photons
-        } else if (m_usePho && abs((*pitr)->pdg_id()) == 22) {
-          ATH_MSG_DEBUG("Found photon: PT,ETA,PHI " << (*pitr)->momentum().perp()/Gaudi::Units::GeV << "GeV, " << (*pitr)->momentum().pseudoRapidity() << " " << (*pitr)->momentum().phi());
-          pt.push_back((*pitr)->momentum().perp());
+        } else if (m_usePho && abs(part->pdg_id()) == 22) {
+          ATH_MSG_DEBUG("Found photon: PT,ETA,PHI " << part->momentum().perp()/Gaudi::Units::GeV << "GeV, " << part->momentum().pseudoRapidity() << " " << part->momentum().phi());
+          pt.push_back(part->momentum().perp());
         }
       }
     }
diff --git a/Generators/GeneratorFilters/src/MuonFilter.cxx b/Generators/GeneratorFilters/src/MuonFilter.cxx
index 3bba1e5478c8..7976f2323c24 100644
--- a/Generators/GeneratorFilters/src/MuonFilter.cxx
+++ b/Generators/GeneratorFilters/src/MuonFilter.cxx
@@ -16,12 +16,10 @@ StatusCode MuonFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr ){
-      if ((*pitr)->status() == 1 && abs((*pitr)->pdg_id()) == 13) {
-        if ((*pitr)->momentum().perp() >= m_Ptmin && fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) {
-          return StatusCode::SUCCESS;
-        }
-      }
+    for ( auto pitr: *genEvt){
+    if (pitr->status() != 1 || std::abs(pitr->pdg_id()) != 13)  continue;
+    if (pitr->momentum().perp() < m_Ptmin || std::abs(pitr->momentum().pseudoRapidity()) > m_EtaRange) continue;
+    return StatusCode::SUCCESS;
     }
   }
   setFilterPassed(false);
diff --git a/Generators/GeneratorFilters/src/PhotonFilter.cxx b/Generators/GeneratorFilters/src/PhotonFilter.cxx
index d8185afbd94f..06a28d13414b 100644
--- a/Generators/GeneratorFilters/src/PhotonFilter.cxx
+++ b/Generators/GeneratorFilters/src/PhotonFilter.cxx
@@ -22,11 +22,11 @@ StatusCode PhotonFilter::filterEvent() {
   int NPhotons = 0;
   for (McEventCollection::const_iterator itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin();	pitr != genEvt->particles_end(); ++pitr) {
-      if ((*pitr)->pdg_id() == 22 && (*pitr)->status()==1 &&
-          (*pitr)->momentum().perp() >= m_Ptmin &&
-          (*pitr)->momentum().perp() <  m_Ptmax &&
-          fabs((*pitr)->momentum().pseudoRapidity()) <= m_EtaRange) NPhotons++;
+    for (auto pitr: *genEvt) {
+      if (pitr->pdg_id() == 22 && pitr->status()==1 &&
+          pitr->momentum().perp() >= m_Ptmin &&
+          pitr->momentum().perp() <  m_Ptmax &&
+          std::abs(pitr->momentum().pseudoRapidity()) <= m_EtaRange) NPhotons++;
     }
   }
   setFilterPassed(NPhotons >= m_NPhotons);
diff --git a/Generators/GeneratorFilters/src/PtmissAndOrLeptonFilter.cxx b/Generators/GeneratorFilters/src/PtmissAndOrLeptonFilter.cxx
index 0b0667790c3d..3d65fe6c3221 100644
--- a/Generators/GeneratorFilters/src/PtmissAndOrLeptonFilter.cxx
+++ b/Generators/GeneratorFilters/src/PtmissAndOrLeptonFilter.cxx
@@ -87,13 +87,12 @@ StatusCode PtmissAndOrLeptonFilter::filterEvent() {
   // Loop over all events in this event: event 0 = hard interaction; events 1,2,3... = pile-up
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin();
-         pitr != genEvt->particles_end(); ++pitr) {
-      if ((*pitr)->status() != 1) continue;
-      const int abspid = abs((*pitr)->pdg_id());
-      const double abseta = fabs((*pitr)->momentum().pseudoRapidity());
-      if (abspid == 11 && (*pitr)->momentum().perp() > m_PtminElectron && abseta <= m_MaxEtaElectron) nelec++;
-      if (abspid == 13 && (*pitr)->momentum().perp() > m_PtminMuon     && abseta <= m_MaxEtaMuon) nmuon++;
+    for (auto part: *genEvt){
+      if (part->status() != 1) continue;
+      const int abspid = abs(part->pdg_id());
+      const double abseta = fabs(part->momentum().pseudoRapidity());
+      if (abspid == 11 && part->momentum().perp() > m_PtminElectron && abseta <= m_MaxEtaElectron) nelec++;
+      if (abspid == 13 && part->momentum().perp() > m_PtminMuon     && abseta <= m_MaxEtaMuon) nmuon++;
 
       nleptons = nelec + nmuon;
       // Check that the number of leptons does not exceed the maximum given in PtmissAndOrLeptonFilter.h for ntuple
@@ -104,9 +103,9 @@ StatusCode PtmissAndOrLeptonFilter::filterEvent() {
       // neutrinos, neutralinos and stable Higgs,
 
       if (abspid == 12 || abspid == 14 || abspid == 16 || abspid == 25 || abspid == 1000022) {
-        ATH_MSG_DEBUG(" found an invisible particle: " << (*pitr)->pdg_id());
-        px = (*pitr)->momentum().x();
-        py = (*pitr)->momentum().y();
+        ATH_MSG_DEBUG(" found an invisible particle: " << part->pdg_id());
+        px = part->momentum().x();
+        py = part->momentum().y();
         sumPxInvis += px;
         sumPyInvis += py;
         ninvis++;
@@ -115,14 +114,14 @@ StatusCode PtmissAndOrLeptonFilter::filterEvent() {
       }
 
       // Treat particles with significant pt lost outside the acceptance region separately
-      if (abseta > m_MinEtaLost && (*pitr)->momentum().perp() >= m_PtminLostTrack) {
+      if (abseta > m_MinEtaLost && part->momentum().perp() >= m_PtminLostTrack) {
         nlost++;
         // Check that the number of lost particles does not exceed the maximum given in PtmissAndOrLeptonFilter.h for ntuple
         if (nlost > 19) ATH_MSG_ERROR(" # lost particles found = " << nlost << " Exceeds maximum allowed.");
 
         // Now sum over px and py for all lost particles
-        px = (*pitr)->momentum().x();
-        py = (*pitr)->momentum().y();
+        px = part->momentum().x();
+        py = part->momentum().y();
         sumPxLost += px;
         sumPyLost += py;
       }
diff --git a/Generators/GeneratorFilters/src/TTbarPhotonWhizardHwgFilter.cxx b/Generators/GeneratorFilters/src/TTbarPhotonWhizardHwgFilter.cxx
index 48944f40d435..7a26e1e060f9 100644
--- a/Generators/GeneratorFilters/src/TTbarPhotonWhizardHwgFilter.cxx
+++ b/Generators/GeneratorFilters/src/TTbarPhotonWhizardHwgFilter.cxx
@@ -15,13 +15,12 @@ TTbarPhotonWhizardHwgFilter::TTbarPhotonWhizardHwgFilter(const std::string& name
 StatusCode TTbarPhotonWhizardHwgFilter::filterEvent() {
   for (McEventCollection::const_iterator itr = events()->begin(); itr != events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-	for (HepMC::GenEvent::particle_const_iterator pit = genEvt->particles_begin();pit != genEvt->particles_end(); ++pit) {
-      if ((*pit)->pdg_id() == 22 && (*pit)->status() == 124 &&
-          (*pit)->momentum().perp() >= m_Ptmin && fabs((*pit)->momentum().pseudoRapidity()) < m_Etamax) {
-        setFilterPassed(true);
-        return StatusCode::SUCCESS;
-      }
-	}
+    for (auto  pit: *genEvt) {
+      if (pit->pdg_id() != 22 || pit->status() != 124 ) continue;
+      if (  pit->momentum().perp() < m_Ptmin || std::abs(pit->momentum().pseudoRapidity()) > m_Etamax) continue;
+      setFilterPassed(true);
+      return StatusCode::SUCCESS; 
+    }
   }
   setFilterPassed(false);
   return StatusCode::SUCCESS;
diff --git a/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx b/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
index fdf491a31086..681ab365ae0d 100644
--- a/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
+++ b/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
@@ -63,9 +63,7 @@ StatusCode TTbarPlusHeavyFlavorFilter::filterEvent() {
 
     // Loop over all truth particles in the event
     // ===========================================
-    for(HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin();pitr!=genEvt->particles_end(); ++pitr ) {
-
-      HepMC::GenParticle* part = (*pitr);
+    for(auto  part: *genEvt) {
 
       if(HepMC::barcode(part) > 200000) break;
 
@@ -158,7 +156,7 @@ StatusCode TTbarPlusHeavyFlavorFilter::filterEvent() {
 }
 
 
-bool TTbarPlusHeavyFlavorFilter::passBSelection(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::passBSelection(HepMC::ConstGenParticlePtr part) const{
 
   const HepMC::FourVector& p4 = part->momentum();
   double pt = p4.perp();
@@ -171,7 +169,7 @@ bool TTbarPlusHeavyFlavorFilter::passBSelection(const HepMC::GenParticlePtr part
   
 }
 
-bool TTbarPlusHeavyFlavorFilter::passCSelection(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::passCSelection(HepMC::ConstGenParticlePtr part) const{
 
   const HepMC::FourVector& p4 = part->momentum();
   double pt = p4.perp();
@@ -200,7 +198,7 @@ int TTbarPlusHeavyFlavorFilter::hadronType(int pdgid) const{
 }
 
 
-bool TTbarPlusHeavyFlavorFilter::isBHadron(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isBHadron(HepMC::ConstGenParticlePtr part) const{
 
   if(HepMC::barcode(part) >= 200000) return false;
   int type = hadronType(part->pdg_id());
@@ -211,7 +209,7 @@ bool TTbarPlusHeavyFlavorFilter::isBHadron(const HepMC::GenParticlePtr part) con
 }
 
 
-bool TTbarPlusHeavyFlavorFilter::isCHadron(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isCHadron(HepMC::ConstGenParticlePtr part) const{
 
   if(HepMC::barcode(part) >= 200000) return false;
   int type = hadronType(part->pdg_id());
@@ -223,9 +221,9 @@ bool TTbarPlusHeavyFlavorFilter::isCHadron(const HepMC::GenParticlePtr part) con
 
 
 
-bool TTbarPlusHeavyFlavorFilter::isInitialHadron(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isInitialHadron(HepMC::ConstGenParticlePtr part) const{
 
-  HepMC::GenVertexPtr prod = part->production_vertex();
+  auto prod = part->production_vertex();
   if(prod){
     int type = hadronType(part->pdg_id());
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
@@ -244,9 +242,9 @@ bool TTbarPlusHeavyFlavorFilter::isInitialHadron(const HepMC::GenParticlePtr par
 }
 
 
-bool TTbarPlusHeavyFlavorFilter::isFinalHadron(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isFinalHadron(HepMC::ConstGenParticlePtr part) const{
 
-  HepMC::GenVertexPtr end = part->end_vertex();
+  auto end = part->end_vertex();
   if(end){
     int type = hadronType(part->pdg_id());
     HepMC::GenVertex::particle_iterator firstChild = end->particles_begin(HepMC::children);
@@ -267,9 +265,9 @@ bool TTbarPlusHeavyFlavorFilter::isFinalHadron(const HepMC::GenParticlePtr part)
 
 
 
-bool TTbarPlusHeavyFlavorFilter::isQuarkFromHadron(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isQuarkFromHadron(HepMC::ConstGenParticlePtr part) const{
 
-  HepMC::GenVertexPtr prod = part->production_vertex();
+  auto prod = part->production_vertex();
   if(prod){
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::ancestors);
     HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::ancestors);
@@ -287,11 +285,11 @@ bool TTbarPlusHeavyFlavorFilter::isQuarkFromHadron(const HepMC::GenParticlePtr p
 
 }
 
-bool TTbarPlusHeavyFlavorFilter::isCHadronFromB(const HepMC::GenParticlePtr part) const{
+bool TTbarPlusHeavyFlavorFilter::isCHadronFromB(HepMC::ConstGenParticlePtr part) const{
 
   if(!isCHadron(part)) return false;
 
-  HepMC::GenVertexPtr prod = part->production_vertex();
+  auto prod = part->production_vertex();
   if(prod){
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::ancestors);
     HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::ancestors);
@@ -308,9 +306,9 @@ bool TTbarPlusHeavyFlavorFilter::isCHadronFromB(const HepMC::GenParticlePtr part
 }
 
 
-bool TTbarPlusHeavyFlavorFilter::isLooping(const HepMC::GenParticlePtr part, std::set<HepMC::GenParticlePtr> init_part) const{
+bool TTbarPlusHeavyFlavorFilter::isLooping(HepMC::ConstGenParticlePtr part, std::set<HepMC::ConstGenParticlePtr> init_part) const{
 
-  HepMC::GenVertexPtr prod = part->production_vertex();
+  auto prod = part->production_vertex();
 
   if(!prod) return false;
 
@@ -348,16 +346,16 @@ HepMC::ConstGenParticlePtr  TTbarPlusHeavyFlavorFilter::findInitial(HepMC::Const
 
 }
 
-bool TTbarPlusHeavyFlavorFilter::isFromTop(const HepMC::GenParticlePtr part, bool looping) const{
+bool TTbarPlusHeavyFlavorFilter::isFromTop(HepMC::ConstGenParticlePtr part, bool looping) const{
 
-  const HepMC::GenParticlePtr initpart = findInitial(part, looping);
+  auto initpart = findInitial(part, looping);
   return isDirectlyFromTop(initpart, looping);
  
 }
 
-bool TTbarPlusHeavyFlavorFilter::isDirectlyFromTop(const HepMC::GenParticlePtr part, bool looping) const{
+bool TTbarPlusHeavyFlavorFilter::isDirectlyFromTop(HepMC::ConstGenParticlePtr part, bool looping) const{
 
- HepMC::GenVertexPtr prod = part->production_vertex();
+ auto prod = part->production_vertex();
 
   if(!prod) return false;
 
@@ -373,9 +371,9 @@ bool TTbarPlusHeavyFlavorFilter::isDirectlyFromTop(const HepMC::GenParticlePtr p
 
 
 
-bool TTbarPlusHeavyFlavorFilter::isDirectlyFromWTop(const HepMC::GenParticlePtr part, bool looping) const{
+bool TTbarPlusHeavyFlavorFilter::isDirectlyFromWTop(HepMC::ConstGenParticlePtr part, bool looping) const{
 
-  HepMC::GenVertexPtr prod = part->production_vertex();
+  auto prod = part->production_vertex();
 
   if(!prod) return false;
 
diff --git a/Generators/GeneratorFilters/src/TrimuMassRangeFilter.cxx b/Generators/GeneratorFilters/src/TrimuMassRangeFilter.cxx
index 2da4c6276cca..4a04215961cc 100644
--- a/Generators/GeneratorFilters/src/TrimuMassRangeFilter.cxx
+++ b/Generators/GeneratorFilters/src/TrimuMassRangeFilter.cxx
@@ -99,8 +99,8 @@ StatusCode TrimuMassRangeFilter::filterEvent() {
     // Loop over all particles in the event
     const HepMC::GenEvent* genEvt = (*itr);
     int n=0;
-    auto genEvt_particles_begin  = genEvt->particles_begin();
-    auto genEvt_particles_end    = genEvt->particles_end();
+    auto genEvt_particles_begin  = HepMC::begin(*genEvt);
+    auto genEvt_particles_end    = HepMC::end(*genEvt);
     for(auto pitr1 = genEvt_particles_begin;
 	pitr1!=genEvt_particles_end; ++pitr1 ){
       n++;
diff --git a/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx b/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx
index 8730ee71d000..747e6ed9c1ae 100644
--- a/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx
+++ b/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx
@@ -56,13 +56,13 @@ StatusCode XtoVVDecayFilterExtended::filterEvent() {
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     // Loop over all particles in the event
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if ( abs((*pitr)->pdg_id()) == m_PDGParent && (*pitr)->status() == m_StatusParent) {
-        bool isGrandParentOK = RunHistory(*pitr);
+    for (auto  pitr: *genEvt) {
+      if ( std::abs(pitr->pdg_id()) == m_PDGParent && pitr->status() == m_StatusParent) {
+        bool isGrandParentOK = RunHistory(pitr);
 	ATH_MSG_DEBUG(" Grand Parent is OK? " << isGrandParentOK);
         if (!isGrandParentOK) continue;
         ++nGoodParent;
-        FindAncestor((*pitr)->end_vertex(), m_PDGParent, okPDGChild1, okPDGChild2);
+        FindAncestor(pitr->end_vertex(), m_PDGParent, okPDGChild1, okPDGChild2);
       }
     }
   }
-- 
GitLab


From e3010f39d34bd390d5aa8e7d183ecb2b5895f35a Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Fri, 12 Jun 2020 10:31:47 +0000
Subject: [PATCH 216/266] Switch to c++11 loops to loop over particles in
 events

---
 Generators/AtlasHepMC/AtlasHepMC/GenEvent.h       |  4 ++++
 .../src/BeamHaloGeneratorAlg.cxx                  | 15 ++++++---------
 .../EventBoost/src/EventBoost.cxx                 |  7 +------
 .../TruthHelper/src/GenAccessIO.cxx               |  6 ++----
 Generators/Pythia8B_i/src/CheckCloningFactor.cxx  |  8 ++++----
 5 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
index cb9bceff26c1..8d574751cca9 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
@@ -7,6 +7,10 @@
 #include "HepMC/GenVertex.h"
 #include "AtlasHepMC/GenVertex.h"
 namespace HepMC {
+inline GenEvent::particle_iterator  begin(HepMC::GenEvent& e){ return e.particles_begin(); }
+inline GenEvent::particle_iterator  end(HepMC::GenEvent& e){ return e.particles_end(); }
+inline GenEvent::particle_const_iterator  begin(const HepMC::GenEvent& e){ return e.particles_begin(); }
+inline GenEvent::particle_const_iterator  end(const HepMC::GenEvent& e){ return e.particles_end(); }
 inline GenEvent* newGenEvent(const int a, const int b ){ return new GenEvent(a,b); }
 inline GenVertex* signal_process_vertex(const GenEvent* e) { return e->signal_process_vertex(); }
 inline GenVertex* barcode_to_vertex(const GenEvent* e, int id ){return  e->barcode_to_vertex(id);}
diff --git a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
index fe9068ecd7f3..33d3db71016e 100644
--- a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
+++ b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
@@ -206,20 +206,17 @@ StatusCode BeamHaloGeneratorAlg::callGenerator() {
 
     double values[4];
     int pdgId;
-    HepMC::GenEvent::particle_const_iterator hepmc_part_itr;
-    for (hepmc_part_itr = m_evt.particles_begin();
-         hepmc_part_itr != m_evt.particles_end();
-         hepmc_part_itr++) {
-      auto prodVertex = (*hepmc_part_itr)->production_vertex();
+    for (const auto& hepmc_part: m_evt) {
+      auto prodVertex = hepmc_part->production_vertex();
       if(!prodVertex) continue;
       
       // Store the values for use in the if conditions that follow
       values[0] = prodVertex->position().perp()/1000.; 
-      values[1] = (*hepmc_part_itr)->momentum().e()/1000.;
-      values[2] = (*hepmc_part_itr)->momentum().pz()/1000.;
-      values[3] = (*hepmc_part_itr)->momentum().perp()/1000.;
+      values[1] = hepmc_part->momentum().e()/1000.;
+      values[2] = hepmc_part->momentum().pz()/1000.;
+      values[3] = hepmc_part->momentum().perp()/1000.;
 
-      pdgId = (*hepmc_part_itr)->pdg_id(); if(pdgId<0) pdgId = -pdgId; 
+      pdgId = hepmc_part->pdg_id(); if(pdgId<0) pdgId = -pdgId; 
       m_validationPlots[SP_R_ALL]->Fill(values[0],weight);
       m_validationPlots[SP_E_ALL]->Fill(values[1],weight);
       m_validationPlots[SP_PZ_ALL]->Fill(values[2],weight);
diff --git a/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx b/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
index 897182b6423b..fc3cbf654d47 100755
--- a/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
+++ b/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
@@ -173,13 +173,8 @@ StatusCode EventBoost::AnalyseGenEvent(const HepMC::GenEvent* genEvt) {
   msg(MSG::VERBOSE) << "EventBoost begin AnalyseGenEvent()" << endmsg;
 
   std::vector<HepMC::GenParticlePtr> particles_needing_modification;
-  HepMC::GenEvent::particle_const_iterator p = genEvt->particles_begin();
-  HepMC::GenEvent::particle_const_iterator pEnd = genEvt->particles_end();
 
-
-  for(; p != pEnd; ++p ) {
-    particles_needing_modification.push_back(*p);
-  }
+  for(auto p: *genEvt)  particles_needing_modification.push_back(p);
 
   m_pxsum=0.;
   for (auto it: particles_needing_modification) {
diff --git a/Generators/GenAnalysisTools/TruthHelper/src/GenAccessIO.cxx b/Generators/GenAnalysisTools/TruthHelper/src/GenAccessIO.cxx
index 07868513e370..a7a537076334 100644
--- a/Generators/GenAnalysisTools/TruthHelper/src/GenAccessIO.cxx
+++ b/Generators/GenAnalysisTools/TruthHelper/src/GenAccessIO.cxx
@@ -51,10 +51,8 @@ namespace TruthHelper {
         // Access the HepMC record which is wrapped within McEvent
         const HepMC::GenEvent* genEvt = (*itr);
         if (genEvt == 0) return StatusCode::FAILURE;
-        HepMC::GenEvent::particle_const_iterator it = genEvt->particles_begin();
-        HepMC::GenEvent::particle_const_iterator en = genEvt->particles_end();
-        for (; it != en; ++it) {
-          if ((*selector)(*it)) mcParticles.push_back(*it);
+        for (auto it: *genEvt) {
+          if ((*selector)(it)) mcParticles.push_back(it);
         }
       }
     }
diff --git a/Generators/Pythia8B_i/src/CheckCloningFactor.cxx b/Generators/Pythia8B_i/src/CheckCloningFactor.cxx
index 0ab294974381..3bd135e3c063 100644
--- a/Generators/Pythia8B_i/src/CheckCloningFactor.cxx
+++ b/Generators/Pythia8B_i/src/CheckCloningFactor.cxx
@@ -45,11 +45,11 @@ StatusCode CheckCloningFactor::execute() {
     for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr) {
         // Loop over all particles in the event and find the b-quarks
         const HepMC::GenEvent* genEvt = (*itr);
-        for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr) {
-	    int p_id = (*pitr)->pdg_id();
-	    int p_stat = (*pitr)->status();
+        for (auto pitr: *genEvt) {
+	    int p_id = pitr->pdg_id();
+	    int p_stat = pitr->status();
             if ( (abs(p_id)==5) && (p_stat == 62 || p_stat == 63) ) {
-                bQuarks.push_back(*pitr);
+                bQuarks.push_back(pitr);
             }
         }
     }
-- 
GitLab


From 3935b0aaa530be268c204e412961b5877a4dd296 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Fri, 12 Jun 2020 11:07:36 +0000
Subject: [PATCH 217/266] Since all implementations, provide the EventContext
 methods, we do not need to default implement them, just leave the non event
 context for client compatibility

---
 .../ICombinedMuonTrackBuilder.h               |  64 +++
 .../CombinedMuonTrackBuilder.h                |   2 +-
 .../OutwardsCombinedMuonTrackBuilder.h        |   2 +-
 .../TrkFitterInterfaces/ITrackFitter.h        | 452 +++++++-----------
 .../TrkFitterInterfaces/ITrackFitter.icc      |  94 ++++
 5 files changed, 346 insertions(+), 268 deletions(-)
 create mode 100644 Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.icc

diff --git a/Reconstruction/MuonIdentification/MuidInterfaces/MuidInterfaces/ICombinedMuonTrackBuilder.h b/Reconstruction/MuonIdentification/MuidInterfaces/MuidInterfaces/ICombinedMuonTrackBuilder.h
index a9fef5fd3653..8929888254cc 100755
--- a/Reconstruction/MuonIdentification/MuidInterfaces/MuidInterfaces/ICombinedMuonTrackBuilder.h
+++ b/Reconstruction/MuonIdentification/MuidInterfaces/MuidInterfaces/ICombinedMuonTrackBuilder.h
@@ -72,6 +72,70 @@ public:
        refit a track removing any indet measurements with optional addition of pseudoMeasurements */
     virtual Trk::Track*		standaloneRefit	(const Trk::Track&	combinedTrack, 
                                                  float bs_x = 0., float bs_y = 0., float bs_z = 0.) const = 0;
+
+
+     /*
+      * Default implement the ITrackFitter context aware method to just call
+      * the no-context ones
+      */
+      using Trk::ITrackFitter::fit;
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::Track& track,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+        return std::unique_ptr<Trk::Track>(fit(track, runOutlier, matEffects));
+      }
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::Track& track,
+        const Trk::PrepRawDataSet& prepRawSet,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+        return std::unique_ptr<Trk::Track>(fit(track, prepRawSet, runOutlier, matEffects));
+      }
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::PrepRawDataSet& prepRawSet,
+        const Trk::TrackParameters& params,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+        return std::unique_ptr<Trk::Track>(fit(prepRawSet, params, runOutlier, matEffects));
+      }
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::Track& track,
+        const Trk::MeasurementSet& measSet,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+         return std::unique_ptr<Trk::Track>(fit(track, measSet, runOutlier, matEffects));
+      }
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::MeasurementSet& measSet,
+        const Trk::TrackParameters& params,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+        return std::unique_ptr<Trk::Track>(fit(measSet, params, runOutlier, matEffects));
+      }
+      virtual std::unique_ptr<Trk::Track> fit(
+        const EventContext&,
+        const Trk::Track& track1,
+        const Trk::Track& track2,
+        const Trk::RunOutlierRemoval runOutlier = false,
+        const Trk::ParticleHypothesis matEffects = Trk::nonInteracting) const
+      {
+
+        return std::unique_ptr<Trk::Track>(fit(track1, track2, runOutlier, matEffects));
+      }
+    //End of default implementing of context aware methods 
+
+
 };
  
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
index 6846bb641070..92a9f33d4c13 100755
--- a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
+++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/CombinedMuonTrackBuilder.h
@@ -96,7 +96,7 @@ class CombinedMuonTrackBuilder : public AthAlgTool, virtual public ICombinedMuon
      * Bring in default impl with
      * EventContext for now
      */
-    using ITrackFitter::fit;
+    using ICombinedMuonTrackBuilder::fit;
 
     /*refit a track */
     Trk::Track* fit(const Trk::Track& track, const Trk::RunOutlierRemoval runOutlier = false,
diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/OutwardsCombinedMuonTrackBuilder.h b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/OutwardsCombinedMuonTrackBuilder.h
index 5885f322e475..e0d64a4a6fda 100644
--- a/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/OutwardsCombinedMuonTrackBuilder.h
+++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/MuidTrackBuilder/OutwardsCombinedMuonTrackBuilder.h
@@ -86,7 +86,7 @@ class OutwardsCombinedMuonTrackBuilder : public AthAlgTool, virtual public IComb
      * EventContext for now
      */
   
-    using ITrackFitter::fit;
+    using ICombinedMuonTrackBuilder::fit;
     /** refit a track */
     Trk::Track* fit(const Trk::Track& track, const Trk::RunOutlierRemoval runOutlier = false,
                     const Trk::ParticleHypothesis particleHypothesis = Trk::muon) const;
diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
index 0ec02babca45..d8cf4ee66365 100755
--- a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
+++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h
@@ -12,287 +12,207 @@
 #ifndef TRK_ITRACKFITTER_H
 #define TRK_ITRACKFITTER_H
 
+#include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/IAlgTool.h"
-#include "TrkFitterUtils/FitterTypes.h"
-#include "TrkFitterUtils/FitterStatusCode.h"
 #include "TrkEventPrimitives/ParticleHypothesis.h"
+#include "TrkFitterUtils/FitterStatusCode.h"
+#include "TrkFitterUtils/FitterTypes.h"
 #include "TrkParameters/TrackParameters.h"
-#include "GaudiKernel/EventContext.h"
-#include "TrkTrack/Track.h" 
+#include "TrkTrack/Track.h"
 namespace Trk {
 
-  class Track;	//!> ATLAS standard track class
-
-  static const InterfaceID IID_ITrackFitter("ITrackFitter",1,0);
-
-  /** @class ITrackFitter
-
-      provides the abstract interface for track fitting in the common
-      ATLAS Tracking EDM.
-      This interfaces carries different methods for the main use cases
-      of fitting, extending and re-fitting a track. Each implementation
-      can decide how they bundle these use cases onto a common maths core.
-      The interface is held general so that it is suitable for global
-      and progressive fitter algorithms.
-      Regarding athena, it is implemented using the IAlgTool inheritance,
-      so fitter implementations should be a component_library.
-
-      Athena MT notes:
-      There are 2 sets of methods
-      1. EventContext aware returning unique_ptr
-      2. Without EventContext returning plain ptr.
-
-      By default the methods of the one set call the methods of the other.
-      So a Fitter implementation needs to implement only one of the two sets. 
-      A client can use any of the two.
-      For MT it might be preferable to migrate to the EventContext aware.
-
-      @author M. Elsing, W. Liebig <http://consult.cern.ch/xwho>
-      @author C. Anastopoulos (Athena MT)
-  */
-
-  class ITrackFitter : virtual public IAlgTool { 
-
-  public:
-    /** other standard AlgTool methods */
-    //    virtual ~ITrackFitter() {};                //!< virtual destructor
-
-    static const InterfaceID& interfaceID ()   //!< the Tool's interface
-      {  return IID_ITrackFitter; }  	
-
-
-     /*
-      * First the context aware retun unique_ptr
-      * methods.
-      * If this set is not overloaded , it 
-      * will call the methods without EventContext
-      */
 
-    /** Event context aware (Athena MT) RE-FIT A TRACK. */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const Track& track,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        (void)(ctx);
-        return std::unique_ptr<Track>(fit(track, runOutlier, matEffects));
-      }
-    /** Event context aware (Athena MT) RE-FIT A TRACK, ADDING A PRD SET.
-        this method will disintegrate the track back to PRD
-        and call the fit(PRDset) method.
-    */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const Track& track,
-        const PrepRawDataSet& prepRawSet,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
+static const InterfaceID IID_ITrackFitter("ITrackFitter", 1, 0);
 
-        (void)(ctx);
-        return std::unique_ptr<Track>(
-          fit(track, prepRawSet, runOutlier, matEffects));
-      }
-     /** Event context aware  FIT A TRACK TO A SET OF PrepRawData.
-        Main fit method. The TrackParameters is a first 
-        estimate for the track, represented close to the origin.
-        Use-cases can be thought of that make it necessary
-        to control toggling outlier removal and material effects not
-        via job options (once-per-job) but at each call (toggle
-        within event, large set of fast fit followed by one final full fit).
-    */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const PrepRawDataSet& prepRawSet,
-        const TrackParameters& params,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        (void)(ctx);
-        return std::unique_ptr<Track>(
-          fit(prepRawSet, params, runOutlier, matEffects));
-      }
+/** @class ITrackFitter
 
-    /** Event context aware RE-FIT A TRACK, ADDING A FITTABLE MEASUREMENT SET.
-        this method will use the vector of measurements from the
-        existing track and refit adding the new measurements. The code
-        is in this class, but can be overwritten by inheriting classes.
-    */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const Track& track,
-        const MeasurementSet& measSet,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-         (void)(ctx);
-         return std::unique_ptr<Track>(
-           fit(track, measSet, runOutlier, matEffects));
-      }
+    provides the abstract interface for track fitting in the common
+    ATLAS Tracking EDM.
+    This interfaces carries different methods for the main use cases
+    of fitting, extending and re-fitting a track. Each implementation
+    can decide how they bundle these use cases onto a common maths core.
+    The interface is held general so that it is suitable for global
+    and progressive fitter algorithms.
+    Regarding athena, it is implemented using the IAlgTool inheritance,
+    so fitter implementations should be a component_library.
 
-      /** Event context aware FIT A TRACK TO A SET OF MEASUREMENTBASE.
-          Main fit method. The TrackParameters is a first
-          estimate for the track, represented close to the origin.
-      */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const MeasurementSet& measSet,
-        const TrackParameters& params,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        (void)(ctx);
-        return std::unique_ptr<Track>(
-          fit(measSet, params, runOutlier, matEffects));
-      }
+    Athena MT notes:
+    There are 2 sets of methods
+    1. EventContext aware returning unique_ptr
+    2. Without EventContext returning plain ptr.
 
-      /** Event context aware COMBINE TWO TRACKS BY REFITTING.
-          Specifically designed for combined muon fits, allowing to extract
-          extra informations (ID-exit & MS-entrance parameters, layers, Mefos)
-          from already fitted tracks.
-      */
-      virtual std::unique_ptr<Track> fit(
-        const EventContext& ctx,
-        const Track& track1,
-        const Track& track2,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        (void)(ctx);
-        return std::unique_ptr<Track>(
-          fit(track1, track2, runOutlier, matEffects));
-      }
+    By default the methods of the one set call the methods of the other.
+    So a Fitter implementation needs to implement only one of the two sets.
+    A client can use any of the two.
+    For MT it might be preferable to migrate to the EventContext aware.
 
-      /*
-       * Then the context unaware retun unique_ptr
-       * methods.
-       * If this set is not overloaded , it
-       * will call the methods with EventContext
-       */
-
-      /** RE-FIT A TRACK.
-          It is the fitter model's decision if to
-          re-fit on PRD or ROT level*/
-      virtual Track* fit(
-        const Track& track,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        return fit(Gaudi::Hive::currentContext(), 
-                   track, 
-                   runOutlier, 
-                   matEffects).release();
-      }
-
-    /** RE-FIT A TRACK, ADDING A PRD SET.
-        this method will disintegrate the track back to PRD
-        and call the fit(PRDset) method. The code is in this class,
-        but can be overwritten by inheriting classes.
-    */
-      virtual Track* fit(
-        const Track& track,
-        const PrepRawDataSet& prepRawSet,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-
-        return fit(Gaudi::Hive::currentContext(),
-                   track,
-                   prepRawSet,
-                   runOutlier,
-                   matEffects)
-          .release();
-      }
-
-    /** FIT A TRACK TO A SET OF PrepRawData.
-        Main fit method. The TrackParameters is a first 
-        estimate for the track, represented close to the origin.
-        Use-cases can be thought of that make it necessary
-        to control toggling outlier removal and material effects not
-        via job options (once-per-job) but at each call (toggle
-        within event, large set of fast fit followed by one final full fit).
-    */
-      virtual Track* fit(
-        const PrepRawDataSet& prepRawSet,
-        const TrackParameters& params,
-        const RunOutlierRemoval runOutlier = false,
-        const ParticleHypothesis matEffects = Trk::nonInteracting) const
-      {
-        return fit(Gaudi::Hive::currentContext(),
-                   prepRawSet,
-                   params,
-                   runOutlier,
-                   matEffects)
-          .release();
-    }
-
-    /** RE-FIT A TRACK, ADDING A FITTABLE MEASUREMENT SET.
-        this method will use the vector of measurements from the
-        existing track and refit adding the new measurements. The code
-        is in this class, but can be overwritten by inheriting classes.
-    */
-    virtual Track* fit(
-      const Track& track,
-      const MeasurementSet& measSet,
-      const RunOutlierRemoval runOutlier = false,
-      const ParticleHypothesis matEffects = Trk::nonInteracting) const
-    {
-      return fit(Gaudi::Hive::currentContext(),
-                 track,
-                 measSet,
-                 runOutlier,
-                 matEffects)
-        .release();
-    }
-
-    /** FIT A TRACK TO A SET OF MEASUREMENTBASE.
-        Main fit method. The TrackParameters is a first 
-        estimate for the track, represented close to the origin.
-    */
-    virtual Track* fit(const MeasurementSet& measSet,
-                       const TrackParameters& params,
-                       const RunOutlierRemoval runOutlier=false,
-                       const ParticleHypothesis matEffects=Trk::nonInteracting) const
-    {
+    @author M. Elsing, W. Liebig <http://consult.cern.ch/xwho>
+    @author C. Anastopoulos (Athena MT)
+*/
 
-      return fit(Gaudi::Hive::currentContext(),
-                 measSet,
-                 params,
-                 runOutlier,
-                 matEffects)
-        .release();
-    }
+class ITrackFitter : virtual public IAlgTool
+{
+
+public:
+
+  static const InterfaceID& interfaceID() //!< the Tool's interface
+  {
+    return IID_ITrackFitter;
+  }
+
+  /*
+   * First the context aware retun unique_ptr
+   * methods.
+   * If this set is not overloaded , it
+   * will call the methods without EventContext
+   */
+
+  /** Event context aware (Athena MT) RE-FIT A TRACK. */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track& track,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+  /** Event context aware (Athena MT) RE-FIT A TRACK, ADDING A PRD SET.
+      this method will disintegrate the track back to PRD
+      and call the fit(PRDset) method.
+  */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track& track,
+    const PrepRawDataSet& prepRawSet,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+  /** Event context aware  FIT A TRACK TO A SET OF PrepRawData.
+     Main fit method. The TrackParameters is a first
+     estimate for the track, represented close to the origin.
+     Use-cases can be thought of that make it necessary
+     to control toggling outlier removal and material effects not
+     via job options (once-per-job) but at each call (toggle
+     within event, large set of fast fit followed by one final full fit).
+ */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const PrepRawDataSet& prepRawSet,
+    const TrackParameters& params,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+
+  /** Event context aware RE-FIT A TRACK, ADDING A FITTABLE MEASUREMENT SET.
+      this method will use the vector of measurements from the
+      existing track and refit adding the new measurements. The code
+      is in this class, but can be overwritten by inheriting classes.
+  */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track& track,
+    const MeasurementSet& measSet,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+
+  /** Event context aware FIT A TRACK TO A SET OF MEASUREMENTBASE.
+      Main fit method. The TrackParameters is a first
+      estimate for the track, represented close to the origin.
+  */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const MeasurementSet& measSet,
+    const TrackParameters& params,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+
+  /** Event context aware COMBINE TWO TRACKS BY REFITTING.
+      Specifically designed for combined muon fits, allowing to extract
+      extra informations (ID-exit & MS-entrance parameters, layers, Mefos)
+      from already fitted tracks.
+  */
+  virtual std::unique_ptr<Track> fit(
+    const EventContext& ctx,
+    const Track& track1,
+    const Track& track2,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0;
+
+  /*
+   * Then the context unaware methods.
+   * These are here for client compatibility.
+   * They just call the EventContext aware
+   * methods.
+   * Implementations do not need to provide them.
+   */
+
+  /** RE-FIT A TRACK.
+      It is the fitter model's decision if to
+      re-fit on PRD or ROT level*/
+  virtual Track* fit(
+    const Track& track,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
+  /** RE-FIT A TRACK, ADDING A PRD SET.
+      this method will disintegrate the track back to PRD
+      and call the fit(PRDset) method. The code is in this class,
+      but can be overwritten by inheriting classes.
+  */
+  virtual Track* fit(
+    const Track& track,
+    const PrepRawDataSet& prepRawSet,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
+  /** FIT A TRACK TO A SET OF PrepRawData.
+      Main fit method. The TrackParameters is a first
+      estimate for the track, represented close to the origin.
+      Use-cases can be thought of that make it necessary
+      to control toggling outlier removal and material effects not
+      via job options (once-per-job) but at each call (toggle
+      within event, large set of fast fit followed by one final full fit).
+  */
+  virtual Track* fit(
+    const PrepRawDataSet& prepRawSet,
+    const TrackParameters& params,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
+  /** RE-FIT A TRACK, ADDING A FITTABLE MEASUREMENT SET.
+      this method will use the vector of measurements from the
+      existing track and refit adding the new measurements. The code
+      is in this class, but can be overwritten by inheriting classes.
+  */
+  virtual Track* fit(
+    const Track& track,
+    const MeasurementSet& measSet,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
+  /** FIT A TRACK TO A SET OF MEASUREMENTBASE.
+      Main fit method. The TrackParameters is a first
+      estimate for the track, represented close to the origin.
+  */
+  virtual Track* fit(
+    const MeasurementSet& measSet,
+    const TrackParameters& params,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
+
+  /** COMBINE TWO TRACKS BY REFITTING.
+      Specifically designed for combined muon fits, allowing to extract
+      extra informations (ID-exit & MS-entrance parameters, layers, Mefos)
+      from already fitted tracks.
+  */
+  virtual Track* fit(
+    const Track& track1,
+    const Track& track2,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = Trk::nonInteracting) const;
 
-    /** COMBINE TWO TRACKS BY REFITTING.
-        Specifically designed for combined muon fits, allowing to extract
-        extra informations (ID-exit & MS-entrance parameters, layers, Mefos)
-        from already fitted tracks.
-    */
-    virtual Track* fit(
-      const Track& track1,
-      const Track& track2,
-      const RunOutlierRemoval runOutlier = false,
-      const ParticleHypothesis matEffects = Trk::nonInteracting) const
-    {
-      return fit(Gaudi::Hive::currentContext(),
-                 track1,
-                 track2,
-                 runOutlier,
-                 matEffects)
-        .release();
-    }
-      /** provides way of getting more detailed information about failing fits
-       * than NULL track pointer */
-      virtual FitterStatusCode statusCodeOfLastFit() const;
+  /** provides way of getting more detailed information about failing fits
+   * than NULL track pointer */
+  virtual FitterStatusCode statusCodeOfLastFit() const;
 
-    }; // end of class
+}; // end of class
 } // end of namespace
 
-// wait until all fitters have it implemented
-inline Trk::FitterStatusCode
-Trk::ITrackFitter::statusCodeOfLastFit() const
-{ return Trk::FitterStatusCode::Success; }
-
+#include "TrkFitterInterfaces/ITrackFitter.icc"
 
 #endif // TRK_ITRACKFITTER_H
diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.icc b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.icc
new file mode 100644
index 000000000000..cf41bf38c2cf
--- /dev/null
+++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.icc
@@ -0,0 +1,94 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+namespace Trk {
+
+inline Track*
+ITrackFitter::fit(const Track& track,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+  return fit(Gaudi::Hive::currentContext(), track, runOutlier, matEffects)
+    .release();
+}
+
+inline Track*
+ITrackFitter::fit(const Track& track,
+                  const PrepRawDataSet& prepRawSet,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+
+  return fit(Gaudi::Hive::currentContext(),
+             track,
+             prepRawSet,
+             runOutlier,
+             matEffects)
+    .release();
+}
+
+inline Track*
+ITrackFitter::fit(const PrepRawDataSet& prepRawSet,
+                  const TrackParameters& params,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+  return fit(Gaudi::Hive::currentContext(),
+             prepRawSet,
+             params,
+             runOutlier,
+             matEffects)
+    .release();
+}
+
+inline Track*
+ITrackFitter::fit(const Track& track,
+                  const MeasurementSet& measSet,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+  return fit(Gaudi::Hive::currentContext(),
+             track,
+             measSet,
+             runOutlier,
+             matEffects)
+    .release();
+}
+
+inline Track*
+ITrackFitter::fit(const MeasurementSet& measSet,
+                  const TrackParameters& params,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+
+  return fit(Gaudi::Hive::currentContext(),
+             measSet,
+             params,
+             runOutlier,
+             matEffects)
+    .release();
+}
+
+inline Track*
+ITrackFitter::fit(const Track& track1,
+                  const Track& track2,
+                  const RunOutlierRemoval runOutlier,
+                  const ParticleHypothesis matEffects) const
+{
+  return fit(Gaudi::Hive::currentContext(),
+             track1,
+             track2,
+             runOutlier,
+             matEffects)
+    .release();
+}
+
+inline FitterStatusCode
+ITrackFitter::statusCodeOfLastFit() const
+{
+  return Trk::FitterStatusCode::Success;
+}
+
+}
-- 
GitLab


From e3d57e7c8a6de22e5adf5574620929e0d851a4c5 Mon Sep 17 00:00:00 2001
From: Patrick Scholer <patrick.scholer@cern.ch>
Date: Fri, 12 Jun 2020 11:38:14 +0000
Subject: [PATCH 218/266] Merge branch 'fillingStripDriftTimesMMClusterization'
 into '21.3'

Filling strip drift times and errros in MMCluster Builder and add author variable to MMPrepData
and fixing conflicts
See merge request atlas/athena!33238
---
 .../MuonPrepRawData/MMPrepData_p1.h           |  2 ++
 .../src/MuonPrepRawData/MMPrepDataCnv_p1.cxx  |  3 ++
 .../src/MmRdoToPrepDataToolCore.cxx           |  7 +++-
 ...sterTimeProjectionMMClusterBuilderTool.cxx | 27 +++++++++++----
 ...lusterTimeProjectionMMClusterBuilderTool.h |  1 +
 .../ConstraintAngleMMClusterBuilderTool.cxx   | 32 +++++++++++++-----
 .../src/ConstraintAngleMMClusterBuilderTool.h |  3 +-
 .../src/ProjectionMMClusterBuilderTool.cxx    | 27 +++++++++++++--
 .../src/ProjectionMMClusterBuilderTool.h      |  3 +-
 .../src/SimpleMMClusterBuilderTool.cxx        | 33 ++++++++++++++-----
 .../src/SimpleMMClusterBuilderTool.h          |  3 +-
 .../src/UTPCMMClusterBuilderTool.cxx          | 26 +++++++++++----
 .../src/UTPCMMClusterBuilderTool.h            |  1 +
 .../MuonPrepRawData/MMPrepData.h              | 19 +++++++++++
 .../MuonPrepRawData/src/MMPrepData.cxx        |  4 +++
 15 files changed, 156 insertions(+), 35 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
index 52f67bd137ae..f6382d41025b 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
@@ -42,6 +42,8 @@ namespace Muon
 
 	std::vector<float>        m_stripDriftDist;
 	std::vector<Amg::MatrixX> m_stripDriftErrors;
+
+  int m_author; // contains the info about which cluster builder tool produced the PRD
         
         //@}
         
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
index 511d8eb8b3e0..9afba6d518f4 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
@@ -46,6 +46,7 @@ createMMPrepData ( const Muon::MMPrepData_p1 *persObj,
   data.setMicroTPC(persObj->m_angle, persObj->m_chisqProb);
   // set the drift distances
   data.setDriftDist(persObj->m_stripDriftDist,persObj->m_stripDriftErrors);
+  data.setAuthor(static_cast<Muon::MMPrepData::Author>(persObj->m_author));
 
   return data;
 }
@@ -79,6 +80,8 @@ transToPers( const Muon::MMPrepData *transObj, Muon::MMPrepData_p1 *persObj, Msg
     persObj->m_stripDriftDist   = transObj->stripDriftDist();
     persObj->m_stripDriftErrors = transObj->stripDriftErrors();
 
+    persObj->m_author = static_cast<int>(transObj->author());
+
     /// store the rdoList in a vector with the difference with respect to the 32-bit cluster identifier
     Identifier32::value_type clusIdCompact = transObj->identify().get_identifier32().get_compact(); // unsigned int
     std::vector<signed char> rdoListPers;
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolCore.cxx
index e70f63ab83d9..4ae0f0f07bcb 100644
--- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolCore.cxx
@@ -175,11 +175,16 @@ StatusCode Muon::MmRdoToPrepDataToolCore::processCollection(const MM_RawDataColl
     localPos.x() += calibStrip.dx;
 
     if(!merge) {
-      prdColl->push_back(new MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift));
+       	// storage will be handeled by Store Gate
+	      MMPrepData *mpd = new MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift);
+	      mpd->setAuthor(Muon::MMPrepData::Author::RDOTOPRDConverter);
+	      prdColl->push_back(mpd);
+
     } else {
        MMPrepData mpd = MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift);
        // set the hash of the MMPrepData such that it contains the correct value in case it gets used in SimpleMMClusterBuilderTool::getClusters
        mpd.setHashAndIndex(hash,0);
+       mpd.setAuthor(Muon::MMPrepData::Author::RDOTOPRDConverter);
        MMprds.push_back(mpd);
     } 
   }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx
index 22b11c43bc30..6496d4f96663 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx
@@ -19,6 +19,7 @@ Muon::ClusterTimeProjectionMMClusterBuilderTool::ClusterTimeProjectionMMClusterB
                     const std::string& n, const IInterface* p):
                     AthAlgTool(t, n, p) {
     declareInterface<IMMClusterBuilderTool>(this);
+    declareProperty("writeStripProperties", m_writeStripProperties = true ); // true  for debugging; needs to become false for large productions
     declareProperty("maxHoleSize", m_maxHoleSize = 1);
 }
 
@@ -196,19 +197,30 @@ StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::writeClusterPrd(
     std::vector<int> stripCharges;
     std::vector<short int> stripTimes;
     std::vector<uint16_t> stripNumbers;
+    std::vector<float> stripDriftDists;
+    std::vector<Amg::MatrixX> stripDriftDistErrors;
 
     rdoList.reserve(idxCluster.size());
-    stripCharges.reserve(idxCluster.size());
-    stripTimes.reserve(idxCluster.size());
-    stripNumbers.reserve(idxCluster.size());
+    if(m_writeStripProperties) {
+        stripCharges.reserve(idxCluster.size());
+        stripTimes.reserve(idxCluster.size());
+        stripNumbers.reserve(idxCluster.size());
+    }
+    stripDriftDists.reserve(idxCluster.size());
+    stripDriftDistErrors.reserve(idxCluster.size());
 
     for (auto &idx : idxCluster) {
         Identifier id = MMPrdsOfLayer.at(idx).identify();
         rdoList.push_back(id);
-        stripCharges.push_back(MMPrdsOfLayer.at(idx).charge());
-        stripTimes.push_back(MMPrdsOfLayer.at(idx).time());
-        stripNumbers.push_back(channel(id));
+        if(m_writeStripProperties) {
+            stripCharges.push_back(MMPrdsOfLayer.at(idx).charge());
+            stripTimes.push_back(MMPrdsOfLayer.at(idx).time());
+            stripNumbers.push_back(channel(id));
+        }
+        stripDriftDists.push_back(MMPrdsOfLayer.at(idx).driftDist());
+        stripDriftDistErrors.push_back(MMPrdsOfLayer.at(idx).localCovariance());
     }
+
     Amg::MatrixX* covN = new Amg::MatrixX(1, 1);
     covN -> coeffRef(0, 0) = clusterPositionErrorSq;
     Amg::Vector2D localClusterPositionV(clusterPosition,
@@ -224,6 +236,9 @@ StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::writeClusterPrd(
                    0.0/*drift dist*/,
                    stripNumbers, stripTimes, stripCharges);
 
+    prdN->setDriftDist(stripDriftDists, stripDriftDistErrors);
+    prdN->setAuthor(Muon::MMPrepData::Author::ClusterTimeProjectionClusterBuilder);
+
     clustersVec.push_back(prdN);
     return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
index cfac1fa4a748..1a3d1670734a 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
@@ -34,6 +34,7 @@ class ClusterTimeProjectionMMClusterBuilderTool :
     /// Muon Detector Descriptor
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
+    bool m_writeStripProperties;
     uint m_maxHoleSize;
 
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.cxx
index 7e7d40ba2222..3aa379bc8a04 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.cxx
@@ -74,6 +74,7 @@ Muon::ConstraintAngleMMClusterBuilderTool::ConstraintAngleMMClusterBuilderTool(c
                     AthAlgTool(t,n,p)
 {
     declareInterface<IMMClusterBuilderTool>(this);
+    declareProperty("writeStripProperties", m_writeStripProperties = true ); // true  for debugging; needs to become false for large productions
     declareProperty("nSigmaSelection",m_nSigmaSelection = 3);
     declareProperty("sTheta",m_sigmaTheta = 3);
     declareProperty("fitAngleCut",m_fitAngleCut = 10);  //degree 
@@ -254,12 +255,20 @@ const{
     std::vector<int> stripsOfClusterCharges;
     std::vector<short int> stripsOfClusterTimes;
     std::vector<uint16_t> stripsOfClusterChannels;
+    std::vector<float> stripDriftDists;
+    std::vector<Amg::MatrixX> stripDriftDistErrors;
 
     uint nStrips = idxCluster.size();
+
     stripsOfCluster.reserve(nStrips);
-    stripsOfClusterCharges.reserve(nStrips);
-    stripsOfClusterTimes.reserve(nStrips);
-    stripsOfClusterChannels.reserve(nStrips);
+
+    if (m_writeStripProperties) {
+        stripsOfClusterCharges.reserve(nStrips);
+        stripsOfClusterTimes.reserve(nStrips);
+        stripsOfClusterChannels.reserve(nStrips);
+    }
+    stripDriftDists.reserve(nStrips);
+    stripDriftDistErrors.reserve(nStrips);
 
     
     for(uint i_strip=0; i_strip < idxCluster.size(); i_strip++){
@@ -272,9 +281,13 @@ const{
         fitFunc.addPoint(x,y,xerror,yerror);
 
         stripsOfCluster.push_back(prdPerLayer.at(idxCluster.at(i_strip)).identify());
-        stripsOfClusterCharges.push_back(prdPerLayer.at(idxCluster.at(i_strip)).charge());
-        stripsOfClusterChannels.push_back(m_idHelperSvc->mmIdHelper().channel(prdPerLayer.at(idxCluster.at(i_strip)).identify()));
-        stripsOfClusterTimes.push_back(prdPerLayer.at(idxCluster.at(i_strip)).time());
+        if (m_writeStripProperties) {
+            stripsOfClusterCharges.push_back(prdPerLayer.at(idxCluster.at(i_strip)).charge());
+            stripsOfClusterTimes.push_back(prdPerLayer.at(idxCluster.at(i_strip)).time());
+            stripsOfClusterChannels.push_back(m_idHelperSvc->mmIdHelper().channel(prdPerLayer.at(idxCluster.at(i_strip)).identify()));
+        }
+        stripDriftDists.push_back(prdPerLayer.at(i_strip).driftDist());
+        stripDriftDistErrors.push_back(prdPerLayer.at(i_strip).localCovariance());
     }
     if(std::abs(ffit->GetParameter(0)-clusterTheta)> m_fitAngleCut * Gaudi::Units::degree){return StatusCode::FAILURE;}; // very loose cut for now
 
@@ -309,9 +322,12 @@ const{
 		  stripsOfClusterCharges.end(),0),
 		driftDist,
 		stripsOfClusterChannels,stripsOfClusterTimes,stripsOfClusterCharges);
-	    
+
+
+     prdN->setDriftDist(stripDriftDists, stripDriftDistErrors);
+     prdN->setAuthor(Muon::MMPrepData::Author::ConstraintuTPCClusterBuilder);
      ATH_MSG_DEBUG("Did create new prd");
-     
+
      ATH_MSG_DEBUG("Setting prd angle: "<< fitResults[0] <<" chi2 Prob: "<<0);
 
      prdN->setMicroTPC(fitResults[0],0);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.h
index 1c105ec983d0..7621f892fdc9 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ConstraintAngleMMClusterBuilderTool.h
@@ -35,7 +35,8 @@ namespace Muon{
             
         private:
             ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-            StatusCode sortHitsToLayer(const std::vector<Muon::MMPrepData>& MMprds, std::vector<std::vector<Muon::MMPrepData>>& prdsPerLayer) const ;
+            bool m_writeStripProperties;
+            StatusCode sortHitsToLayer(const std::vector<Muon::MMPrepData>& MMprds, std::vector<std::vector<Muon::MMPrepData>>& prdsPerLayer ) const; 
             StatusCode scanLayer(const std::vector<Muon::MMPrepData> &mmPrdsPerLayer,std::vector<std::vector<uint>> &idxClusters, std::vector<double> &clusterTheta)const ;
             StatusCode fitCluster(const std::vector<Muon::MMPrepData> &prdPerLayer,const std::vector<uint>& idxCluster,const double &clusterTheta,std::vector<Muon::MMPrepData*>& clustersVec) const;
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
index 53fda070640d..7eef27ad4a30 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx
@@ -30,6 +30,7 @@ Muon::ProjectionMMClusterBuilderTool::ProjectionMMClusterBuilderTool(const std::
   AthAlgTool(t,n,p)
 {
   declareInterface<IMMClusterBuilderTool>(this);
+  declareProperty("writeStripProperties", m_writeStripProperties = true ); // true  for debugging; needs to become false for large productions
   declareProperty("tmin", m_tmin=0.0);
   declareProperty("tmax", m_tmax=5.0);
   declareProperty("tOffset", m_tOffset=0);
@@ -212,12 +213,30 @@ StatusCode Muon::ProjectionMMClusterBuilderTool::writeNewPrd(std::vector<Muon::M
       std::vector<short int> stripsOfClusterDriftTime;
       std::vector<int> stripsOfClusterCharge;
       std::vector<uint16_t> stripsOfClusterStripNumber;
+      std::vector<float> stripsOfClusterDriftDists;
+      std::vector<Amg::MatrixX> stripsOfClusterDriftDistErrors;
+
+
+
+      stripsOfCluster.reserve(idx_selected.size());
+      if (m_writeStripProperties) {
+        stripsOfClusterDriftTime.reserve(idx_selected.size());
+        stripsOfClusterCharge.reserve(idx_selected.size());
+        stripsOfClusterStripNumber.reserve(idx_selected.size());
+      }
+      stripsOfClusterDriftDists.reserve(idx_selected.size());
+      stripsOfClusterDriftDistErrors.reserve(idx_selected.size());
+
       double meanTime=0;
       for(const auto& id_goodStrip:idx_selected){
         stripsOfCluster.push_back(prdsOfLayer.at(id_goodStrip).identify());
-        stripsOfClusterDriftTime.push_back(int(prdsOfLayer.at(id_goodStrip).time()));
-        stripsOfClusterCharge.push_back(int(prdsOfLayer.at(id_goodStrip).charge()));
-        stripsOfClusterStripNumber.push_back(m_idHelperSvc->mmIdHelper().channel(prdsOfLayer.at(id_goodStrip).identify()));
+        if (m_writeStripProperties) {
+          stripsOfClusterDriftTime.push_back(static_cast<short int>(prdsOfLayer.at(id_goodStrip).time()));
+          stripsOfClusterCharge.push_back(static_cast<int>(prdsOfLayer.at(id_goodStrip).charge()));
+          stripsOfClusterStripNumber.push_back(m_idHelperSvc->mmIdHelper().channel(prdsOfLayer.at(id_goodStrip).identify()));
+        }
+        stripsOfClusterDriftDists.push_back(prdsOfLayer.at(id_goodStrip).driftDist());
+        stripsOfClusterDriftDistErrors.push_back(prdsOfLayer.at(id_goodStrip).localCovariance());
 
 
         meanTime+=prdsOfLayer.at(id_goodStrip).time()*prdsOfLayer.at(id_goodStrip).charge();
@@ -233,6 +252,8 @@ StatusCode Muon::ProjectionMMClusterBuilderTool::writeNewPrd(std::vector<Muon::M
 				      (short int) int(meanTime),int(qtot), driftDist,
 				      stripsOfClusterStripNumber,stripsOfClusterDriftTime,stripsOfClusterCharge);
 
+      prdN->setAuthor(Muon::MMPrepData::Author::ProjectionClusterBuilder);
+
       clustersVect.push_back(prdN);
       ATH_MSG_VERBOSE("pushedBack  prdN");
       ATH_MSG_VERBOSE("pushedBack PRDs: stationEta: "<< m_idHelperSvc->mmIdHelper().stationEta(prdN->identify())
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h
index 2085327f5223..3c1f82b09b44 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h
@@ -46,9 +46,10 @@ namespace Muon
   private: 
 
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+    bool m_writeStripProperties;
 
     double m_tmin,m_tmax,m_tOffset;
-    double m_p0,m_p1,m_p2; //correction factors for charge dependence
+    double m_p0, m_p1, m_p2;
 
     int m_t0;
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
index 41270cbf2389..4c9f83f8e0b4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
@@ -14,6 +14,7 @@ Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string&
   AthAlgTool(t,n,p)
 {
   declareInterface<IMMClusterBuilderTool>(this);
+  declareProperty("writeStripProperties", m_writeStripProperties = true ); // true  for debugging; needs to become false for large productions
   declareProperty("useErrorParametrization", m_useErrorParametrization = true);
   declareProperty("maxHoleSize", m_maxHoleSize = 1);
 }
@@ -92,13 +93,20 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
     std::vector<uint16_t> mergeStrips;
     std::vector<short int> mergeStripsTime;
     std::vector<int> mergeStripsCharge;
+    std::vector<float> mergeStripsDriftDists;
+    std::vector<Amg::MatrixX> mergeStripsDriftDistErrors;
+
 
     rdoList.push_back(id_prd);
     MMflag[i] = 1;
     mergeIndices.push_back(i);
     mergeStrips.push_back(strip);
-    mergeStripsTime.push_back(MMprds[i].time());
-    mergeStripsCharge.push_back(MMprds[i].charge());
+    if (m_writeStripProperties) {
+      mergeStripsTime.push_back(MMprds[i].time());
+      mergeStripsCharge.push_back(MMprds[i].charge());
+    }
+    mergeStripsDriftDists.push_back(MMprds[i].driftDist());
+    mergeStripsDriftDistErrors.push_back(MMprds[i].localCovariance());
 
     unsigned int nmergeStrips = 1;
     unsigned int nmergeStripsMax = 50;
@@ -120,8 +128,12 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
 	    MMflag[j] = 1;
 	    mergeIndices.push_back(j);
 	    mergeStrips.push_back(stripN);
-	    mergeStripsTime.push_back(MMprds[j].time()-MMprds[j].globalPosition().norm()/299.792);
-	    mergeStripsCharge.push_back(MMprds[j].charge());
+      if(m_writeStripProperties) {
+        mergeStripsTime.push_back(MMprds[j].time());
+        mergeStripsCharge.push_back(MMprds[j].charge());
+      }
+      mergeStripsDriftDists.push_back(MMprds[j].driftDist());
+      mergeStripsDriftDistErrors.push_back(MMprds[j].localCovariance());
 	    nmergeStrips++;
 	  }
 	}
@@ -191,10 +203,15 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
     ///
     /// memory allocated dynamically for the PrepRawData is managed by Event Store
     ///
-    MMPrepData* prdN = new MMPrepData(MMprds[j].identify(), hash, clusterLocalPosition, 
-				      rdoList, covN, MMprds[j].detectorElement(),
-                                      (short int)0,int(totalCharge),(float)0.0,
-				      mergeStrips,mergeStripsTime,mergeStripsCharge);
+    MMPrepData* prdN = new MMPrepData(MMprds[j].identify(), hash, clusterLocalPosition,
+              rdoList, covN, MMprds[j].detectorElement(),
+              static_cast<short int> (0), static_cast<int>(totalCharge), static_cast<float>(0.0),
+              (m_writeStripProperties ? mergeStrips : std::vector<uint16_t>(0) ),
+              mergeStripsTime, mergeStripsCharge);
+    prdN->setDriftDist(mergeStripsDriftDists, mergeStripsDriftDistErrors);
+    prdN->setAuthor(Muon::MMPrepData::Author::SimpleClusterBuilder);
+
+
     clustersVect.push_back(prdN);
   } // end loop MMprds[i]
   //clear vector and delete elements
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
index eacd9b6fab01..1100380dfc6f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
@@ -42,7 +42,8 @@ namespace Muon
   private: 
     /// Muon Detector Descriptor
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    
+    bool m_writeStripProperties;
+
     bool m_useErrorParametrization;
     uint m_maxHoleSize;
     
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
index 72bd7b667123..db66d696a3cd 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
@@ -34,6 +34,7 @@ Muon::UTPCMMClusterBuilderTool::UTPCMMClusterBuilderTool(const std::string& t,
     AthAlgTool(t,n,p)
 {
     declareInterface<IMMClusterBuilderTool>(this);
+    declareProperty("writeStripProperties", m_writeStripProperties = true ); // true  for debugging; needs to become false for large productions
     declareProperty("HoughAlphaMin",m_alphaMin=-90); //degree
     declareProperty("HoughAlphaMax",m_alphaMax=0); //degree
     declareProperty("HoughAlphaResolution",m_alphaResolution=1.0); // degree
@@ -138,11 +139,17 @@ StatusCode Muon::UTPCMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepD
             std::vector<uint16_t> stripsOfClusterChannels;
             std::vector<short int> stripsOfClusterTimes;
             std::vector<int> stripsOfClusterCharges;
+            std::vector<float> stripsOfClusterDriftDists;
+            std::vector<Amg::MatrixX> stripsOfClusterDriftDistErrors;
 
             stripsOfCluster.reserve(idx_goodStrips.size());
-            stripsOfClusterChannels.reserve(idx_goodStrips.size());
-            stripsOfClusterTimes.reserve(idx_goodStrips.size());
-            stripsOfClusterCharges.reserve(idx_goodStrips.size());
+            if (m_writeStripProperties) {
+                stripsOfClusterChannels.reserve(idx_goodStrips.size());
+                stripsOfClusterTimes.reserve(idx_goodStrips.size());
+                stripsOfClusterCharges.reserve(idx_goodStrips.size());
+            }
+            stripsOfClusterDriftDists.reserve(idx_goodStrips.size());
+            stripsOfClusterDriftDistErrors.reserve(idx_goodStrips.size());
 
             ATH_MSG_DEBUG("Found good Strips: "<< idx_goodStrips.size());
 
@@ -152,9 +159,13 @@ StatusCode Muon::UTPCMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepD
                 flag.at(idx)=1;
                 ATH_MSG_DEBUG("Set Good strips");
                 stripsOfCluster.push_back(MMprdsOfLayer.at(idx).identify());
-                stripsOfClusterChannels.push_back(m_idHelperSvc->mmIdHelper().channel(MMprdsOfLayer.at(idx).identify()));
-                stripsOfClusterTimes.push_back(MMprdsOfLayer.at(idx).time());
-                stripsOfClusterCharges.push_back(MMprdsOfLayer.at(idx).charge());
+                if (m_writeStripProperties) {
+                    stripsOfClusterChannels.push_back(m_idHelperSvc->mmIdHelper().channel(MMprdsOfLayer.at(idx).identify()));
+                    stripsOfClusterTimes.push_back(MMprdsOfLayer.at(idx).time());
+                    stripsOfClusterCharges.push_back(MMprdsOfLayer.at(idx).charge());
+                }
+                stripsOfClusterDriftDists.push_back(MMprdsOfLayer.at(idx).driftDist());
+                stripsOfClusterDriftDistErrors.push_back(MMprdsOfLayer.at(idx).localCovariance());
             }
             Amg::MatrixX* covN = new Amg::MatrixX(1,1);
             covN->coeffRef(0,0)=sigmaLocalClusterPosition;
@@ -180,6 +191,9 @@ StatusCode Muon::UTPCMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepD
             
             ATH_MSG_DEBUG("Setting prd angle: "<< finalFitAngle <<" chi2 Prob: "<<finalFitChiSqProb);
 
+            prdN->setAuthor(Muon::MMPrepData::Author::uTPCClusterBuilder);
+            prdN->setDriftDist(stripsOfClusterDriftDists,stripsOfClusterDriftDistErrors);
+
             prdN->setMicroTPC(finalFitAngle,finalFitChiSqProb);
             ATH_MSG_DEBUG("Reading back prd angle: "<< prdN->angle() <<" chi2 Prob: "<<prdN->chisqProb());
             clustersVect.push_back(prdN);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.h
index ef6bcf1c18c1..9f2d3d47355b 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.h
@@ -50,6 +50,7 @@ namespace Muon
 
     /// Muon Detector Descriptor
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+    bool m_writeStripProperties;
 
     // params for the hough trafo
     double m_alphaMin,m_alphaMax,m_alphaResolution,m_selectionCut;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h
index 4b02c4342451..1ed5d7970d87 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h
@@ -143,6 +143,19 @@ namespace Muon
     /** @brief Dumps information about the PRD*/
     std::ostream& dump( std::ostream& stream) const;
 
+
+    enum Author{
+      RDOTOPRDConverter = -1,
+      SimpleClusterBuilder,
+      ProjectionClusterBuilder,
+      ClusterTimeProjectionClusterBuilder,
+      ConstraintuTPCClusterBuilder,
+      uTPCClusterBuilder,
+    };
+
+    Author author() const;
+    void setAuthor(Author author);
+
   private:
 
     /** @brief Cached pointer to the detector element - should never be zero.*/
@@ -169,6 +182,8 @@ namespace Muon
     std::vector<int> m_stripCharges;
     std::vector<float> m_stripDriftDist;
     std::vector<Amg::MatrixX>  m_stripDriftErrors;
+    
+    Author m_author;
 
   };
 
@@ -235,6 +250,10 @@ namespace Muon
     return m_stripDriftErrors;
   }
 
+  inline MMPrepData::Author MMPrepData::author() const {
+    return m_author;
+  }
+
 }
 
 #endif // MUONPREPRAWDATA_MMREPDATA_H
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx
index b118d7ade164..67a2a0f867ba 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx
@@ -163,6 +163,10 @@ namespace Muon
     m_stripDriftErrors = driftDistErrors;
   }
 
+  void MMPrepData::setAuthor(MMPrepData::Author author){
+    m_author = author;
+  }
+
   //assignment operator
   MMPrepData&
   MMPrepData::operator=(const MMPrepData& RIO)
-- 
GitLab


From 2892e7dc1741f8f67474844ac45c902942014e3d Mon Sep 17 00:00:00 2001
From: Jason Robert Veatch <jason.veatch@cern.ch>
Date: Fri, 12 Jun 2020 12:21:02 +0000
Subject: [PATCH 219/266] Merge branch '21.2-JTLDev' into '21.2'

JetTruthLabelingTool small fixes

See merge request atlas/athena!32930
---
 .../ParticleJetTools/JetTruthLabelingTool.h   | 113 ++++
 .../ParticleJetTools/LargeRJetLabelEnum.h     |  89 ++++
 .../ParticleJetTools/ParticleJetToolsDict.h   |   3 +-
 .../ParticleJetTools/selection.xml            |   1 +
 .../Root/JetTruthLabelingTool.cxx             | 493 ++++++++++++++++++
 .../components/ParticleJetTools_entries.cxx   |   2 +
 6 files changed, 700 insertions(+), 1 deletion(-)
 create mode 100644 PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/JetTruthLabelingTool.h
 create mode 100644 PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/LargeRJetLabelEnum.h
 create mode 100644 PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetTruthLabelingTool.cxx

diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/JetTruthLabelingTool.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/JetTruthLabelingTool.h
new file mode 100644
index 000000000000..5b9ef017f7d1
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/JetTruthLabelingTool.h
@@ -0,0 +1,113 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PARTICLEJETTOOLS_JETTRUTHLABELINGTOOL_H
+#define PARTICLEJETTOOLS_JETTRUTHLABELINGTOOL_H
+
+#include "AsgTools/AsgTool.h"
+
+#include "xAODJet/JetContainer.h"
+#include "xAODTruth/TruthParticleContainer.h"
+#include "xAODEventInfo/EventInfo.h"
+#include "JetInterface/IJetModifier.h"
+#include "ParticleJetTools/LargeRJetLabelEnum.h"
+
+class JetTruthLabelingTool :   virtual public asg::AsgTool, 
+			       virtual public IJetModifier
+{
+  ASG_TOOL_CLASS(JetTruthLabelingTool, IJetModifier)
+
+public:
+
+  // default constructor - to be used in all derived classes
+  JetTruthLabelingTool(const std::string& name = "JetTruthLabelingTool");
+  virtual StatusCode initialize() override;
+
+  // decorate truth label to a jet collection
+  StatusCode modify(xAOD::JetContainer& jets) const override;
+
+  // decorate truth label to a const jet
+  StatusCode modifyJet(const xAOD::Jet& jet) const;
+
+  // Print configured parameters
+  void print() const override;
+  
+  // returns the name of large-R jet truth label
+  std::string getLargeRJetTruthLabelName() const {
+    return m_truthLabelName;
+  };
+
+protected:
+  
+  // truth label name
+  std::string m_truthLabelName;
+
+  // Flag indicating whether input collection is a truth jet container
+  bool m_isTruthJetCol;
+
+  // TRUTH1 or TRUTH3
+  bool m_useTRUTH3;
+  std::string m_truthParticleContainerName;
+  std::string m_truthBosonContainerName;
+  std::string m_truthTopQuarkContainerName;
+
+  // parameters for truth labeling
+  double m_dRTruthJet;
+  double m_dRTruthPart;
+  double m_mLowTop;
+  double m_mLowW;
+  double m_mHighW;
+  double m_mLowZ;
+  double m_mHighZ;
+
+  // Label truth jet collection
+  StatusCode labelTruthJets() const;
+  StatusCode labelTruthJets(const xAOD::JetContainer &jets) const;
+
+  // Apply label to a single jet
+  // This method is included for backwards compatibility with BoostedJetTaggers
+  StatusCode labelRecoJet(const xAOD::Jet& jet, const xAOD::JetContainer *truthJets=nullptr) const;
+
+  // Apply labels to all jets in a container
+  StatusCode labelRecoJets(xAOD::JetContainer& jets) const;
+
+  // Get truth label using R21Consolidated definition
+  int getTruthJetLabelR21Consolidated( const xAOD::Jet &jet, std::vector<std::pair<TLorentzVector,int> > tlv_truthParts ) const;
+  
+  // Check for Sherpa DSIDs
+  bool getIsSherpa(const int DSID) const {
+    if(
+        (304307 <= DSID && DSID <= 304309) || // Sherpa 2.2.1 W+jets
+        (304707 <= DSID && DSID <= 304709) // Sherpa 2.2.1 Z+jets
+	) { 
+      return true;
+    }
+    return false;
+  };
+
+  // Extract heavy particle 4-vectors from truth record
+  void getTLVs(std::vector< std::pair<TLorentzVector,int> > &tlvs, const xAOD::TruthParticleContainer *truthBosons, const xAOD::TruthParticleContainer *truthTop, bool isSherpa = false) const;
+
+  // Check if truth particle has correct DSID and isn't self decay
+  bool selectTruthParticle(const xAOD::TruthParticle *tp, int pdgId) const;
+
+  // Accessors and decorators
+  std::unique_ptr< SG::AuxElement::Accessor<int> > m_acc_label;
+  std::unique_ptr< SG::AuxElement::Accessor<float> > m_acc_dR_W;
+  std::unique_ptr< SG::AuxElement::Accessor<float> > m_acc_dR_Z;
+  std::unique_ptr< SG::AuxElement::Accessor<float> > m_acc_dR_H;
+  std::unique_ptr< SG::AuxElement::Accessor<float> > m_acc_dR_Top;
+  std::unique_ptr< SG::AuxElement::Accessor<int> > m_acc_NB;
+
+  std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_label;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dR_W;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dR_Z;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dR_H;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dR_Top;
+  std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_NB;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_TruthJetMass;
+
+};
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/LargeRJetLabelEnum.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/LargeRJetLabelEnum.h
new file mode 100644
index 000000000000..4c58bf9f6316
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/LargeRJetLabelEnum.h
@@ -0,0 +1,89 @@
+#ifndef PARTICLEJETTOOLS_LARGERJETLABELENUM_H
+#define PARTICLEJETTOOLS_LARGERJETLABELENUM_H
+
+namespace LargeRJetTruthLabel
+{
+  enum TypeEnum
+  {
+    UNKNOWN=0, // Not tagged yet
+    tqqb,      // full-contained top->qqb
+    Wqq,       // full-contained W->qq
+    Zqq,       // full-contained Z->qq
+    Wqq_From_t,// full-contained W->qq (also mathced to top)
+    other_From_t, // matched to top
+    other_From_V, // matched to W/Z
+    notruth,   // failed to truth-jet matching (pileup)
+    qcd,       // not matched to top or W/Z (background jet)
+    Hbb,       // full-contained H->bb
+    other_From_H, //matched to H
+  };  
+  inline int enumToInt(const TypeEnum type)
+  {
+    switch (type)
+      {
+      case tqqb:         return 1;
+      case Wqq:          return 2;
+      case Zqq:          return 3;
+      case Wqq_From_t:   return 4;
+      case other_From_t: return 5;
+      case other_From_V: return 6;
+      case notruth:      return 7;
+      case qcd:          return 8;
+      case Hbb:          return 9;
+      case other_From_H: return 10;
+      default:           return 0;
+      }
+  }  
+  inline TypeEnum intToEnum(const int type)
+  {
+    if ( type==1 ){
+      return tqqb;
+    }else if ( type==2 ){
+      return Wqq;
+    }else if ( type==3 ){
+	return Zqq;
+    }else if ( type==4 ){
+      return Wqq_From_t;
+    }else if ( type==5 ){
+      return other_From_t;
+    }else if ( type==6 ){
+      return other_From_V;
+    }else if ( type==7 ){
+      return notruth;
+    }else if ( type==8 ){
+      return qcd;
+    }else if ( type == 9){
+      return Hbb;
+    }else if ( type == 10){
+      return other_From_H;
+    }
+    
+    return UNKNOWN;
+  }
+  inline TypeEnum stringToEnum(const TString& name)
+  {
+    if (name.EqualTo("tqqb",TString::kIgnoreCase))
+        return tqqb;
+    if (name.EqualTo("Wqq",TString::kIgnoreCase))
+        return Wqq;
+    if (name.EqualTo("Zqq",TString::kIgnoreCase))
+        return Zqq;
+    if (name.EqualTo("Wqq_From_t",TString::kIgnoreCase))
+        return Wqq_From_t;
+    if (name.EqualTo("other_From_t",TString::kIgnoreCase))
+        return other_From_t;
+    if (name.EqualTo("other_From_V",TString::kIgnoreCase))
+        return other_From_V;
+    if (name.EqualTo("notruth",TString::kIgnoreCase))
+        return notruth;
+    if (name.EqualTo("qcd",TString::kIgnoreCase))
+        return qcd;
+    if (name.EqualTo("Hbb",TString::kIgnoreCase))
+        return Hbb;
+    if (name.EqualTo("other_From_H",TString::kIgnoreCase))
+        return other_From_H;
+    return UNKNOWN;
+  }
+}
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
index 71ab9ad0c6d7..13acc2a9894c 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef PARTICLEJETTOOLSDICT_H
@@ -14,5 +14,6 @@
 #include "ParticleJetTools/JetParticleAssociation.h"
 #include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
 #include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
+#include "ParticleJetTools/JetTruthLabelingTool.h"
 
 #endif
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/selection.xml b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/selection.xml
index 3f55b866646a..3841462458a8 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/selection.xml
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/selection.xml
@@ -9,4 +9,5 @@
     <class name="JetParticleAssociation" />  
     <class name="JetParticleShrinkingConeAssociation" />  
     <class name="JetParticleCenterOfMassAssociation" />  
+    <class name="JetTruthLabelingTool" />
 </lcgdict>
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetTruthLabelingTool.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetTruthLabelingTool.cxx
new file mode 100644
index 000000000000..73d3ff2ea823
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetTruthLabelingTool.cxx
@@ -0,0 +1,493 @@
+/*
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ParticleJetTools/JetTruthLabelingTool.h"
+
+JetTruthLabelingTool::JetTruthLabelingTool(const std::string& name) :
+  asg::AsgTool(name)
+{
+
+    declareProperty( "TruthLabelName",                m_truthLabelName = "R10TruthLabel_R21Consolidated");
+    declareProperty( "IsTruthJetCollection",          m_isTruthJetCol = false);
+    declareProperty( "UseTRUTH3",                     m_useTRUTH3 = false);
+    declareProperty( "TruthParticleContainerName",    m_truthParticleContainerName = "TruthParticles");
+    declareProperty( "TruthBosonContainerName",       m_truthBosonContainerName = "TruthBosonsWithDecayParticles");
+    declareProperty( "TruthTopQuarkContainerName",    m_truthTopQuarkContainerName = "TruthTopQuarkWithDecayParticles");
+    
+    // Hard-code some values for R10TruthLabel_R21Consolidated
+    // Functionality to customize labeling will be added later
+    if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+      m_dRTruthJet = 0.75;
+      m_dRTruthPart = 0.75;
+      m_mLowTop = 140.0;
+      m_mLowW = 50.0;
+      m_mHighW = 100.0;
+      m_mLowZ = 60.0;
+      m_mHighZ = 110.0;
+    }
+}
+
+StatusCode JetTruthLabelingTool::initialize(){
+
+  ATH_MSG_INFO("Initializing " << name());
+  print();
+
+  // Check if TruthLabelName is supported. If not, give an error and
+  // return FAILURE
+  if(m_truthLabelName != "R10TruthLabel_R21Consolidated") {
+    ATH_MSG_ERROR("TruthLabelName " << m_truthLabelName << " is not supported. Exiting...");
+    return StatusCode::FAILURE;
+  }
+
+  m_acc_label = std::make_unique< SG::AuxElement::Accessor<int> >(m_truthLabelName);
+  m_acc_dR_W = std::make_unique< SG::AuxElement::Accessor<float> >(m_truthLabelName+"_dR_W");
+  m_acc_dR_Z = std::make_unique< SG::AuxElement::Accessor<float> >(m_truthLabelName+"_dR_Z");
+  m_acc_dR_H = std::make_unique< SG::AuxElement::Accessor<float> >(m_truthLabelName+"_dR_H");
+  m_acc_dR_Top = std::make_unique< SG::AuxElement::Accessor<float> >(m_truthLabelName+"_dR_Top");
+  m_acc_NB = std::make_unique< SG::AuxElement::Accessor<int> >(m_truthLabelName+"_NB");
+
+  m_dec_label = std::make_unique< SG::AuxElement::Decorator<int> >(m_truthLabelName);
+  m_dec_dR_W = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_W");
+  m_dec_dR_Z = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_Z");
+  m_dec_dR_H = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_H");
+  m_dec_dR_Top = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_Top");
+  m_dec_NB = std::make_unique< SG::AuxElement::Decorator<int> >(m_truthLabelName+"_NB");
+  m_dec_TruthJetMass = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_TruthJetMass");
+
+  return StatusCode::SUCCESS;
+}
+
+void JetTruthLabelingTool::print() const {
+  ATH_MSG_INFO("Parameters for " << name());
+
+  ATH_MSG_INFO("xAOD information:");
+  ATH_MSG_INFO("TruthLabelName:               " << m_truthLabelName);
+  ATH_MSG_INFO("UseTRUTH3:                    " << ( m_useTRUTH3 ? "True" : "False"));
+  if(m_useTRUTH3) {
+    ATH_MSG_INFO("TruthBosonContainerName:      " << m_truthBosonContainerName);
+    ATH_MSG_INFO("TruthTopQuarkContainerName:   " << m_truthTopQuarkContainerName);
+  }
+  else {
+    ATH_MSG_INFO("TruthParticleContainerName:   " << m_truthParticleContainerName);
+  }
+  if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+    ATH_MSG_INFO("dRTruthJet:    " << std::to_string(m_dRTruthJet));
+    ATH_MSG_INFO("dRTruthPart:   " << std::to_string(m_dRTruthPart));
+    ATH_MSG_INFO("mLowTop:       " << std::to_string(m_mLowTop));
+    ATH_MSG_INFO("mLowW:         " << std::to_string(m_mLowW));
+    ATH_MSG_INFO("mHighW:        " << std::to_string(m_mHighW));
+    ATH_MSG_INFO("mLowZ:         " << std::to_string(m_mLowZ));
+    ATH_MSG_INFO("mHighZ:        " << std::to_string(m_mHighZ));
+  }
+}
+
+int JetTruthLabelingTool::getTruthJetLabelR21Consolidated( const xAOD::Jet &jet, std::vector<std::pair<TLorentzVector,int> > tlv_truthParts ) const {
+
+  bool isMatchW = false;
+  bool isMatchZ = false;
+  bool isMatchH = false;
+  bool isMatchTop = false;
+
+  // Distances to truth particles
+  float dR_W = 9999;
+  float dR_Z = 9999;
+  float dR_H = 9999;
+  float dR_Top = 9999;
+
+  for (auto tlv_truth : tlv_truthParts) {
+    float dR = tlv_truth.first.DeltaR(jet.p4());
+    if( dR < m_dRTruthPart ) {
+
+      if ( std::abs(tlv_truth.second) == 23 && !isMatchZ) {
+        dR_Z = dR;
+        isMatchZ = true;
+      }
+
+      if ( std::abs(tlv_truth.second) == 24 && !isMatchW) {
+        dR_W = dR;
+        isMatchW = true;
+      }
+
+      if ( std::abs(tlv_truth.second) == 25 && !isMatchH) {
+        dR_H = dR;
+        isMatchH = true;
+      }
+
+      if ( std::abs(tlv_truth.second) == 6 && !isMatchTop) {
+        dR_Top = dR;
+        isMatchTop = true;
+      }
+
+    }
+  }
+
+  // find ghost associated B-hadrons
+  int nMatchB = 0;
+  if( !jet.getAttribute<int>( "GhostBHadronsFinalCount", nMatchB ) ){
+
+    std::vector<const xAOD::TruthParticle*> ghostB; // Ghost associated B hadrons after FSR
+    if( !jet.getAssociatedObjects<xAOD::TruthParticle>( "GhostBHadronsFinal", ghostB ) ){      
+      ATH_MSG_ERROR("GhostBHadronsFinal cannot be retrieved! Truth label definition of W/top tagger might be wrong");
+    } 
+    nMatchB = ghostB.size();
+  }
+
+  // Add matching criteria decorations
+  (*m_dec_dR_W)(jet) = dR_W;
+  (*m_dec_dR_Z)(jet) = dR_Z;
+  (*m_dec_dR_H)(jet) = dR_H;
+  (*m_dec_dR_Top)(jet) = dR_Top;
+  (*m_dec_NB)(jet) = nMatchB;
+
+  if( !isMatchTop && !isMatchW && !isMatchZ && !isMatchH) {
+    return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::qcd);
+  }
+
+  if(isMatchH) {
+    if(nMatchB > 1) return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::Hbb);
+    else return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::other_From_H);
+  }
+  else if( isMatchTop && nMatchB > 0 && m_mLowTop < jet.m()*0.001 ) {
+    return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::tqqb); 
+  }
+  else if( isMatchW && nMatchB == 0 && m_mLowW < jet.m()*0.001 && jet.m()*0.001 < m_mHighW ) {
+    if ( isMatchTop ) {
+      return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::Wqq_From_t);
+    }
+    else {
+      return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::Wqq);
+    } 
+  }
+  else if( isMatchZ && m_mLowZ < jet.m()*0.001 && jet.m()*0.001 < m_mHighZ ) {
+    return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::Zqq);
+  }
+  else {
+    if ( isMatchTop ) {
+      return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::other_From_t); 
+    }
+    else {
+      return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::other_From_V);
+    }
+  }
+
+  return LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::qcd);
+}
+
+StatusCode JetTruthLabelingTool::modify(xAOD::JetContainer& jets) const {
+
+  // Apply label to truth jet collections
+  if(m_isTruthJetCol) ATH_CHECK( labelTruthJets(jets) );
+
+  // Copy label to matched reco jets
+  if(!m_isTruthJetCol) {
+    ATH_CHECK( labelTruthJets() );
+    ATH_CHECK( labelRecoJets(jets) );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode JetTruthLabelingTool::modifyJet(const xAOD::Jet& jet) const {
+
+  // Apply label to truth jet collections
+  ATH_CHECK( labelTruthJets() );
+
+  // Copy label to matched reco jets
+  ATH_CHECK( labelRecoJet(jet) );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode JetTruthLabelingTool::labelRecoJets(xAOD::JetContainer& jets) const {
+
+  // Retrieve appropriate truth jet container
+  const xAOD::JetContainer* truthJets=nullptr;
+  if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+    ATH_CHECK( evtStore()->retrieve(truthJets, "AntiKt10TruthTrimmedPtFrac5SmallR20Jets") );
+  }
+
+  for(xAOD::Jet *jet : jets) {
+
+    ATH_CHECK( labelRecoJet(*jet, truthJets) );
+
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode JetTruthLabelingTool::labelRecoJet(const xAOD::Jet& jet, const xAOD::JetContainer *truthJets) const {
+
+  // Retrieve appropriate truth jet container
+  if(!truthJets) {
+    if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+      ATH_CHECK( evtStore()->retrieve(truthJets, "AntiKt10TruthTrimmedPtFrac5SmallR20Jets") );
+    }
+  }
+
+  // Find matched truth jet
+  float dRmin = 9999;
+  const xAOD::Jet* matchTruthJet = nullptr;
+  for ( const xAOD::Jet* truthJet : *truthJets ) {
+    float dR = jet.p4().DeltaR( truthJet->p4() );
+    if ( m_dRTruthJet < 0 || dR < m_dRTruthJet ) { // if m_dRTruthJet < 0, the closest truth jet is used as matched jet. Otherwise, only match if dR < m_dRTruthJet
+      if( dR < dRmin ){
+        dRmin = dR;
+        matchTruthJet = truthJet;
+      }
+    }
+  }
+
+  int label = LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::notruth);
+  float dR_truthJet_W = 9999;
+  float dR_truthJet_Z = 9999;
+  float dR_truthJet_Top = 9999;
+  float dR_truthJet_H = 9999;
+  float truthJetNB = -1;
+  float truthJetMass = -9999;
+
+  if ( matchTruthJet ) {
+    label = (*m_acc_label)(*matchTruthJet);
+    if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+      if(m_acc_dR_W->isAvailable(*matchTruthJet)) dR_truthJet_W = (*m_acc_dR_W)(*matchTruthJet);
+      if(m_acc_dR_Z->isAvailable(*matchTruthJet)) dR_truthJet_Z = (*m_acc_dR_Z)(*matchTruthJet);
+      if(m_acc_dR_H->isAvailable(*matchTruthJet)) dR_truthJet_H = (*m_acc_dR_H)(*matchTruthJet);
+      if(m_acc_dR_Top->isAvailable(*matchTruthJet)) dR_truthJet_Top = (*m_acc_dR_Top)(*matchTruthJet);
+      if(m_acc_NB->isAvailable(*matchTruthJet)) truthJetNB = (*m_acc_NB)(*matchTruthJet);
+      truthJetMass = matchTruthJet->m();
+    }
+  }
+
+  // decorate truth label
+  (*m_dec_label)(jet) = label;
+
+  // decorate additional information used for truth labeling
+  if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+    // These most likely won't be used in the R21Precision labeling definition
+    (*m_dec_dR_W)(jet) = dR_truthJet_W;
+    (*m_dec_dR_Z)(jet) = dR_truthJet_Z;
+    (*m_dec_dR_H)(jet) = dR_truthJet_H;
+    (*m_dec_dR_Top)(jet) = dR_truthJet_Top;
+    (*m_dec_NB)(jet) = truthJetNB;
+    (*m_dec_TruthJetMass)(jet) = truthJetMass;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode JetTruthLabelingTool::labelTruthJets() const {
+
+  // Retrieve appropriate truth jet container
+  const xAOD::JetContainer* truthJets = nullptr;
+  if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+    ATH_CHECK( evtStore()->retrieve(truthJets, "AntiKt10TruthTrimmedPtFrac5SmallR20Jets") );
+  }
+
+  // Make sure the truth jet collection has been retrieved
+  if(!truthJets) {
+    ATH_MSG_ERROR("No truth jet container retrieved. Please make sure you are using a supported TruthLabelName.");
+    return StatusCode::FAILURE;
+  }
+
+  return labelTruthJets(*truthJets);
+
+}
+
+StatusCode JetTruthLabelingTool::labelTruthJets(const xAOD::JetContainer &truthJets) const {
+
+  // Make sure there is at least 1 jet in truth collection
+  if(!(truthJets.size())) return StatusCode::SUCCESS;
+
+  // Check if the truth jet collection already has labels applied
+  const xAOD::Jet *jet = truthJets.at(0);
+  if(m_acc_label->isAvailable(*jet)) {
+    ATH_MSG_DEBUG("labelTruthJets: Truth jet collection already labelled with " << m_truthLabelName);
+    return StatusCode::SUCCESS;
+  }
+
+  // Get MC channel number
+  int channelNumber = -999;
+
+  //Get the EventInfo to identify Sherpa samples
+  const xAOD::EventInfo * eventInfo = nullptr;
+  if ( evtStore()->retrieve(eventInfo,"EventInfo").isFailure() || !eventInfo ) {
+    ATH_MSG_ERROR("Failed to retrieve event information.");
+    return StatusCode::FAILURE;
+  }
+
+  channelNumber = eventInfo->mcChannelNumber();
+
+  if( channelNumber < 0 ) {
+    ATH_MSG_ERROR("Channel number was not set correctly");
+    return StatusCode::FAILURE;
+  }
+
+  // Check if it is a Sherpa sample
+  bool isSherpa = getIsSherpa(channelNumber);
+
+  if(m_useTRUTH3 && isSherpa) {
+    ATH_MSG_ERROR("Cannot apply truth labels to Sherpa 2.2.1 samples using TRUTH3 containers");
+    return StatusCode::FAILURE;
+  }
+
+  int label = LargeRJetTruthLabel::enumToInt(LargeRJetTruthLabel::notruth);
+  const xAOD::TruthParticleContainer* truthPartsBoson = nullptr;
+  const xAOD::TruthParticleContainer* truthPartsTop = nullptr;
+
+  // TRUTH3
+  if( m_useTRUTH3 ) {
+    // Check for boson container
+    if( evtStore()->contains<xAOD::TruthParticleContainer>( m_truthBosonContainerName ) ) ATH_CHECK(evtStore()->retrieve(truthPartsBoson, m_truthBosonContainerName));
+    else {
+      ATH_MSG_ERROR("Unable to find " << m_truthBosonContainerName << ". Please check the content of your input file.");
+      return StatusCode::FAILURE;
+    }
+    
+    // Check for top quark container
+    if( evtStore()->contains<xAOD::TruthParticleContainer>( m_truthTopQuarkContainerName ) ) ATH_CHECK(evtStore()->retrieve(truthPartsTop, m_truthTopQuarkContainerName));
+    else {
+      ATH_MSG_ERROR("Unable to find " << m_truthTopQuarkContainerName << ". Please check the content of your input file.");
+      return StatusCode::FAILURE;
+    }
+  }
+  
+  // TRUTH1
+  else {
+    if( evtStore()->contains<xAOD::TruthParticleContainer>( m_truthParticleContainerName ) ) {
+      ATH_CHECK(evtStore()->retrieve(truthPartsBoson, m_truthParticleContainerName));
+      ATH_CHECK(evtStore()->retrieve(truthPartsTop, m_truthParticleContainerName));
+    }
+    else {
+      ATH_MSG_ERROR("Unable to find " << m_truthParticleContainerName << ". Please check the content of your input file.");
+      return StatusCode::FAILURE;
+    }
+  }
+
+  // Vectors of W/Z/H/Top TLorentzVectors
+  std::vector<std::pair<TLorentzVector,int> > tlv_truthParts;
+
+  // Get truth particle TLVs
+  if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+    getTLVs(tlv_truthParts, truthPartsBoson, truthPartsTop, isSherpa);
+  }
+
+  // Apply label to truth jet
+  for(const xAOD::Jet* jet : truthJets) {
+
+    if(m_truthLabelName == "R10TruthLabel_R21Consolidated") {
+      label = getTruthJetLabelR21Consolidated(*jet, tlv_truthParts);
+    }
+
+    (*m_dec_label)(*jet) = label;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+void JetTruthLabelingTool::getTLVs(std::vector<std::pair<TLorentzVector,int> > &tlvs, const xAOD::TruthParticleContainer *truthBosons, const xAOD::TruthParticleContainer *truthTop, bool isSherpa) const {
+
+  tlvs.clear();
+
+  // Sherpa W/Z+jets samples need special treatment
+  if(isSherpa) {
+    int countStatus3 = 0;
+    
+    // Decay products
+    TLorentzVector p1(0,0,0,0);
+    TLorentzVector p2(0,0,0,0);
+
+    // W candidate
+    TLorentzVector WZCand(0,0,0,0);
+
+    // Flag for W or Z candidates
+    bool isWPCand = false;
+    bool isWMCand = false;
+    bool isZCand = false;
+
+    // Flag to check if qq' pair is in the mass window
+    bool inMassWindow = false;
+
+    for ( unsigned int ipart = 0; ipart < truthBosons->size(); ipart++ ){
+
+      const xAOD::TruthParticle* part1 = truthBosons->at(ipart);
+
+      if ( part1->status() != 3 ) continue; /// Skip particles without status == 3
+
+      if ( std::abs(part1->pdgId()) > 5 ) continue; /// Skip anything that isn't a light quark
+
+      countStatus3++;
+      if ( countStatus3 > 3 ) continue; /// We want to look at first 2 partons except beam particles. Sometimes beam particles are dropped from DxAODs...
+      p1 = part1->p4(); /// Keep particles as first daughter
+
+      // Find the next particle in the list with status == 3
+      for ( unsigned int jpart = ipart+1; jpart < truthBosons->size(); jpart++ ) {
+
+        const xAOD::TruthParticle* part2 = truthBosons->at(jpart);
+
+        if ( part2->status() != 3 ) continue; /// Skip particles without status == 3
+
+        if ( std::abs(part2->pdgId()) > 5 ) continue; /// Skip anything that isn't a light quark
+
+        p2 = part2->p4();
+  
+        if ( part1->pdgId() + part2->pdgId() == 0 ) {
+          isZCand = true; /// Daughters of Z decay should be same-flavor but opposite charge
+        }
+        else if ( part1->pdgId() == 2 || part1->pdgId() == 4 || part2->pdgId() == 2 || part2->pdgId() == 4 ) {
+          isWPCand = true; /// W+ daughters should have a positive u or c
+        }
+        else {
+          isWMCand = true; /// W+ daughters should have a positive u or c
+        }
+        
+        break; /// If p1 is a daughter of W/Z decay, the next one is the other daughter
+      }
+
+      WZCand = p1 + p2;
+
+      if ( 60000 < WZCand.M() && WZCand.M() < 140000. ) {
+        inMassWindow = true;
+        break; /// ~98% efficiency to W/Z signals. (95% if it is changed to [65, 105]GeV and 90% if [70,100]GeV)
+      }
+
+    }
+
+    if( inMassWindow && (isWPCand || isWMCand || isZCand) ) {
+      std::pair<TLorentzVector,int> WZ;
+      if(isZCand) {
+        WZ = std::make_pair(WZCand,23);
+      }
+      if(isWPCand) {
+        WZ = std::make_pair(WZCand,24);
+      }
+      if(isWMCand) {
+        WZ = std::make_pair(WZCand,-24);
+      }
+      tlvs.push_back(WZ);
+    }
+
+  }
+
+  // Store W/Z/H bosons
+  for( const xAOD::TruthParticle* part : *truthBosons ){
+    if(!(selectTruthParticle(part,23) || selectTruthParticle(part,24) || selectTruthParticle(part,25))) continue;
+    tlvs.push_back(std::make_pair(part->p4(),part->pdgId())); /// Save 4-vector and pdgId
+  }
+
+  // Store top quarks
+  for( const xAOD::TruthParticle* part : *truthTop ){
+    if(!selectTruthParticle(part,6)) continue;
+    tlvs.push_back(std::make_pair(part->p4(),part->pdgId())); /// Save 4-vector and pdgId
+  }
+
+}
+
+bool JetTruthLabelingTool::selectTruthParticle(const xAOD::TruthParticle *tp, int pdgId) const {
+  if(std::abs(tp->pdgId())!=pdgId) return false;
+  for(unsigned int iChild = 0; iChild < tp->nChildren(); iChild++) {
+    const xAOD::TruthParticle *child = tp->child(iChild);
+    if(!child) continue;
+    if(child->pdgId() == tp->pdgId()) return false;
+  }
+  return true;
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
index 16d43fb1cad3..bcbf4b7bae13 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
@@ -13,6 +13,7 @@
 #include "ParticleJetTools/JetParticleAssociationAlg.h"
 #include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
 #include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
+#include "ParticleJetTools/JetTruthLabelingTool.h"
 
 using namespace Analysis;
 
@@ -31,5 +32,6 @@ DECLARE_COMPONENT( CopyTruthJetParticles )
 DECLARE_COMPONENT( ParticleJetDeltaRLabelTool )
 DECLARE_COMPONENT( JetParticleShrinkingConeAssociation )
 DECLARE_COMPONENT( JetParticleCenterOfMassAssociation )
+DECLARE_COMPONENT( JetTruthLabelingTool )
 DECLARE_COMPONENT( JetParticleAssociationAlg )
 
-- 
GitLab


From d10fb5792dafa72d6f7d9de36d60974b05372928 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Fri, 12 Jun 2020 12:55:47 +0000
Subject: [PATCH 220/266] Augment NSWPRDValAlg check script

---
 .../MuonPRDTest/scripts/checkNSWValTree.py            | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
index be48c4ea6a1d..49848ff8e238 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
@@ -88,4 +88,15 @@ if __name__ == "__main__":
         sys.exit(1)
 
     print ('INFO: All fine with file %s'%Options.inputFile)
+    print ('INFO: Number of found MM hits:\t\t%i'%nHitsMM)
+    print ('INFO: Number of found STGC hits:\t%i'%nHitsSTGC)
+    print ('INFO: Number of found MM digits:\t%i'%nDigitsMM)
+    print ('INFO: Number of found STGC digits:\t%i'%nDigitsSTGC)
+    print ('INFO: Number of found MM SDOs:\t\t%i'%nSDOMM)
+    print ('INFO: Number of found STGC SDOs:\t%i'%nSDOSTGC)
+    print ('INFO: Number of found MM RDOs:\t\t%i'%nRDOMM)
+    print ('INFO: Number of found STGC RDOs:\t%i'%nRDOSTGC)
+    if Options.checkPRD:
+        print ('INFO: Number of found MM PRDs:\t\t%i'%nPRDMM)
+        print ('INFO: Number of found STGC PRDs:\t%i'%nPRDSTGC)
 
-- 
GitLab


From 4cda2506415e85c2a6caa2eaa62af6183315052a Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Fri, 12 Jun 2020 14:02:28 +0100
Subject: [PATCH 221/266] Small refactor of Pix decoder to make the main loop
 shorter

---
 .../src/PixelRodDecoder.cxx                   | 139 ++++++++++--------
 .../src/PixelRodDecoder.h                     |  27 ++--
 2 files changed, 93 insertions(+), 73 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
index a3fb49465197..05e6af8fc0f7 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
@@ -44,8 +44,8 @@ inline bool isDBM( uint32_t robId ) { return ((robId>>16) & 0xFF)==0x15; }
 PixelRodDecoder::PixelRodDecoder
 ( const std::string& type, const std::string& name,const IInterface* parent )
   :  AthAlgTool(type,name,parent),
-     m_is_ibl_present(false),
-     m_pixelCabling("PixelCablingSvc",name)
+     m_pixelCabling("PixelCablingSvc",name),
+     m_is_ibl_present(false)
 {
   declareInterface< IPixelRodDecoder  >( this );
 }
@@ -111,7 +111,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
   ATH_MSG_DEBUG("Entering PixelRodDecoder");
 #endif
 
-  Identifier invalidPixelId = Identifier(); // used by Cabling for an invalid entry
+  const Identifier invalidPixelId = Identifier(); // used by Cabling for an invalid entry
   Identifier pixelId;
   uint64_t onlineId(0);
 
@@ -327,9 +327,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	// Count number of headers received
 	if (mLink < 0x8) ++nFragmentsPerFE[mLink];
 
-      }
-
-      else { // decode Pixel header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB
+      } else { // decode Pixel header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB (NOT IBL OR PIXEL)
 
 	ATH_MSG_VERBOSE( "Decoding Pixel header word: 0x" << std::hex << rawDataWord << std::dec );
 
@@ -367,31 +365,14 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	prevStartingBCID = mBCID;
 	}
 	*/
-
-	uint32_t headererror = decodeHeaderErrors(rawDataWord);   // get link (module) header errors
-	if (headererror != 0) { // only treatment for header errors now, FIXME
+	const uint32_t headerError = decodeHeaderErrors(rawDataWord);   // get link (module) header errors
+	if ( headerError != 0 )  {
 	  sc = StatusCode::RECOVERABLE;
-	  errorcode = errorcode | (headererror << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
-	  if (headererror & (1 << 3)) {
-	    m_errors->addPreambleError();
-	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
-	  }
-	  if (headererror & (1 << 2)) {
-	    m_errors->addTimeOutError();
-	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
-	  }
-	  if (headererror & (1 << 1)) {
-	    m_errors->addLVL1IDError();
-	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
-	  }
-	  if (headererror & (1 << 0)) {
-	    m_errors->addBCIDError();
-	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
-	  }
+	  errorcode = errorcode | (headerError << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
+	  checkHeaderErrors( bsErrCode, headerError );
 	}
       }
 
-
       // Get onlineId
       onlineId = pixCabling->getOnlineIdFromRobId(robId, mLink);
 
@@ -1072,44 +1053,12 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
     } // end of switch
   }   // end of loop over ROD
 
-  if (corruptionError) {
-    //Set EventInfo error
-    const xAOD::EventInfo* eventInfo=nullptr;
-    ATH_CHECK(evtStore()->retrieve(eventInfo));
-    if (!eventInfo->updateErrorState(xAOD::EventInfo::Pixel,xAOD::EventInfo::Error)) {
-      ATH_MSG_WARNING(" cannot set EventInfo error state for Pixel " );
-    }
-    if (!eventInfo->updateEventFlagBit(xAOD::EventInfo::Pixel,0x1)) { //FIXME an enum at some appropriate place to indicating 0x1 as
-      ATH_MSG_WARNING(" cannot set flag bit for Pixel " );
-    }
-  } // end if corruption error
+  ATH_CHECK( updateEventInfoIfEventCorruted( corruptionError ) );
 
 
-    // Verify that all active IBL FEs sent the same number of headers
+  // Verify that all active IBL FEs sent the same number of headers
   if (isIBLModule || isDBMModule) {
-    unsigned int nFrags = 0;
-    for (unsigned int i = 0; i < 8; ++i) {
-      if (nFrags == 0) {
-	if (nFragmentsPerFE[i] != 0) nFrags = nFragmentsPerFE[i];    // set nFrags on first non-zero occurence
-      }
-      else {
-	if (nFragmentsPerFE[i] != 0 && nFragmentsPerFE[i] != nFrags) {
-	  // Got unequal number of headers per FE for same ROD, this means trouble.
-	  // Print value for each FE
-	  char tempstr[20];
-	  std::string errmsg;
-	  for (unsigned int j = 0; j < 8; ++j) {
-	    if (nFragmentsPerFE[j] != 0) {
-	      sprintf(tempstr, "FE %d: %d   ", j, nFragmentsPerFE[j]);
-	      errmsg.append(tempstr);
-	    }
-	  }
-	  generalwarning("In ROB 0x" << std::hex << robId << ": got unequal number of headers per FE" << std::dec);
-	  generalwarning("[FE number] : [# headers] - " << errmsg);
-	  break;
-	}
-      }
-    }
+    checkUnequalNumberOfHeaders( nFragmentsPerFE, robId );
   }
 
   if (sc == StatusCode::RECOVERABLE) {
@@ -1850,3 +1799,69 @@ uint32_t PixelRodDecoder::treatmentFEFlagInfo(unsigned int serviceCode, unsigned
 }
 
 
+void PixelRodDecoder::checkHeaderErrors( uint64_t& bsErrCode, uint32_t headerError ) const {
+  if (headerError != 0) { // only treatment for header errors now, FIXME
+    if (headerError & (1 << 3)) {
+      m_errors->addPreambleError();
+      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
+    }
+    if (headerError & (1 << 2)) {
+      m_errors->addTimeOutError();
+      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
+    }
+    if (headerError & (1 << 1)) {
+      m_errors->addLVL1IDError();
+      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
+    }
+    if (headerError & (1 << 0)) {
+      m_errors->addBCIDError();
+      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
+    }
+  }
+}
+
+
+StatusCode PixelRodDecoder::updateEventInfoIfEventCorruted( bool isCorrupted ) const {
+  if ( not isCorrupted )
+    return StatusCode::SUCCESS;
+  //Set EventInfo error
+  const xAOD::EventInfo* eventInfo=nullptr;
+  ATH_CHECK(evtStore()->retrieve(eventInfo));
+  if (!eventInfo->updateErrorState(xAOD::EventInfo::Pixel,xAOD::EventInfo::Error)) {
+    ATH_MSG_WARNING(" cannot set EventInfo error state for Pixel " );
+  }
+  if (!eventInfo->updateEventFlagBit(xAOD::EventInfo::Pixel,0x1)) { //FIXME an enum at some appropriate place to indicating 0x1 as
+    ATH_MSG_WARNING(" cannot set flag bit for Pixel " );
+  }
+  return StatusCode::SUCCESS;
+}
+
+
+void PixelRodDecoder::checkUnequalNumberOfHeaders( const unsigned int nFragmentsPerFE[8], uint32_t robId ) const {
+  unsigned int nFrags = 0;
+  bool foundIssue = false;
+  for (unsigned int i = 0; i < 8; ++i) {
+    if (nFrags == 0) {
+      if (nFragmentsPerFE[i] != 0)
+	nFrags = nFragmentsPerFE[i];    // set nFrags on first non-zero occurence
+    } else {
+      if (nFragmentsPerFE[i] != 0 && nFragmentsPerFE[i] != nFrags) {
+	foundIssue = true;
+      }
+    }
+  }
+  if ( not foundIssue )
+    return;
+
+  // Got unequal number of headers per FE for same ROD, this means trouble.
+  // Print value for each FE
+  std::string errmsg;
+  for (unsigned int j = 0; j < 8; ++j) {
+    if (nFragmentsPerFE[j] != 0) {
+      errmsg += "FE "+ std::to_string(j) + " " +std::to_string(nFragmentsPerFE[j]) + "  ";
+    }
+  }
+  generalwarning("In ROB 0x" << std::hex << robId << ": got unequal number of headers per FE" << std::dec);
+  generalwarning("[FE number] : [# headers] - " << errmsg);
+}
+
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
index e5a15c2f32e8..d0436344979f 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
@@ -46,10 +46,6 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
 
     StatusCode StoreBSError() const override;
 
-    inline void setDet( const eformat::SubDetector det );
-    bool m_is_ibl_present;
-    bool m_is_ibl_module;
-    bool m_is_dbm_module;
 
     uint32_t getDataType(unsigned int rawDataWord, bool link_start) const;   // determine module word type
 
@@ -133,15 +129,14 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
   private:
     mutable std::atomic_uint m_masked_errors{};
     mutable std::atomic_uint m_numGenWarnings{};
-    unsigned m_maxNumGenWarnings{200};     // Maximum number of general warnings to print
+    const unsigned m_maxNumGenWarnings{200};     // Maximum number of general warnings to print
     mutable std::atomic_uint m_numBCIDWarnings{};
-    unsigned m_maxNumBCIDWarnings{50};    // Maximum number of BCID and LVL1ID warnings to print
+    const unsigned m_maxNumBCIDWarnings{50};    // Maximum number of BCID and LVL1ID warnings to print
     BooleanProperty m_checkDuplicatedPixel{this, "CheckDuplicatedPixel", true, "Check duplicated pixels in fillCollection method"};
 
     ServiceHandle<IPixelCablingSvc>  m_pixelCabling;
 
     const PixelID*              m_pixel_id=nullptr;
-    eformat::SubDetector        m_det{eformat::SubDetector()};
 
     ToolHandle<IPixelByteStreamErrorsTool> m_errors
     {this, "PixelByteStreamErrorsTool", "PixelByteStreamErrorsTool", "Tool for PixelByteStreamError"};
@@ -160,11 +155,21 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
 
     //! checks if data words do not look like header & trailer markers, return true if so, this is sign of data corruption
     bool checkDataWordsCorruption( uint32_t word ) const;
+
+    //!< flags concerning the detector configuration; set at config time
+    bool m_is_ibl_present;
+    bool m_is_ibl_module;
+    bool m_is_dbm_module;
+
+    //!< if there are errors in the header, save info in error word and (for now) report to BS error tool
+    void checkHeaderErrors( uint64_t& bsErrorWord, uint32_t headerWord ) const;
+
+    //!< if the flag is set to true appropriate bits are set in event info
+    StatusCode updateEventInfoIfEventCorruted( bool isCorrupted ) const;
+
+    //!< checks if all FEs have sent the same number of headers, if not, generate warning message
+    void checkUnequalNumberOfHeaders( const unsigned int nFragmentsPerFE[8], uint32_t robId ) const;
 };
 
-inline void PixelRodDecoder::setDet( const eformat::SubDetector det )
-{
-  m_det = det;
-}
 
 #endif
-- 
GitLab


From 4f573e4a48bbeedf2ad9c67a0152796a2400e29e Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Fri, 12 Jun 2020 16:17:04 +0200
Subject: [PATCH 222/266] Adapt muon triggers to avoid duplicate processing

Due to the way the input maker was configured for the EF SA muon triggers, we were duplicating processing of RoIs when running ms-only and combined muon chains in the same steps. In order to avoid this:
- Have changed the input maker for the EF SA step to use the roi tool that fetches the RoIs from previous views (this allows us to use the same RoIs in both types of chains, instead of the using the L1 RoIs for ms-only chains and the L2 RoIs in the combined chains).
- Change the input maker for the EF SA step to merge based on the initialRoI, which removes the duplication of views
- Adjust the ViewCreatorFetchFromViewROITool to be able to fetch the RoIs from a specific view from earlier in the chain (default is to fetch from the view from the previous step)
---
 .../src/ViewCreatorFetchFromViewROITool.cxx   | 44 ++++++++++++++-----
 .../src/ViewCreatorFetchFromViewROITool.h     |  3 ++
 .../TrigEDMConfig/python/TriggerEDMRun3.py    |  1 +
 .../HLTMenuConfig/Muon/MuonSequenceSetup.py   | 12 +++--
 4 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx
index cc9db3be8599..aa7d2560da7c 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx
@@ -26,20 +26,42 @@ StatusCode ViewCreatorFetchFromViewROITool::attachROILinks(TrigCompositeUtils::D
   SG::WriteHandle<TrigRoiDescriptorCollection> roisWriteHandle = createAndStoreNoAux(m_roisWriteHandleKey, ctx);
   
   for ( Decision* outputDecision : decisions ) { 
-    const std::vector<LinkInfo<ViewContainer>> myView = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::lastFeatureOfType);
-    
-    if (myView.size() != 1) {
-      ATH_MSG_ERROR("Did not find exactly one most-recent '" << viewString() << "' for Decision object index " << outputDecision->index()
-        << ", found " << myView.size());
-      if (myView.size() > 1) {
-        ATH_MSG_ERROR("Was this Decision Object was merged after having followed different reconstruction paths in previous Steps?");
-        ATH_MSG_ERROR("Need more information about which of these Views to look in to find the desired '" << m_inViewRoIKey.key() << "' TrigRoiDescriptorCollection");
+    LinkInfo<ViewContainer> viewToFetchFrom;
+    if(!m_viewToFetchFrom.empty()){
+      // Look for a specific View, keyed by the View's SG key
+      const std::vector<LinkInfo<ViewContainer>> myViews = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::allFeaturesOfType);
+      bool found = false;
+      for(LinkInfo<ViewContainer> v : myViews){
+	if(v.link.dataID() == m_viewToFetchFrom){
+	  found = true;
+	  viewToFetchFrom = v;
+	  break;
+	}
       }
-      return StatusCode::FAILURE;
+      if(!found){
+	ATH_MSG_ERROR("Of the " << myViews.size() << " Views in the history of Decision object with index " << outputDecision->index()
+		      << ", none came from a View called " << m_viewToFetchFrom);
+	return StatusCode::FAILURE;
+      }
+    }
+    else{
+
+      // Assume the most recent View is the one we fetch from, and that there is exactly one most recent View after any merging
+      const std::vector<LinkInfo<ViewContainer>> myView = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::lastFeatureOfType);
+      if (myView.size() != 1) {
+	ATH_MSG_ERROR("Did not find exactly one most-recent '" << viewString() << "' for Decision object index " << outputDecision->index()
+		      << ", found " << myView.size());
+	if (myView.size() > 1) {
+	  ATH_MSG_ERROR("Was this Decision Object was merged after having followed different reconstruction paths in previous Steps?");
+	  ATH_MSG_ERROR("Need more information about which of these Views to look in to find the desired '" << m_inViewRoIKey.key() << "' TrigRoiDescriptorCollection");
+	}
+	return StatusCode::FAILURE;
+      }
+      viewToFetchFrom = myView.at(0);
     }
-    ATH_CHECK(myView.at(0).isValid());
+    ATH_CHECK(viewToFetchFrom.isValid());
 
-    SG::ReadHandle<TrigRoiDescriptorCollection> roiReadHandle = ViewHelper::makeHandle(*myView.at(0).link, m_inViewRoIKey, ctx);
+    SG::ReadHandle<TrigRoiDescriptorCollection> roiReadHandle = ViewHelper::makeHandle(*viewToFetchFrom.link, m_inViewRoIKey, ctx);
     ATH_CHECK(roiReadHandle.isValid());
 
     if (roiReadHandle->size() != 1) {
diff --git a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h
index 022601648a90..cf62f0d8aeca 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h
+++ b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h
@@ -42,6 +42,9 @@ public:
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_inViewRoIKey{this,"InViewRoIs","",
     "Name of the ROI collection within the most recent EventView of the input Decision objects"};
 
+  Gaudi::Property< std::string > m_viewToFetchFrom {this,"ViewToFetchFrom","", 
+      "Optional name of EventView to fetch ROI from. Must be in the history of the DecisionObject. If not supplied, the most recent EventView will be used."};
+
 };
 
 #endif //> !VIEWALGS_VIEWCREATORFETCHFROMVIEWROITOOL_H
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index f84f7f781660..4c6d6d8264b1 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -219,6 +219,7 @@ TriggerHLTListRun3 = [
     ('xAOD::L2IsoMuonAuxContainer#HLT_MuonL2ISInfoAux.',        'BS ESD AODFULL', 'Muon'),
 
     ('TrigRoiDescriptorCollection#HLT_Roi_L2SAMuon',                   'BS ESD AODFULL', 'Muon'),
+    ('TrigRoiDescriptorCollection#HLT_Roi_L2SAMuonForEF',                   'BS ESD AODFULL', 'Muon'),
 
     # Tau
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
index c2a7f96ea727..4cdd3372fd6c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
@@ -31,6 +31,8 @@ from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm, \
 #muon container names (for RoI based sequences)
 from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muonNames
 muNames = muonNames().getNames('RoI')
+from TrigEDMConfig.TriggerEDMRun3 import recordable
+
 #-----------------------------------------------------#
 ### ************* Step1  ************* ###
 #-----------------------------------------------------#
@@ -102,7 +104,6 @@ def muFastOvlpRmSequence():
 ### ************* Step2  ************* ###
 #-----------------------------------------------------#
 def muCombAlgSequence(ConfigFlags):
-    from TrigEDMConfig.TriggerEDMRun3 import recordable
     ### set the EVCreator ###
     l2muCombViewsMaker = EventViewCreatorAlgorithm("IMl2muComb")
     newRoITool = ViewCreatorFetchFromViewROITool()
@@ -195,8 +196,13 @@ def muEFSAAlgSequence(ConfigFlags):
 
     efsaViewsMaker = EventViewCreatorAlgorithm("IMefsa")
     #
-    efsaViewsMaker.RoIsLink = "roi" # Merge based on L2SA muon
-    efsaViewsMaker.RoITool = ViewCreatorPreviousROITool() # Spawn EventViews on L2SA muon ROI 
+    efsaViewsMaker.RoIsLink = "initialRoI" # Merge based on initial RoI
+
+    newRoITool = ViewCreatorFetchFromViewROITool()
+    newRoITool.RoisWriteHandleKey = recordable("HLT_Roi_L2SAMuonForEF") #RoI collection recorded to EDM
+    newRoITool.InViewRoIs = muNames.L2forIDName #input RoIs from L2 SA views
+    newRoITool.ViewToFetchFrom = "MUViewRoIs"
+    efsaViewsMaker.RoITool = newRoITool # Create a new ROI centred on the L2 SA muon from Step 1 
     #
     efsaViewsMaker.Views = "MUEFSAViewRoIs"
     efsaViewsMaker.InViewRoIs = "MUEFSARoIs"
-- 
GitLab


From 38065fba5a2f08a491e7ed9a365338d76aceb569 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Fri, 12 Jun 2020 15:24:44 +0100
Subject: [PATCH 223/266] Moved trailer checking to separate functions

---
 .../src/PixelRodDecoder.cxx                   | 165 ++++++++----------
 .../src/PixelRodDecoder.h                     |   4 +
 2 files changed, 74 insertions(+), 95 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
index 05e6af8fc0f7..bb6e6616afc5 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
@@ -327,7 +327,8 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	// Count number of headers received
 	if (mLink < 0x8) ++nFragmentsPerFE[mLink];
 
-      } else { // decode Pixel header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB (NOT IBL OR PIXEL)
+      }
+      else { // this is Pixels detector decode header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB (NOT IBL OR PIXEL)
 
 	ATH_MSG_VERBOSE( "Decoding Pixel header word: 0x" << std::hex << rawDataWord << std::dec );
 
@@ -336,42 +337,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	mLink = decodeModule(rawDataWord);   // decode Pixel link (module): n
 	//mLVL1IDskip = decodeL1IDskip(rawDataWord);   // decode Pixel skipped LVL1ID: M    -- temporarily removed
 
-	/*
-	// If decoding fragment from same FE as previous one, do LVL1ID and BCID checks
-	if (mLink == prevLinkNum) {
-
-	// Check that L1ID is the same for all fragments
-	if (mLVL1ID != prevLVL1ID && prevLVL1ID != 0x3FFF) {
-	ATH_MSG_WARNING("In ROB " << std::hex << robId << ": got header with LVL1ID unequal to previous one (LVL1ID = 0x"
-	<< mLVL1ID << ", prevLVL1ID = 0x" << prevLVL1ID << ")" << std::dec);
-	}
-	// Check that BCIDs are consecutive
-	if ((mBCID != prevBCID + 1) && prevBCID != 0x3FFF && prevBCID != mBCID_max_pix) {
-	ATH_MSG_WARNING("In ROB " << std::hex << robId << ": got header with non-consecutive BCIDs (BCID = 0x"
-	<< mBCID << ", prevBCID = 0x" << prevBCID << ")" << std::dec);
-	}
-	}
-	else {  // If decoding new FE, check BCID offset
-	offsetBCID_ROB_FE = static_cast<int>(mBCID) - robBCID;
-	if (offsetBCID_ROB_FE != prevOffsetBCID_ROB_FE && (offsetBCID_ROB_FE != 0x3FFF && prevOffsetBCID_ROB_FE != 0x3FFF)) {
-	ATH_MSG_WARNING("In ROB 0x" << std::hex << robId << std::dec << ": got FE header with unexpected BCID offset"
-	<< " wrt to ROB header (offset = " << offsetBCID_ROB_FE << ", expected " << prevOffsetBCID_ROB_FE << ")");
-	}
-	// Check that first fragment from each FE starts at the same BCID
-	if (mBCID != prevStartingBCID && prevStartingBCID != 0x3FFF) {
-	ATH_MSG_WARNING("In ROB 0x" << std::hex << robId << ": BCID starts at different value than in previous FE (BCID = 0x" << mBCID
-	<< ", prev starting BCID = 0x" << prevStartingBCID << ")" << std::dec);
-	}
-	prevStartingBCID = mBCID;
-	}
-	*/
 	const uint32_t headerError = decodeHeaderErrors(rawDataWord);   // get link (module) header errors
 	if ( headerError != 0 )  {
 	  sc = StatusCode::RECOVERABLE;
 	  errorcode = errorcode | (headerError << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
 	  checkHeaderErrors( bsErrCode, headerError );
 	}
-      }
+      } // end of detector type decoding
 
       // Get onlineId
       onlineId = pixCabling->getOnlineIdFromRobId(robId, mLink);
@@ -814,55 +786,19 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 
 	//                mSkippedTrigTrailer = decodeSkippedTrigTrailer_IBL(rawDataWord); // decode skipped trigger counter bits => M  -- temporarily removed
 
-	uint32_t trailererror = decodeTrailerErrors_IBL(rawDataWord); // => E cPpl bzhv // taking all errors together.
-
-	// Create a copy without the useless 'c' bit
-	uint32_t trailererror_noC = 0;
-	trailererror_noC = (trailererror & 0x7F) | ((trailererror & 0x100) >> 1);
+	const uint32_t trailerError = decodeTrailerErrors_IBL(rawDataWord); // => E cPpl bzhv // taking all errors together.
 
 	// Insert trailer errors into errorcode (except the 'c' bit)
 	// CCC CCCC CCCC CCCC CCCC EPpl bzhv
-	errorcode = errorcode | trailererror_noC;
+	const uint32_t trailerError_noC = (trailerError & 0x7F) | ((trailerError & 0x100) >> 1);
+	errorcode = errorcode | trailerError_noC;
 
-	// Add errors to errorsvc
-	if (trailererror & (1 << 8)) { // time out error bit => E
-	  m_errors->addTimeOutError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
-	}
-	if (trailererror & (1 << 7))  // condensed mode bit => W
+	checkTrailerErrorsIBL( bsErrCode, trailerError );
+	if (trailerError & (1 << 7))  // condensed mode bit => W
 	  if (!receivedCondensedWords) {
 	    generalwarning("In ROB 0x" << std::hex << robId << ", link 0x" << mLink
 			   << ": condensed mode bit is set, but no condensed words received" << std::dec);
-	  }
-	if (trailererror & (1 << 6)) {// link masked by PPC => P
-	  m_errors->addLinkMaskedByPPC();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LinkMaskedByPPC );
-	}
-	if (trailererror & (1 << 5)) { // preamble error bit => p
-	  m_errors->addPreambleError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
-	}
-	if (trailererror & (1 << 4)) { // LVL1 error bit => l
-	  m_errors->addLVL1IDError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
-	}
-	if (trailererror & (1 << 3)) {// BCID error bit => b
-	  m_errors->addBCIDError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
-	}
-	if (trailererror & (1 << 2)) { // trailer error bit => z
-	  m_errors->addTrailerError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer );
-	}
-	if (trailererror & (1 << 1)) { // header/trailer limit error=> h
-	  m_errors->addLimitError();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Limit );
-	}
-	if (trailererror & (1 << 0)) { // data overflow error=> v
-	  m_errors->addInvalidIdentifier();
-	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
-	}
-
+	  }	
 	// Write the error word to the service
 	if (offlineIdHash != 0xffffffff && errorcode) {
 	  m_errors->setFeErrorCode(offlineIdHash, (mLink & 0x1), errorcode);
@@ -902,26 +838,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 
 	ATH_MSG_VERBOSE( "Decoding Pixel trailer word: 0x" << std::hex << rawDataWord << std::dec );
 
-	uint32_t trailererror = decodeTrailerErrors(rawDataWord);   // creating link (module) trailer error variable
+	const uint32_t trailerError = decodeTrailerErrors(rawDataWord);   // creating link (module) trailer error variable
 	//mBitFlips = decodeTrailerBitflips(rawDataWord);   -- temporarily removed
 
-	if (trailererror != 0) {
+	if (trailerError != 0) {
 	  sc = StatusCode ::RECOVERABLE;
-	  errorcode = errorcode | trailererror; //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
-	  //for now just sum all trailer errors
-	  if (trailererror & (1 << 3))
-	    m_errors->addTrailerError();
-	  if (trailererror & (1 << 2))
-	    m_errors->addTrailerError();
-	  if (trailererror & (1 << 1))
-	    m_errors->addTrailerError();
-	  if (trailererror & (1 << 0))
-	    m_errors->addTrailerError();
-	  // TODO, above looks like a bug, compared to previous meaning of trailer error bits. For the sake of consistency reproduce it.
-	  if ( trailererror & 0xf ) {
-	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer );
-	  }
-
+	  errorcode = errorcode | trailerError; //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
+	  checkTrailerErrors( bsErrCode, trailerError);
 	}
       }
       if ( offlineIdHash != 0xffffffff ) { // now write the error word to the service
@@ -1799,23 +1722,23 @@ uint32_t PixelRodDecoder::treatmentFEFlagInfo(unsigned int serviceCode, unsigned
 }
 
 
-void PixelRodDecoder::checkHeaderErrors( uint64_t& bsErrCode, uint32_t headerError ) const {
+void PixelRodDecoder::checkHeaderErrors( uint64_t& bsErrorCode, uint32_t headerError ) const {
   if (headerError != 0) { // only treatment for header errors now, FIXME
     if (headerError & (1 << 3)) {
       m_errors->addPreambleError();
-      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
+      PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Preamble );
     }
     if (headerError & (1 << 2)) {
       m_errors->addTimeOutError();
-      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
+      PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::TimeOut );
     }
     if (headerError & (1 << 1)) {
       m_errors->addLVL1IDError();
-      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
+      PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LVL1ID );
     }
     if (headerError & (1 << 0)) {
       m_errors->addBCIDError();
-      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
+      PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::BCID );
     }
   }
 }
@@ -1865,3 +1788,55 @@ void PixelRodDecoder::checkUnequalNumberOfHeaders( const unsigned int nFragments
   generalwarning("[FE number] : [# headers] - " << errmsg);
 }
 
+void PixelRodDecoder::checkTrailerErrors( uint64_t& bsErrorCode, uint32_t trailerError ) const {
+  //for now just sum all trailer errors
+  if (trailerError & (1 << 3))
+    m_errors->addTrailerError();
+  if (trailerError & (1 << 2))
+    m_errors->addTrailerError();
+  if (trailerError & (1 << 1))
+    m_errors->addTrailerError();
+  if (trailerError & (1 << 0))
+    m_errors->addTrailerError();
+  
+  if ( trailerError & 0xF ) {
+     PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Trailer );
+  }
+}
+
+void PixelRodDecoder::checkTrailerErrorsIBL( uint64_t& bsErrorCode, uint32_t trailerError ) const {
+  // Add errors to errorsvc
+  if (trailerError & (1 << 8)) { // time out error bit => E
+    m_errors->addTimeOutError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::TimeOut );
+  }
+
+  if (trailerError & (1 << 6)) {// link masked by PPC => P
+    m_errors->addLinkMaskedByPPC();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LinkMaskedByPPC );
+  }
+  if (trailerError & (1 << 5)) { // preamble error bit => p
+    m_errors->addPreambleError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Preamble );
+  }
+  if (trailerError & (1 << 4)) { // LVL1 error bit => l
+    m_errors->addLVL1IDError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LVL1ID );
+  }
+  if (trailerError & (1 << 3)) {// BCID error bit => b
+    m_errors->addBCIDError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::BCID );
+  }
+  if (trailerError & (1 << 2)) { // trailer error bit => z
+    m_errors->addTrailerError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Trailer );
+  }
+  if (trailerError & (1 << 1)) { // header/trailer limit error=> h
+    m_errors->addLimitError();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Limit );
+  }
+  if (trailerError & (1 << 0)) { // data overflow error=> v
+    m_errors->addInvalidIdentifier();
+    PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Invalid );
+  }
+}
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
index d0436344979f..8589c5b99f92 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
@@ -164,6 +164,10 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
     //!< if there are errors in the header, save info in error word and (for now) report to BS error tool
     void checkHeaderErrors( uint64_t& bsErrorWord, uint32_t headerWord ) const;
 
+    //!< if there are errors in the trailer, save info in error word and (for now) report to BS error tool
+    void checkTrailerErrors( uint64_t& bsErrorWord, uint32_t headerWord ) const;
+    void checkTrailerErrorsIBL( uint64_t& bsErrorWord, uint32_t headerWord ) const;
+
     //!< if the flag is set to true appropriate bits are set in event info
     StatusCode updateEventInfoIfEventCorruted( bool isCorrupted ) const;
 
-- 
GitLab


From e88003a1ea388d67a2ccff262e10faf6fbee5988 Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Fri, 12 Jun 2020 16:57:02 +0200
Subject: [PATCH 224/266] TileConditions: Remove Tile conditions tools from
 ToolSvc

Tile conditions tools have been removed from ToolSvc
because they are not used in standard reconstruction.
---
 .../python/TileInfoConfigurator.py            | 53 ++++++-------------
 1 file changed, 16 insertions(+), 37 deletions(-)

diff --git a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
index 53acd1b57ac9..cdc268889277 100644
--- a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
+++ b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ##############################################################
 #
@@ -78,19 +78,18 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolIsConfigured = True
 
         #=== connect all tools to COOL
-        from AthenaCommon.AppMgr import ToolSvc
 
         self.msg.info("Changing default TileBadChanTool configuration to COOL source")
         from .TileCondToolConf import getTileBadChanTool
-        ToolSvc += getTileBadChanTool('COOL')
+        getTileBadChanTool('COOL')
 
         self.msg.info("Changing default TileCondToolEmscale configuration to COOL source")
         from .TileCondToolConf import getTileCondToolEmscale
-        ToolSvc += getTileCondToolEmscale('COOL')
+        getTileCondToolEmscale('COOL')
 
         self.msg.info("Changing default TileCondToolNoiseSample configuration to COOL source")
         from .TileCondToolConf import getTileCondToolNoiseSample
-        ToolSvc += getTileCondToolNoiseSample('COOL')
+        getTileCondToolNoiseSample('COOL')
 
 #        self.msg.info("Changing default TileCondToolNoiseAutoCr configuration to COOL source")
 #        from .TileCondToolConf import getTileCondToolAutoCr
@@ -102,7 +101,7 @@ class _TileInfoConfigurator( TileInfoLoader ):
 
         self.msg.info("Changing default TileCondToolTiming configuration to COOL source")
         from .TileCondToolConf import getTileCondToolTiming
-        ToolSvc += getTileCondToolTiming('COOL',type)
+        getTileCondToolTiming('COOL',type)
 
  #       self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source")
  #       from .TileCondToolConf import getTileCondToolPulseShape
@@ -144,12 +143,10 @@ class _TileInfoConfigurator( TileInfoLoader ):
             return False
 
         #=== connect TileCondToolOfcCool to COOL
-        from AthenaCommon.AppMgr import ToolSvc
         from .TileCondToolConf import getTileCondToolOfcCool
         toolOfcCool = getTileCondToolOfcCool('COOL', type, ofcType, name )
         if toolOfcCool is not None:
             self.msg.info("Changing default TileCondToolOfcCool configuration to COOL source for %s", ofcType)
-            ToolSvc += toolOfcCool
             return True
         elif ofcType == 'OF1':
             self._coolof1ofcIsConfigured = False
@@ -185,11 +182,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
             name = 'TileCondToolOnlineTiming'
 
         #=== connect TileCondToolTiming to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolTiming configuration to COOL source")
         from .TileCondToolConf import getTileCondToolTiming
-        ToolSvc += getTileCondToolTiming('COOL', type, online, name )
+        getTileCondToolTiming('COOL', type, online, name )
 
 
 
@@ -226,14 +221,12 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolcispulseIsConfigured = True
 
         #=== connect all tools to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source")
         from .TileCondToolConf import getTileCondToolPulseShape
-        ToolSvc += getTileCondToolPulseShape('COOL','CISPULSE100','TileCondToolPulseShape')
-        ToolSvc += getTileCondToolPulseShape('COOL','CISPULSE5P2','TileCondToolPulse5p2Shape')
-        ToolSvc += getTileCondToolPulseShape('COOL','CISLEAK100','TileCondToolLeak100Shape')
-        ToolSvc += getTileCondToolPulseShape('COOL','CISLEAK5P2','TileCondToolLeak5p2Shape')
+        getTileCondToolPulseShape('COOL','CISPULSE100','TileCondToolPulseShape')
+        getTileCondToolPulseShape('COOL','CISPULSE5P2','TileCondToolPulse5p2Shape')
+        getTileCondToolPulseShape('COOL','CISLEAK100','TileCondToolLeak100Shape')
+        getTileCondToolPulseShape('COOL','CISLEAK5P2','TileCondToolLeak5p2Shape')
 
     #_______________________________________________________________
     def setupCOOLLASPULSE(self, defTag = "", dbConnection = ""):
@@ -251,11 +244,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coollaspulseIsConfigured = True
 
         #=== connect TileCondToolOfcCool to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source")
         from .TileCondToolConf import getTileCondToolPulseShape
-        ToolSvc += getTileCondToolPulseShape('COOL','LAS','TileCondToolPulseShape')
+        getTileCondToolPulseShape('COOL','LAS','TileCondToolPulseShape')
 
     #_______________________________________________________________
     def setupCOOLPHYPULSE(self, defTag = "", dbConnection = ""):
@@ -273,11 +264,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolphypulseIsConfigured = True
 
         #=== connect TileCondToolOfcCool to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolPHYPULSECool configuration to COOL source")
         from .TileCondToolConf import getTileCondToolPulseShape
-        ToolSvc += getTileCondToolPulseShape('COOL')
+        getTileCondToolPulseShape('COOL')
 
     #_______________________________________________________________
     def setupCOOLINTEGRATOR(self, defTag = "", dbConnection = ""):
@@ -295,11 +284,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolintegratorIsConfigured = True
 
         #=== connect TileCondToolIntegrator to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolIntegrator configuration to COOL source")
         from .TileCondToolConf import getTileCondToolIntegrator
-        ToolSvc += getTileCondToolIntegrator('COOL','TileCondToolIntegrator')
+        getTileCondToolIntegrator('COOL','TileCondToolIntegrator')
 
     #_______________________________________________________________
     def setupCOOLMUID(self, defTag = "", dbConnection = ""):
@@ -317,11 +304,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolmuidIsConfigured = True
 
         #=== connect TileCondToolMuID to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolMuID configuration to COOL source")
         from .TileCondToolConf import getTileCondToolMuID
-        ToolSvc += getTileCondToolMuID('COOL','TileCondToolMuID')
+        getTileCondToolMuID('COOL','TileCondToolMuID')
 
 
     #_______________________________________________________________
@@ -340,11 +325,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolacrIsConfigured = True
 
         #=== connect TileCondToolMuID to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileCondToolNoiseAutoCr configuration to COOL source")
         from .TileCondToolConf import getTileCondToolAutoCr
-        ToolSvc += getTileCondToolAutoCr('COOL','TileCondToolAutoCr')
+        getTileCondToolAutoCr('COOL','TileCondToolAutoCr')
 
     #_______________________________________________________________
     def setupCOOLEMEXPERT(self, defTag = "", dbConnection = ""):
@@ -362,11 +345,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
         self._coolEmExpertIsConfigured = True
 
         #=== connect TileExpertToolEmscale to COOL
-        from AthenaCommon.AppMgr import ToolSvc
-
         self.msg.info("Changing default TileExpertToolEmscale configuration to COOL source")
         from .TileCondToolConf import getTileExpertToolEmscale
-        ToolSvc += getTileExpertToolEmscale('COOL')
+        getTileExpertToolEmscale('COOL')
 
         return
 
@@ -429,12 +410,10 @@ class _TileInfoConfigurator( TileInfoLoader ):
             return True
 
         #=== connect TileCondToolMuID to COOL
-        from AthenaCommon.AppMgr import ToolSvc
         from .TileCondToolConf import getTileCondToolDspThreshold
         toolDspThreshold = getTileCondToolDspThreshold('COOL','TileCondToolDspThreshold')
         if toolDspThreshold is not None:
             self.msg.info("Changing default TileCondToolDspThreshold configuration to COOL source")
-            ToolSvc += toolDspThreshold
             self._coolDspThresholdIsConfigured = True
             return True
         else:
-- 
GitLab


From 32113e90e71602e2664d1fe7a52a388a66ca31d6 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 12 Jun 2020 15:50:22 +0000
Subject: [PATCH 225/266] Reduce the number of deletes in
 CompetingSCT_ClustersOnTrack(Tool) and SCT_ClusterOnTrack

---
 .../CompetingSCT_ClustersOnTrackCnv_p1.cxx    |   8 +-
 .../CompetingSCT_ClustersOnTrack.h            |  14 +--
 .../src/CompetingSCT_ClustersOnTrack.cxx      |  34 +++---
 .../src/SCT_ClusterOnTrack.cxx                |   8 +-
 .../src/CompetingSCT_ClustersOnTrackTool.cxx  | 101 +++++++-----------
 5 files changed, 67 insertions(+), 98 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx
index 268a83fd6d88..eef3a1865417 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h"
@@ -17,15 +17,15 @@ CompetingSCT_ClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingSCT_Clust
    std::vector< TPObjRef >::const_iterator  it = persObj->m_containedChildRots.begin(), 
                                             itE = persObj->m_containedChildRots.end();
                                             
-   auto containedChildRots = new std::vector< const InDet::SCT_ClusterOnTrack * >;
+   std::vector< const InDet::SCT_ClusterOnTrack * > containedChildRots;
    
    for (; it!=itE;it++) {
        ITPConverterFor<Trk::MeasurementBase>  *rotCnv = 0;
        const InDet::SCT_ClusterOnTrack* mcot = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(createTransFromPStore(&rotCnv, *it, log));
-       containedChildRots->push_back( mcot );
+       containedChildRots.push_back( mcot );
    }
 
-   *transObj = InDet::CompetingSCT_ClustersOnTrack (containedChildRots,
+   *transObj = InDet::CompetingSCT_ClustersOnTrack (std::move(containedChildRots),
                                                     nullptr);
    fillTransFromPStore( &m_cRotCnv, persObj->m_competingROT, transObj, log );
 }
diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h
index 5f4b07ee0a6a..62642927d136 100755
--- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h
+++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@ public:
     but call InDet::CompetingSCT_ClustersOnTrackTool, otherwise inconsistency of
     the data will be very probable. */
     CompetingSCT_ClustersOnTrack(
-        std::vector<const InDet::SCT_ClusterOnTrack*>* childrots,
+        std::vector<const InDet::SCT_ClusterOnTrack*>&& childrots,
         std::vector<AssignmentProb>* assgnProb
     );
 
@@ -109,7 +109,7 @@ private:
     CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition;
 
     /** The vector of contained InDet::SCT_ClusterOnTrack objects */
-    std::vector<const InDet::SCT_ClusterOnTrack*>*   m_containedChildRots;
+    std::vector<const InDet::SCT_ClusterOnTrack*> m_containedChildRots;
 
     /** Have all the contained ROTs a common associated surface?
       If withNonVanishingAssignProb==true just the ROTs with non-vanishing assignment probabilities
@@ -125,16 +125,16 @@ inline CompetingSCT_ClustersOnTrack* CompetingSCT_ClustersOnTrack::clone() const
 }
 
 inline const Trk::Surface& CompetingSCT_ClustersOnTrack::associatedSurface() const {
-    return ((*(m_containedChildRots->begin()))->associatedSurface());
+    return ((*(m_containedChildRots.begin()))->associatedSurface());
 }
 
 
 inline const std::vector<const InDet::SCT_ClusterOnTrack*>& CompetingSCT_ClustersOnTrack::containedROTs() const {
-    return (*m_containedChildRots);
+    return m_containedChildRots;
 }
 
 inline const InDet::SCT_ClusterOnTrack& CompetingSCT_ClustersOnTrack::rioOnTrack(unsigned int indx) const {
-        return * m_containedChildRots->operator[](indx);
+    return *(m_containedChildRots[indx]);
 }
 
 inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const {
@@ -145,7 +145,7 @@ inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const
 }
 
 inline unsigned int CompetingSCT_ClustersOnTrack::numberOfContainedROTs() const {
-    return m_containedChildRots->size();
+    return m_containedChildRots.size();
 }
 
 }
diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
index 9e884a934e06..8edd270876dd 100755
--- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
+++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -18,20 +18,16 @@
 // default constructor
 InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack():
         Trk::CompetingRIOsOnTrack(),
-        m_globalPosition{},
-        m_containedChildRots(0)
+        m_globalPosition{}
         //
         {}
 
 // copy constructor
 InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::CompetingSCT_ClustersOnTrack& compROT) :
         Trk::CompetingRIOsOnTrack(compROT),
-        m_globalPosition{},
-        m_containedChildRots(0) {
-    m_containedChildRots = new std::vector< const InDet::SCT_ClusterOnTrack* >;
-    std::vector< const InDet::SCT_ClusterOnTrack* >::const_iterator rotIter = compROT.m_containedChildRots->begin();
-    for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) {
-        m_containedChildRots->push_back((*rotIter)->clone());
+        m_globalPosition{} {
+    for (const InDet::SCT_ClusterOnTrack* rot : compROT.m_containedChildRots) {
+        m_containedChildRots.push_back(rot->clone());
     }
     if (compROT.m_globalPosition) {
         m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition));
@@ -40,14 +36,13 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::C
 
 // explicit constructor
 InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(
-    //const Trk::Surface* sf,
-    std::vector<const InDet::SCT_ClusterOnTrack*>* childrots,
+    std::vector<const InDet::SCT_ClusterOnTrack*>&& childrots,
     std::vector<AssignmentProb>* assgnProb
     
 ):
 Trk::CompetingRIOsOnTrack(assgnProb),
 m_globalPosition{},
-m_containedChildRots(childrots)
+m_containedChildRots{childrots}
 {
   // initialize local position and error matrix
   setLocalParametersAndErrorMatrix();
@@ -60,13 +55,11 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat
         Trk::CompetingRIOsOnTrack::operator=(compROT);
         // clear rots
         clearChildRotVector();
-        delete m_containedChildRots;
-        m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>;
-
-        std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin();
-        for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter)
-            m_containedChildRots->push_back((*rotIter)->clone());
+        m_containedChildRots.clear();
 
+        for (const InDet::SCT_ClusterOnTrack* rot : compROT.m_containedChildRots) {
+            m_containedChildRots.push_back(rot->clone());
+        }
         if (compROT.m_globalPosition) {
             m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition));
         } else if (m_globalPosition) {
@@ -78,13 +71,10 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat
 
 InDet::CompetingSCT_ClustersOnTrack::~CompetingSCT_ClustersOnTrack() {
     clearChildRotVector();
-    delete m_containedChildRots;
 }
 
 void InDet::CompetingSCT_ClustersOnTrack::clearChildRotVector() {
-    std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = m_containedChildRots->begin();
-    for (; rotIter!=m_containedChildRots->end(); ++rotIter)
-        delete (*rotIter);
+    for (const InDet::SCT_ClusterOnTrack* rot : m_containedChildRots) delete rot;
 }
 
 MsgStream& InDet::CompetingSCT_ClustersOnTrack::dump( MsgStream& out ) const {
diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx
index dfda5beff5c8..02f8b5a93b7a 100755
--- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx
+++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -15,7 +15,6 @@
 #include <limits>
 
 
-
 // Constructor with parameters - no global position assigned
 InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(const InDet::SCT_Cluster* RIO, 
            const Trk::LocalParameters& locpars, 
@@ -42,12 +41,11 @@ InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(const InDet::SCT_Cluster* RIO,
   m_rio.setElement(RIO);
   
 //constructing local position provided a global one  
-  const Amg::Vector2D * lpos =  detectorElement()->surface( identify() ).
-                                positionOnSurface(globalPosition);
+  std::unique_ptr<const Amg::Vector2D>
+    lpos{detectorElement()->surface( identify() ).positionOnSurface(globalPosition)};
 					
 //storing the position along the strip if available
   m_positionAlongStrip = (lpos) ? (*lpos)[Trk::locY]:0.; 
-  delete lpos;
 }
 
 InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack( const ElementLinkToIDCSCT_ClusterContainer& RIO,
diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx
index 914a4dfdb181..4e035bc0b24c 100755
--- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx
@@ -112,14 +112,14 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo
 
     ATH_MSG_DEBUG("********* in createCompetingROT() ********** ");
     // vector of ROTs
-    std::vector< const InDet::SCT_ClusterOnTrack* >* ROTvector = new std::vector<const InDet::SCT_ClusterOnTrack*>;
+    std::vector< const InDet::SCT_ClusterOnTrack* > ROTvector;
     // vector of assignmentProbs
-    std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb > *assgnProbVector = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >;
+    auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>();
     // type of TRT_BaseElement to check if all RIOs are of same type
     //InDetDD::TRT_BaseElement::Type* TRTtype = 0;
     const Trk::Surface* detElementSurface = 0;
     const Trk::TrackParameters* trkParAtRIOsurface = 0;
-    const Trk::TrackParameters* newTrackParameters = 0;
+    std::unique_ptr<const Trk::TrackParameters> newTrackParameters;
     bool isBarrel = true;
     // maxium assignment propability for choosing the surface....
     //Trk::CompetingRIOsOnTrack::AssignmentProb maximumAssignProb = 0;
@@ -131,10 +131,9 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo
                                 << trkPar.associatedSurface().center().z() << ")");
     // ----------------------
     // loop over all given PrepRawData
-    std::list<const Trk::PrepRawData*>::const_iterator rioIter = RIO_List.begin();
-    for (; rioIter!=RIO_List.end(); ++rioIter) {
+    for (const Trk::PrepRawData* rio : RIO_List) {
         // check if given pointer is not nullptr
-        const InDet::SCT_Cluster* riopointer = dynamic_cast<const InDet::SCT_Cluster*>(*rioIter);
+        const InDet::SCT_Cluster* riopointer = dynamic_cast<const InDet::SCT_Cluster*>(rio);
         if (!riopointer) {
             //ATH_MSG_WARNING("That's mean: given list of PrepRawData* contains a nullptr resp. not a SCT_Cluster!");
             ATH_MSG_WARNING("Given list of PrepRawData* contains a non SCT_Cluster!");
@@ -163,24 +162,20 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo
             } else {
                 // first create trkParameter on the Surface of the RIO
                 // clone TrkParameters without error to force the extrapolator to do propagation without error matrix
-                const Trk::TrackParameters* trkParWithoutError = trkPar.clone();
+                std::unique_ptr<const Trk::TrackParameters> trkParWithoutError{trkPar.clone()};
                 // extrapolate to RIO surface
                 ATH_MSG_VERBOSE("Try to propagate TrackParameters to compROT surface");
-                newTrackParameters = m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), *detElementSurface,
-                                                                        Trk::anyDirection, // propagate in any direction
-                                                                        false, //do noBoundaryCheck!
-                                                                        Trk::nonInteracting); // without material interaction
-                delete trkParWithoutError;
-                trkParWithoutError = 0;
+                newTrackParameters.reset(m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar),
+                                                                             *detElementSurface,
+                                                                             Trk::anyDirection, // propagate in any direction
+                                                                             false, //do noBoundaryCheck!
+                                                                             Trk::nonInteracting)); // without material interaction
                 if (!newTrackParameters){
                     ATH_MSG_ERROR("TrackParameters could not be propagated to PrepRawData surface");
-                    delete ROTvector;
-                    // FIXME: delete entries of ROT vector
-                    delete assgnProbVector;
                     return 0;
                 } // end if (extrapolation failed)
                 // const Trk::AtaStraightLine* trkParAtRIOsurface1 = new Trk::AtaStraightLine(trkPar.position(), trkPar.momentum(), trkPar.charge(), *RIOsurfacePointer);
-                trkParAtRIOsurface = newTrackParameters;
+                trkParAtRIOsurface = newTrackParameters.get();
                 ATH_MSG_VERBOSE("propagated TrackParameters on RIO surface: GP ("
                                         << trkParAtRIOsurface->position().x() << ", "
                                         << trkParAtRIOsurface->position().y() << ", "
@@ -209,7 +204,7 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo
         } else {
             //ATH_MSG_VERBOSE("Created ROT");
             // add ROT to vector of ROTs
-            ROTvector->push_back(rot);
+            ROTvector.push_back(rot);
             // call weightcalculator and calc assignment probabilty:
             ATH_MSG_VERBOSE("Call weight calculator for non-normalized assignment probability");
             Trk::CompetingRIOsOnTrack::AssignmentProb assgnProb = m_WeightCalculator->calculateWeight(*trkParAtRIOsurface, *rot, beta);
@@ -222,42 +217,37 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo
 //             }
         }// end else (!rot)
     } // end for loop
-    delete newTrackParameters;
 
     // -------------------------------------
     // test if at least one ROT was created:
-    if (ROTvector->size() <= 0) {
+    if (ROTvector.size() <= 0) {
         ATH_MSG_ERROR("No valid SCT_ClusterOnTrack could be created:");
         ATH_MSG_ERROR("CompetingSCT_ClustersOnTrack creation aborted!");
         //clean-up
-        delete ROTvector;
-        delete assgnProbVector;
         return 0;
     }
-    ATH_MSG_DEBUG("List of competing SCT_ ROTs contains "<< ROTvector->size() << " SCT_ClustersOnTrack");
+    ATH_MSG_DEBUG("List of competing SCT_ ROTs contains "<< ROTvector.size() << " SCT_ClustersOnTrack");
 
     // -----------------------------------
     // normalize assignment probabilities:
     // copy ROTvector to base class vector (vector of RIO_OnTrack) because vector<> does not know inheritance structure
-    std::vector< const Trk::RIO_OnTrack* >* baseROTvector = new std::vector<const Trk::RIO_OnTrack*>;
-    std::vector< const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = ROTvector->begin();
-    for (; rotIter!=ROTvector->end(); ++rotIter) {
-        baseROTvector->push_back(*rotIter);
+    std::vector< const Trk::RIO_OnTrack* > baseROTvector;
+    for (const InDet::SCT_ClusterOnTrack* rot : ROTvector) {
+        baseROTvector.push_back(rot);
     }
     // call normalize()
     if (isBarrel) {
         ATH_MSG_DEBUG("Call weight calculator for normalization now (Barrel cut)");
-        m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_BarrelCutValue);
+        m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_BarrelCutValue);
     } else {
         ATH_MSG_DEBUG("Call weight calculator for normalization now (end-cap cut)");
-        m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_EndCapCutValue);
+        m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_EndCapCutValue);
     }
-    delete baseROTvector;
 
     // ---------------------------------------
     // create CompetingSCT_ClustersOnTrack
     //return (new CompetingSCT_ClustersOnTrack(assocSurface, ROTvector, assgnProbVector, effectiveLocalPar, effectiveErrMat, ROTsHaveCommonSurface));
-    CompetingSCT_ClustersOnTrack* theCompetingROT = new CompetingSCT_ClustersOnTrack(ROTvector, assgnProbVector);
+    CompetingSCT_ClustersOnTrack* theCompetingROT = new CompetingSCT_ClustersOnTrack(std::move(ROTvector), assgnProbVector.release());
     if (msgLvl(MSG::VERBOSE)) testCompetingROT(*theCompetingROT);
     return theCompetingROT;
 }
@@ -286,7 +276,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT(
         return;
     }
     // new vector of assignmentProbs
-    std::vector< InDet::CompetingSCT_ClustersOnTrack::AssignmentProb >* assgnProbVector = new std::vector< InDet::CompetingSCT_ClustersOnTrack::AssignmentProb >;
+    auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>();
     // maxium assignment propability to update the index
     Trk::CompetingRIOsOnTrack::AssignmentProb maximumAssignProb = 0;
     unsigned int maximumAssignProbIndex = 0;
@@ -295,7 +285,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT(
                                 << trkPar.associatedSurface().center().x() << ", "
                                 << trkPar.associatedSurface().center().y() << ", "
                                 << trkPar.associatedSurface().center().z() << ")");
-    const Trk::TrackParameters* newTrackParameters = 0;
+    std::unique_ptr<const Trk::TrackParameters> newTrackParameters;
     const Trk::TrackParameters* trkParAtROTsurface = 0;
     // ---------------------------------------------------
     // get trackParameters on the surface of the compROT
@@ -315,22 +305,20 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT(
     } else {
         // first create trkParameter on the Surface of the compROT
         // clone TrkParameters without error to force the extrapolator to do propagation without error matrix
-        const Trk::TrackParameters* trkParWithoutError = trkPar.clone();
+        std::unique_ptr<const Trk::TrackParameters> trkParWithoutError{trkPar.clone()};
         ATH_MSG_VERBOSE("Try to propagate TrackParameters to compROT surface");
-        newTrackParameters = m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), compROT->associatedSurface(),
-                                                                Trk::anyDirection, // propagate in any direction
-                                                                false, //do noBoundaryCheck!
-                                                                Trk::nonInteracting); // without material interaction
-        delete trkParWithoutError;
-        trkParWithoutError = 0;
+        newTrackParameters.reset(m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar),
+                                                                     compROT->associatedSurface(),
+                                                                     Trk::anyDirection, // propagate in any direction
+                                                                     false, //do noBoundaryCheck!
+                                                                     Trk::nonInteracting)); // without material interaction
         if (!newTrackParameters){
             ATH_MSG_ERROR("TrackParameters could not be propagated to compROT surface:");
             ATH_MSG_ERROR("    CompetingSCT_ClustersOnTrack could not be updated!");
-            delete assgnProbVector;
             return;
         } // end if (extrapolation failed)
         // const Trk::AtaStraightLine* trkParAtRIOsurface1 = new Trk::AtaStraightLine(trkPar.position(), trkPar.momentum(), trkPar.charge(), *RIOsurfacePointer);
-        trkParAtROTsurface = newTrackParameters;
+        trkParAtROTsurface = newTrackParameters.get();
         ATH_MSG_VERBOSE("propagated TrackParameters on compROT surface: GP ("
                                 << trkParAtROTsurface->position().x() << ", "
                                 << trkParAtROTsurface->position().y() << ", "
@@ -354,26 +342,23 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT(
             maximumAssignProbIndex = i;
         }
     } // end for loop
-    delete newTrackParameters;
     if (maximumAssignProb > 0. ) {
         // -----------------------------------
         // normalize assignment probabilities:
         // copy ROTvector to base class vector (vector of RIO_OnTrack) because vector<> does not know inheritance structure
-        std::vector< const Trk::RIO_OnTrack* >* baseROTvector = new std::vector<const Trk::RIO_OnTrack*>;
-        std::vector< const InDet::SCT_ClusterOnTrack* >::const_iterator rotIter = compROT->containedROTs().begin();
-        for (; rotIter!=compROT->containedROTs().end(); ++rotIter) {
-            baseROTvector->push_back(*rotIter);
+        std::vector< const Trk::RIO_OnTrack* > baseROTvector;
+        for (const InDet::SCT_ClusterOnTrack* rot : compROT->containedROTs()) {
+            baseROTvector.push_back(rot);
         }
         // call normalize()
         ATH_MSG_VERBOSE("normalize the assignment probabilities");
         if(compROT->rioOnTrack(0).detectorElement()->isBarrel()) {
             ATH_MSG_DEBUG("Call weight calculator for normalization now (Barrel cut)");
-            m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_BarrelCutValue);
+            m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_BarrelCutValue);
         } else {
             ATH_MSG_DEBUG("Call weight calculator for normalization now (end-cap cut)");
-            m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_EndCapCutValue);
+            m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_EndCapCutValue);
         }
-        delete baseROTvector;
     } else {
         ATH_MSG_VERBOSE("all ROTs have probability 0.");
         maximumAssignProbIndex = 0;
@@ -382,7 +367,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT(
     // update the competingROT
     // set new assignment probabilities
     delete compROT->m_assignProb;
-    compROT->m_assignProb = assgnProbVector;
+    compROT->m_assignProb = assgnProbVector.release();
     // update maximum assign prob index:
     compROT->m_indexMaxAssignProb = maximumAssignProbIndex;
     // delete global position (will be recreated by the competingROT itself)
@@ -410,13 +395,9 @@ void InDet::CompetingSCT_ClustersOnTrackTool::reequipCompetingROT
     ATH_MSG_WARNING( "inconsistent use of reequipCompetingROT() " );
     return;
   }
-  std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator
-    rotIter = cst->m_containedChildRots->begin();
-  for (; rotIter!=cst->m_containedChildRots->end(); ++rotIter)
-    delete (*rotIter);
-  delete cst->m_containedChildRots;
-  cst->m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>;
-  cst->m_containedChildRots->push_back(newCluster);
+  for (const InDet::SCT_ClusterOnTrack* rot : cst->m_containedChildRots) delete rot;
+  cst->m_containedChildRots.clear();
+  cst->m_containedChildRots.push_back(newCluster);
 
   this->updateCompetingROT(*modifiableCompROT, trkPar, beta);
 }
@@ -523,7 +504,7 @@ StatusCode InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROTprobs(
     // update the competingROT 
     // set new assignment probabilities 
     delete compROT->m_assignProb; 
-    std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* assgnProbVector = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >(assignmentProbs); 
+    auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>();
     // update maximum assign prob index: 
     double maximumAssignProb = 0.; 
     compROT->m_indexMaxAssignProb = 0; 
@@ -538,7 +519,7 @@ StatusCode InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROTprobs(
             (*(assgnProbVector))[i] = 0.; 
         } 
     } // end for loop 
-    compROT->m_assignProb = assgnProbVector; 
+    compROT->m_assignProb = assgnProbVector.release(); 
     // delete global position (will be recreated by the competingROT itself) 
     if (compROT->m_globalPosition) {
         compROT->m_globalPosition.release().reset(); 
-- 
GitLab


From 21b26c05539aaadd3ef9081cc36951e8a3da4efb Mon Sep 17 00:00:00 2001
From: William Panduro Vazquez <j.panduro.vazquez@cern.ch>
Date: Fri, 12 Jun 2020 15:57:52 +0000
Subject: [PATCH 226/266] Add new run HLT_standalone ART tests (build and grid)
 for Cosmics MC with cosmic_run3_v1 menu (ATR-21572)

---
 .../TrigValTools/share/TrigValInputs.json     |  7 ++++
 .../test/test_trig_mc_v1Cosmic_build.py       | 30 ++++++++++++++++
 .../test/test_trig_mc_v1Cosmic_grid.py        | 35 +++++++++++++++++++
 3 files changed, 72 insertions(+)
 create mode 100755 Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
 create mode 100755 Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py

diff --git a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
index 8ce27fea098f..97dbc4a2378c 100644
--- a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
+++ b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
@@ -105,5 +105,12 @@
         "paths": [
             "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigAnalysisTest/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.simul.HITS.e4981_s3087_s3111_tid10701335_00/HITS.10701335._000011.pool.root.1"
         ]
+    },
+    "mc_cosmics": {
+        "source": "mc",
+        "format": "RDO",
+        "paths": [
+            "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.310772.CosmicRays_CollisionSetup.recon.RDO.s3513_s3519_r11737_tid20237005_00/RDO.20237005._004484.pool.root.1"
+        ]
     }
 }
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
new file mode 100755
index 000000000000..1559309e94b3
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+
+# art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu
+# art-type: build
+# art-include: master/Athena
+# Skipping art-output which has no effect for build tests.
+# If you create a grid version, check art-output in existing grid tests.
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+
+ex = ExecStep.ExecStep()
+ex.type = 'athena'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
+ex.input = 'mc_cosmics'
+ex.threads = 1
+precommand = ''.join([
+  "setMenu='Cosmic_run3_v1';", 
+  "doWriteBS=False;",
+  "doWriteRDOTrigger=True;",
+  "fpeAuditor=True;"
+])
+ex.args = '-c "{:s}"'.format(precommand)
+
+test = Test.Test()
+test.art_type = 'build'
+test.exec_steps = [ex]
+test.check_steps = CheckSteps.default_check_steps(test)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py
new file mode 100755
index 000000000000..21bc55c94bdb
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu
+# art-type: grid
+# art-include: master/Athena
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.pmon.gz
+# art-output: *perfmon*
+# art-output: prmon*
+# art-output: *.check*
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+
+ex = ExecStep.ExecStep()
+ex.type = 'athena'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
+ex.input = 'mc_cosmics'
+ex.threads = 1
+ex.args = '-c "setMenu=\'Cosmic_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
+
+test = Test.Test()
+test.art_type = 'grid'
+test.exec_steps = [ex]
+test.check_steps = CheckSteps.default_check_steps(test)
+
+import sys
+sys.exit(test.run())
-- 
GitLab


From 22e7a1512f5cc31704179b03d608370d122760f7 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 12 Jun 2020 17:52:11 +0200
Subject: [PATCH 227/266] TrigMuonEvent: Cleanup cmake dependencies

---
 .../TrigEvent/TrigMuonEvent/CMakeLists.txt    | 48 ++++---------------
 1 file changed, 8 insertions(+), 40 deletions(-)

diff --git a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
index fec40324544a..18d7258089c8 100644
--- a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
@@ -1,71 +1,39 @@
-################################################################################
-# Package: TrigMuonEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigMuonEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/AthLinks
-                          Control/AthContainers
-                          Control/Navigation
-                          Event/EventKernel
-                          Event/FourMom
-                          GaudiKernel
-                          Reconstruction/Particle
-                          Trigger/TrigEvent/TrigInDetEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTrigMuon
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment
-                          Reconstruction/MuonIdentification/MuidEvent
-                          Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigEvent/TrigNavigation )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( TrigMuonEvent
                    src/*.cxx
                    PUBLIC_HEADERS TrigMuonEvent
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TrigSerializeCnvSvcLib TrigNavigationLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent )
+                   LINK_LIBRARIES AthContainers AthLinks AthenaKernel EventKernel FourMom GaudiKernel Navigation Particle TrigInDetEvent
+                   PRIVATE_LINK_LIBRARIES MuidEvent MuonPattern MuonSegment TrigNavigationLib )
 
 atlas_add_sercnv_library( TrigMuonEventSerCnv
                           FILES TrigMuonEvent/MuonFeature.h TrigMuonEvent/MuonFeatureContainer.h TrigMuonEvent/CombinedMuonFeature.h TrigMuonEvent/CombinedMuonFeatureContainer.h TrigMuonEvent/IsoMuonFeature.h TrigMuonEvent/IsoMuonFeatureContainer.h TrigMuonEvent/TrigMuonClusterFeature.h TrigMuonEvent/TrigMuonClusterFeatureContainer.h TrigMuonEvent/TrigMuonEF.h TrigMuonEvent/TrigMuonEFContainer.h TrigMuonEvent/TileMuFeature.h TrigMuonEvent/TileMuFeatureContainer.h TrigMuonEvent/TileTrackMuFeature.h TrigMuonEvent/TileTrackMuFeatureContainer.h TrigMuonEvent/TrigMuonEFTrack.h TrigMuonEvent/TrigMuonEFCbTrack.h TrigMuonEvent/TrigMuonEFInfo.h TrigMuonEvent/TrigMuonEFInfoContainer.h TrigMuonEvent/TrigMuonEFInfoTrack.h TrigMuonEvent/TrigMuonEFInfoTrackContainer.h TrigMuonEvent/TrigMuonEFIsolation.h TrigMuonEvent/TrigMuonEFIsolationContainer.h TrigMuonEvent/MuonFeatureDetails.h TrigMuonEvent/MuonFeatureDetailsContainer.h
-                          INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                          LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent )
+                          LINK_LIBRARIES TrigMuonEvent )
 
 atlas_add_sercnv_library( TrigMuonEventxAODSerCnv
                           FILES xAODMuon/MuonContainer.h xAODMuon/MuonAuxContainer.h xAODTrigMuon/L2StandAloneMuonContainer.h xAODTrigMuon/L2StandAloneMuonAuxContainer.h xAODTrigMuon/L2CombinedMuonContainer.h xAODTrigMuon/L2CombinedMuonAuxContainer.h xAODTrigMuon/L2IsoMuonContainer.h xAODTrigMuon/L2IsoMuonAuxContainer.h
                           TYPES_WITH_NAMESPACE xAOD::MuonContainer xAOD::MuonAuxContainer xAOD::L2StandAloneMuonContainer xAOD::L2StandAloneMuonAuxContainer xAOD::L2CombinedMuonContainer xAOD::L2CombinedMuonAuxContainer xAOD::L2IsoMuonContainer xAOD::L2IsoMuonAuxContainer
                           CNV_PFX xAOD
-                          INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                          LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent )
+                          LINK_LIBRARIES TrigMuonEvent )
 
 atlas_add_dictionary( TrigMuonEvent_cDict
                       TrigMuonEvent/TrigMuonEvent_cDict.h
                       TrigMuonEvent/selection_c.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent )
+                      LINK_LIBRARIES TrigMuonEvent )
 
 atlas_add_dictionary( TrigMuonEventDict
                       TrigMuonEvent/TrigMuonEventDict.h
                       TrigMuonEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent
+                      LINK_LIBRARIES TrigMuonEvent
                       DATA_LINKS MuonFeature CombinedMuonFeature IsoMuonFeature TrigMuonClusterFeature TrigMuonEFContainer TileMuFeature TileTrackMuFeature TrigMuonEFIsolationContainer
                       ELEMENT_LINKS MuonFeatureContainer CombinedMuonFeatureContainer IsoMuonFeatureContainer TrigMuonClusterFeatureContainer TileMuFeatureContainer TileTrackMuFeatureContainer TrigMuonEFInfoContainer )
 
 atlas_add_test( Operators_test
                 SOURCES
                 test/Operators_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent
+                LINK_LIBRARIES TrigMuonEvent
                 POST_EXEC_SCRIPT nopost.sh )
-- 
GitLab


From 63529c89c872a91f7e68c25f3cecbaff5c26ce82 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 12 Jun 2020 18:06:02 +0200
Subject: [PATCH 228/266] TrigCaloEvent: CMake cleanup

---
 .../TrigEvent/TrigCaloEvent/CMakeLists.txt    | 46 +++----------------
 .../TrigEvent/TrigCaloEvent/docs/README.txt   | 23 ----------
 .../src/components/TrigCaloEvent_entries.cxx  |  1 -
 3 files changed, 6 insertions(+), 64 deletions(-)
 delete mode 100755 Trigger/TrigEvent/TrigCaloEvent/docs/README.txt
 delete mode 100644 Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx

diff --git a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
index cfcd3f0b79b9..50cf2d037d71 100644
--- a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
@@ -1,63 +1,29 @@
-################################################################################
-# Package: TrigCaloEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigCaloEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloGeoHelpers
-                          Control/AthenaKernel
-                          Control/AthLinks
-                          Control/AthContainers
-                          Control/Navigation
-                          Control/CxxUtils
-                          Event/EventKernel
-                          Event/FourMom
-                          GaudiKernel
-                          
-                          Trigger/TrigEvent/TrigMissingEtEvent
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODHIEvent
-                          Event/xAOD/xAODTrigCalo
-                          Event/xAOD/xAODTrigL1Calo
-                          Event/xAOD/xAODTrigMinBias
-                          Event/xAOD/xAODTrigRinger
-                          Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigEvent/TrigNavigation )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( TrigCaloEvent
                    src/*.cxx
-                   src/components/*.cxx
                    PUBLIC_HEADERS TrigCaloEvent
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent TrigSerializeCnvSvcLib TrigNavigationLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger )
+                   LINK_LIBRARIES AthContainers AthLinks AthenaKernel CaloGeoHelpers CxxUtils EventKernel FourMom GaudiKernel Navigation TrigMissingEtEvent xAODCaloEvent xAODTrigMinBias
+                   PRIVATE_LINK_LIBRARIES CaloEvent TrigNavigationLib xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigRinger )
 
 atlas_add_sercnv_library( TrigCaloEventSerCnv
                           FILES TrigCaloEvent/TrigCaloCluster.h TrigCaloEvent/TrigCaloClusterContainer.h TrigCaloEvent/TrigEMCluster.h TrigCaloEvent/TrigEMClusterContainer.h TrigCaloEvent/RingerRings.h TrigCaloEvent/RingerRingsContainer.h TrigCaloEvent/TrigTauCluster.h TrigCaloEvent/TrigTauClusterContainer.h TrigCaloEvent/TrigTauClusterDetails.h TrigCaloEvent/TrigTauClusterDetailsContainer.h TrigCaloEvent/TrigT2Jet.h TrigCaloEvent/TrigT2JetContainer.h TrigCaloEvent/Trig3Momentum.h TrigCaloEvent/TrigT2MbtsBits.h TrigCaloEvent/TrigT2MbtsBitsContainer.h TrigCaloEvent/TrigT2ZdcSignals.h TrigCaloEvent/TrigT2ZdcSignalsContainer.h TrigCaloEvent/TrigRNNOutput.h TrigCaloEvent/TrigRNNOutputContainer.h CaloEvent/CaloCellContainer.h CaloEvent/CaloClusterContainer.h CaloEvent/CaloShowerContainer.h CaloEvent/CaloTowerContainer.h CaloEvent/CaloCellLinkContainer.h
-                          INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                          LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent )
+                          LINK_LIBRARIES TrigCaloEvent )
 
 atlas_add_sercnv_library( TrigCaloEventxAODSerCnv
                           FILES xAODTrigCalo/TrigCaloCluster.h xAODTrigCalo/TrigCaloClusterContainer.h xAODTrigCalo/TrigCaloClusterAuxContainer.h xAODTrigCalo/TrigEMCluster.h xAODTrigCalo/TrigEMClusterContainer.h xAODTrigCalo/TrigEMClusterAuxContainer.h xAODTrigCalo/CaloClusterTrigAuxContainer.h xAODTrigL1Calo/TriggerTower.h xAODTrigL1Calo/TriggerTowerContainer.h xAODTrigL1Calo/TriggerTowerAuxContainer.h xAODTrigRinger/TrigRingerRings.h xAODTrigRinger/TrigRingerRingsContainer.h xAODTrigRinger/TrigRingerRingsAuxContainer.h xAODTrigRinger/TrigRNNOutput.h xAODTrigRinger/TrigRNNOutputContainer.h xAODTrigRinger/TrigRNNOutputAuxContainer.h xAODTrigMinBias/TrigT2MbtsBits.h xAODTrigMinBias/TrigT2MbtsBitsContainer.h xAODTrigMinBias/TrigT2MbtsBitsAuxContainer.h xAODTrigMinBias/TrigT2ZdcSignals.h xAODTrigMinBias/TrigT2ZdcSignalsContainer.h xAODTrigMinBias/TrigT2ZdcSignalsAuxContainer.h xAODCaloEvent/CaloCluster.h xAODCaloEvent/CaloClusterContainer.h xAODCaloEvent/CaloClusterAuxContainer.h xAODHIEvent/HIEventShape.h xAODHIEvent/HIEventShapeContainer.h xAODHIEvent/HIEventShapeAuxContainer.h
                           TYPES_WITH_NAMESPACE xAOD::CaloCluster xAOD::CaloClusterContainer xAOD::CaloClusterAuxContainer xAOD::CaloClusterTrigAuxContainer xAOD::TrigCaloCluster xAOD::TrigCaloClusterContainer xAOD::TrigCaloClusterAuxContainer xAOD::TrigEMCluster xAOD::TrigEMClusterContainer xAOD::TrigEMClusterAuxContainer xAOD::TrigT2MbtsBits xAOD::TrigT2MbtsBitsContainer xAOD::TrigT2MbtsBitsAuxContainer xAOD::TrigRingerRings xAOD::TrigRingerRingsContainer xAOD::TrigRingerRingsAuxContainer xAOD::TrigRNNOutput xAOD::TrigRNNOutputContainer xAOD::TrigRNNOutputAuxContainer xAOD::TrigT2ZdcSignals xAOD::TrigT2ZdcSignalsContainer xAOD::TrigT2ZdcSignalsAuxContainer xAOD::TriggerTower xAOD::TriggerTowerContainer xAOD::TriggerTowerAuxContainer xAOD::HIEventShape xAOD::HIEventShapeContainer xAOD::HIEventShapeAuxContainer
                           CNV_PFX xAOD
-                          INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                          LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent )
+                          LINK_LIBRARIES TrigCaloEvent )
 
 atlas_add_dictionary( TrigCaloEventDict
                       TrigCaloEvent/TrigCaloEventDict.h
                       TrigCaloEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent
+                      LINK_LIBRARIES TrigCaloEvent
                       DATA_LINKS TrigCaloCluster TrigEMCluster TrigT2Jet TrigTauCluster TrigTauClusterDetails RingerRings TrigRNNOutput
                       ELEMENT_LINKS TrigEMClusterContainer RingerRingsContainer TrigTauClusterContainer TrigTauClusterDetailsContainer TrigRNNOutputContainer )
 
diff --git a/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt b/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt
deleted file mode 100755
index 15d36cfe165d..000000000000
--- a/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-
-2005-10-27:	In TrigCaloEvent directory :
-		TrigCaloCluster.h -> base classe of
-		the package.
-		TrigEMCluster.h -> egamma object
-		TrigTauCluster.h -> tau object
-		TrigEMCluster.h -> container for 
-		egamma object
-		TrigTauCluster.h -> container for
-		tau object
-		TestEDM.h -> Writes the classes
-		to StoreGate and tried to read it
-		back.
-		In the src directory -> the implementation
-		of the classes described above.
-		In the docs directory -> this file.
-		In the share directory -> very simple
-		athena python script to test clusters
-		and containers.
-		If the package is configured you can
-		just get the TestEDM.py jobOption file
-		and do:
-		athena.py TestEDM.py
diff --git a/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx b/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx
deleted file mode 100644
index 8b137891791f..000000000000
--- a/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx
+++ /dev/null
@@ -1 +0,0 @@
-
-- 
GitLab


From f7cad66a4676003dc8b70c02f298856325f5c8f0 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Fri, 12 Jun 2020 21:10:11 +0200
Subject: [PATCH 229/266] Initial commit of hepmc3 functions

---
 Generators/AtlasHepMC/AtlasHepMC/GenEvent.h   | 88 +++++++++++++++++++
 .../AtlasHepMC/AtlasHepMC/GenEvent_fwd.h      |  7 ++
 .../AtlasHepMC/AtlasHepMC/GenParticle.h       | 31 +++++++
 .../AtlasHepMC/AtlasHepMC/GenParticle_fwd.h   |  8 ++
 Generators/AtlasHepMC/AtlasHepMC/GenRanges.h  |  4 +
 Generators/AtlasHepMC/AtlasHepMC/GenVertex.h  | 36 ++++++++
 .../AtlasHepMC/AtlasHepMC/GenVertex_fwd.h     |  8 ++
 .../AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h    |  8 ++
 Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h   |  9 ++
 .../AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h |  4 +
 .../AtlasHepMC/AtlasHepMC/IO_BaseClass.h      |  4 +
 .../AtlasHepMC/AtlasHepMC/IO_GenEvent.h       | 13 +++
 Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h  |  5 ++
 Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h  |  4 +
 Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h    |  9 ++
 .../AtlasHepMC/AtlasHepMC/Polarization.h      | 31 +++++++
 .../AtlasHepMC/AtlasHepMC/SimpleVector.h      |  9 ++
 .../AtlasHepMC/AtlasHepMC/WeightContainer.h   |  4 +
 Generators/AtlasHepMC/CMakeLists.txt          | 31 +++++++
 19 files changed, 313 insertions(+)

diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
index 8d574751cca9..27bb413999ee 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
@@ -3,6 +3,93 @@
 */
 #ifndef ATLASHEPMC_GENEVENT_H
 #define ATLASHEPMC_GENEVENT_H
+#ifdef HEPMC3
+#undef private
+#undef protected
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/GenHeavyIon.h"
+#include "HepMC3/PrintStreams.h"
+#include "AtlasHepMC/GenVertex.h"
+#include "AtlasHepMC/GenParticle.h"
+namespace HepMC3
+{
+inline std::vector<HepMC3::GenParticlePtr>::const_iterator  begin(HepMC3::GenEvent& e){ return e.particles().begin(); }
+inline std::vector<HepMC3::GenParticlePtr>::const_iterator  end(HepMC3::GenEvent& e){ return e.particles().end(); }
+inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator  begin(const HepMC3::GenEvent& e){ return e.particles().begin(); }
+inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator  end(const HepMC3::GenEvent& e){ return e.particles().end(); }
+}
+
+namespace HepMC {
+using Print=HepMC3::Print;
+using GenHeavyIon=HepMC3::GenHeavyIon;
+using GenEvent=HepMC3::GenEvent;
+
+inline std::vector<HepMC3::GenParticlePtr>::const_iterator  begin(HepMC3::GenEvent& e){ return e.particles().begin(); }
+inline std::vector<HepMC3::GenParticlePtr>::const_iterator  end(HepMC3::GenEvent& e){ return e.particles().end(); }
+inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator  begin(const HepMC3::GenEvent& e){ return e.particles().begin(); }
+inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator  end(const HepMC3::GenEvent& e){ return e.particles().end(); }
+
+inline GenEvent* newGenEvent(const int signal_process_id, const int event_number ){ GenEvent* e= new GenEvent(); 
+std::shared_ptr<HepMC3::IntAttribute> signal_process_id_A = std::make_shared<HepMC3::IntAttribute>(signal_process_id);
+e->add_attribute("signal_process_id",signal_process_id_A); 
+e->set_event_number(event_number);
+return e;
+}
+
+inline GenVertexPtr  barcode_to_vertex(const GenEvent* e, int id ){
+auto vertices=((GenEvent*)e)->vertices();
+for (auto v: vertices)  
+{
+auto barcode_attr=e->attribute<HepMC3::IntAttribute>("barcode");
+if (!barcode_attr) continue;
+if (barcode_attr->value()==id) return v;
+}
+if (-id>0&&-id<(int)vertices.size()) return vertices[-id];
+return  HepMC3::GenVertexPtr(); 
+}
+
+inline GenParticlePtr  barcode_to_particle(const GenEvent* e, int id ){
+auto particles=((GenEvent*)e)->particles();
+for (auto p: particles)  
+{
+auto barcode_attr=p->attribute<HepMC3::IntAttribute>("barcode");
+if (!barcode_attr) continue;
+if (barcode_attr->value()==id) return p;
+}
+if (id>0&&id<(int)particles.size()) return particles[id];
+return  HepMC3::GenParticlePtr(); 
+}
+
+
+inline int signal_process_id(const GenEvent evt) {
+std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=evt.attribute<HepMC3::IntAttribute>("signal_process_id");
+ return A_signal_process_id?(A_signal_process_id->value()):0;
+}
+inline int signal_process_id(const GenEvent* evt) {
+std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=evt->attribute<HepMC3::IntAttribute>("signal_process_id");
+ return A_signal_process_id?(A_signal_process_id->value()):0;
+}
+namespace Print {
+inline void line(std::ostream& os,const GenEvent& e){e.print(os);}
+inline void line(std::ostream& os,const GenEvent* e){e->print(os);}
+}
+inline bool valid_beam_particles(const GenEvent* e){return e->valid_beam_particles();}
+
+inline void set_signal_process_id(GenEvent* e, const int i=0) {     std::shared_ptr<HepMC3::IntAttribute> signal_process_id = std::make_shared<HepMC3::IntAttribute>(i);
+                                                                    e->add_attribute("signal_process_id",signal_process_id);  }
+inline void set_random_states(GenEvent* e, std::vector<long int>& a)  { 
+ e->add_attribute("random_states",std::make_shared<HepMC3::VectorLongIntAttribute>(a));
+}
+template <class T> void set_signal_process_vertex(GenEvent* e, T v){
+if (!v) return;
+if (v->parent_event()!=e) return;
+v->add_attribute("signal_process_vertex",std::make_shared<HepMC3::IntAttribute>(1));
+}
+inline ConstGenVertexPtr signal_process_vertex(const GenEvent* e) { for (auto v: e->vertices()) if (v->attribute<HepMC3::IntAttribute>("signal_process_vertex")) return v; return nullptr; }
+inline      GenVertexPtr signal_process_vertex(GenEvent* e) { for (auto v: e->vertices()) if (v->attribute<HepMC3::IntAttribute>("signal_process_vertex")) return v; return nullptr; }
+inline bool valid_beam_particles(const GenEvent* e){ if (!e) return false; if  (e->beams().size()!=2) return false; return true;}
+}
+#else
 #include "HepMC/GenEvent.h"
 #include "HepMC/GenVertex.h"
 #include "AtlasHepMC/GenVertex.h"
@@ -38,3 +125,4 @@ inline bool valid_beam_particles(const GenEvent* e){return e->valid_beam_particl
 }
 #include "AtlasHepMC/SimpleVector.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h
index cea90d473a27..e7113d8ee86a 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h
@@ -3,7 +3,14 @@
 */
 #ifndef ATLASHEPMC_GENEVENTFWD_H
 #define ATLASHEPMC_GENEVENTFWD_H
+#ifdef HEPMC3
+namespace HepMC3 { class GenEvent; }
+namespace HepMC {
+using GenEvent=HepMC3::GenEvent;
+}
+#else
 namespace HepMC {
 class GenEvent;
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
index d96e0e501729..a90880fb7d09 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
@@ -3,6 +3,35 @@
 */
 #ifndef ATLASHEPMC_GENPARTICLE_H
 #define ATLASHEPMC_GENPARTICLE_H
+#ifdef HEPMC3
+#include "HepMC3/GenParticle.h"
+#include "HepMC3/PrintStreams.h"
+#include "AtlasHepMC/Polarization.h"
+#include "AtlasHepMC/Flow.h"
+namespace HepMC {
+typedef HepMC3::GenParticlePtr GenParticlePtr;
+typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr;
+inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom = HepMC3::FourVector::ZERO_VECTOR(), int pid = 0, int status = 0) {
+  return std::make_shared<HepMC3::GenParticle>(mom,pid,status);
+}
+inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom, int pid , int status , HepMC::Flow fl, HepMC::Polarization pol) {
+  return std::make_shared<HepMC3::GenParticle>(mom,pid,status);
+}
+inline int barcode(GenParticlePtr p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+inline int barcode(ConstGenParticlePtr p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+inline int barcode(const HepMC3::GenParticle p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p.attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+template <class T> void suggest_barcode(T p, int i){p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(i));}
+}
+#else
 #include "HepMC/GenParticle.h"
 namespace HepMC {
 typedef GenParticle* GenParticlePtr;
@@ -12,6 +41,7 @@ inline GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom = HepMC::Fo
 }
 inline int barcode(GenParticle p) {   return    p.barcode(); }
 template <class T> inline int barcode(T p) {   return    p->barcode(); }
+template <class T> void suggest_barcode(T p, int i){p->suggest_barcode(i);}
 inline void suggest_barcode(GenParticle p, int i){p.suggest_barcode(i);}
 template <class T> void suggest_barcode(T* p, int i){p->suggest_barcode(i);}
 namespace Print {
@@ -20,3 +50,4 @@ inline void line(std::ostream& os,const GenParticle* p){p->print(os);}
 }
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h
index 15f0ac57861c..06e26fead4d6 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h
@@ -3,8 +3,16 @@
 */
 #ifndef ATLASHEPMC_GENPARTICLEFWD_H
 #define ATLASHEPMC_GENPARTICLEFWD_H
+#ifdef HEPMC3
+#include "HepMC3/GenParticle_fwd.h"
+namespace HepMC {
+typedef HepMC3::GenParticlePtr GenParticlePtr;
+typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr;
+}
+#else
 namespace HepMC {
 class GenParticle;
 typedef GenParticle* GenParticlePtr;
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h b/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h
index f07a1886e972..57349312ef42 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h
@@ -3,5 +3,9 @@
 */
 #ifndef ATLASHEPMC_GENRANGES_H
 #define ATLASHEPMC_GENRANGES_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#else
 #include "HepMC/GenRanges.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
index 8b7c2eb2e8d7..d34899f96f78 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
@@ -3,6 +3,41 @@
 */
 #ifndef ATLASHEPMC_GENVERTEX_H
 #define ATLASHEPMC_GENVERTEX_H
+#ifdef HEPMC3
+#include "HepMC3/GenVertex.h"
+#include "HepMC3/PrintStreams.h"
+namespace HepMC {
+typedef HepMC3::GenVertexPtr GenVertexPtr;
+typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr;
+inline GenVertexPtr newGenVertexPtr(const HepMC3::FourVector &pos = HepMC3::FourVector::ZERO_VECTOR(),const int i=0) {
+  GenVertexPtr v=std::make_shared<HepMC3::GenVertex>(pos);
+  v->set_status(i);
+  return v;
+}
+inline int barcode(GenVertexPtr p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+inline int barcode(ConstGenVertexPtr p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+inline int barcode(HepMC3::GenVertex p){ 
+	std::shared_ptr<HepMC3::IntAttribute> barcode=p.attribute<HepMC3::IntAttribute>("barcode");
+		 return barcode?(barcode->value()):0;
+}
+
+inline std::vector<HepMC3::GenVertexPtr> DESCENDANTS(HepMC3::GenVertexPtr endvtx)
+{
+return std::vector<HepMC3::GenVertexPtr>();	
+}
+inline std::vector<HepMC3::ConstGenVertexPtr> DESCENDANTS(HepMC3::ConstGenVertexPtr endvtx)
+{
+return std::vector<HepMC3::ConstGenVertexPtr>();	
+}
+inline void* raw_pointer(GenVertexPtr p){ return p.get();}
+}
+#else
 #include "HepMC/GenVertex.h"
 namespace HepMC {
 typedef HepMC::GenVertex* GenVertexPtr;
@@ -12,3 +47,4 @@ inline GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos = HepMC::FourVe
 }
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h
index 2c98b4f9dafe..680b4f2d6303 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h
@@ -3,8 +3,16 @@
 */
 #ifndef ATLASHEPMC_GENVERTEXFWD_H
 #define ATLASHEPMC_GENVERTEXFWD_H
+#ifdef HEPMC3
+#include "HepMC3/GenVertex_fwd.h"
+namespace HepMC {
+typedef HepMC3::GenVertexPtr GenVertexPtr;
+typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr;
+}
+#else
 namespace HepMC {
 class GenVertex;
 typedef HepMC::GenVertex* GenVertexPtr;
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h b/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h
index 40434b23f35e..6c9e621462eb 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h
@@ -3,5 +3,13 @@
 */
 #ifndef ATLASHEPMC_HEPEVTWRAPPER_H
 #define ATLASHEPMC_HEPEVTWRAPPER_H
+#ifdef HEPMC3
+#include "HepMC3/HEPEVT_Wrapper.h"
+namespace HepMC
+{
+typedef HepMC3::HEPEVT_Wrapper HEPEVT_Wrapper;
+}
+#else
 #include "HepMC/HEPEVT_Wrapper.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h b/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h
index d5019486d16f..36f5c2484fb8 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h
@@ -3,5 +3,14 @@
 */
 #ifndef ATLASHEPMC_HEAVYION_H
 #define ATLASHEPMC_HEAVYION_H
+#ifdef HEPMC3
+#include "HepMC3/GenHeavyIon.h"
+#include "HepMC3/PrintStreams.h"
+namespace HepMC {
+typedef HepMC3::GenHeavyIonPtr GenHeavyIonPtr;
+typedef HepMC3::GenHeavyIon GenHeavyIon;
+}
+#else
 #include "HepMC/HeavyIon.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h b/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h
index f08aa07f05cc..2988e277731d 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h
@@ -3,5 +3,9 @@
 */
 #ifndef ATLASHEPMC_IOASCIIPARTICLES_H
 #define ATLASHEPMC_IOASCIIPARTICLES_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#else
 #include "HepMC/IO_AsciiParticles.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h b/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h
index b41a56970177..26a0e105b4a2 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h
@@ -3,5 +3,9 @@
 */
 #ifndef ATLASHEPMC_IOBASECLASS_H
 #define ATLASHEPMC_IOBASECLASS_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#else
 #include "HepMC/IO_BaseClass.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h
index 145f50b91cba..93d4a0254f7e 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h
@@ -3,5 +3,18 @@
 */
 #ifndef ATLASHEPMC_IOGENEVENT_H
 #define ATLASHEPMC_IOGENEVENT_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#include "HepMC3/Reader.h"
+#include "HepMC3/Writer.h"
+#include "HepMC3/ReaderAsciiHepMC2.h"
+#include "HepMC3/WriterAsciiHepMC2.h"
+namespace HepMC
+{
+typedef HepMC3::WriterAsciiHepMC2   WriterAsciiHepMC2;
+typedef HepMC3::ReaderAsciiHepMC2   ReaderAsciiHepMC2;
+}
+#else
 #include "HepMC/IO_GenEvent.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
index 95152b32ebc5..681ae7f2bdcb 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
@@ -3,5 +3,10 @@
 */
 #ifndef ATLASHEPMC_IOHEPEVT_H
 #define ATLASHEPMC_IOHEPEVT_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#include "HepMC3/HEPEVT_Wrapper.h"
+#else
 #include "HepMC/IO_HEPEVT.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h b/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h
index 9eb2314399e0..f6567ecb4d4d 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h
@@ -3,5 +3,9 @@
 */
 #ifndef ATLASHEPMC_IOHERWIG_H
 #define ATLASHEPMC_IOHERWIG_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#else
 #include "HepMC/IO_HERWIG.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h b/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h
index bf074824222a..7b2455445501 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h
@@ -3,9 +3,18 @@
 */
 #ifndef ATLASHEPMC_PDFINFO_H
 #define ATLASHEPMC_PDFINFO_H
+#ifdef HEPMC3
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/PrintStreams.h"
+namespace HepMC
+{
+typedef std::shared_ptr<HepMC3::GenPdfInfo>  GenPdfInfoPtr;
+}
+#else
 #include "HepMC/PdfInfo.h"
 namespace HepMC
 {
 typedef HepMC::PdfInfo*  GenPdfInfoPtr;
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
index 65033c4dff71..c637be312b2f 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
@@ -3,6 +3,36 @@
 */
 #ifndef ATLASHEPMC_POLARIZATION_H
 #define ATLASHEPMC_POLARIZATION_H
+#ifdef HEPMC3
+#include "HepMC3/GenParticle.h"
+#include "HepMC3/Attribute.h"
+namespace HepMC
+{
+class Polarization  {
+public:
+Polarization( const double a=0.0, const double b=0.0): m_theta(a), m_phi(b) {};
+~Polarization(){};
+double theta() const  { return m_theta;}
+double phi() const { return m_phi;}
+bool is_defined() const { if (std::abs(m_theta)<0.00001&&std::abs(m_phi)<0.00001) return false; return true; }
+private:
+double m_theta;
+double m_phi;
+};
+inline Polarization polarization(HepMC3::GenParticlePtr a){
+	std::shared_ptr<HepMC3::DoubleAttribute> phi_A =a->attribute<HepMC3::DoubleAttribute>("phi");
+	std::shared_ptr<HepMC3::DoubleAttribute> theta_A=a->attribute<HepMC3::DoubleAttribute>("theta");
+    double phi=(phi_A?phi_A->value():0.0);
+    double theta=(theta_A?theta_A->value():0.0);
+	return Polarization(theta,phi);
+}
+template<class T> void  set_polarization( T a,  Polarization b) 
+{
+a->add_attribute("phi",std::make_shared<HepMC3::DoubleAttribute>(b.phi())); 
+a->add_attribute("theta",std::make_shared<HepMC3::DoubleAttribute>(b.theta())); 
+}
+}
+#else
 #include "HepMC/Polarization.h"
 namespace HepMC
 {
@@ -14,3 +44,4 @@ template<class T>  Polarization polarization(T a) {
 }
 }
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h b/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h
index fe7a493ae596..d65497de6d75 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h
@@ -3,5 +3,14 @@
 */
 #ifndef ATLASHEPMC_SIMPLEVECTOR_H
 #define ATLASHEPMC_SIMPLEVECTOR_H
+#ifdef HEPMC3
+#include "HepMC3/FourVector.h"
+#include "HepMC3/PrintStreams.h"
+namespace HepMC
+{
+typedef HepMC3::FourVector FourVector;
+}
+#else
 #include "HepMC/SimpleVector.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h b/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h
index ec680f6373c7..5dd69b248608 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h
@@ -3,5 +3,9 @@
 */
 #ifndef ATLASHEPMC_WEIGHTCONTAINER_H
 #define ATLASHEPMC_WEIGHTCONTAINER_H
+#ifdef HEPMC3
+#include "HepMC3/Version.h"
+#else
 #include "HepMC/WeightContainer.h"
 #endif
+#endif
diff --git a/Generators/AtlasHepMC/CMakeLists.txt b/Generators/AtlasHepMC/CMakeLists.txt
index a4e5b03554e4..4a50fb1e304f 100644
--- a/Generators/AtlasHepMC/CMakeLists.txt
+++ b/Generators/AtlasHepMC/CMakeLists.txt
@@ -5,6 +5,30 @@ atlas_subdir( AtlasHepMC )
 # External(s) needed by the package.
 find_package( HepMC COMPONENTS HepMC HepMCfio )
 
+if (HEPMC3_USE)
+# Component(s) in the package.
+atlas_add_library( AtlasHepMCLib
+   AtlasHepMC/*.h
+   INTERFACE
+   PUBLIC_HEADERS AtlasHepMC
+   INCLUDE_DIRS  ${HEPMC3_INCLUDE_DIRS}
+   LINK_LIBRARIES ${HEPMC3_HepMC3_LIBRARY}  )
+
+atlas_add_library( AtlasHepMCfioLib
+   AtlasHepMC/*.h
+   INTERFACE
+   PUBLIC_HEADERS AtlasHepMC
+   INCLUDE_DIRS  ${HEPMC3_INCLUDE_DIRS} 
+   )
+
+atlas_add_library( AtlasHepMCsearchLib
+   AtlasHepMC/*.h
+   INTERFACE
+   PUBLIC_HEADERS AtlasHepMC
+   INCLUDE_DIRS  ${HEPMC3_INCLUDE_DIRS}
+   LINK_LIBRARIES ${HEPMC3_HepMC3search_LIBRARY}  )
+
+else()
 # Component(s) in the package.
 atlas_add_library( AtlasHepMCLib
    AtlasHepMC/*.h
@@ -13,9 +37,16 @@ atlas_add_library( AtlasHepMCLib
    INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS}
    LINK_LIBRARIES ${_HEPMC_HepMC_library} )
 
+atlas_add_library( AtlasHepMCsearchLib
+   AtlasHepMC/*.h
+   INTERFACE
+   PUBLIC_HEADERS AtlasHepMC
+   INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS}  
+   )
 atlas_add_library( AtlasHepMCfioLib
    AtlasHepMC/*.h
    INTERFACE
    PUBLIC_HEADERS AtlasHepMC
    INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS}
    LINK_LIBRARIES ${_HEPMC_HepMCfio_library} )
+endif()
-- 
GitLab


From 9c41ab503b3e1643cd2d6d19c6d9684d130774dc Mon Sep 17 00:00:00 2001
From: rlongo <riccardo.longo@cern.ch>
Date: Sat, 9 May 2020 13:11:51 -0500
Subject: [PATCH 230/266] Migrated JetDecorators in HIJetSignificanceTool to MT
 safe new implementation

---
 .../HIJetRec/HIJetRec/HIJetSignificanceTool.h |  45 +++---
 .../HIJetRec/Root/HIJetSignificanceTool.cxx   | 136 +++++++++++-------
 2 files changed, 111 insertions(+), 70 deletions(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
index ca4c4b019c0c..a324b8bd5679 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
@@ -1,44 +1,53 @@
 // this file is -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-
-/**  
+/**
      @class HIJetSignificanceTool
+     @brief Modified by R.Longo on May 2020 to include new treatment for JetDecorations
 */
 
 #ifndef HIJETREC_HIJETSIGNIFICANCETOOL_H
 #define HIJETREC_HIJETSIGNIFICANCETOOL_H
 
-#include "JetRec/JetModifierBase.h"
+#include <string>
+
+#include "StoreGate/WriteDecorHandleKey.h"
+#include "JetInterface/IJetDecorator.h"
+#include "AsgTools/AsgTool.h"
+#include "StoreGate/WriteDecorHandleKey.h"
+
 #include "AsgTools/ToolHandle.h"
 
 
-class HIJetSignificanceTool: public JetModifierBase {
+class HIJetSignificanceTool: public asg::AsgTool,
+                             virtual public IJetDecorator
+{
   ASG_TOOL_CLASS0(HIJetSignificanceTool)
 
-public:
+ public:
   HIJetSignificanceTool(const std::string & name);
 
-  virtual int modifyJet(xAOD::Jet& ) const ;
-  
   virtual StatusCode initialize();
 
- private:
+  //The modifyJet function has to be replaced by decorate
+  //virtual int modifyJet(xAOD::Jet& ) const ;
+  virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
 
+ private:
 
-};
+ //New set of keys for decorations now needed + jet container name to initialize them automatically
 
-#endif
-// DoxygenDocumentation 
-/*! @class JetLArHVMoment
- @brief JetLArHVMoment
+ SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetSignificanceKey { this, "SignificanceKey", "SIGNIFICANCE", "Key for significance Jet attribute"};
+ SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCellSignificanceKey { this, "CellSignificanceKey", "CELL_SIGNIFICANCE", "Key for cell significance Jet attribute"};
+ SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCellSigSamplingKey { this, "CellSigSamplingKey", "CELL_SIG_SAMPLING", "Key for cell significance sampling Jet attribute"};
+ SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetNMaxSigTileKey { this, "NMaxSigTileKey", "N_MAX_SIG_TILE", "Key for N max sig tile Jet attribute"};
+ SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetSignificanceTileKey { this, "SignificanceTileKey", "SIGNIFICANCE_TILE", "Key for significance tile Jet attribute"};
 
+ Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
 
-Calculates the proportion of cells in a bad LAr HV area, and gives an information about the energy affected.
-(the second moment should change later).
+};
 
-</table>
-*/
+#endif
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
index f25acfedef4c..4195a81f156e 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
@@ -1,84 +1,116 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "StoreGate/WriteDecorHandle.h"
 
 #include "HIJetRec/HIJetSignificanceTool.h"
 #include "xAODCaloEvent/CaloCluster.h"
 
 HIJetSignificanceTool::HIJetSignificanceTool(const std::string& name)
-  : JetModifierBase(name)
+  : asg::AsgTool(name)
 {
+  declareInterface<IJetDecorator>(this);
 }
 
 
 StatusCode HIJetSignificanceTool::initialize()
 {
+  //First we chekc that jet container name is defined
+  if( m_jetContainerName.empty() ){
+    ATH_MSG_ERROR("HIJetSignificanceTool needs to have its input jet container name configured!");
+    return StatusCode::FAILURE;
+  }
+  //Preped Jet Container Name
+  m_jetSignificanceKey = m_jetContainerName + "." + m_jetSignificanceKey.key();
+  m_jetCellSignificanceKey = m_jetContainerName + "." + m_jetCellSignificanceKey.key();
+  m_jetCellSigSamplingKey = m_jetContainerName + "." + m_jetCellSigSamplingKey.key();
+  m_jetNMaxSigTileKey = m_jetContainerName + "." + m_jetNMaxSigTileKey.key();
+  m_jetSignificanceTileKey = m_jetContainerName + "." + m_jetSignificanceTileKey.key();
+
+  //Keys Initialization
+  ATH_CHECK( m_jetSignificanceKey.initialize() );
+  ATH_CHECK( m_jetCellSignificanceKey.initialize() );
+  ATH_CHECK( m_jetCellSigSamplingKey.initialize() );
+  ATH_CHECK( m_jetNMaxSigTileKey.initialize() );
+  ATH_CHECK( m_jetSignificanceTileKey.initialize() );
+
   return StatusCode::SUCCESS;
 }
 
 
-int HIJetSignificanceTool::modifyJet( xAOD::Jet& jet ) const 
+StatusCode HIJetSignificanceTool::decorate( const xAOD::JetContainer& jets ) const
 {
-  float significance=0;
-  float cell_sig=0;
-  int cell_sig_sampling=-1;
-  int n_sig_max_tile=0;
-  float sig_tile=0;
-  float E_tile=0;
-  const xAOD::JetConstituentVector constituents = jet.getConstituents();
-
-  for(xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) 
-
+  //From decor keys to handlers
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetSignificanceDecorHandle( m_jetSignificanceKey );
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetCellSignificanceDecorHandle ( m_jetCellSignificanceKey );
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetCellSigSamplingDecorHandle ( m_jetCellSigSamplingKey );
+  SG::WriteDecorHandle<xAOD::JetContainer, int  > jetNMaxSigTileDecorHandle ( m_jetNMaxSigTileKey );
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetSignificanceTileDecorHandle ( m_jetSignificanceTileKey );
+
+  //Here we were passing through JetConstituentVector. Now we access this directly and in a loop of jets, not for single instances
+  //const xAOD::JetConstituentVector constituents = jets.getConstituents();
+  //for(xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr)
+  for(const xAOD::Jet* jet : jets)
   {
-    const xAOD::CaloCluster* cl=static_cast<const xAOD::CaloCluster*>( itr->rawConstituent() );
-    if( !cl) continue;
+    float significance=0;
+    float cell_sig=0;
+    int cell_sig_sampling=-1;
+    int n_sig_max_tile=0;
+    float sig_tile=0;
+    float E_tile=0;
+    // loop over raw constituents. Look for clusters
+    size_t num = jet->numConstituents();
+    for(size_t i = 0; i < num; i++)
+    {
+      const xAOD::CaloCluster* cl=static_cast<const xAOD::CaloCluster*>( (jet->rawConstituent(i)) );
+      if( !cl) continue;
 
-    double m=0;
-    double m2=0;
-    unsigned int samp_max=CaloSampling::Unknown;
+      double m=0;
+      double m2=0;
+      unsigned int samp_max=CaloSampling::Unknown;
 
 
-    double cl_E=cl->altE(); //signifiance moments were computed from unsubtracted cell energies
-    double sigma_cl=0;
+      double cl_E=cl->altE(); //signifiance moments were computed from unsubtracted cell energies
+      double sigma_cl=0;
 
-    for(unsigned int isample=12; isample<21; isample++) E_tile+=cl->eSample( (CaloSampling::CaloSample) isample);
+      for(unsigned int isample=12; isample<21; isample++) E_tile+=cl->eSample( (CaloSampling::CaloSample) isample);
 
-    if(cl->retrieveMoment(xAOD::CaloCluster::SIGNIFICANCE,m) ) 
-    {
-      sigma_cl=cl_E/m;
-      significance+=sigma_cl*sigma_cl;
-    }
-    if(cl->retrieveMoment(xAOD::CaloCluster::CELL_SIG_SAMPLING,m2))
-    {
-      samp_max=static_cast<unsigned int>(m2);
-      if(CaloSampling::getSamplingName(samp_max).find("Tile")!=std::string::npos) 
+      if(cl->retrieveMoment(xAOD::CaloCluster::SIGNIFICANCE,m) )
       {
-	n_sig_max_tile++;
-	sig_tile+=sigma_cl*sigma_cl;
+        sigma_cl=cl_E/m;
+        significance+=sigma_cl*sigma_cl;
       }
-    }
-    
-    if( cl->retrieveMoment(xAOD::CaloCluster::CELL_SIGNIFICANCE,m) )
-    {
-      if( m > cell_sig )
+      if(cl->retrieveMoment(xAOD::CaloCluster::CELL_SIG_SAMPLING,m2))
       {
-	cell_sig=m;
-	if(samp_max!=CaloSampling::Unknown) cell_sig_sampling=samp_max;
+        samp_max=static_cast<unsigned int>(m2);
+        if(CaloSampling::getSamplingName(samp_max).find("Tile")!=std::string::npos)
+        {
+        	n_sig_max_tile++;
+        	sig_tile+=sigma_cl*sigma_cl;
+        }
+      }
+
+      if( cl->retrieveMoment(xAOD::CaloCluster::CELL_SIGNIFICANCE,m) )
+      {
+        if( m > cell_sig )
+        {
+        	cell_sig=m;
+        	if(samp_max!=CaloSampling::Unknown) cell_sig_sampling=samp_max;
+        }
       }
     }
-  }
-  significance=jet.jetP4(xAOD::JetEMScaleMomentum).E()/std::sqrt(significance);
-  sig_tile=E_tile/std::sqrt(sig_tile);
-
-  // set the attributes
-  jet.setAttribute<float>("SIGNIFICANCE",significance);
-  jet.setAttribute<float>("CELL_SIGNIFICANCE",cell_sig);
-  jet.setAttribute<int>("CELL_SIG_SAMPLING", cell_sig_sampling);
-  jet.setAttribute<int>("N_MAX_SIG_TILE", n_sig_max_tile);
-  jet.setAttribute<float>("SIGNIFICANCE_TILE", sig_tile);
-    
-  return 0;
-}
+    significance=jet->jetP4(xAOD::JetEMScaleMomentum).E()/std::sqrt(significance);
+    sig_tile=E_tile/std::sqrt(sig_tile);
+
+    // set the attributes
+    jetSignificanceDecorHandle(*jet) = significance;
+    jetCellSignificanceDecorHandle(*jet) = cell_sig;
+    jetCellSigSamplingDecorHandle(*jet) = cell_sig_sampling;
+    jetNMaxSigTileDecorHandle(*jet) = n_sig_max_tile;
+    jetSignificanceTileDecorHandle(*jet) = sig_tile;
 
+  }//End of loop over jets
 
+  return StatusCode::SUCCESS;
+}
-- 
GitLab


From 9a9fd817782bf885a3faf97458ad0247e269dc61 Mon Sep 17 00:00:00 2001
From: rlongo <riccardo.longo@cern.ch>
Date: Sun, 10 May 2020 02:59:20 -0500
Subject: [PATCH 231/266] Migrated JetDecorators in HIJetMaxOverMeanTool to MT
 safe new implementation (+ fix in previous commit, omitted const)

---
 .../HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h  | 26 +++++--
 .../HIJetRec/HIJetRec/HIJetSignificanceTool.h |  1 -
 .../HIJetRec/Root/HIJetMaxOverMeanTool.cxx    | 68 +++++++++++++------
 3 files changed, 67 insertions(+), 28 deletions(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h
index 8fda755ce907..5dc7e7707770 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // HIJetMaxOverMeanTool.h
@@ -20,21 +20,33 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 
-#include "JetRec/JetModifierBase.h"
+#include "StoreGate/WriteDecorHandleKey.h"
+#include "JetInterface/IJetDecorator.h"
+#include "AsgTools/AsgTool.h"
 
-class HIJetMaxOverMeanTool : public JetModifierBase
+class HIJetMaxOverMeanTool : public asg::AsgTool,
+                             virtual public IJetDecorator
 {
 
   ASG_TOOL_CLASS0(HIJetMaxOverMeanTool)
 
 public:
-    
+
   HIJetMaxOverMeanTool(const std::string& t);
 
-  /// \brief Implementing abstract methods from base
-  int modifyJet(xAOD::Jet& jet) const;
+  virtual StatusCode initialize() override;
+
+  //The modifyJet function has to be replaced by decorate
+  //virtual int modifyJet(xAOD::Jet& ) const ;
+  virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
+
+private:
+
+  SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetMaxConstituentETKey { this, "MaxConstituentETKey", "MaxConstituentET", "Key for MaxConstituentET tile Jet attribute"};
+  SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetMaxOverMeanKey { this, "MaxOverMeanKey", "MaxOverMean", "Key for MaxOverMean tile Jet attribute"};
+
+  Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
 
-    
 };
 
 #endif
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
index a324b8bd5679..b97f8d174030 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
@@ -17,7 +17,6 @@
 #include "StoreGate/WriteDecorHandleKey.h"
 #include "JetInterface/IJetDecorator.h"
 #include "AsgTools/AsgTool.h"
-#include "StoreGate/WriteDecorHandleKey.h"
 
 #include "AsgTools/ToolHandle.h"
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
index b35841cdd579..72cd911bc7a1 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
@@ -1,32 +1,60 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
+#include "StoreGate/WriteDecorHandle.h"
 
 #include "HIJetRec/HIJetMaxOverMeanTool.h"
 
-HIJetMaxOverMeanTool::HIJetMaxOverMeanTool(const std::string& t) : JetModifierBase(t)
+HIJetMaxOverMeanTool::HIJetMaxOverMeanTool(const std::string& t) : asg::AsgTool(t)
 {
+  declareInterface<IJetDecorator>(this);
 }
 
-int HIJetMaxOverMeanTool::modifyJet(xAOD::Jet& jet) const 
+
+StatusCode HIJetMaxOverMeanTool::initialize()
 {
-  float max=-999;
-  float sum=0;
-  float count=0;
-  const xAOD::JetConstituentVector constituents = jet.getConstituents();
-  for (xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) 
+  if( m_jetContainerName.empty() ){
+    ATH_MSG_ERROR("HIJetMaxOverMeanTool needs to have its input jet container name configured!");
+    return StatusCode::FAILURE;
+  }
+  //Preped Jet Container Name
+  m_jetMaxConstituentETKey = m_jetContainerName + "." + m_jetMaxConstituentETKey.key();
+  m_jetMaxOverMeanKey = m_jetContainerName + "." + m_jetMaxOverMeanKey.key();
+
+  ATH_CHECK( m_jetMaxConstituentETKey.initialize() );
+  ATH_CHECK( m_jetMaxOverMeanKey.initialize() );
+
+  return StatusCode::SUCCESS;
+
+}
+
+ StatusCode HIJetMaxOverMeanTool::decorate(const xAOD::JetContainer& jets) const
+ {
+  //Decorator handlers
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetMaxConstituentETDecorHandle( m_jetMaxConstituentETKey );
+  SG::WriteDecorHandle<xAOD::JetContainer, float> jetMaxOverMeanDecorHandle ( m_jetMaxOverMeanKey );
+  for(const xAOD::Jet* jet : jets)
   {
-    float et=(*itr)->e()/std::cosh((*itr)->eta());
-    if(et > max) max=et;
-    sum+=et;
-    count++;
+    float max=-999;
+    float sum=0;
+    float count=0;
+    const xAOD::JetConstituentVector constituents = jet->getConstituents();
+    for (xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr)
+    {
+      float et=(*itr)->e()/std::cosh((*itr)->eta());
+      if(et > max) max=et;
+      sum+=et;
+      count++;
+    }
+    if(count==0.) sum=0;
+    else sum/=count;
+    float D=0;
+    if(sum!=0.) D=max/sum;
+
+    // set the attributes
+    jetMaxConstituentETDecorHandle(*jet) = max;
+    jetMaxOverMeanDecorHandle(*jet) = D;
+
   }
-  if(count==0.) sum=0;
-  else sum/=count;
-  float D=0;
-  if(sum!=0.) D=max/sum;
-
-  jet.setAttribute("MaxConstituentET",max);
-  jet.setAttribute("MaxOverMean",D);
-  return 0;
+  return StatusCode::SUCCESS;
 }
-- 
GitLab


From 774c15cb822098bf5fd05bb167d902c3c2b2f2f8 Mon Sep 17 00:00:00 2001
From: rlongo <riccardo.longo@cern.ch>
Date: Mon, 11 May 2020 22:19:06 -0500
Subject: [PATCH 232/266] Few adjustments to HIClusterSubtraction, still mostly
 commented out

---
 .../HIJetRec/src/HIClusterSubtraction.cxx     | 43 ++++++++-----------
 .../HIJetRec/src/HIClusterSubtraction.h       |  4 +-
 ...MonitoringJobOptions_forRecExCommission.py |  1 +
 3 files changed, 22 insertions(+), 26 deletions(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
index 651947798b52..9ce49e51ecf3 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
@@ -11,6 +11,7 @@
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
 
+class ISvcLocator;
 //**********************************************************************
 
 HIClusterSubtraction::HIClusterSubtraction(std::string name) : asg::AsgTool(name)//,
@@ -39,31 +40,25 @@ int HIClusterSubtraction::execute() const
 
   //const jet::cellset_t & badcells = badCellMap.cells() ;
   //retrieve UE
-	//From here on temporarily commented out code bc decorators needs a dedicated treatment in MT
+	//From here on temporarily commented out code bc needs a dedicated treatment in MT to compile
+	//In rel 21 we were updating a non-const CaloCalusterContainer. That approach is no more acceptable in Athena MT
 	//const xAOD::HIEventShapeContainer* shape = 0;
-	SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey );
+	//SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey );
   //shape = readHandleEvtShape.get();
   ATH_MSG_WARNING("HIClusterSubtraction not yet migrated to MT. Currently disabled! ");
   //const HIEventShapeIndex* es_index = HIEventShapeMap::getIndex( m_eventShapeKey.key() );
 
   const xAOD::HIEventShape* eshape = nullptr;
-  //Hibryd merging between commit c2aeaed0 to master and 5af8a733 to 21.0ss
   CHECK(m_modulatorTool->getShape(eshape), 1);
-	//This part regards decoration!
-	//Needs a more deep implementation to work in MT - to be discussed w/ Bill Balunas
-	//Will be fronted in the next step of the migration
-  /*
-	SG::ReadHandle<xAOD::CaloClusterContainer>  read_handle_clusters ( m_clusterKey );
-	if (!read_handle_clusters.isValid())
-	{
-		ATH_MSG_ERROR("Could not retrieve input CaloClusterContainer " << m_clusterKey.key() );
-		return 1;
-	}
-	const xAOD::CaloClusterContainer* ccl=0;
+
+	/*
+
+	SG::ReadHandle<xAOD::CaloClusterContainer>  readHandleClusters ( m_clusterKey );
+
   if(m_updateMode)
   {
-		ccl = read_handle_clusters.get();
-    //if(evtStore()->retrieve(ccl,m_clusterKey).isFailure())
+		const xAOD::CaloClusterContainer* ccl = nullptr;
+		ccl = readHandleClusters.cptr();
     std::unique_ptr<std::vector<float> > subtractedE(new std::vector<float>());
     subtractedE->reserve(ccl->size());
 		//Decoration TODO: check for migration
@@ -73,23 +68,23 @@ int HIClusterSubtraction::execute() const
     {
       const xAOD::CaloCluster* cl=*itr;
       xAOD::IParticle::FourMom_t p4;
-      m_subtractorTool->Subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
+      m_subtractorTool->subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
       subtractedE->push_back(p4.E());
       decorator(*cl)=p4.E();
     }
   }
   else
   {
-		xAOD::CaloClusterContainer* ccl=0;
-		ccl = read_handle_clusters.get();
+		xAOD::CaloClusterContainer* ccl = nullptr;
+		ccl = readNonConstHandleCluster.ptr();
     for(xAOD::CaloClusterContainer::iterator itr=ccl->begin(); itr!=ccl->end(); itr++)
     {
-      xAOD::CaloCluster* cl=*itr;
+      const xAOD::CaloCluster* cl=*itr;
       xAOD::IParticle::FourMom_t p4;
-      if(m_setMoments) m_subtractorTool->SubtractWithMoments(cl, shape, es_index, m_modulatorTool, eshape);
+      if(m_setMoments) m_subtractorTool->subtractWithMoments(cl, shape, es_index, m_modulatorTool, eshape);
       else
       {
-					m_subtractorTool->Subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
+					m_subtractorTool->subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
 					HIJetRec::setClusterP4(p4,cl,HIJetRec::subtractedClusterState());
       }
     }
@@ -98,9 +93,7 @@ int HIClusterSubtraction::execute() const
     {
       ATH_MSG_DEBUG(" Applying correction = " << (*toolIt)->name() );
 			CHECK((*toolIt)->execute(Gaudi::Hive::currentContext(), ccl), 1);
-			//Hibryd merging between commit c2aeaed0 to master and 5af8a733 to 21.0
-			//eventually needs to be changed to following for r21:
-			//CHECK((*toolIt)->execute(ccl), 1);
+
     }//End loop over correction tools
   }*/
   return 0;
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
index 44e53ca88ff3..530372c5994d 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
@@ -40,9 +40,11 @@ class HIClusterSubtraction : virtual public asg::AsgTool,
   ASG_TOOL_CLASS(HIClusterSubtraction,IJetExecuteTool)
 public:
   HIClusterSubtraction(std::string name);
-  virtual StatusCode initialize();
+
   virtual ~HIClusterSubtraction() {};
 
+	virtual StatusCode initialize();
+
   virtual int execute() const;
 
 
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
index 7451e62b3f6e..85bce8ac7659 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
@@ -46,6 +46,7 @@ from TrigT1CTMonitoring.TrigT1CTMonitoringConfig import *
 from AthenaCommon.AppMgr import ToolSvc as toolSvc
 from TrigT1CTMonitoring.TrigT1CTMonitoringConf import TrigT1CTMonitoring__BSMonitoring as BSMon
 
+isOnline=False
 #-----------ONLINE CODE---------------------
 if isOnline and jp.ConcurrencyFlags.NumThreads() == 0:
     #from TrigServices.TrigServicesConf import TrigMonTHistSvc
-- 
GitLab


From d712a537cd5eb50280e67b0c9fa508380f441be6 Mon Sep 17 00:00:00 2001
From: rlongo <riccardo.longo@cern.ch>
Date: Fri, 12 Jun 2020 12:50:31 -0500
Subject: [PATCH 233/266] Restored master situation for HIClusterSubtraction
 code. This will be handled in a separate MR

---
 .../HIJetRec/src/HIClusterSubtraction.cxx     | 43 +++++++++++--------
 .../HIJetRec/src/HIClusterSubtraction.h       |  4 +-
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
index 9ce49e51ecf3..651947798b52 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
@@ -11,7 +11,6 @@
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
 
-class ISvcLocator;
 //**********************************************************************
 
 HIClusterSubtraction::HIClusterSubtraction(std::string name) : asg::AsgTool(name)//,
@@ -40,25 +39,31 @@ int HIClusterSubtraction::execute() const
 
   //const jet::cellset_t & badcells = badCellMap.cells() ;
   //retrieve UE
-	//From here on temporarily commented out code bc needs a dedicated treatment in MT to compile
-	//In rel 21 we were updating a non-const CaloCalusterContainer. That approach is no more acceptable in Athena MT
+	//From here on temporarily commented out code bc decorators needs a dedicated treatment in MT
 	//const xAOD::HIEventShapeContainer* shape = 0;
-	//SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey );
+	SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey );
   //shape = readHandleEvtShape.get();
   ATH_MSG_WARNING("HIClusterSubtraction not yet migrated to MT. Currently disabled! ");
   //const HIEventShapeIndex* es_index = HIEventShapeMap::getIndex( m_eventShapeKey.key() );
 
   const xAOD::HIEventShape* eshape = nullptr;
+  //Hibryd merging between commit c2aeaed0 to master and 5af8a733 to 21.0ss
   CHECK(m_modulatorTool->getShape(eshape), 1);
-
-	/*
-
-	SG::ReadHandle<xAOD::CaloClusterContainer>  readHandleClusters ( m_clusterKey );
-
+	//This part regards decoration!
+	//Needs a more deep implementation to work in MT - to be discussed w/ Bill Balunas
+	//Will be fronted in the next step of the migration
+  /*
+	SG::ReadHandle<xAOD::CaloClusterContainer>  read_handle_clusters ( m_clusterKey );
+	if (!read_handle_clusters.isValid())
+	{
+		ATH_MSG_ERROR("Could not retrieve input CaloClusterContainer " << m_clusterKey.key() );
+		return 1;
+	}
+	const xAOD::CaloClusterContainer* ccl=0;
   if(m_updateMode)
   {
-		const xAOD::CaloClusterContainer* ccl = nullptr;
-		ccl = readHandleClusters.cptr();
+		ccl = read_handle_clusters.get();
+    //if(evtStore()->retrieve(ccl,m_clusterKey).isFailure())
     std::unique_ptr<std::vector<float> > subtractedE(new std::vector<float>());
     subtractedE->reserve(ccl->size());
 		//Decoration TODO: check for migration
@@ -68,23 +73,23 @@ int HIClusterSubtraction::execute() const
     {
       const xAOD::CaloCluster* cl=*itr;
       xAOD::IParticle::FourMom_t p4;
-      m_subtractorTool->subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
+      m_subtractorTool->Subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
       subtractedE->push_back(p4.E());
       decorator(*cl)=p4.E();
     }
   }
   else
   {
-		xAOD::CaloClusterContainer* ccl = nullptr;
-		ccl = readNonConstHandleCluster.ptr();
+		xAOD::CaloClusterContainer* ccl=0;
+		ccl = read_handle_clusters.get();
     for(xAOD::CaloClusterContainer::iterator itr=ccl->begin(); itr!=ccl->end(); itr++)
     {
-      const xAOD::CaloCluster* cl=*itr;
+      xAOD::CaloCluster* cl=*itr;
       xAOD::IParticle::FourMom_t p4;
-      if(m_setMoments) m_subtractorTool->subtractWithMoments(cl, shape, es_index, m_modulatorTool, eshape);
+      if(m_setMoments) m_subtractorTool->SubtractWithMoments(cl, shape, es_index, m_modulatorTool, eshape);
       else
       {
-					m_subtractorTool->subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
+					m_subtractorTool->Subtract(p4,cl,shape,es_index,m_modulatorTool,eshape);
 					HIJetRec::setClusterP4(p4,cl,HIJetRec::subtractedClusterState());
       }
     }
@@ -93,7 +98,9 @@ int HIClusterSubtraction::execute() const
     {
       ATH_MSG_DEBUG(" Applying correction = " << (*toolIt)->name() );
 			CHECK((*toolIt)->execute(Gaudi::Hive::currentContext(), ccl), 1);
-
+			//Hibryd merging between commit c2aeaed0 to master and 5af8a733 to 21.0
+			//eventually needs to be changed to following for r21:
+			//CHECK((*toolIt)->execute(ccl), 1);
     }//End loop over correction tools
   }*/
   return 0;
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
index 530372c5994d..44e53ca88ff3 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
@@ -40,11 +40,9 @@ class HIClusterSubtraction : virtual public asg::AsgTool,
   ASG_TOOL_CLASS(HIClusterSubtraction,IJetExecuteTool)
 public:
   HIClusterSubtraction(std::string name);
-
+  virtual StatusCode initialize();
   virtual ~HIClusterSubtraction() {};
 
-	virtual StatusCode initialize();
-
   virtual int execute() const;
 
 
-- 
GitLab


From a0debf77ff646c0fcd11c6edf3137c5782451c26 Mon Sep 17 00:00:00 2001
From: Adam Edward Barton <adam.edward.barton@cern.ch>
Date: Thu, 11 Jun 2020 14:29:20 +0100
Subject: [PATCH 234/266] Rework IDC overlay for faster access

---
 .../InDetOverlay/src/TRTOverlay.cxx           | 22 ++++++++---------
 .../MuonOverlay/CscOverlay/src/CscOverlay.cxx | 21 +++++++---------
 .../MuonOverlayBase/IDC_MuonOverlayBase.icc   | 24 ++++++++-----------
 .../IDC_OverlayBase/IDC_OverlayBase.icc       | 24 +++++++++----------
 4 files changed, 40 insertions(+), 51 deletions(-)

diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx
index c7b73f5877ae..0b6a8f1b013a 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx
@@ -147,15 +147,13 @@ StatusCode TRTOverlay::overlayContainer(const TRT_RDO_Container *bkgContainer,
                                         TRT_RDO_Container *outputContainer,
                                         const InDetSimDataCollection *signalSDOCollection) const
 {
-  // Get all the hashes for the signal container
-  const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes();
 
   // There are some use cases where background is empty
   if (!bkgContainer) {
     // Only loop through the signal collections and copy them over
-    for (const IdentifierHash &hashId : signalHashes) {
+    for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
       // Copy the signal collection
-      std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId));
+      std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, ptr);
 
       if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) {
         ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed");
@@ -176,21 +174,21 @@ StatusCode TRTOverlay::overlayContainer(const TRT_RDO_Container *bkgContainer,
   // Retrieve the occupancy map
   std::map<int, double> occupancyMap = m_TRT_LocalOccupancyTool->getDetectorOccupancy(bkgContainer);
 
-  // Get all the hashes for the background container
-  const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes();
 
   // The MC signal container should typically be smaller than bkgContainer,
   // because the latter contains all the noise, minimum bias and pile up.
   // Thus we firstly iterate over signal hashes and store them in a map.
-  std::map<IdentifierHash, bool> overlapMap;
-  for (const IdentifierHash &hashId : signalHashes) {
-    overlapMap.emplace(hashId, false);
+  std::vector < std::pair<IdentifierHash, bool> > overlapMap;
+  overlapMap.reserve(signalContainer->numberOfCollections());
+  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
+    overlapMap.emplace_back(hashId, false);
   }
 
   // Now loop through the background hashes and copy unique ones over
-  for (const IdentifierHash &hashId : bkgHashes) {
-    auto search = overlapMap.find(hashId);
-    if (search == overlapMap.end()) {
+  for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) {
+    auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId,
+     [](const std::pair<IdentifierHash, bool> &lhs,  IdentifierHash rhs) -> bool { return lhs.first < rhs; } );
+    if (search == overlapMap.end() || search->first != hashId) {
       // Copy the background collection
       std::unique_ptr<TRT_RDO_Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId));
 
diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
index 74304be5f72f..d5003a1764a9 100644
--- a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
+++ b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
@@ -82,25 +82,22 @@ StatusCode CscOverlay::overlayContainer(const CscRawDataContainer *bkgContainer,
 {
   ATH_MSG_DEBUG("overlayContainer() begin");
 
-  // Get all the hashes for the signal and background containers
-  const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes();
-  const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes();
-
   // The MC signal container should typically be smaller than bkgContainer,
   // because the latter contains all the noise, minimum bias and pile up.
   // Thus we firstly iterate over signal hashes and store them in a map.
-  std::map<IdentifierHash, bool> overlapMap;
-  for (const IdentifierHash &hashId : signalHashes) {
-    overlapMap.emplace(hashId, false);
+  std::vector < std::pair<IdentifierHash, bool> > overlapMap;
+  overlapMap.reserve(signalContainer->numberOfCollections());
+  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
+    overlapMap.emplace_back(hashId, false);
   }
 
   // Now loop through the background hashes and copy unique ones over
-  for (const IdentifierHash &hashId : bkgHashes) {
-    auto search = overlapMap.find(hashId);
-    if (search == overlapMap.end()) {
+  for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) {
+    auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId,
+     [](const std::pair<IdentifierHash, bool> &lhs,  IdentifierHash rhs) -> bool { return lhs.first < rhs; } );
+    if (search == overlapMap.end() || search->first != hashId) {
       // Copy the background collection
-      std::unique_ptr<CscRawDataCollection> bkgCollection
-        = copyCollection(bkgContainer->indexFindPtr(hashId));
+      std::unique_ptr<CscRawDataCollection> bkgCollection  = copyCollection(ptr);
 
       if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) {
         ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed");
diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc
index 0b8723c1854c..31d061dfdced 100644
--- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc
+++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc
@@ -41,15 +41,12 @@ StatusCode IDC_MuonOverlayBase::overlayContainerBase(const IDC_Container *bkgCon
 
   ATH_MSG_DEBUG("overlayContainer<>() begin");
 
-  // Get all the hashes for the signal container
-  const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes();
-
   // There are some use cases where background is empty
   if (!bkgContainer) {
     // Only loop through the signal collections and copy them over
-    for (const IdentifierHash &hashId : signalHashes) {
+    for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
       // Copy the signal collection
-      std::unique_ptr<Collection> signalCollection = copyCollection(hashId, signalContainer->indexFindPtr(hashId));
+      std::unique_ptr<Collection> signalCollection = copyCollection(hashId, ptr);
 
       if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) {
         ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed");
@@ -62,21 +59,20 @@ StatusCode IDC_MuonOverlayBase::overlayContainerBase(const IDC_Container *bkgCon
     return StatusCode::SUCCESS;
   }
 
-  // Get all the hashes for the background container
-  const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes();
-
   // The MC signal container should typically be smaller than bkgContainer,
   // because the latter contains all the noise, minimum bias and pile up.
   // Thus we firstly iterate over signal hashes and store them in a map.
-  std::map<IdentifierHash, bool> overlapMap;
-  for (const IdentifierHash &hashId : signalHashes) {
-    overlapMap.emplace(hashId, false);
+  std::vector < std::pair<IdentifierHash, bool> > overlapMap;
+  overlapMap.reserve(signalContainer->numberOfCollections());
+  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
+    overlapMap.emplace_back(hashId, false);
   }
 
   // Now loop through the background hashes and copy unique ones over
-  for (const IdentifierHash &hashId : bkgHashes) {
-    auto search = overlapMap.find(hashId);
-    if (search == overlapMap.end()) {
+  for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) {
+    auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId,
+     [](const std::pair<IdentifierHash, bool> &lhs,  IdentifierHash rhs) -> bool { return lhs.first < rhs; } );
+    if (search == overlapMap.end() || search->first != hashId) {
       // Copy the background collection
       std::unique_ptr<Collection> bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId));
 
diff --git a/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc b/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc
index 084c7dd45373..6717791a367a 100644
--- a/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc
+++ b/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc
@@ -20,15 +20,13 @@ StatusCode IDC_OverlayBase::overlayContainer(const IDC_Container *bkgContainer,
 
   typedef typename IDC_Container::base_value_type Collection;
 
-  // Get all the hashes for the signal container
-  const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes();
 
   // There are some use cases where background is empty
   if (!bkgContainer) {
     // Only loop through the signal collections and copy them over
-    for (const IdentifierHash &hashId : signalHashes) {
+    for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
       // Copy the signal collection
-      std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId));
+      std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, ptr);
 
       if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) {
         ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed");
@@ -41,23 +39,23 @@ StatusCode IDC_OverlayBase::overlayContainer(const IDC_Container *bkgContainer,
     return StatusCode::SUCCESS;
   }
 
-  // Get all the hashes for the background container
-  const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes();
   
   // The MC signal container should typically be smaller than bkgContainer,
   // because the latter contains all the noise, minimum bias and pile up.
   // Thus we firstly iterate over signal hashes and store them in a map.
-  std::map<IdentifierHash, bool> overlapMap;
-  for (const IdentifierHash &hashId : signalHashes) {
-    overlapMap.emplace(hashId, false);
+  std::vector < std::pair<IdentifierHash, bool> > overlapMap;
+  overlapMap.reserve(signalContainer->numberOfCollections());
+  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
+    overlapMap.emplace_back(hashId, false);
   }
 
   // Now loop through the background hashes and copy unique ones over
-  for (const IdentifierHash &hashId : bkgHashes) {
-    auto search = overlapMap.find(hashId);
-    if (search == overlapMap.end()) {
+  for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) {
+    auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId,
+       [](const std::pair<IdentifierHash, bool> &lhs,  IdentifierHash rhs) -> bool { return lhs.first < rhs; } );
+    if (search == overlapMap.end() || search->first != hashId) {
       // Copy the background collection
-      std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId));
+      std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, ptr);
 
       if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) {
         ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed");
-- 
GitLab


From 6c45036b3875f722b870bf7c39af196c03e19db5 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 12 Jun 2020 16:38:32 +0200
Subject: [PATCH 235/266] EventContainers: cmake fix

Remove use of undefined ROOT macros.
---
 Event/EventContainers/CMakeLists.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Event/EventContainers/CMakeLists.txt b/Event/EventContainers/CMakeLists.txt
index 35dd15112721..13966852d9b4 100644
--- a/Event/EventContainers/CMakeLists.txt
+++ b/Event/EventContainers/CMakeLists.txt
@@ -23,8 +23,7 @@ atlas_add_library( EventContainers
 atlas_add_dictionary( EventContainersDict
                       EventContainers/EventContainersDict.h
                       EventContainers/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} EventContainers )
+                      LINK_LIBRARIES EventContainers )
 
 
 atlas_add_test( IdCont SOURCES test/ID_ContainerTest.cxx
@@ -50,4 +49,4 @@ atlas_add_test( IDBenchTest SOURCES test/IDC_Benchmark.cxx
                 INCLUDE_DIRS src test EventContainers
                 LINK_LIBRARIES Identifier AthenaKernel GaudiKernel EventContainers
                 LOG_IGNORE_PATTERN "time"
-              )
\ No newline at end of file
+              )
-- 
GitLab


From 13057b37e6cbc3054032bd27fdc91bdb7e7bcd75 Mon Sep 17 00:00:00 2001
From: rlongo <riccardo.longo@cern.ch>
Date: Fri, 12 Jun 2020 18:24:46 -0500
Subject: [PATCH 236/266] Erased unwanted modification in the merge request on
 the Trigger package

---
 .../share/TrigT1CTMonitoringJobOptions_forRecExCommission.py     | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
index 85bce8ac7659..7451e62b3f6e 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
@@ -46,7 +46,6 @@ from TrigT1CTMonitoring.TrigT1CTMonitoringConfig import *
 from AthenaCommon.AppMgr import ToolSvc as toolSvc
 from TrigT1CTMonitoring.TrigT1CTMonitoringConf import TrigT1CTMonitoring__BSMonitoring as BSMon
 
-isOnline=False
 #-----------ONLINE CODE---------------------
 if isOnline and jp.ConcurrencyFlags.NumThreads() == 0:
     #from TrigServices.TrigServicesConf import TrigMonTHistSvc
-- 
GitLab


From b258ed98606541013cb2389acd27a6603ea8d760 Mon Sep 17 00:00:00 2001
From: ktaniguc <guchiwo7@gmail.com>
Date: Sat, 13 Jun 2020 09:05:27 +0900
Subject: [PATCH 237/266] remove unnecessary lines in TgcDataPreparator and
 RpcRoadDefiner

---
 .../TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h     |  3 ---
 .../TrigL2MuonSA/src/RpcRoadDefiner.cxx            | 13 +------------
 .../TrigL2MuonSA/src/TgcDataPreparator.cxx         | 14 +++++---------
 3 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
index a3d3e6e81cee..b2f5ef5aea48 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h
@@ -36,7 +36,6 @@ class RpcRoadDefiner: public AthAlgTool
                  const IInterface*  parent);
 
   virtual StatusCode initialize() override;
-  virtual StatusCode finalize  () override;
   
  public:
   StatusCode defineRoad(const LVL1::RecMuonRoI*      p_roi,
@@ -58,8 +57,6 @@ class RpcRoadDefiner: public AthAlgTool
   float fp(float x, float c33, float c22, float c1) const;
 
  private:
-  const BarrelRoadData*  m_roadData{nullptr};
-
   double m_rWidth_RPC_Failed{0};
   bool m_use_rpc{true};
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
index dbf9f5136de6..7f753f214dc4 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx
@@ -42,8 +42,6 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
                                                     double                       roiEtaMaxHigh)
 {
 
-  if (!m_roadData) m_roadData = new BarrelRoadData();
-  
   const double ZERO_LIMIT = 1e-5;
   
   const int N_LAYER = 5; // 0: inner, 1: middle, 2: outer 4: BME 5: BMG
@@ -216,14 +214,5 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI*
   return StatusCode::SUCCESS;
 }
 
-// --------------------------------------------------------------------------------                  
-// --------------------------------------------------------------------------------                  
-
-StatusCode TrigL2MuonSA::RpcRoadDefiner::finalize()
-{
-  if (m_roadData) delete m_roadData;
-  return StatusCode::SUCCESS;
-}
-
-// --------------------------------------------------------------------------------                  
+// --------------------------------------------------------------------------------  
 // --------------------------------------------------------------------------------                  
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
index 259ddf74e076..b4a5f877bebd 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
@@ -133,9 +133,8 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    std::vector<float> ov_dphi;
    ov_dphi.clear();
    for( const Muon::TgcPrepDataCollection* wi : *tgcPrepContainer ) { // loop over collections
-     const Muon::TgcPrepDataCollection* colwi = wi;
-     if( !colwi ) continue;
-     for( const Muon::TgcPrepData* cwi : *colwi ){ // loop over data in the collection
+     if( !wi ) continue;
+     for( const Muon::TgcPrepData* cwi : *wi ){ // loop over data in the collection
        if( !cwi ) continue;
        const Muon::TgcPrepData& prepDataWi = *cwi;
        if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataWi.identify())) {//wire
@@ -164,9 +163,8 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    int num_min_hits=0;
    int num_second_hits=0;
    for( const Muon::TgcPrepDataCollection* hit : *tgcPrepContainer ) { // loop over collections
-     const Muon::TgcPrepDataCollection* colhit = hit;
-     if( !colhit ) continue;
-     for( const Muon::TgcPrepData* chit : *colhit ){ // loop over data in the collection
+     if( !hit ) continue;
+     for( const Muon::TgcPrepData* chit : *hit ){ // loop over data in the collection
        if( !chit ) continue;
        const Muon::TgcPrepData& prepDataHit = *chit;
        if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataHit.identify())) {//strip
@@ -188,12 +186,10 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
      else useDefault=true;
    }
 
-   for( const Muon::TgcPrepDataCollection* it : *tgcPrepContainer ) { // loop over collections
-     const Muon::TgcPrepDataCollection* col = it;
+   for( const Muon::TgcPrepDataCollection* col : *tgcPrepContainer ) { // loop over collections
      if( !col ) continue;
      for( const Muon::TgcPrepData* cit : *col ){ // loop over data in the collection
        if( !cit ) continue;
-       
        const Muon::TgcPrepData& prepData = *cit;
        
        bool isInRoad = false;
-- 
GitLab


From 1e820a5398b80c99b68a6dcd5e7799c101a77c7b Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 12 Jun 2020 16:38:47 +0200
Subject: [PATCH 238/266] LumiBlockComps: cmake fix

Remove reference to nonexistent source file.
---
 LumiBlock/LumiBlockComps/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt
index d954796bd1b9..b9701ec08cc7 100644
--- a/LumiBlock/LumiBlockComps/CMakeLists.txt
+++ b/LumiBlock/LumiBlockComps/CMakeLists.txt
@@ -20,7 +20,7 @@ if( NOT XAOD_ANALYSIS )
 endif()
 atlas_add_library( LumiBlockCompsLib
    LumiBlockComps/*.h src/*.h Root/*.cxx
-   src/CreateLumiBlockCollectionFromFile.cxx src/xAOD2NtupLumiSvc.cxx
+   src/CreateLumiBlockCollectionFromFile.cxx 
    ${extra_srcs}
    PUBLIC_HEADERS LumiBlockComps
    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-- 
GitLab


From 14e563d3e423bf053ff6d5471f1bb40c74434d7b Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 12 Jun 2020 16:32:44 +0200
Subject: [PATCH 239/266] ZdcRec: Fix clang warnings.

Unused variables.
---
 ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx
index cbae6914fb23..4753bff93338 100644
--- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx
+++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /*
@@ -337,10 +337,6 @@ int ZdcRecChannelToolV2::makeWaveformFromDigits(xAOD::ZdcModule& module) const
 //==================================================================================================
 int  ZdcRecChannelToolV2::makeRawFromDigits(xAOD::ZdcModuleContainer&  ChannelCollection) const
 {
-
-	Identifier id;
-
-	
 	msg(MSG::DEBUG) << "--> ZDC : ZdcRecChannelToolV2 ChannelCollection size " << ChannelCollection.size() << endmsg ;
 	return 0;
 }
-- 
GitLab


From 2d81006b9ca632ca410bbc68abdc8de5ada8e6bd Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 12 Jun 2020 16:33:59 +0200
Subject: [PATCH 240/266] TRT_Digitization: Fix clang warnings.

Unused variables.
---
 .../TRT_Digitization/src/TRTProcessingOfStraw.cxx               | 2 --
 1 file changed, 2 deletions(-)

diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
index 2a5154bc67f6..5e1969bc034b 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
@@ -780,8 +780,6 @@ void TRTProcessingOfStraw::ClustersToDeposits (MagField::AtlasFieldCache& fieldC
 //________________________________________________________________________________
 Amg::Vector3D TRTProcessingOfStraw::getGlobalPosition (  int hitID, const TimedHitPtr<TRTUncompressedHit> *theHit ) {
 
-  Identifier IdStraw;
-
   const int mask(0x0000001F);
   int word_shift(5);
   int trtID, ringID, moduleID, layerID, strawID;
-- 
GitLab


From bda740d2a43ca6e69ede2b038f2efebf4ce1afcc Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 12 Jun 2020 16:34:46 +0200
Subject: [PATCH 241/266] TileSimAlgs: Fix clang warnings.

Unused variables.
---
 TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx
index a23e580a210c..475c7a6b0430 100644
--- a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx
+++ b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //****************************************************************************
@@ -1188,8 +1188,6 @@ StatusCode TileDigitsMaker::FillDigitCollection(const TileHitCollection* hitColl
   IdContext drawer_context = m_tileHWID->drawer_context();
 
   /* Set up buffers for handling information in a single collection. */
-  IdentifierHash idhash;
-
   HWIdentifier drawer_id = m_tileHWID->drawer_id(hitCollection->identify());
   int ros = m_tileHWID->ros(drawer_id);
   int drawer = m_tileHWID->drawer(drawer_id);
-- 
GitLab


From f94b390c83a4eaf19a1335d5a62f5a004c20bc41 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 12 Jun 2020 16:35:01 +0200
Subject: [PATCH 242/266] TrigL2MuonSA: Fix clang warnings.

Unused variables.
---
 Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx
index a0d063d7be89..eacc301989c2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx
@@ -482,8 +482,6 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::createRpcFragment(const LVL1::RecMuo
   unsigned int sector = (sectorAddress & 0x0000003e) >> 1;
   unsigned int roiNumber =  sectorRoIOvl & 0x0000001F;  
 
-  Identifier padId;
-  
   // retrieve the pad container
   const RpcPadContainer* rpcPadContainer=nullptr; 
   ATH_CHECK(evtStore()->retrieve(rpcPadContainer,"RPCPAD"));
-- 
GitLab


From 2c1eea3533112b134baf0a1861ab56a6ce457c5c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 12 Jun 2020 16:35:20 +0200
Subject: [PATCH 243/266] TrigT1CaloCalibTools: Fix clang warnings.

Unused variables.
---
 .../src/L1CaloPprEtCorrelationPlotManager.cxx                  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
index 5e7fafd37237..1c3db5484df2 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1CaloCalibTools/L1CaloPprEtCorrelationPlotManager.h"
@@ -101,7 +101,6 @@ StatusCode L1CaloPprEtCorrelationPlotManager::getCaloCells()
 
 double L1CaloPprEtCorrelationPlotManager::getMonitoringValue(const xAOD::TriggerTower* trigTower, CalLayerEnum /*theLayer*/)
 {
-    Identifier id;
     std::vector<float> CaloEnergyLayers;
     std::vector<float> CaloETLayers;
     float caloEnergy = 0.;
-- 
GitLab


From 7d81f5078b712e3571b38e095a28532eb991ea13 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 11 Jun 2020 16:31:12 +0200
Subject: [PATCH 244/266] SCT_Monitoring: Use thread-safe track summary method.

The thread-safety checker wasn't properly checking virtual function calls.
When that is fixed, it flags calls to ITrackSummaryTool::createSummary,
which modifies in place the Track passed to it.

Change to using the thread-safe version summary(), which does not attempt
to cache a new summary.
---
 .../SCT_Monitoring/src/SCTTracksMonAlg.cxx                | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx
index 8b3b28245f38..9997ee98a6b0 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx
@@ -95,13 +95,9 @@ ATH_MSG_DEBUG("SCTTracksMonAlg::fillHistograms()");
 
     int local_scthits{0};
     int scthits_on_trk{0}; // Breaks out of loop if track has less than 3 sct hits
-    std::unique_ptr<const Trk::TrackSummary> trkSum = std::make_unique<const Trk::TrackSummary>(*(track->trackSummary()));
+    std::unique_ptr<const Trk::TrackSummary> trkSum = m_trackSummaryTool->summary (*track);
     if (trkSum==nullptr) {
-      trkSum.reset(m_trackSummaryTool->createSummary(*track)); //creates new object on heap
-      if (trkSum==nullptr) {
-        ATH_MSG_WARNING("Trk::TrackSummary is null and cannot be created by " << m_trackSummaryTool.name());
-        continue;
-      }
+      ATH_MSG_WARNING("Trk::TrackSummary is null and cannot be created by " << m_trackSummaryTool.name());
     }
 
     if (trkSum) {
-- 
GitLab


From 8f900a851ff0648378eb53cbeca0a72f811c977d Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 13 Jun 2020 03:27:08 +0100
Subject: [PATCH 245/266] Remove seemingly unused code

---
 .../TrkEventUtils/InverseTruthMap.h           |  70 -----------
 .../TrkEventUtils/PerigeeFromVertexCreator.h  |  62 ----------
 .../TrkEventUtils/TruthCollectionInverter.h   | 115 ------------------
 .../src/PerigeeFromVertexCreator.cxx          |  72 -----------
 4 files changed, 319 deletions(-)
 delete mode 100755 Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h
 delete mode 100755 Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h
 delete mode 100755 Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h
 delete mode 100755 Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx

diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h
deleted file mode 100755
index d33cee360519..000000000000
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/** @file
- * This file defines the Trk::InverseTruthMap template class.
- */
-
-#ifndef INVERSETRUTHMAP_H
-#define INVERSETRUTHMAP_H
-
-#include <map>
-
-#include "AtlasHepMC/GenParticle_fwd.h"
-
-namespace Trk {
-  /**
-   * @class InverseTruthMap
-   *
-   * An InverseTruthMap object allows to quickly find a reconstructed
-   * object matching a given GenParticle.
-   *
-   * A map for lookup in the other direction is given by TrackTruthCollection 
-   * (or by SpacePointTruthCollection, or by PrepRawDataTruthCollection).
-   * Note that a true "inverse" of a TrackTruthCollection would not be very useful,
-   * because TrackTruthCollection maps 
-   *
-   *  Trk::Track*  ==>  (an object containing GenParticle* AND SOME OTHER STUFF)
-   *
-   * therefore to use a true inverse map you would need to have that
-   * SOME OTHER STUFF to perform a lookup, in addition to the
-   * GenParticle you are interested in.  (The actual code uses
-   * persistifiable pointers, I use the bare pointer notation for the
-   * sake of clarity.)
-   *
-   * The map inversion discards SOME OTHER STUFF data.  If needed, they
-   * can be accessed through the original map.  That is, after a
-   * GenParticle* ==> Trk::Track* lookup, use the found Trk::Track* to
-   * extract its corresponding TrackTruth object that contains the
-   * matching probability.
-   *
-   * Similar for SpacePointTruthCollection and PrepRawDataTruthCollection.
-   * 
-   * Example of use:
-   * @code
-   *     #include "TrkEventUtils/InverseTruthMap.h"
-   *     #include "TrkEventUtils/TruthCollectionInverter.h"
-   *
-   *     ...
-   *
-   *     TrackTruthCollection *origMap = ...; // retrieve from SG
-   *
-   *     Trk::InverseTruthMap<TrackTruthCollection> invMap;
-   *
-   *     Trk::buildInverseTruthMap(*origMap, &invMap);
-   * @endcode
-   *
-   * InverseTruthMap requires that the TruthCollection template argument
-   * defines a key_type, like std::map does.
-   *
-   * @see TruthInverters
-   *
-   * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2005
-   */
-  template<class TruthCollection> class InverseTruthMap : 
-    public std::map<const HepMC::GenParticle*, typename TruthCollection::key_type> {};
-
-}
-
-#endif/*INVERSETRUTHMAP_H*/
diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h
deleted file mode 100755
index aeaf9f2c02ef..000000000000
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-///////////////////////////////////////////////////////////////////
-// PerigeeFromVertex.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-
-#ifndef TRKEVENTUTILS_PERIGEEFROMVERTEXCREATOR_H
-#define TRKEVENTUTILS_PERIGEEFROMVERTEXCREATOR_H
-
-#include "TrkParameters/TrackParameters.h"
-#include "GeoPrimitives/GeoPrimitives.h"
-
-namespace Trk {
-    /** @class PerigeeFromVertexCreator
-     
-        Given a vertex in global or global/local expressiong,
-        a Perigee : public TrackParameters is returned
-
-        It enhances a factory type and a copy by object return method set
-
-        @author Tatjana.Lenz@cern.ch, Andreas.Salzburger@cern.ch */
-
-   class PerigeeFromVertexCreator {
-
-      public:
-        /** Constructor */
-        PerigeeFromVertexCreator() :
-        m_field(s_magField)
-        {}
-        /** Constructor */
-        PerigeeFromVertexCreator(double magfield) :
-        m_field(magfield)
-        {}
-        /** ~Desctructor */
-        virtual ~PerigeeFromVertexCreator()
-        {}
-
-        /** createPerigee method - returned by object */
-        Trk::Perigee createPerigee(Amg::Vector3D& gp, Amg::Vector3D& gm, double charge) const;
-        /** createPerigee method - returned by object */        
-        Trk::Perigee createPerigee(Amg::Vector3D& gp, double phi, double theta, double qOverP) const;
-        
-        /** createPerigee method - Factory type */
-        Trk::Perigee* createNewPerigee(Amg::Vector3D& gp, Amg::Vector3D& gm, double charge) const;
-        /** createPerigee method - Factory type */        
-        Trk::Perigee* createNewPerigee(Amg::Vector3D& gp, double phi, double theta, double qOverP) const;
-
-      private:
-         double m_field;                  //!< magnetic field in tesla, can be set through constructor      
-         static const double s_unitConversion;   //!< unit conversion factor
-         static const double s_magField;         //!< default magnetic field value
-                          
-
-     };
-} // end of namespace
-
-
-#endif  
diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h
deleted file mode 100755
index 43264bb33ca5..000000000000
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file 
- * @brief This file provides @ref TruthInverters.
- */
-
-#ifndef TRUTHCOLLECTIONINVERTER_H
-#define TRUTHCOLLECTIONINVERTER_H
-
-#include <map>
-
-#include "TrkEventUtils/InverseTruthMap.h"
-#include "TrkEventUtils/TruthCollectionFilter.h"
-#include "TrkEventUtils/MatchCompare.h"
-
-namespace Trk {
-  /** @defgroup TruthInverters TruthCollection inversion functions */
-  /*@{*/
-
-  /**
-   * The template function buildInverseTruthMap() fills an
-   * InverseTruthMap object with data
-   *
-   * An inverse of a map is a multimap.  Because we want to get a map
-   * instead, information may be lost in this operation.  MatchCompare
-   * is a functor deciding which of the matches to keep.  If cmp(a,b) is
-   * true, b will be kept, and a discarded.  MatchCompare should define
-   * a total ordering (strict weak ordering does not guarantee that
-   * results will be reproducible).
-   *
-   * The input map may contain invalid particle links, therefore we
-   * must pre-filter it before the inversion.  The pre-filtering may
-   * also include additional matching criteria.  This is all done
-   * using a Filter functor, which returns true for accepted matches.
-   *
-   * @see Trk::InverseTruthMap, MatchCompare.h, TruthCollectionFilter.h
-   *
-   * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2005
-   */
-  template<class TruthCollection, class Filter, class MatchCompare>
-  void buildInverseTruthMap(const TruthCollection& rec2truth, 
-			    InverseTruthMap<TruthCollection> *result,
-			    const Filter& filter, 
-			    const MatchCompare& cmp);
-
-  /** A fewer argument version with default MatchCompare=MatchCompareByProbability 
-   */
-  template<class TruthCollection, class Filter>
-  void buildInverseTruthMap(const TruthCollection& rec2truth, 
-			    InverseTruthMap<TruthCollection> *result,
-			    const Filter& filter) 
-  {
-    buildInverseTruthMap(rec2truth, result, filter, MatchCompareByProbability<TruthCollection>() );
-  }
-  
-  /** A fewer argument version with default MatchCompare and Filter=BasicTruthCollectionFilter 
-   */
-  template<class TruthCollection>
-  void buildInverseTruthMap(const TruthCollection& rec2truth, 
-			    InverseTruthMap<TruthCollection> *result)				 
-  {
-    buildInverseTruthMap(rec2truth, 
-			 result, 
-			 BasicTruthCollectionFilter<TruthCollection>(), 
-			 MatchCompareByProbability<TruthCollection>() 
-			 );
-  }
-
-  //================================================================
-  // Implementation of the "main" inverter.
-
-  template<class TruthCollection, class Filter, class MatchCompare>
-  void buildInverseTruthMap(const TruthCollection& rec2truth, 
-			    InverseTruthMap<TruthCollection> *result,
-			    const Filter& filter, 
-			    const MatchCompare& cmp)
-  {
-    result->clear();
-    typedef std::map<const HepMC::GenParticle*, typename TruthCollection::const_iterator> Helper_t;
-    Helper_t seen_links;
-    for(typename TruthCollection::const_iterator i=rec2truth.begin(); i!=rec2truth.end(); i++) {
-      if(filter(i)) {
-	const HepMC::GenParticle *particle = i->second.particleLink().cptr();
-	typename Helper_t::iterator p = seen_links.find(particle);
-	//----------------------------------------------------------------
-	if(p == seen_links.end()) { // match to a new GenParticle
-	  // Add this match to the output map.
-	  (*result)[particle] = i->first ;
-	  // and remember we saw the particle
-	  seen_links[particle] = i;
-	}
-	//----------------------------------------------------------------
-	else { // another match to the same GenParticle
-	  // Need to decide which of the matches to keep.
-	  if(cmp(p->second,i)) { // the new match is better
-	    // Overwrite value for the key in the output map
-	    (*result)[particle] = i->first ;
-	    // and in the helper data structure.
-	    seen_links[particle] = i;
-	  }
-	}
-      }
-    }
-  }
-
-  //================================================================
-
-  /*@}*/
-
-} // namespace 
-
-#endif/*TRUTHCOLLECTIONINVERTER_H*/
diff --git a/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx b/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx
deleted file mode 100755
index 309a42194540..000000000000
--- a/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// PerigeeFromVertexCreator.cxx,    (c) ATLAS Detector software  //
-///////////////////////////////////////////////////////////////////
-
-#include "TrkEventUtils/PerigeeFromVertexCreator.h"
-#include <cmath>
-
-const double Trk::PerigeeFromVertexCreator::s_unitConversion = -0.3;
-const double Trk::PerigeeFromVertexCreator::s_magField       = 2.083;
-              
-Trk::Perigee Trk::PerigeeFromVertexCreator::createPerigee(Amg::Vector3D& vertex, 
-                                                          Amg::Vector3D& momentum, 
-                                                          double charge) const
-{ 
-  return createPerigee(vertex, momentum.phi(),momentum.theta(),charge/momentum.mag());
-}
-
-Trk::Perigee Trk::PerigeeFromVertexCreator::createPerigee(Amg::Vector3D& vertex,
-                                                          double phi,
-                                                          double theta,
-                                                          double qOverP) const
-{
-  // calculate perigee
-  double sinp = sin(phi);
-  double cosp = sin(phi);
-  double R = vertex[1]*cosp - vertex[0]*sinp;
-  double Q = vertex[1]*sinp + vertex[0]*cosp;
-  double rho = s_unitConversion*m_field*qOverP/sin(theta);
-  double d0 = R + pow(Q,2.)*rho/2.;
-  double z0 = vertex[2] - Q*(1-R*rho)/tan(theta);
-  double phi0 = phi - Q*rho;
-
-  // check phi0 for [-Pi,+Pi) range
-  while (phi0 > M_PI) { phi0 -= M_PI;}
-  while (phi0 < -M_PI) { phi0 += M_PI;}
-
-  return Trk::Perigee(d0,z0,phi0,theta,qOverP,PerigeeSurface());
-}
-             
-Trk::Perigee* Trk::PerigeeFromVertexCreator::createNewPerigee(Amg::Vector3D& vertex, 
-                                                              Amg::Vector3D& momentum, 
-                                                               double charge) const
-{
-  return createNewPerigee(vertex, momentum.phi(),momentum.theta(),charge/momentum.mag());
-}
-
-Trk::Perigee* Trk::PerigeeFromVertexCreator::createNewPerigee(Amg::Vector3D& vertex,
-                                                              double phi,
-                                                              double theta,
-                                                              double qOverP) const
-{
-  // calculate perigee
-  double sinp = sin(phi);
-  double cosp = sin(phi);
-  double R = vertex[1]*cosp - vertex[0]*sinp;
-  double Q = vertex[1]*sinp + vertex[0]*cosp;
-  double rho = s_unitConversion*m_field*qOverP/sin(theta);
-  double d0 = R + pow(Q,2.)*rho/2.;
-  double z0 = vertex[2] - Q*(1-R*rho)/tan(theta);
-  double phi0 = phi - Q*rho;
-
-  // check phi0 for [-Pi,+Pi) range
-  while (phi0 > M_PI) { phi0 -= M_PI;}
-  while (phi0 < -M_PI) { phi0 += M_PI;}
-
-  return new Trk::Perigee(d0,z0,phi0,theta,qOverP,PerigeeSurface());
-}
-
-- 
GitLab


From 3ae7235026c973955a910ef7dbc73cc73de72047 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 13 Jun 2020 04:18:34 +0100
Subject: [PATCH 246/266] MeasurementBaseComparisonFunction default copy,move,
 and use switch

---
 .../MeasurementBaseComparisonFunction.h       | 385 +++++++++---------
 1 file changed, 199 insertions(+), 186 deletions(-)

diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h
index 7a755179a2c4..75e24b86c41e 100755
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h
+++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h
@@ -11,21 +11,19 @@
 // Wolfgang.Liebig@cern.ch / Andreas.Salzburger@cern.ch
 ///////////////////////////////////////////////////////////////////
 
-
 #ifndef TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
 #define TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
 
-//Trk
+// Trk
 #include "TrkMeasurementBase/MeasurementBase.h"
+#include "TrkSurfaces/DiscSurface.h"
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkSurfaces/StraightLineSurface.h"
-#include "TrkSurfaces/DiscSurface.h"
 // extra-maths for cylinder intersections
 #include "TrkSurfaces/CylinderSurface.h"
-#include "TrkSurfaces/CylinderSurface.h"
 #include "TrkSurfaces/PerigeeSurface.h"
 #include "TrkSurfaces/SurfaceBounds.h"
-//STL
+// STL
 #include <algorithm>
 #include <stdexcept>
 
@@ -35,195 +33,210 @@
 
 namespace Trk {
 
-  /** Class implementing a comparison function 
-   * for sorting MeasurementBase objects*/
- 
-class MeasurementBaseComparisonFunction {
-  public:
-
-    /*
-     * Default ctor does not make much sense
-     */
-    MeasurementBaseComparisonFunction()=delete;
-      /** Destructor */
-    ~MeasurementBaseComparisonFunction()=default;
- 
-    /** Full relation definition using a straight line propagation */
-    MeasurementBaseComparisonFunction(const Amg::Vector3D &sp, const Amg::Vector3D &dir)
-        : m_point(sp), m_direction(dir.unit()) {}
-    /** Copy Ctor */
-    MeasurementBaseComparisonFunction(const MeasurementBaseComparisonFunction &MCF)
-        : m_point(MCF.m_point), m_direction(MCF.m_direction) {}
-              
-    MeasurementBaseComparisonFunction &operator=(MeasurementBaseComparisonFunction &MCF) {
-      if (this != &MCF) {
-        m_point = MCF.m_point;
-        m_direction = MCF.m_direction;
+/** Class implementing a comparison function
+ * for sorting MeasurementBase objects*/
+
+class MeasurementBaseComparisonFunction
+{
+public:
+  MeasurementBaseComparisonFunction() = delete;
+  ~MeasurementBaseComparisonFunction() = default;
+  /** Full relation definition using a straight line propagation */
+  MeasurementBaseComparisonFunction(const Amg::Vector3D& sp,
+                                    const Amg::Vector3D& dir)
+    : m_point(sp)
+    , m_direction(dir.unit())
+  {}
+
+  /*
+   * Default methods
+   */
+  MeasurementBaseComparisonFunction(
+    const MeasurementBaseComparisonFunction& MCF) = default;
+  MeasurementBaseComparisonFunction& operator=(
+    MeasurementBaseComparisonFunction& MCF) = default;
+  MeasurementBaseComparisonFunction(MeasurementBaseComparisonFunction&& MCF) =
+    default;
+  MeasurementBaseComparisonFunction& operator=(
+    MeasurementBaseComparisonFunction&& MCF) = default;
+
+  /** The comparison function defining in what case a Measurement is 'smaller'
+     than a second one */
+  bool operator()(const Trk::MeasurementBase* one,
+                  const Trk::MeasurementBase* two) const
+  {
+
+    // --- flexible sorting along a predicted direction
+    double path1 = 0;
+    const Trk::Surface& sf1 = one->associatedSurface();
+    const Trk::Surface::SurfaceType surfType1 = sf1.type();
+    switch (surfType1) {
+      case Trk::Surface::Plane: {
+        const Trk::PlaneSurface& opsf =
+          static_cast<const Trk::PlaneSurface&>(sf1);
+        path1 = this->pathIntersectWithPlane(opsf);
+      } break;
+      case Trk::Surface::Line: {
+        const Trk::StraightLineSurface& ossf =
+          static_cast<const Trk::StraightLineSurface&>(sf1);
+        path1 = this->pathIntersectWithLine(ossf);
+      } break;
+      case Trk::Surface::Disc: {
+        const Trk::DiscSurface& odsf =
+          static_cast<const Trk::DiscSurface&>(sf1);
+        path1 = this->pathIntersectWithDisc(odsf);
+      } break;
+      case Trk::Surface::Cylinder: {
+        const Trk::CylinderSurface& ocsf =
+          static_cast<const Trk::CylinderSurface&>(sf1);
+        path1 = this->pathIntersectWithCylinder(ocsf, one->globalPosition());
+      } break;
+      case Trk::Surface::Perigee: {
+        const Trk::PerigeeSurface& ogsf =
+          static_cast<const Trk::PerigeeSurface&>(sf1);
+        path1 = this->pathIntersectWithLine(ogsf);
+      } break;
+      default: {
+        throw std::runtime_error(
+          "MeasurementBaseComparisonFunction: surface type error for Sf1!");
       }
-      return *this;
-    }
-   
-    /** The comparison function defining in what case a PRD is 'smaller' than
-        a second one */
-    bool operator() (const Trk::MeasurementBase* one,
-		     const Trk::MeasurementBase* two) const {
-
-     // --- flexible sorting along a predicted direction
-        double path1 = 0;
-        const Trk::Surface& sf1 = one->associatedSurface();
-        const Trk::Surface::SurfaceType surfType1  = sf1.type();
-        
-        if (surfType1==Trk::Surface::Plane) {
-          const Trk::PlaneSurface&  opsf = static_cast <const Trk::PlaneSurface&>(sf1);
-          path1 = this->pathIntersectWithPlane(opsf);
-        } 
-        else if (surfType1==Trk::Surface::Line) {
-          const Trk::StraightLineSurface& ossf =  static_cast <const Trk::StraightLineSurface&>(sf1);
-          path1 = this->pathIntersectWithLine (ossf);
-        } 
-        else if (surfType1==Trk::Surface::Disc) {
-          const Trk::DiscSurface&   odsf = static_cast <const Trk::DiscSurface&> (sf1); 
-          path1 = this->pathIntersectWithDisc (odsf);
-        } 
-        else if (surfType1==Trk::Surface::Cylinder) {
-          const Trk::CylinderSurface&  ocsf = static_cast <const Trk::CylinderSurface&> (sf1);
-          path1 = this->pathIntersectWithCylinder(ocsf, one->globalPosition());
-        } 
-        else if (surfType1==Trk::Surface::Perigee) {
-          const Trk::PerigeeSurface&  ogsf = static_cast< const Trk::PerigeeSurface&>(sf1);
-          path1 = this->pathIntersectWithLine (ogsf);
-        }
-        else {
-          throw std::runtime_error( "MeasurementBaseComparisonFunction: surface type error for Sf1!");
-        }
-
-        // --- identify the 2nd surface type and get intersection path for surface 1
-        double path2 = 0;
-        const Trk::Surface& sf2 = two->associatedSurface();
-        const Trk::Surface::SurfaceType surfType2  = sf2.type();
-        
-        if (surfType2==Trk::Surface::Plane) {
-          const Trk::PlaneSurface&  tpsf = static_cast <const Trk::PlaneSurface&>(sf2);
-          path2 = this->pathIntersectWithPlane(tpsf);
-        } 
-        else if (surfType2==Trk::Surface::Line) {
-          const Trk::StraightLineSurface& tssf =  static_cast <const Trk::StraightLineSurface&>(sf2);
-          path2 = this->pathIntersectWithLine (tssf);
-        } 
-        else if (surfType2==Trk::Surface::Disc) {
-          const Trk::DiscSurface&   tdsf = static_cast <const Trk::DiscSurface&> (sf2); 
-          path2 = this->pathIntersectWithDisc (tdsf);
-        } 
-        else if (surfType2==Trk::Surface::Cylinder) {
-          const Trk::CylinderSurface&  tcsf = static_cast <const Trk::CylinderSurface&> (sf2);
-          path2 = this->pathIntersectWithCylinder(tcsf, two->globalPosition());
-        } 
-        else if (surfType2==Trk::Surface::Perigee) {
-          const Trk::PerigeeSurface&  tgsf = static_cast< const Trk::PerigeeSurface&>(sf2);
-          path2 = this->pathIntersectWithLine (tgsf);
-        }
-        else {
-          throw std::runtime_error("MeasurementBaseComparisonFunction: surface type error for Sf2!");
-        }
-        
-        return path1 < path2;
-    }
-  private:
-    Amg::Vector3D m_point;
-    Amg::Vector3D m_direction;
-
-    double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const
-    {
-      double denom = m_direction.dot(psf.normal()); // c++ can be unreadable
-      return (denom) ?
-        psf.normal().dot(psf.center() - m_point)/(denom) :
-        denom                                            ;
-    }
-
-    double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const
-    {
-      Amg::Vector3D dirWire(lsf.transform().rotation().col(2));
-      dirWire.normalize();
-      Amg::Vector3D trackToWire(lsf.center() - m_point);
-      double     parallelity = m_direction.dot(dirWire);
-      double     denom       = 1 - parallelity*parallelity;
-      return (fabs(denom)>10e-7)                       ?
-        (trackToWire.dot(m_direction) 
-         - trackToWire.dot(dirWire)*parallelity)/denom :
-        0.                                             ;
-    }
-
-    double pathIntersectWithLine(const Trk::PerigeeSurface& pgsf) const
-    {
-      Amg::Vector3D trackToWire(pgsf.center() - m_point);
-      double     parallelity = m_direction.dot(Trk::s_zAxis);
-      double     denom       = 1 - parallelity*parallelity;
-      return (fabs(denom)>10e-7)                            ?
-        (trackToWire.dot(m_direction) 
-         - trackToWire.dot(Trk::s_zAxis)*parallelity)/denom :
-        0.                                                  ;
     }
 
-    double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const
-    {
-      double denom = m_direction.dot(dsf.normal());
-      return (denom)                                     ?
-        dsf.normal().dot(dsf.center() - m_point)/(denom) :
-        denom                                            ;
+    // --- identify the 2nd surface type and get intersection path for surface 1
+    double path2 = 0;
+    const Trk::Surface& sf2 = two->associatedSurface();
+    const Trk::Surface::SurfaceType surfType2 = sf2.type();
+    switch (surfType2) {
+      case Trk::Surface::Plane: {
+        const Trk::PlaneSurface& tpsf =
+          static_cast<const Trk::PlaneSurface&>(sf2);
+        path2 = this->pathIntersectWithPlane(tpsf);
+      } break;
+      case Trk::Surface::Line: {
+        const Trk::StraightLineSurface& tssf =
+          static_cast<const Trk::StraightLineSurface&>(sf2);
+        path2 = this->pathIntersectWithLine(tssf);
+      } break;
+      case Trk::Surface::Disc: {
+        const Trk::DiscSurface& tdsf =
+          static_cast<const Trk::DiscSurface&>(sf2);
+        path2 = this->pathIntersectWithDisc(tdsf);
+      } break;
+      case Trk::Surface::Cylinder: {
+        const Trk::CylinderSurface& tcsf =
+          static_cast<const Trk::CylinderSurface&>(sf2);
+        path2 = this->pathIntersectWithCylinder(tcsf, two->globalPosition());
+      } break;
+      case Trk::Surface::Perigee: {
+        const Trk::PerigeeSurface& tgsf =
+          static_cast<const Trk::PerigeeSurface&>(sf2);
+        path2 = this->pathIntersectWithLine(tgsf);
+      } break;
+      default: {
+        throw std::runtime_error(
+          "MeasurementBaseComparisonFunction: surface type error for Sf2!");
+      }
     }
-
-    double pathIntersectWithCylinder(const Trk::CylinderSurface& csf,
-                                     const Amg::Vector3D&  globalHit) const
-    { // --- code from TrkExSlPropagator/LineCylinderIntersection.cxx
-     
-      // get the rotation by reference
-      const Amg::Transform3D& locTrans = csf.transform();
-      // take two points of line and calculate them to the 3D frame of the cylinder
-      Amg::Vector3D point1(locTrans.inverse() * m_point);
-      Amg::Vector3D point2raw = m_point + m_direction;
-      Amg::Vector3D point2(locTrans.inverse() * point2raw); // do it in two steps
-
-      // new direction in 3D frame of cylinder
-      Amg::Vector3D direc((point2 - point1).unit());
-
-      if (!direc.x()){
+    return path1 < path2;
+  }
+
+private:
+  Amg::Vector3D m_point;
+  Amg::Vector3D m_direction;
+
+  double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const
+  {
+    double denom = m_direction.dot(psf.normal()); 
+    return (denom) ? psf.normal().dot(psf.center() - m_point) / (denom) : denom;
+  }
+
+  double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const
+  {
+    Amg::Vector3D dirWire(lsf.transform().rotation().col(2));
+    dirWire.normalize();
+    Amg::Vector3D trackToWire(lsf.center() - m_point);
+    double parallelity = m_direction.dot(dirWire);
+    double denom = 1 - parallelity * parallelity;
+    return (fabs(denom) > 10e-7) ? (trackToWire.dot(m_direction) -
+                                    trackToWire.dot(dirWire) * parallelity) /
+                                     denom
+                                 : 0.;
+  }
+
+  double pathIntersectWithLine(const Trk::PerigeeSurface& pgsf) const
+  {
+    Amg::Vector3D trackToWire(pgsf.center() - m_point);
+    double parallelity = m_direction.dot(Trk::s_zAxis);
+    double denom = 1 - parallelity * parallelity;
+    return (fabs(denom) > 10e-7)
+             ? (trackToWire.dot(m_direction) -
+                trackToWire.dot(Trk::s_zAxis) * parallelity) /
+                 denom
+             : 0.;
+  }
+
+  double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const
+  {
+    double denom = m_direction.dot(dsf.normal());
+    return (denom) ? dsf.normal().dot(dsf.center() - m_point) / (denom) : denom;
+  }
+
+  double pathIntersectWithCylinder(const Trk::CylinderSurface& csf,
+                                   const Amg::Vector3D& globalHit) const
+  { // --- code from TrkExSlPropagator/LineCylinderIntersection.cxx
+
+    // get the rotation by reference
+    const Amg::Transform3D& locTrans = csf.transform();
+    // take two points of line and calculate them to the 3D frame of the
+    // cylinder
+    Amg::Vector3D point1(locTrans.inverse() * m_point);
+    Amg::Vector3D point2raw = m_point + m_direction;
+    Amg::Vector3D point2(locTrans.inverse() * point2raw); // do it in two steps
+
+    // new direction in 3D frame of cylinder
+    Amg::Vector3D direc((point2 - point1).unit());
+
+    if (!direc.x()) {
+      return 0.;
+    } else {
+      // get line and circle constants
+      double k = (direc.y()) / (direc.x());
+      double d = (point2.x() * point1.y() - point1.x() * point2.y()) /
+                 (point2.x() - point1.x());
+      double R = csf.bounds().r();
+      double first = 0.;
+      double second = 0.;
+
+      // and solve the quadratic equation  Trk::RealQuadraticEquation
+      // pquad(1+k*k, 2*k*d, d*d-R*R);
+      double a = 1 + k * k;
+      double p = 2 * k * d;
+      double q = d * d - R * R;
+      double discriminant = p * p - 4 * a * q;
+      if (discriminant < 0) {
         return 0.;
       } else {
-        // get line and circle constants
-        double k = (direc.y())/(direc.x());
-        double d = (point2.x()*point1.y() - point1.x()*point2.y())/(point2.x() - point1.x());
-        double R = csf.bounds().r();
-        double first = 0.;
-        double second= 0.;
-    
-        // and solve the quadratic equation  Trk::RealQuadraticEquation pquad(1+k*k, 2*k*d, d*d-R*R);
-        double a = 1 + k*k;
-        double p = 2*k*d;
-        double q = d*d - R*R;
-        double discriminant = p*p - 4*a*q;
-        if (discriminant<0) {
-          return 0.;
-        } else {
-          //          solutions = (discriminant==0) ? one : two;
-          double x0 = -0.5*(p + (p>0 ? sqrt(discriminant) : -sqrt(discriminant)));
-          first = x0/a;
-          second = q/x0;
-        }
-        double t1 = (first  - point1.x())/direc.x();
-        double t2 = (second - point1.x())/direc.x();
-        // the solutions in the 3D frame of the cylinder
-        Amg::Vector3D dist1raw(point1 + t1 * direc - globalHit);
-        Amg::Vector3D dist2raw(point1 + t2 * direc - globalHit);
-        // return the solution which is closer to Meas'Base's global coordinates
-        if ( dist1raw.mag() < dist2raw.mag() ) {
-          return t1; // FIXME - wrong line parameterisation
-        } else {
-          return t2;
-        }
+        // solutions = (discriminant==0) ? one : two;
+        double x0 =
+          -0.5 * (p + (p > 0 ? sqrt(discriminant) : -sqrt(discriminant)));
+        first = x0 / a;
+        second = q / x0;
+      }
+      double t1 = (first - point1.x()) / direc.x();
+      double t2 = (second - point1.x()) / direc.x();
+      // the solutions in the 3D frame of the cylinder
+      Amg::Vector3D dist1raw(point1 + t1 * direc - globalHit);
+      Amg::Vector3D dist2raw(point1 + t2 * direc - globalHit);
+      // return the solution which is closer to Meas'Base's global coordinates
+      if (dist1raw.mag() < dist2raw.mag()) {
+        return t1; 
+      } else {
+        return t2;
       }
     }
-  };
+  }
+};
 } // end of namespace
 
-#endif //TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
+#endif // TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
 
-- 
GitLab


From 135d68562dee79b04e9eca2d50e7813ee5f7130a Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Sat, 13 Jun 2020 14:00:56 +0200
Subject: [PATCH 247/266] TrigFake: Package cleanup

- move headers to src/
- remove atlas_depends_on_subdirs
- delete obsolete files
- remove library and update link dependencies
---
 Trigger/TrigFake/CMakeLists.txt               |  39 +---
 Trigger/TrigFake/share/IDonly_sequence.xml    |  22 --
 Trigger/TrigFake/share/IDonly_signature.xml   |  11 -
 .../share/TrigMaster_IDonly_jobOptions.txt    | 209 ------------------
 ...jobOfragment_FakeLvl1ConversionTestBeam.py |  15 --
 .../TrigFake/share/jobOfragment_TrigFake.py   |   9 -
 .../TrigFake/share/jobOfragment_TrigFake.txt  |   1 -
 .../src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx |   6 +-
 .../FakeLvl1MultipleRoIsatFixedEtaPhi.h       |   0
 .../TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx |   6 +-
 .../FakeLvl1RoIatFixedEtaPhi.h                |   0
 Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx  |   6 +-
 .../{TrigFake => src}/FakeLvl1RoIfromKine.h   |   0
 Trigger/TrigFake/{TrigFake => src}/FakeRoI.h  |   0
 Trigger/TrigFake/src/Trajectory.cxx           |   2 +-
 .../TrigFake/{TrigFake => src}/Trajectory.h   |   0
 Trigger/TrigFake/src/ZVertexFromKine.cxx      |   2 +-
 .../{TrigFake => src}/ZVertexFromKine.h       |   0
 .../src/components/TrigFake_entries.cxx       |   8 +-
 19 files changed, 19 insertions(+), 317 deletions(-)
 delete mode 100755 Trigger/TrigFake/share/IDonly_sequence.xml
 delete mode 100755 Trigger/TrigFake/share/IDonly_signature.xml
 delete mode 100755 Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt
 delete mode 100755 Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py
 delete mode 100755 Trigger/TrigFake/share/jobOfragment_TrigFake.py
 delete mode 100755 Trigger/TrigFake/share/jobOfragment_TrigFake.txt
 mode change 100755 => 100644 Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx
 rename Trigger/TrigFake/{TrigFake => src}/FakeLvl1MultipleRoIsatFixedEtaPhi.h (100%)
 mode change 100755 => 100644
 mode change 100755 => 100644 Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx
 rename Trigger/TrigFake/{TrigFake => src}/FakeLvl1RoIatFixedEtaPhi.h (100%)
 mode change 100755 => 100644
 mode change 100755 => 100644 Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx
 rename Trigger/TrigFake/{TrigFake => src}/FakeLvl1RoIfromKine.h (100%)
 mode change 100755 => 100644
 rename Trigger/TrigFake/{TrigFake => src}/FakeRoI.h (100%)
 mode change 100755 => 100644
 mode change 100755 => 100644 Trigger/TrigFake/src/Trajectory.cxx
 rename Trigger/TrigFake/{TrigFake => src}/Trajectory.h (100%)
 mode change 100755 => 100644
 mode change 100755 => 100644 Trigger/TrigFake/src/ZVertexFromKine.cxx
 rename Trigger/TrigFake/{TrigFake => src}/ZVertexFromKine.h (100%)
 mode change 100755 => 100644

diff --git a/Trigger/TrigFake/CMakeLists.txt b/Trigger/TrigFake/CMakeLists.txt
index 8b97b0e7d8f4..0d79ad93b1fe 100644
--- a/Trigger/TrigFake/CMakeLists.txt
+++ b/Trigger/TrigFake/CMakeLists.txt
@@ -1,44 +1,13 @@
-################################################################################
-# Package: TrigFake
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigFake )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Trigger/TrigEvent/TrigInDetEvent
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigSteer/TrigSteering
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          Trigger/TrigConfiguration/TrigConfHLTData
-                          Trigger/TrigEvent/TrigNavigation
-                          Trigger/TrigSteer/TrigInterfaces
-                          Trigger/TrigT1/TrigT1Interfaces
-                          Trigger/TrigT1/TrigT1Result )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( TrigFakeLib
-                   src/*.cxx
-                   PUBLIC_HEADERS TrigFake
-                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigInDetEvent TrigSteeringEvent TrigSteeringLib StoreGateLib SGtests TrigNavigationLib TrigInterfacesLib
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorObjects TrigConfHLTData TrigT1Interfaces TrigT1Result )
-
 atlas_add_component( TrigFake
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel TrigInDetEvent TrigSteeringEvent TrigSteeringLib StoreGateLib SGtests GeneratorObjects TrigConfHLTData TrigNavigationLib TrigInterfacesLib TrigT1Interfaces TrigT1Result TrigFakeLib )
-
-# Install files from the package:
-atlas_install_joboptions( share/jobOfragment_TrigFake.* )
-
+                     src/*.cxx src/components/*.cxx
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorObjects TrigConfHLTData TrigInDetEvent TrigSteeringEvent TrigSteeringLib TrigT1Interfaces TrigT1Result )
diff --git a/Trigger/TrigFake/share/IDonly_sequence.xml b/Trigger/TrigFake/share/IDonly_sequence.xml
deleted file mode 100755
index ae6466c52335..000000000000
--- a/Trigger/TrigFake/share/IDonly_sequence.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-
-<!DOCTYPE SEQUENCE_LIST SYSTEM "sequencelist.dtd">
-
-<SEQUENCE_LIST>
-
-
-<SEQUENCE level="L2" input="EMTAUROI" 
-algorithm="
-TrigIdScan::IdScanMain/IdScan_IdScanMain/1
-TrigEgammaNtuple/TrigEgammaNtuple/1
-"
-output="LVL2out" />
-
-
-
-</SEQUENCE_LIST>
-
-
-
-
-
diff --git a/Trigger/TrigFake/share/IDonly_signature.xml b/Trigger/TrigFake/share/IDonly_signature.xml
deleted file mode 100755
index 71c705c5fcb6..000000000000
--- a/Trigger/TrigFake/share/IDonly_signature.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-
-<!DOCTYPE SIGNATURE_LIST SYSTEM "signaturelist.dtd">
-
-<SIGNATURE_LIST>
-
-<SIGNATURE signature_id="LVL2out" prescale="1" forced_accept="0">
-      <TRIGGERELEMENT te_name="LVL2out" />
-</SIGNATURE>
-
-</SIGNATURE_LIST>                 
diff --git a/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt b/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt
deleted file mode 100755
index 8919f75fe7f4..000000000000
--- a/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-//**************************************************************
-//
-// top jopOptions file for accessing RIOs from RDOs using transient BS 
-// for any algorithm.
-// The Selection must come into the sequence list to use
-//
-//**************************************************************
-
-
-// specify input file
-ApplicationMgr.EvtSel = "FILE ZEBRA.P";
-
-// specify the number of events
-ApplicationMgr.EvtMax = 3;
-
-//--------------------------------------------------------------
-// Event parameters
-//--------------------------------------------------------------
-EventSelector.dataSetNames = {"Y23406.1", "Y23406.2"};
-// For runs: provide a first/last range or a list
-EventSelector.runs = {1, 30000};
-
-// Switch off detectors not needed
-EventSelector.muons=false;
-//EventSelector.indet=false;
-//EventSelector.pixel=false;
-//EventSelector.sct=false;
-//EventSelector.trt=false;
-//EventSelector.calos=false;
-//EventSelector.tile=false;
-//EventSelector.hec=false;
-//EventSelector.fcal=false;
-
-//--------------------------------------------------------------
-// Use auditors
-//--------------------------------------------------------------
-ApplicationMgr.DLLs += { "GaudiAud" };
-
-// write out a summary of the time spent
-AuditorSvc.Auditors  += { "ChronoAuditor"};
-
-// write out a short message upon entering or leaving each algorithm
-AuditorSvc.Auditors  += { "NameAuditor" };
-
-// write out s summary of the memory usage
-AuditorSvc.Auditors  += { "MemStatAuditor" };
-MemStatAuditor.OutputLevel = 4 ;
-
-
-#include "$PARTPROPSVCROOT/share/PartPropSvc.txt"
-//
-// Genz/kine->HepMc converter for true particle, Generators and Kine
-//
-ApplicationMgr.DLLs += { "GenzModule"};
-// run the  GenzKine->HepMC coverter
-ApplicationMgr.TopAlg += { "GenzModule"};
-
-ApplicationMgr.DLLs += { "TrigFake" };
-
-#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt"
-
-#include "ByteStreamCnvSvcBase/BSAddProvSvc_RIO_jobOptions.txt"
-
-ProxyProviderSvc.ProviderNames += { "ByteStreamAddressProviderSvc" } ;
-
-#include "InDetDC1ReadPackage/SiTrackerDetDescrDC0_CnvOptions.txt"
-#include "InDetDC1ReadPackage/PixelDetDescrCnvOptions.txt"
-#include "InDetDC1ReadPackage/SCT_DetDescrCnvOptions.txt"
-DetDescrCnvSvc.DecodeIdDict = true;
-
-// Make RDOs and Write BS  for all 3 InDet detectors
-//
-ApplicationMgr.DLLs +={"InDetRawDataByteStream" };
-
-
-#include "InDetDC1ReadPackage/TRT_RDOCnvOptions.txt"
-
-#include "InDetDC1ReadPackage/SCT_RDOCnvOptions.txt"
-
-#include "InDetDC1ReadPackage/PixelRDOCnvOptions.txt"
-
-#include "$INDETSIMDATASELECTORROOT/share/PixelSimDataSelectorOptions.txt"
-#include "$INDETSIMDATASELECTORROOT/share/SCT_SimDataSelectorOptions.txt"
-
-ApplicationMgr.DLLs +={"InDetRawDataByteStream" };
-
-// TRT 
-StreamBS.ItemList +={"2542#*"};
-
-// SCT 
-StreamBS.ItemList +={"2541#*"};
-
-// Pixel
-StreamBS.ItemList +={"2540#*"};
-
-#include "ByteStreamCnvSvc/RDP_ByteStream_jobOptions.txt"
-
-
-//InDet
-ApplicationMgr.DLLs += {"InDetRecInputByteStream"};
-ApplicationMgr.ExtSvc += { "ByteStreamCnvSvc"} ;
-
-
-//--------------------------------------------------------------
-// TrigConfig Algorithm
-//--------------------------------------------------------------
-ApplicationMgr.DLLs += { "TrigConfig" };
-ApplicationMgr.TopAlg += {"HLT::TriggerConfig/TriggerConfig"};
-
-// SG keys for config data
-TriggerConfig.trigConfigL2Vector = "storeL2Location";
-TriggerConfig.trigConfigEFVector = "storeEFLocation";
-TriggerConfig.OutputLevel = 3;
-
-//--------------------------------------------------
-// TrigSteering Algorithm
-//-------------------------------------------------
-ApplicationMgr.DLLs += { "TrigSteering" };
-
-ApplicationMgr.TopAlg += { "StepController/StepController_L2" };
-
-// SG keys for config data
-StepHandler_L2.trigConfigVector = "storeL2Location";
-
-//--------------------------------------------------
-// Region Selection Tool
-//-------------------------------------------------
-ApplicationMgr.DLLs += { "TrigRegionSelector" };
-
-//--------------------------------------------------
-// L2/EF Seeding
-//-------------------------------------------------
-//ApplicationMgr.DLLs += { "TrigL2Result" };
-
-//--------------------------------------------------
-// Result Builder
-//-------------------------------------------------
-ApplicationMgr.DLLs += { "TrigL2ResultBuilder" };
-
-ResultBuilder_L2.trigL2ConfigVector = "storeL2Location";
-ResultBuilder_L2.trigEFConfigVector = "storeEFLocation";
-ResultBuilder_L2.useL1Simulation= "NO";
-
-#include "TrigIDSCAN/jobOfragment_TrigIDSCAN.txt"
-#include "TrigSiTrack/jobOfragment_TrigSitrack.txt"
-//#include "TrigTRTxK/jobOfragment_TrigTRTxK.txt"
-
-#include "TrigSiTreeAlg/jobOfragment_TrigSiTreeAlg.txt"
-
-//--------------------------------------------------------------
-// TrigNtEgamma: CBNT and LVL2 Ntuples
-//--------------------------------------------------------------
-#include "TrigNtEgamma/jobOfragment_TrigNtEgamma.txt"
-TrigEgammaNtuple_1_L2.NtupleID = 101;
-TrigEgammaNtuple_2_L2.NtupleID = 102;
-
-//--------------------------------------------------------------
-// Set individual output levels
-// (0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-//--------------------------------------------------------------
-// Get rid of messages during running
-L2Result.OutputLevel = 4;
-
-//--------------------------------------------------
-// Benchmarking
-//--------------------------------------------------
-#include "TrigTimeAlgs/jobOfragment_TrigTimerSvc.txt"
-TrigTimeNtuple_1_L2.NtupleID = 501;
-TrigTimeNtuple_2_L2.NtupleID = 502;
-
-
-
-
-//--------------------------------------------------------------
-// Algorithm Sequence and Signature lists to configure HLTSSW
-//--------------------------------------------------------------
-TriggerConfig.sequenceListFileLocation = "IDonly_sequence.xml";
-TriggerConfig.signatureListFileLocation = "IDonly_signature.xml";
-
-//---------------------------------------------------------------
-// Ntuple service output
-//---------------------------------------------------------------
-ApplicationMgr.HistogramPersistency="HBOOK";
-NTupleSvc.Output    = { "FILE1 DATAFILE='trigger.ntup' OPT='NEW'" };
-HbookHistSvc.NPAWC = 1500000 ;
-
-// Histogram output, if any. 
-HistogramPersistencySvc.OutputFile  = "histo.hbook";
-
-StepController_L2.Lvl1Conversion="FakeLvl1Conversion";
-FakeLvl1Conversion_L2.FakeEmTauRoiParticleIDs={11,-11};
-FakeLvl1Conversion_L2.FakeEmTauRoiPtMin=20.*GeV;
-FakeLvl1Conversion_L2.FakeMuonRoiParticleIDs={13,-13};
-FakeLvl1Conversion_L2.FakeMuonRoiPtMin=20.*GeV;
-
-//--------------------------------------------------------------
-// Output levels
-//--------------------------------------------------------------
-// Set output level threshold 
-// (0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-MessageSvc.OutputLevel  = 2 ;
-StoreGateSvc.OutputLevel = 3 ;
-
-
-// write out a list of all Storegate collection with their keys and
-// lock/unlock state. Very useful for debugging purpose
-StoreGateSvc.Dump = false ;
-ROBDataProviderSvc.OutputLevel = 3 ;
-TRT_RDO_Cnv.OutputLevel = 3 ;
\ No newline at end of file
diff --git a/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py b/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py
deleted file mode 100755
index 7ff5f35062c2..000000000000
--- a/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#give a list of RoI you want to create (as many as the shortest list below)
-FakeLvl1Conversion_L2.RoiIDs = ["MUONROI","MUONROI","MUONROI","EMTAUROI"]
-
-#their positions in eta
-#FakeLvl1Conversion_L2.RoiPositionsEta = [-0.405654,0.87,99.]
-FakeLvl1Conversion_L2.RoiPositionsEta = [2.75]
-
-#and phi
-FakeLvl1Conversion_L2.RoiPositionsPhi = [4.09706,0.17,0.]
-FakeLvl1Conversion_L2.OutputLevel = DEBUG
-
-#only one MUONROI can be set (defaults are 1/31/10)
-FakeLvl1Conversion_L2.MUONROIsubsysId = 1
-FakeLvl1Conversion_L2.MUONROIsectorId = 31
-FakeLvl1Conversion_L2.MUONROIroiNumber= 10
diff --git a/Trigger/TrigFake/share/jobOfragment_TrigFake.py b/Trigger/TrigFake/share/jobOfragment_TrigFake.py
deleted file mode 100755
index 9581352cce0d..000000000000
--- a/Trigger/TrigFake/share/jobOfragment_TrigFake.py
+++ /dev/null
@@ -1,9 +0,0 @@
-theApp.Dlls += [ "TrigFake" ]
-if doTruth:
-    theApp.TopAlg += [ "ZVertexFromKine"  ]
-
-    if DetDescrVersion[0:2]=="DC2":
-        Algorithm("ZVertexFromKine").McEventCollectionName = "G4Truth"
-    else:
-        Algorithm("ZVertexFromKine").McEventCollectionName = "TruthEvent"
-
diff --git a/Trigger/TrigFake/share/jobOfragment_TrigFake.txt b/Trigger/TrigFake/share/jobOfragment_TrigFake.txt
deleted file mode 100755
index dac7ebd55a17..000000000000
--- a/Trigger/TrigFake/share/jobOfragment_TrigFake.txt
+++ /dev/null
@@ -1 +0,0 @@
-ApplicationMgr.DLLs += { "TrigFake" };
diff --git a/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx
old mode 100755
new mode 100644
index b48deb22969e..2ecadae82256
--- a/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx
+++ b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx
@@ -31,9 +31,9 @@ Modified :
 # include "CLHEP/Units/SystemOfUnits.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h"
-#include "TrigFake/FakeRoI.h"
-#include "TrigFake/Trajectory.h"
+#include "FakeLvl1MultipleRoIsatFixedEtaPhi.h"
+#include "FakeRoI.h"
+#include "Trajectory.h"
 
 #include "TrigInterfaces/AlgoConfig.h"
 #include "TrigSteering/SteeringChain.h"
diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h
rename to Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.h
diff --git a/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx
old mode 100755
new mode 100644
index ab1a7e2b40e1..164b12a3ea10
--- a/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx
+++ b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx
@@ -27,9 +27,9 @@ Modified :
 # include "CLHEP/Units/SystemOfUnits.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "TrigFake/FakeLvl1RoIatFixedEtaPhi.h"
-#include "TrigFake/FakeRoI.h"
-#include "TrigFake/Trajectory.h"
+#include "FakeLvl1RoIatFixedEtaPhi.h"
+#include "FakeRoI.h"
+#include "Trajectory.h"
 
 #include "TrigInterfaces/AlgoConfig.h"
 #include "TrigSteering/SteeringChain.h"
diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1RoIatFixedEtaPhi.h b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/FakeLvl1RoIatFixedEtaPhi.h
rename to Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.h
diff --git a/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx
old mode 100755
new mode 100644
index d05c4d58a4b0..40d868dd86dd
--- a/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx
+++ b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx
@@ -33,9 +33,9 @@ Modified :
 #include "GeneratorObjects/McEventCollection.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "TrigFake/FakeLvl1RoIfromKine.h"
-#include "TrigFake/FakeRoI.h"
-#include "TrigFake/Trajectory.h"
+#include "FakeLvl1RoIfromKine.h"
+#include "FakeRoI.h"
+#include "Trajectory.h"
 
 
 #include "TrigInterfaces/AlgoConfig.h"
diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1RoIfromKine.h b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/FakeLvl1RoIfromKine.h
rename to Trigger/TrigFake/src/FakeLvl1RoIfromKine.h
diff --git a/Trigger/TrigFake/TrigFake/FakeRoI.h b/Trigger/TrigFake/src/FakeRoI.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/FakeRoI.h
rename to Trigger/TrigFake/src/FakeRoI.h
diff --git a/Trigger/TrigFake/src/Trajectory.cxx b/Trigger/TrigFake/src/Trajectory.cxx
old mode 100755
new mode 100644
index 598bc5f2536d..44113db61aec
--- a/Trigger/TrigFake/src/Trajectory.cxx
+++ b/Trigger/TrigFake/src/Trajectory.cxx
@@ -3,7 +3,7 @@
 */
 
 #include<cmath>
-#include "TrigFake/Trajectory.h"
+#include "Trajectory.h"
 
 namespace TrigFake{
 Trajectory::Trajectory(double px_MeV, double py_MeV, double pz_MeV, 
diff --git a/Trigger/TrigFake/TrigFake/Trajectory.h b/Trigger/TrigFake/src/Trajectory.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/Trajectory.h
rename to Trigger/TrigFake/src/Trajectory.h
diff --git a/Trigger/TrigFake/src/ZVertexFromKine.cxx b/Trigger/TrigFake/src/ZVertexFromKine.cxx
old mode 100755
new mode 100644
index d1558205b8a7..9b0f9d3b6e1c
--- a/Trigger/TrigFake/src/ZVertexFromKine.cxx
+++ b/Trigger/TrigFake/src/ZVertexFromKine.cxx
@@ -25,7 +25,7 @@ Modified :
 #include "TrigInDetEvent/TrigVertexCollection.h"
 #include "TrigInDetEvent/TrigVertex.h"
 
-#include "TrigFake/ZVertexFromKine.h"                               
+#include "ZVertexFromKine.h"                               
 
 
 
diff --git a/Trigger/TrigFake/TrigFake/ZVertexFromKine.h b/Trigger/TrigFake/src/ZVertexFromKine.h
old mode 100755
new mode 100644
similarity index 100%
rename from Trigger/TrigFake/TrigFake/ZVertexFromKine.h
rename to Trigger/TrigFake/src/ZVertexFromKine.h
diff --git a/Trigger/TrigFake/src/components/TrigFake_entries.cxx b/Trigger/TrigFake/src/components/TrigFake_entries.cxx
index 45baa2d1d037..78d495b978e9 100644
--- a/Trigger/TrigFake/src/components/TrigFake_entries.cxx
+++ b/Trigger/TrigFake/src/components/TrigFake_entries.cxx
@@ -1,8 +1,8 @@
-#include "TrigFake/FakeLvl1RoIatFixedEtaPhi.h"
-#include "TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h"
+#include "../FakeLvl1RoIatFixedEtaPhi.h"
+#include "../FakeLvl1MultipleRoIsatFixedEtaPhi.h"
 //#include "TrigFake/FakeLvl1ConversionTestBeam.h"
-#include "TrigFake/FakeLvl1RoIfromKine.h"
-#include "TrigFake/ZVertexFromKine.h"
+#include "../FakeLvl1RoIfromKine.h"
+#include "../ZVertexFromKine.h"
 
 
 DECLARE_COMPONENT( FakeLvl1RoIfromKine )
-- 
GitLab


From 1d2621d77e498601a9f1de7270dcf810ee1f03cc Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 13 Jun 2020 18:06:17 +0100
Subject: [PATCH 248/266] Comparison Function, avoid allocation, default ctor
 assignment, since no ptr impl can be slightly easier

---
 .../TrkEventUtils/ComparisonFunction.h        | 186 +++++++++---------
 1 file changed, 90 insertions(+), 96 deletions(-)

diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
index d393a9823bd9..56cba7fd6489 100755
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
+++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -9,105 +9,99 @@
 #ifndef TRKEVENTUTILS_COMPARISONFUNCTION_H
 #define TRKEVENTUTILS_COMPARISONFUNCTION_H
 
-//STL
-#include <ext/algorithm>
-#include <cmath>
 #include "GeoPrimitives/GeoPrimitives.h"
+#include <cmath>
+#include <cstdint>
 
 namespace Trk {
 
-  /** 
-    @class ComparisonFunction 
-    
-    this functor is used to find the closest objects:
-    
-    - a point
-    - a line
-    - a cylinder of radius R
-    
-    @author Andreas.Salzburger@cern.ch
-     
-    */
-
-   template <class T>  class ComparisonFunction {
-     public:        
-        /** Default Constructor */
-        ComparisonFunction():
-          m_point(0),
-          m_line(0),
-          m_radius(0.)
-        {}
-        
-        /** Constructor for pointlike Search */        
-        ComparisonFunction(const Amg::Vector3D& sp):
-          m_point(new Amg::Vector3D(sp)),
-          m_line(0),
-          m_radius(0.)
-        {}  
-
-        /** Constructor for search from line */
-        ComparisonFunction(const Amg::Vector3D& sp, const Amg::Vector3D& dir):
-          m_point(new Amg::Vector3D(sp)),
-          m_line(new Amg::Vector3D(dir)),
-          m_radius(0.)
-        {} 
-        
-        ComparisonFunction(double cradius):
-          m_point(0),
-          m_line(0),
-          m_radius(fabs(cradius))
-        {}
-
-        ComparisonFunction(const ComparisonFunction& cpf):
-          m_point(cpf.m_point ? new Amg::Vector3D(*cpf.m_point) : 0),
-          m_line(cpf.m_line  ? new Amg::Vector3D(*cpf.m_line) : 0),
-          m_radius(cpf.m_radius)
-        {}
-
-        virtual ~ComparisonFunction(){
-          delete m_point;
-          delete m_line;
-        }
-
-        ComparisonFunction &operator=(const ComparisonFunction& cpf) {
-          if (this != &cpf) {
-            delete m_point;
-            m_point=(cpf.m_point ? new Amg::Vector3D(*cpf.m_point) : 0);
-            delete m_line;
-            m_line=(cpf.m_line  ? new Amg::Vector3D(*cpf.m_line) : 0);
-            m_radius=(cpf.m_radius);
-          }
-          return *this;
-        }
-                       
-        bool operator() (const T* one, const T* two) const {                 
-                if (!m_point && !m_line){
-                  return ( fabs(one->position().perp() - m_radius) < fabs(two->position().perp() - m_radius) );
-                }
-                if (!m_line){
-                 return ( (one->position() - (*m_point)).mag() < (two->position() - (*m_point)).mag());
-                }
-                Amg::Vector3D distPosOne((one->position())-(*m_point)); 
-                double lmag2 = m_line->mag(); lmag2 *= lmag2;
-                double dp1_mag2 = distPosOne.mag(); dp1_mag2 *= dp1_mag2;
-                double pl1_2 = m_line->dot(distPosOne); pl1_2 *= pl1_2;
-                double distOne = (lmag2*dp1_mag2 - pl1_2)/dp1_mag2; 
-
-                Amg::Vector3D distPosTwo((two->position())-(*m_point)); 
-                double dp2_mag2 = distPosTwo.mag(); dp1_mag2 *= dp1_mag2;
-                double pl2_2 = m_line->dot(distPosTwo); pl1_2 *= pl1_2;
-                double distTwo = (lmag2*dp2_mag2 - pl2_2)/dp2_mag2; 
-                
-                return ( fabs(distOne) < fabs(distTwo) );
-        }
-         
-      private:
-        Amg::Vector3D* m_point;
-        Amg::Vector3D* m_line;
-        double         m_radius;
-                    
-  };
-   
+/**
+  @class ComparisonFunction
+
+  this functor is used to find the closest objects:
+
+  - a point
+  - a line
+  - a cylinder of radius R
+
+  @author Andreas.Salzburger@cern.ch
+  @author Christos Anastopoulos (MT cleanup)
+
+  */
+
+template<class T>
+class ComparisonFunction
+{
+public:
+  /** Default */
+  ComparisonFunction() = default;
+  ComparisonFunction(const ComparisonFunction& cpf) = default;
+  ComparisonFunction(ComparisonFunction&& cpf) = default;
+  ComparisonFunction& operator=(const ComparisonFunction& cpf) = default;
+  ComparisonFunction& operator=(ComparisonFunction&& cpf) = default;
+  ~ComparisonFunction() = default;
+
+  /** Constructor for pointlike Search */
+  ComparisonFunction(const Amg::Vector3D& sp)
+    : m_point(sp)
+    , m_line{}
+    , m_radius{ 0 }
+    , m_hasPointAndLine{ 1 }
+  {}
+
+  /** Constructor with point and line, search with direction */
+  ComparisonFunction(const Amg::Vector3D& sp, const Amg::Vector3D& dir)
+    : m_point(sp)
+    , m_line(dir)
+    , m_radius{ 0. }
+    , m_hasPointAndLine{ 2 }
+  {}
+
+  /** Search wrt to distance wrt to radius*/
+  ComparisonFunction(double cradius)
+    : m_point{}
+    , m_line{}
+    , m_radius{ std::abs(cradius) }
+    , m_hasPointAndLine{ 0 }
+  {}
+
+  bool operator()(const T* one, const T* two) const
+  {
+    if (m_hasPointAndLine == 0) {
+      return (fabs(one->position().perp() - m_radius) <
+              fabs(two->position().perp() - m_radius));
+    }
+    if (m_hasPointAndLine == 1) {
+      return ((one->position() - m_point).mag() <
+              (two->position() - m_point).mag());
+    }
+    Amg::Vector3D distPosOne((one->position()) - m_point);
+    double lmag2 = m_line.mag();
+    lmag2 *= lmag2;
+    double dp1_mag2 = distPosOne.mag();
+    dp1_mag2 *= dp1_mag2;
+    double pl1_2 = m_line.dot(distPosOne);
+    pl1_2 *= pl1_2;
+    double distOne = (lmag2 * dp1_mag2 - pl1_2) / dp1_mag2;
+
+    Amg::Vector3D distPosTwo((two->position()) - m_point);
+    double dp2_mag2 = distPosTwo.mag();
+    dp1_mag2 *= dp1_mag2;
+    double pl2_2 = m_line.dot(distPosTwo);
+    pl1_2 *= pl1_2;
+    double distTwo = (lmag2 * dp2_mag2 - pl2_2) / dp2_mag2;
+
+    return (fabs(distOne) < fabs(distTwo));
+  }
+
+private:
+  Amg::Vector3D m_point;
+  Amg::Vector3D m_line;
+  double m_radius = 0.;
+  // 0 no line no point, 1 only point , 2 has both
+  int8_t m_hasPointAndLine = 0;
+};
+
 } // end of namespace
 
 #endif
-- 
GitLab


From b61ca66b90dc6bf698523a72ac19c8f68da47106 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 13 Jun 2020 21:16:38 +0100
Subject: [PATCH 249/266] EMBreCollectionTool does not need an EM Extrapolation
 Tool instance

---
 .../egamma/egammaAlgs/python/EMBremCollectionBuilder.py       | 3 +--
 .../egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx         | 2 --
 .../egamma/egammaAlgs/src/EMBremCollectionBuilder.h           | 4 ----
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
index 97a1a5657977..9084f01e87a4 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
@@ -14,7 +14,6 @@ from egammaRec.Factories import AlgFactory
 from egammaTools.egammaExtrapolators import (AtlasPublicExtrapolator,
                                              egammaExtrapolator)
 # default configuration of the EMBremCollectionBuilder
-from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
 from InDetRecExample.InDetJobProperties import InDetFlags
 from InDetRecExample.InDetKeys import InDetKeys
 from RecExConfig.RecFlags import rec
@@ -108,6 +107,7 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder):
         #  Track Particle Creator tool (private not in ToolSvc)
         #  But needs a public extrapolator and
         #  InDetTrackSummaryTool still...
+        #
         from TrkParticleCreator.TrkParticleCreatorConf import (
             Trk__TrackParticleCreatorTool)
 
@@ -138,7 +138,6 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder):
 EMBremCollectionBuilder = AlgFactory(
     egammaBremCollectionBuilder,
     name='EMBremCollectionBuilder',
-    ExtrapolationTool=EMExtrapolationTools,
     TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(),
     OutputTrkPartContainerName=egammaKeys.outputTrackParticleKey(),
     OutputTrackContainerName=egammaKeys.outputTrackKey(),
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
index 16ca1b03c981..3642deb631ce 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
@@ -52,8 +52,6 @@ StatusCode EMBremCollectionBuilder::initialize() {
   ATH_CHECK(m_slimTool.retrieve());
   /* Get the track summary tool */
   ATH_CHECK(m_summaryTool.retrieve());
-  /* the extrapolation tool*/
-  ATH_CHECK(m_extrapolationTool.retrieve());
   
   return StatusCode::SUCCESS;
 }  
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
index d9af48a6a440..cd0f9da03c2f 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
+++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
@@ -106,10 +106,6 @@ private:
   ToolHandle<Trk::ITrackSummaryTool>   m_summaryTool {this,
     "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool"};
 
-  /** @brief Tool for extrapolation */
-  ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this,
-    "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"};
-
   /** @brief Option to do truth*/
   Gaudi::Property<bool> m_doTruth {this, "DoTruth", false, "do truth"};
 
-- 
GitLab


From f1c3938fd9eb62b8f8fb591933de2ade5f4c3849 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 14 Jun 2020 04:54:54 +0100
Subject: [PATCH 250/266] Magnetic field Elements use std::array when can make
 syntax easier, use ATh_RESTRICT where seems OK to do so

---
 .../MagFieldElements/AtlasFieldCache.h        | 30 ++++----
 .../MagFieldElements/AtlasFieldCache.icc      | 46 +++++++------
 .../MagFieldElements/BFieldCache.h            | 31 +++++----
 .../MagFieldElements/BFieldCache.icc          | 61 ++++++++---------
 .../MagFieldElements/BFieldMesh.h             | 48 ++++++-------
 .../MagFieldElements/BFieldMesh.icc           | 68 ++++++++++---------
 .../MagFieldElements/BFieldVector.h           | 35 +++++-----
 .../MagFieldElements/BFieldVectorZR.h         | 33 +++++----
 .../MagFieldElements/src/AtlasFieldCache.cxx  |  2 +-
 .../MagFieldElements/src/AtlasFieldMap.cxx    |  2 +-
 .../src/AtlasFieldCacheCondAlg.cxx            |  2 +-
 .../src/AtlasFieldMapCondAlg.cxx              |  4 +-
 12 files changed, 190 insertions(+), 172 deletions(-)

diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
index 9a04eee74f3f..2871b66ea6ab 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
@@ -43,7 +43,12 @@ public:
   AtlasFieldCache(double solFieldScale,
                   double torFieldScale,
                   const AtlasFieldMap* fieldMap);
+
+  /**
+   * Move-able but not copy-able
+   */
   AtlasFieldCache& operator=(AtlasFieldCache&& other) = default;
+  AtlasFieldCache(AtlasFieldCache&& other) = default;
   ~AtlasFieldCache() = default;
 
   /// Temporary flag for switching between 'old' and 'new' magField usage
@@ -55,46 +60,47 @@ public:
   inline void getField(const double* ATH_RESTRICT xyz,
                        double* ATH_RESTRICT bxyz,
                        double* ATH_RESTRICT deriv = nullptr);
+
   inline void getFieldZR(const double* ATH_RESTRICT xyz,
                          double* ATH_RESTRICT bxyz,
                          double* ATH_RESTRICT deriv = nullptr);
 
   /** status of the magnets */
   bool solenoidOn() const;
-  bool toroidOn() const; 
+  bool toroidOn() const;
 
 private:
   AtlasFieldCache(const AtlasFieldCache& other) = delete;
   AtlasFieldCache& operator=(const AtlasFieldCache& other) = delete;
-  AtlasFieldCache(AtlasFieldCache&& other) = delete;
 
   bool fillFieldCache(double z, double r, double phi);
   bool fillFieldCacheZR(double z, double r);
 
+  /// Full 3d field
+  BFieldCache m_cache3d;
+
+  /// Fast 2d field
+  BFieldCacheZR m_cacheZR;
+
   /// magnetic field scales from currents
   double m_solScale{ 1 };
   double m_torScale{ 1 };
   double m_scaleToUse{ 1 };
-  // Solenoid zone ID number - needed to set solScale. Assumes only one Solenoid
-  // zone!
-  int m_solZoneId{ -1 };
 
   /// handle to the magnetic field service - not owner
-  const AtlasFieldMap* m_fieldMap;
+  const AtlasFieldMap* m_fieldMap{ nullptr };
 
   /// Pointer to the conductors in the current field zone (to compute
   /// Biot-Savart component) Owned by AtlasFieldMap.
   const std::vector<BFieldCond>* m_cond{ nullptr };
 
-  /// Full 3d field
-  BFieldCache m_cache3d;
-
-  /// Fast 2d field
-  BFieldCacheZR m_cacheZR;
-
   // fast 2d map (made of one zone)
   /// Owned by AtlasFieldMap.
   const BFieldMeshZR* m_meshZR{ nullptr };
+
+  // Solenoid zone ID number - needed to set solScale. Assumes only one Solenoid
+  // zone!
+  int m_solZoneId{ -1 };
 };
 
 } // namespace MagField
diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
index 1ee7397d5c8e..2aa851d47476 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-
 /** fill given magnetic field zone */
 inline bool
 MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi)
@@ -37,15 +36,12 @@ MagField::AtlasFieldCache::fillFieldCacheZR(double z, double r)
 {
   // is it inside the solenoid zone?
   if (m_meshZR && m_meshZR->inside(z, r)) {
-
     // fill the cache, pass in current scale factor
     m_meshZR->getCache(z, r, m_cacheZR, m_solScale);
-
-  } else {
-    // outside solenoid
-    return false;
+    return true;
   }
-  return true;
+  // outside solenoid
+  return false;
 }
 
 inline void
@@ -59,15 +55,19 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
       constexpr double TEST_BFIELD = 1.997;      
       bxyz[0] = bxyz[1] = 0;
       bxyz[2] = TEST_BFIELD;
-      if (deriv) for (int i = 0; i < 9; i++) deriv[i] = 0.;
+      if (deriv) {
+        for (int i = 0; i < 9; i++) {
+          deriv[i] = 0.;
+        }
+      }
       return;
   }
-    
-  const double& x(xyz[0]);
-  const double& y(xyz[1]);
-  const double& z(xyz[2]);
-  double r = std::sqrt(x * x + y * y);
-  double phi = std::atan2(y, x);
+
+  const double x = xyz[0];
+  const double y = xyz[1];
+  const double z = xyz[2];
+  const double r = std::sqrt(x * x + y * y);
+  const double phi = std::atan2(y, x);
 
   // test if initialised and the cache is valid
   if (!m_cache3d.inside(z, r, phi)) {
@@ -108,17 +108,21 @@ MagField::AtlasFieldCache::getFieldZR(const double* ATH_RESTRICT xyz,
   // Allow for the case of no map for testing
   if ( m_fieldMap == nullptr ) {
       // constant ATLAS magnetic field if no map has been set - for testing
-      constexpr double TEST_BFIELD = 1.997;      
+      constexpr double TEST_BFIELD = 1.997;
       bxyz[0] = bxyz[1] = 0;
       bxyz[2] = TEST_BFIELD;
-      if (deriv) for (int i = 0; i < 9; i++) deriv[i] = 0.;
+      if (deriv) {
+        for (int i = 0; i < 9; i++) {
+          deriv[i] = 0.;
+        }
+      }
       return;
   }
-    
-  const double& x(xyz[0]);
-  const double& y(xyz[1]);
-  const double& z(xyz[2]);
-  double r = sqrt(x * x + y * y);
+
+  const double x = xyz[0];
+  const double y = xyz[1];
+  const double z = xyz[2];
+  const double r = sqrt(x * x + y * y);
 
   // test if the cache was initialized and the ZR cache is valid for current
   // position
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
index d474cbec13a6..98bf7f2ed75a 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
@@ -15,8 +15,8 @@
 #define BFIELDCACHE_H
 
 #include "MagFieldElements/BFieldVector.h"
+#include "CxxUtils/restrict.h"
 #include <cmath>
-#include <iostream>
 
 class BFieldCache
 {
@@ -57,20 +57,27 @@ public:
     m_invphi = 1.0 / (phimax - phimin);
   }
   // set the field values at each corner (rescale for current scale factor)
-  void setField(int i,
-                const BFieldVector<double>& field,
+  void setField(const std::array<BFieldVector<double>,8>& field,
                 double scaleFactor = 1.0)
   {
-    for (int j = 0; j < 3; j++) {
-      m_field[j][i] = scaleFactor * field[j];
+    // We pass array of 8 elements with 3 entries
+    // Which go to 3x8 matrix
+    for (int i = 0; i < 8; ++i) {
+      for (int j = 0; j < 3; ++j) {
+        m_field[j][i] = scaleFactor * field[i][j];
+      }
     }
   }
-  void setField(int i,
-                const BFieldVector<short>& field,
+  
+  void setField(const std::array<BFieldVector<short>,8>& field,
                 double scaleFactor = 1.0)
   {
-    for (int j = 0; j < 3; j++) {
-      m_field[j][i] = scaleFactor * field[j];
+    // We pass array of 8 elements with 3 entries
+    // Which go to 3x8 matrix
+    for (int i = 0; i < 8; ++i) {
+      for (int j = 0; j < 3; ++j) {
+        m_field[j][i] = scaleFactor * field[i][j];
+      }
     }
   }
   // set the multiplicative factor for the field vectors
@@ -87,11 +94,11 @@ public:
   }
   // interpolate the field and return B[3].
   // also compute field derivatives if deriv[9] is given.
-  void getB(const double* xyz,
+  void getB(const double* ATH_RESTRICT xyz,
             double r,
             double phi,
-            double* B,
-            double* deriv = nullptr) const;
+            double* ATH_RESTRICT B,
+            double* ATH_RESTRICT deriv = nullptr) const;
 
 private:
   double m_zmin, m_zmax;          // bin range in z
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
index 8b6e11310e00..0fadd5381bf1 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
@@ -3,42 +3,41 @@
 */
 
 inline void
-BFieldCache::getB(const double* xyz,
+BFieldCache::getB(const double* ATH_RESTRICT xyz,
                   double r,
                   double phi,
-                  double* B,
-                  double* deriv) const
+                  double* ATH_RESTRICT B,
+                  double* ATH_RESTRICT deriv) const
 {
 
-  const double& x(xyz[0]);
-  const double& y(xyz[1]);
-  const double& z(xyz[2]);
+  const double x = xyz[0];
+  const double y = xyz[1];
+  const double z = xyz[2];
 
   // make sure phi is inside [m_phimin,m_phimax]
   if (phi < m_phimin) {
     phi += 2 * M_PI;
   }
   // fractional position inside this bin
-  float fz = (z - m_zmin) * m_invz;
-  float gz = 1.0 - fz;
-  float fr = (r - m_rmin) * m_invr;
-  float gr = 1.0 - fr;
-  float fphi = (phi - m_phimin) * m_invphi;
-  float gphi = 1.0 - fphi;
+  const float fz = (z - m_zmin) * m_invz;
+  const float gz = 1.0 - fz;
+  const float fr = (r - m_rmin) * m_invr;
+  const float gr = 1.0 - fr;
+  const float fphi = (phi - m_phimin) * m_invphi;
+  const float gphi = 1.0 - fphi;
   // interpolate field values in z, r, phi
+  const float scale = m_scale;
   float Bzrphi[3];
   for (int i = 0; i < 3; i++) { // z, r, phi components
     const float* field = m_field[i];
-    Bzrphi[i] = m_scale * (gz * (gr * (gphi * field[0] + fphi * field[1]) +
-                                 fr * (gphi * field[2] + fphi * field[3])) +
-                           fz * (gr * (gphi * field[4] + fphi * field[5]) +
-                                 fr * (gphi * field[6] + fphi * field[7])));
+    Bzrphi[i] = scale * (gz * (gr * (gphi * field[0] + fphi * field[1]) +
+                               fr * (gphi * field[2] + fphi * field[3])) +
+                         fz * (gr * (gphi * field[4] + fphi * field[5]) +
+                               fr * (gphi * field[6] + fphi * field[7])));
   }
   // convert (Bz,Br,Bphi) to (Bx,By,Bz)
   float invr;
-
   float c;
-
   float s;
   if (r > 0.0) {
     invr = 1.0 / r;
@@ -55,14 +54,14 @@ BFieldCache::getB(const double* xyz,
 
   // compute field derivatives if requested
   if (deriv) {
-    float sz = m_scale * m_invz;
-    float sr = m_scale * m_invr;
-    float sphi = m_scale * m_invphi;
+    const float sz = m_scale * m_invz;
+    const float sr = m_scale * m_invr;
+    const float sphi = m_scale * m_invphi;
+   
     float dBdz[3];
-
     float dBdr[3];
-
     float dBdphi[3];
+    
     for (int j = 0; j < 3; j++) { // Bz, Br, Bphi components
       const float* field = m_field[j];
       dBdz[j] =
@@ -78,14 +77,14 @@ BFieldCache::getB(const double* xyz,
                 fz * (gr * (field[5] - field[4]) + fr * (field[7] - field[6])));
     }
     // convert to cartesian coordinates
-    float cc = c * c;
-    float cs = c * s;
-    float ss = s * s;
-    float ccinvr = cc * invr;
-    float csinvr = cs * invr;
-    float ssinvr = ss * invr;
-    float sinvr = s * invr;
-    float cinvr = c * invr;
+    const float cc = c * c;
+    const float cs = c * s;
+    const float ss = s * s;
+    const float ccinvr = cc * invr;
+    const float csinvr = cs * invr;
+    const float ssinvr = ss * invr;
+    const float sinvr = s * invr;
+    const float cinvr = c * invr;
     deriv[0] = cc * dBdr[1] - cs * dBdr[2] - csinvr * dBdphi[1] +
                ssinvr * dBdphi[2] + sinvr * B[1];
     deriv[1] = cs * dBdr[1] - ss * dBdr[2] + ccinvr * dBdphi[1] -
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
index deab3cd9eeb5..585fc31b05ea 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
@@ -16,8 +16,8 @@
 
 #include "MagFieldElements/BFieldCache.h"
 #include "MagFieldElements/BFieldVector.h"
+#include <array>
 #include <cmath>
-#include <iostream>
 #include <vector>
 
 template<class T>
@@ -25,11 +25,7 @@ class BFieldMesh
 {
 public:
   // constructor
-  BFieldMesh()
-    : m_scale(1.0)
-  {
-    ;
-  }
+  BFieldMesh() = default;
   BFieldMesh(double zmin,
              double zmax,
              double rmin,
@@ -40,12 +36,8 @@ public:
     : m_scale(bscale)
     , m_nomScale(bscale)
   {
-    m_min[0] = zmin;
-    m_max[0] = zmax;
-    m_min[1] = rmin;
-    m_max[1] = rmax;
-    m_min[2] = phimin;
-    m_max[2] = phimax;
+    m_min = { zmin, rmin, phimin };
+    m_max = { zmax, rmax, phimax };
   }
   // set ranges
   void setRange(double zmin,
@@ -55,12 +47,8 @@ public:
                 double phimin,
                 double phimax)
   {
-    m_min[0] = zmin;
-    m_max[0] = zmax;
-    m_min[1] = rmin;
-    m_max[1] = rmax;
-    m_min[2] = phimin;
-    m_max[2] = phimax;
+    m_min = { zmin, rmin, phimin };
+    m_max = { zmax, rmax, phimax };
   }
   // set bscale
   void setBscale(double bscale) { m_scale = m_nomScale = bscale; }
@@ -75,7 +63,7 @@ public:
   // add elements to vectors
   void appendMesh(int i, double mesh) { m_mesh[i].push_back(mesh); }
   void appendField(const BFieldVector<T>& field) { m_field.push_back(field); }
-  // build LUT
+  // build Look Up Table
   void buildLUT();
   // test if a point is inside this zone
   bool inside(double z, double r, double phi) const;
@@ -86,34 +74,38 @@ public:
                 BFieldCache& cache,
                 double scaleFactor = 1.0) const;
   // get the B field
-  void getB(const double* xyz, double* B, double* deriv = nullptr) const;
+  void getB(const double* ATH_RESTRICT xyz,
+            double* ATH_RESTRICT B,
+            double* ATH_RESTRICT deriv = nullptr) const;
   // accessors
-  double min(int i) const { return m_min[i]; }
-  double max(int i) const { return m_max[i]; }
+  double min(size_t i) const { return m_min[i]; }
+  double max(size_t i) const { return m_max[i]; }
   double zmin() const { return m_min[0]; }
   double zmax() const { return m_max[0]; }
   double rmin() const { return m_min[1]; }
   double rmax() const { return m_max[1]; }
   double phimin() const { return m_min[2]; }
   double phimax() const { return m_max[2]; }
-  unsigned nmesh(int i) const { return m_mesh[i].size(); }
-  double mesh(int i, int j) const { return m_mesh[i][j]; }
+  unsigned nmesh(size_t i) const { return m_mesh[i].size(); }
+  double mesh(size_t i, size_t j) const { return m_mesh[i][j]; }
   unsigned nfield() const { return m_field.size(); }
-  const BFieldVector<T>& field(int i) const { return m_field[i]; }
+  const BFieldVector<T>& field(size_t i) const { return m_field[i]; }
   double bscale() const { return m_scale; }
   int memSize() const;
 
 protected:
-  double m_min[3], m_max[3];
+  std::array<double, 3> m_min;
+  std::array<double, 3> m_max;
   std::vector<double> m_mesh[3];
 
 private:
   std::vector<BFieldVector<T>> m_field;
-  double m_scale;
+  double m_scale = 1.0;
   double m_nomScale; // nominal m_scale from the map
+
   // look-up table and related variables
   std::vector<int> m_LUT[3];
-  double m_invUnit[3]; // inverse unit size in the LUT
+  std::array<double,3> m_invUnit; // inverse unit size in the LUT
   int m_roff, m_zoff;
 };
 #include "BFieldMesh.icc"
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
index 18adc27d1e28..b85e2bb1aa13 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
@@ -73,15 +73,18 @@ BFieldMesh<T>::getCache(double z,
   cache.setRange(
     mz[iz], mz[iz + 1], mr[ir], mr[ir + 1], mphi[iphi], mphi[iphi + 1]);
   // store the B field at the 8 corners
-  int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner
-  cache.setField(0, m_field[im0], scaleFactor);
-  cache.setField(1, m_field[im0 + 1], scaleFactor);
-  cache.setField(2, m_field[im0 + m_roff], scaleFactor);
-  cache.setField(3, m_field[im0 + m_roff + 1], scaleFactor);
-  cache.setField(4, m_field[im0 + m_zoff], scaleFactor);
-  cache.setField(5, m_field[im0 + m_zoff + 1], scaleFactor);
-  cache.setField(6, m_field[im0 + m_zoff + m_roff], scaleFactor);
-  cache.setField(7, m_field[im0 + m_zoff + m_roff + 1], scaleFactor);
+  const int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner
+  std::array<BFieldVector<T>, 8> field = {
+    m_field[im0],
+    m_field[im0 + 1],
+    m_field[im0 + m_roff],
+    m_field[im0 + m_roff + 1],
+    m_field[im0 + m_zoff],
+    m_field[im0 + m_zoff + 1],
+    m_field[im0 + m_zoff + m_roff],
+    m_field[im0 + m_zoff + m_roff + 1]
+  };
+  cache.setField(field, scaleFactor);
   // store the B scale
   cache.setBscale(m_scale);
 }
@@ -91,7 +94,9 @@ BFieldMesh<T>::getCache(double z,
 //
 template<class T>
 void
-BFieldMesh<T>::getB(const double* xyz, double* B, double* deriv) const
+BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz,
+                    double* ATH_RESTRICT B,
+                    double* ATH_RESTRICT deriv) const
 {
   // cylindrical coordinates
   double x = xyz[0];
@@ -136,34 +141,33 @@ BFieldMesh<T>::getB(const double* xyz, double* B, double* deriv) const
   }
   // get the B field at the 8 corners
   int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner
-  BFieldVector<T> field[8];
-  field[0] = m_field[im0];
-  field[1] = m_field[im0 + 1];
-  field[2] = m_field[im0 + m_roff];
-  field[3] = m_field[im0 + m_roff + 1];
-  field[4] = m_field[im0 + m_zoff];
-  field[5] = m_field[im0 + m_zoff + 1];
-  field[6] = m_field[im0 + m_zoff + m_roff];
-  field[7] = m_field[im0 + m_zoff + m_roff + 1];
+  const std::array<BFieldVector<T>, 8> field = { m_field[im0],
+                                           m_field[im0 + 1],
+                                           m_field[im0 + m_roff],
+                                           m_field[im0 + m_roff + 1],
+                                           m_field[im0 + m_zoff],
+                                           m_field[im0 + m_zoff + 1],
+                                           m_field[im0 + m_zoff + m_roff],
+                                           m_field[im0 + m_zoff + m_roff + 1] };
   // fractional position inside this mesh
-  double fz = (z - mz[iz]) / (mz[iz + 1] - mz[iz]);
-  double gz = 1.0 - fz;
-  double fr = (r - mr[ir]) / (mr[ir + 1] - mr[ir]);
-  double gr = 1.0 - fr;
-  double fphi = (phi - mphi[iphi]) / (mphi[iphi + 1] - mphi[iphi]);
-  double gphi = 1.0 - fphi;
+  const double fz = (z - mz[iz]) / (mz[iz + 1] - mz[iz]);
+  const double gz = 1.0 - fz;
+  const double fr = (r - mr[ir]) / (mr[ir + 1] - mr[ir]);
+  const double gr = 1.0 - fr;
+  const double fphi = (phi - mphi[iphi]) / (mphi[iphi + 1] - mphi[iphi]);
+  const double gphi = 1.0 - fphi;
+  const double scale = m_scale;
   // interpolate field values in z, r, phi
   double Bzrphi[3];
   for (int i = 0; i < 3; i++) { // z, r, phi
-    Bzrphi[i] =
-      m_scale * (gz * (gr * (gphi * field[0][i] + fphi * field[1][i]) +
-                       fr * (gphi * field[2][i] + fphi * field[3][i])) +
-                 fz * (gr * (gphi * field[4][i] + fphi * field[5][i]) +
-                       fr * (gphi * field[6][i] + fphi * field[7][i])));
+    Bzrphi[i] = scale * (gz * (gr * (gphi * field[0][i] + fphi * field[1][i]) +
+                               fr * (gphi * field[2][i] + fphi * field[3][i])) +
+                         fz * (gr * (gphi * field[4][i] + fphi * field[5][i]) +
+                               fr * (gphi * field[6][i] + fphi * field[7][i])));
   }
   // convert (Bz,Br,Bphi) to (Bx,By,Bz)
-  double c = (r > 0.0) ? x / r : cos(mphi[iphi]);
-  double s = (r > 0.0) ? y / r : sin(mphi[iphi]);
+  const double c = (r > 0.0) ? x / r : cos(mphi[iphi]);
+  const double s = (r > 0.0) ? y / r : sin(mphi[iphi]);
   B[0] = Bzrphi[1] * c - Bzrphi[2] * s;
   B[1] = Bzrphi[1] * s + Bzrphi[2] * c;
   B[2] = Bzrphi[0];
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h
index e54fe41d244d..2d1a79e57b11 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -10,37 +10,40 @@
 //
 // Masahiro Morii, Harvard University
 //
+// Athena MT RD Schaffer , C Anastopoulos
+//
 #ifndef BFIELDVECTOR_H
 #define BFIELDVECTOR_H
 
+#include <array>
+
 template<class T>
 class BFieldVector
 {
 public:
-  // constructor
-  BFieldVector() { ; }
+  // Default
+  BFieldVector() = default;
+  BFieldVector(const BFieldVector&) = default;
+  BFieldVector(BFieldVector&&) = default;
+  BFieldVector& operator=(const BFieldVector&) = default;
+  BFieldVector& operator=(BFieldVector&&) = default;
+  ~BFieldVector() = default;
+
   BFieldVector(T Bz, T Br, T Bphi)
-  {
-    m_B[0] = Bz;
-    m_B[1] = Br;
-    m_B[2] = Bphi;
-  }
+    : m_B{ Bz, Br, Bphi }
+  {}
   // setter
-  void set(T Bz, T Br, T Bphi)
-  {
-    m_B[0] = Bz;
-    m_B[1] = Br;
-    m_B[2] = Bphi;
-  }
+  void set(T Bz, T Br, T Bphi) { m_B = { Bz, Br, Bphi }; }
+
   // accessors
   T z() const { return m_B[0]; }
   T r() const { return m_B[1]; }
   T phi() const { return m_B[2]; }
   // array-like accessor
-  T operator[](int i) const { return m_B[i]; }
+  T operator[](size_t i) const { return m_B[i]; }
 
 private:
-  T m_B[3];
+  std::array<T, 3> m_B;
 };
 
 #endif
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h
index 874c231b0bed..e5061dab58f1 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -9,33 +9,36 @@
 //
 // Masahiro Morii, Harvard University
 //
+// Athena MT RD Schaffer , C Anastopoulos
+//
 #ifndef BFIELDVECTORZR_H
 #define BFIELDVECTORZR_H
-
+#include <array>
 class BFieldVectorZR
 {
 public:
-  // constructor
-  BFieldVectorZR() { ; }
+  // default
+  BFieldVectorZR() = default;
+  BFieldVectorZR(const BFieldVectorZR&) = default;
+  BFieldVectorZR(BFieldVectorZR&&) = default;
+  BFieldVectorZR& operator=(const BFieldVectorZR&) = default;
+  BFieldVectorZR& operator=(BFieldVectorZR&&) = default;
+  ~BFieldVectorZR() = default;
+
+  //constructor
   BFieldVectorZR(float Bz, float Br)
-  {
-    m_B[0] = Bz;
-    m_B[1] = Br;
-  }
+    : m_B{ Bz, Br }
+  {}
   // setter
-  void set(float Bz, float Br)
-  {
-    m_B[0] = Bz;
-    m_B[1] = Br;
-  }
+  void set(float Bz, float Br) { m_B = { Bz, Br }; }
   // accessors
   float z() const { return m_B[0]; }
   float r() const { return m_B[1]; }
   // array-like accessor
-  float operator[](int i) const { return m_B[i]; }
+  float operator[](size_t i) const { return m_B[i]; }
 
 private:
-  float m_B[2];
+  std::array<float, 2> m_B;
 };
 
 #endif
diff --git a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx
index d21ffee4b7fe..89ace3a10777 100644
--- a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx
+++ b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx
@@ -12,7 +12,7 @@
 #include "MagFieldElements/AtlasFieldCache.h"
 
 /// Constructor
-MagField::AtlasFieldCache::AtlasFieldCache() {}
+MagField::AtlasFieldCache::AtlasFieldCache() = default;
 
 MagField::AtlasFieldCache::AtlasFieldCache(double solFieldScale,
                                            double torFieldScale,
diff --git a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
index fa16bc0f0489..43192dd4523a 100644
--- a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
+++ b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
@@ -20,7 +20,7 @@
 #include "TTree.h"
 
 /** Constructor **/
-MagField::AtlasFieldMap::AtlasFieldMap() {}
+MagField::AtlasFieldMap::AtlasFieldMap() = default;
 
 MagField::AtlasFieldMap::~AtlasFieldMap()
 {
diff --git a/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx b/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx
index c14001187c99..932fd88b12a2 100644
--- a/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx
+++ b/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx
@@ -30,7 +30,7 @@ MagField::AtlasFieldCacheCondAlg::AtlasFieldCacheCondAlg(const std::string& name
     :AthReentrantAlgorithm(name, pSvcLocator){ 
 }
 
-MagField::AtlasFieldCacheCondAlg::~AtlasFieldCacheCondAlg(){ }
+MagField::AtlasFieldCacheCondAlg::~AtlasFieldCacheCondAlg()= default;
 
 StatusCode
 MagField::AtlasFieldCacheCondAlg::initialize() {
diff --git a/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx b/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx
index 56fc691ae501..4d15b83660bb 100644
--- a/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx
+++ b/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx
@@ -33,7 +33,7 @@ MagField::AtlasFieldMapCondAlg::AtlasFieldMapCondAlg(const std::string& name,
     :AthReentrantAlgorithm(name, pSvcLocator){ 
 }
 
-MagField::AtlasFieldMapCondAlg::~AtlasFieldMapCondAlg(){ }
+MagField::AtlasFieldMapCondAlg::~AtlasFieldMapCondAlg()= default;
 
 StatusCode
 MagField::AtlasFieldMapCondAlg::initialize() {
@@ -213,7 +213,7 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c
             ATH_MSG_INFO("updateFieldMap: tagInfoH " << tagInfoH.fullKey() << " is valid. ");
             int i = 0;
             bool resetCurrentsFromTagInfo = false;
-            for ( auto tag : tagInfoH->getTags() ) {
+            for ( const auto& tag : tagInfoH->getTags() ) {
                 ATH_MSG_DEBUG("updateFieldMap: i, tags: " << i << " " << tag.first << " " << tag.second);
                 ++i;
                 if (tag.first == "MapSoleCurrent") {
-- 
GitLab


From 65911ffd84881da800601d5d8f754b73a277c8ed Mon Sep 17 00:00:00 2001
From: Yasuyuki Okumura <yasuyuki.okumura@cern.ch>
Date: Sun, 14 Jun 2020 08:30:18 +0200
Subject: [PATCH 251/266] Add ART tests for PU80 ttbar with v1Dev menu in
 TriggerTest (ATR-21577)

---
 .../TrigValTools/share/TrigValInputs.json     |  7 ++++
 .../test/test_trig_mc_v1Dev_pu80_build.py     | 30 ++++++++++++++++
 .../test/test_trig_mc_v1Dev_pu80_grid.py      | 36 +++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100755 Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
 create mode 100755 Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py

diff --git a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
index 97dbc4a2378c..19dcdb359039 100644
--- a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
+++ b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
@@ -49,6 +49,13 @@
             "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.RDO.e4993_s3214_r11315/RDO.17533168._000002.pool.root.1"
         ]
     },
+    "ttbar_pu80": {
+        "source": "mc",
+        "format": "RDO",
+        "paths": [
+            "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.RDO.e6337_e5984_s3126_r10201/RDO.13232200._000020.pool.root.1"
+        ]
+    },
     "ttbar_rel21": {
         "source": "mc",
         "format": "RDO",
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
new file mode 100755
index 000000000000..a37a863fde44
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+
+# art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample
+# art-type: build
+# art-include: master/Athena
+# Skipping art-output which has no effect for build tests.
+# If you create a grid version, check art-output in existing grid tests.
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+
+ex = ExecStep.ExecStep()
+ex.type = 'athena'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
+ex.input = 'ttbar_pu80'
+ex.threads = 1
+precommand = ''.join([
+  "setMenu='LS2_v1';",  # LS2_v1 soon to be renamed to Dev_pp_run3_v1
+  "doWriteBS=False;",
+  "doWriteRDOTrigger=True;",
+  "fpeAuditor=True;"
+])
+ex.args = '-c "{:s}"'.format(precommand)
+
+test = Test.Test()
+test.art_type = 'build'
+test.exec_steps = [ex]
+test.check_steps = CheckSteps.default_check_steps(test)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py
new file mode 100755
index 000000000000..d303cf558c6b
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+# art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample
+# art-type: grid
+# art-include: master/Athena
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.pmon.gz
+# art-output: *perfmon*
+# art-output: prmon*
+# art-output: *.check*
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+
+ex = ExecStep.ExecStep()
+ex.type = 'athena'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
+ex.input = 'ttbar_pu80'
+ex.threads = 1
+# LS2_v1 soon to be renamed to Dev_pp_run3_v1
+ex.args = '-c "setMenu=\'LS2_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
+
+test = Test.Test()
+test.art_type = 'grid'
+test.exec_steps = [ex]
+test.check_steps = CheckSteps.default_check_steps(test)
+
+import sys
+sys.exit(test.run())
-- 
GitLab


From 14459049e6eb40e3c972feacc617237091e80d59 Mon Sep 17 00:00:00 2001
From: Yohei Yamaguchi <yohei.yamaguchi@cern.ch>
Date: Sun, 14 Jun 2020 12:08:13 +0000
Subject: [PATCH 252/266] cleanup TrigL2MuonSA package v1

---
 .../TrigL2MuonSA/AlignmentBarrelLUT.h         |  36 +-
 .../TrigL2MuonSA/AlignmentBarrelLUTSvc.h      |  27 +-
 .../TrigL2MuonSA/AlphaBetaEstimate.h          |  56 ++-
 .../TrigL2MuonSA/CscDataPreparator.h          |  37 +-
 .../TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h   | 118 ++----
 .../TrigL2MuonSA/CscSegmentMaker.h            | 268 ++++++------
 .../TrigL2MuonSA/MdtDataPreparator.h          |  69 ++-
 .../TrigL2MuonSA/MdtRegionDefiner.h           |  35 +-
 .../TrigL2MuonSA/src/AlignmentBarrelLUT.cxx   |  65 +--
 .../src/AlignmentBarrelLUTSvc.cxx             |  45 +-
 .../TrigL2MuonSA/src/AlphaBetaEstimate.cxx    |  88 +---
 .../TrigL2MuonSA/src/CscDataPreparator.cxx    |  76 +---
 .../TrigL2MuonSA/src/CscRegUtils.cxx          |  69 +--
 .../TrigL2MuonSA/src/CscSegmentMaker.cxx      |  99 +----
 .../TrigL2MuonSA/src/MdtDataPreparator.cxx    | 393 +++++++-----------
 .../TrigL2MuonSA/src/MdtRegionDefiner.cxx     | 119 ++----
 16 files changed, 567 insertions(+), 1033 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h
index 02fb29bf6902..7d3389b20afb 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGL2MUONSA_ALIGNMENTBARRELLUT_H
@@ -10,8 +10,6 @@
 #include "TMath.h"
 
 #include "GaudiKernel/Service.h"
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/StatusCode.h"
 
 #include <string>
 
@@ -21,15 +19,10 @@ class AlignmentBarrelLUT: public AthAlgTool
 {
 
   public:
-    static const InterfaceID& interfaceID();
 
     AlignmentBarrelLUT(const std::string& type, 
                        const std::string& name,
                        const IInterface*  parent);
-    ~AlignmentBarrelLUT(void);
-
-    virtual StatusCode initialize();
-    virtual StatusCode finalize  ();
 
     StatusCode readLUT(std::string lut_fileName);
 
@@ -38,16 +31,23 @@ class AlignmentBarrelLUT: public AthAlgTool
     std::pair<int, int> GetBinNumber(int saddress, int innerR, double etaMap, double phiMap) const;
 
   private:
-    double m_dZ[4][2][15][30][2]; // [s_address][innerR][eta][phi][etaQ]
-
-    int m_NbinEta[4][2]; // [s_address][innerR]
-    float m_EtaMin[4][2];
-    float m_EtaMax[4][2];
-    float m_EtaStep[4][2];
-    int m_NbinPhi[4][2];
-    float m_PhiMin[4][2];
-    float m_PhiMax[4][2];
-    float m_PhiStep[4][2];
+
+    static const int s_saddress = 4;
+    static const int s_innerR = 2;
+    static const int s_eta = 15;
+    static const int s_phi = 30;
+    static const int s_etaQ = 2;
+
+    double m_dZ[s_saddress][s_innerR][s_eta][s_phi][s_etaQ];
+
+    int m_NbinEta[s_saddress][s_innerR];
+    float m_EtaMin[s_saddress][s_innerR];
+    float m_EtaMax[s_saddress][s_innerR];
+    float m_EtaStep[s_saddress][s_innerR];
+    int m_NbinPhi[s_saddress][s_innerR];
+    float m_PhiMin[s_saddress][s_innerR];
+    float m_PhiMax[s_saddress][s_innerR];
+    float m_PhiStep[s_saddress][s_innerR];
 
   };
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
index 79dad7a3929e..0922223f7101 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGL2MUONSA_ALIGNMENTBARRELLUTSVC_H
@@ -7,8 +7,6 @@
 
 #include <string>
 #include "AthenaBaseComps/AthService.h"
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/StatusCode.h"
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
@@ -16,35 +14,34 @@
 #include "TrigL2MuonSA/AlignmentBarrelLUT.h"
 
 namespace TrigL2MuonSA {
-  
+
   class AlignmentBarrelLUTSvc : public AthService, virtual public IInterface
   {
   public:
-    static const InterfaceID& interfaceID() { 
+    static const InterfaceID& interfaceID() {
       static const InterfaceID IID(11498, 0 , 0);
       return IID;
     }
 
   public:
     AlignmentBarrelLUTSvc(const std::string& name,ISvcLocator* sl);
-    virtual ~AlignmentBarrelLUTSvc() {}
-    
+
     virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
-    
-    virtual StatusCode initialize(void);
-    virtual StatusCode finalize(void);
+
+    virtual StatusCode initialize() override;
 
   private:
     Gaudi::Property< std::string > m_lut_fileName {
-	this, "LUTfile", "dZ_barrel.lut", ""};
+      this, "LUTfile", "dZ_barrel.lut", ""};
+
+    ToolHandle<AlignmentBarrelLUT>   m_alignmentBarrelLUT {
+      this, "AlignmentBarrelLUT", "TrigL2MuonSA::AlignmentBarrelLUT/AlignmentBarrelLUT"};
 
-    ToolHandle<AlignmentBarrelLUT>   m_alignmentBarrelLUT;
-    
   public:
     const ToolHandle<AlignmentBarrelLUT>* alignmentBarrelLUT(void) const
     { return &m_alignmentBarrelLUT; };
   };
 
 }
-  
-#endif 
+
+#endif
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h
index cec9c148b581..55952a872486 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef  TRIGL2MUONSA_ALPHABETAESTIMATE_H
@@ -22,46 +22,40 @@ namespace TrigL2MuonSA {
 class AlphaBetaEstimate: public AthAlgTool
 {
  public:
-    
-  static const InterfaceID& interfaceID();
 
   AlphaBetaEstimate(const std::string& type, 
 		    const std::string& name,
 		    const IInterface*  parent);
     
-  ~AlphaBetaEstimate();
-
-  virtual StatusCode initialize();
-  virtual StatusCode finalize  ();
-    
   void setMCFlag(BooleanProperty use_mcLUT,
 		 const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc);
     
-  public:
-    
-    StatusCode setAlphaBeta(const LVL1::RecMuonRoI*     p_roi,
-			    TrigL2MuonSA::TgcFitResult& tgcFitResult,
-			    TrigL2MuonSA::TrackPattern& trackPattern,
-                            const TrigL2MuonSA::MuonRoad&     muonRoad);
-    
-  private:
-    
-    double     computeRadius(double InnerSlope, double InnerR, double InnerZ,
-			      double MiddleSlope, double MiddleR, double MiddleZ,
-			      double sign);
-    
-    double     computeRadius3Points(double InnerZ, double InnerR, double EEZ, double EER,double MiddleZ, double MiddleR ) const ;
-    double     calcDistance(double x1,double y1,double x2,double y2,double x3,double y3) const;
-    
-    inline bool isZero( float value, float tolerance = 1e-5 ) const {
-      return std::abs( value ) < tolerance;
-    }
+ public:
     
-    BooleanProperty  m_use_mcLUT;
+  StatusCode setAlphaBeta(const LVL1::RecMuonRoI*       p_roi,
+			  TrigL2MuonSA::TgcFitResult&   tgcFitResult,
+			  TrigL2MuonSA::TrackPattern&   trackPattern,
+			  const TrigL2MuonSA::MuonRoad& muonRoad);
+
+ private:
+
+  double computeRadius(double InnerSlope, double InnerR, double InnerZ,
+		       double MiddleSlope, double MiddleR, double MiddleZ,
+		       double sign);
+
+  double computeRadius3Points(double InnerZ, double InnerR, double EEZ, double EER,double MiddleZ, double MiddleR ) const ;
+  double calcDistance(double x1,double y1,double x2,double y2,double x3,double y3) const;
+
+  inline bool isZero( float value, float tolerance = 1e-5 ) const {
+    return std::abs( value ) < tolerance;
+  }
+
+  BooleanProperty m_use_mcLUT;
+
+  const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT {nullptr}; // point to LUT when calling setMCFlag()
+
+};
 
-    const ToolHandle<PtEndcapLUT>*    m_ptEndcapLUT;
-  };
-  
 } // namespace TrigL2MuonSA
 
 #endif  // ALPHABETAESTIMATE_H
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h
index e753a5a91515..90cc948bd374 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h
@@ -31,29 +31,23 @@ namespace TrigL2MuonSA {
   class CscDataPreparator: public AthAlgTool
   {
   public:
-    
-    static const InterfaceID& interfaceID();
-    
-  public:
-    
-    CscDataPreparator(const std::string& type, 
+
+    CscDataPreparator(const std::string& type,
 		      const std::string& name,
 		      const IInterface*  parent);
-    
-    ~CscDataPreparator()=default;
-    
-    virtual StatusCode initialize();
+
+    virtual StatusCode initialize() override;
     
   public:
-    
+
     StatusCode prepareData(const TrigRoiDescriptor* p_roids,
 			   TrigL2MuonSA::MuonRoad&  muonRoad,
 			   TrigL2MuonSA::CscHits&   cscHits);
 
-    void setRoIBasedDataAccess(bool use_RoIBasedDataAccess);
+    void setRoIBasedDataAccess(bool use_RoIBasedDataAccess) {m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;};
 
   private:
-    
+
     double calc_residual(double aw,
 			 double bw,
 			 double x,
@@ -69,11 +63,14 @@ namespace TrigL2MuonSA {
     ServiceHandle<IRegSelSvc>  m_regionSelector;
 
     // Tool handles for BS conversion and Rdo to Prep Data conversion
-    ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool;
-    
+    ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool{
+      this, "CscRawDataProvider", "Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool"};
+
     // CSC PrepDataProvider
-    ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider;
-    ToolHandle<ICscClusterBuilder> m_cscClusterProvider;
+    ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider{
+      this, "CscPrepDataProvider", "Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"};
+    ToolHandle<ICscClusterBuilder> m_cscClusterProvider{
+      this, "CscClusterProvider", "CscThresholdClusterBuilderTool"};
 
     SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrepContainerKey{ this, "CSCPrepDataContainer", "CSC_Clusters", "Name of the CSCContainer to read in"};
 
@@ -82,10 +79,10 @@ namespace TrigL2MuonSA {
 
     // Flag to decide whether or not to run BS decoding
     Gaudi::Property< bool > m_decodeBS { this, "DecodeBS", true, "Flag to decide whether or not to run BS->RDO decoding" };
-    
+
     bool m_use_RoIBasedDataAccess;
   };
-  
+
 } // namespace TrigL2MuonSA
 
-#endif  // 
+#endif
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h
index 8acb98476dec..dc002d9862b2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGL2MUONSA_CSCREGUTILS_H
@@ -7,8 +7,7 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/Service.h"
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/StatusCode.h"
+#include "GaudiKernel/ToolHandle.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
 
@@ -20,16 +19,34 @@
 
 namespace TrigL2MuonSA {
 
-class UtilTools;
 class ReturnCode;
 
 
+class UtilTools{
+
+public:
+  UtilTools(){}
+
+  double calc_theta(double eta){ return 2*atan(exp((-1)*eta)); }
+  double calc_theta(double x, double y, double z){ return acos(z/sqrt(x*x+y*y+z*z)); } // for position not for direction theta in [0,pi]
+  double calc_eta(double x, double y, double z){return (-1)*log(tan(calc_theta(x,y,z)/2.));}
+  double calc_phi( double x, double y);
+  double calc_dphi(double phi1, double phi2);
+  double calc_sumsq(double x, double y){ return sqrt(x*x+y*y); }
+  double calc_sumsq(double x, double y, double z){ return sqrt(x*x+y*y+z*z);}
+  double cotan(double theta){ return tan(M_PI-theta); }
+  double relative_error(double measured, double reference){return (measured-reference)/reference; }
+  double average_phi(double phi1, double phi2);
+
+};
+
+
 class CscRegDict: public AthAlgTool{
-  
+
  public:
-  
+
   //  typedef TrigL2MuonSA::ReturnCode ReturnCode;
-  
+
   typedef struct {
     double etaMin;
     double etaMax;
@@ -43,17 +60,14 @@ class CscRegDict: public AthAlgTool{
     double posCorrectionPlusR;
     double posCorrectionMinusR;
   } CscRegion;
-  
-  static const InterfaceID &interfaceID();
+
   CscRegDict(const std::string &type, const std::string &name, const IInterface *parent);
-  ~CscRegDict();
-  
-  StatusCode initialize();
-  StatusCode finalize();
-  
+
+  virtual StatusCode initialize() override;
+
   double phiCen(int module){ return m_reg_dict[module].phiCen; }
   double phiMod(int module){ return m_reg_dict[module].phiMod; }
-  
+
   int get_hash(int stationname, int stationeta, int stationphi); //return a module context hashId.
   Amg::Vector3D nomalVector(int module);
   double displacement(int module);
@@ -64,43 +78,34 @@ class CscRegDict: public AthAlgTool{
   int stationName(int hash);
   int stationEta(int hash);
   int stationPhi(int hash);
-  
+
  private:
   Gaudi::Property< bool >  m_isMC { this, "MCFlag", true, "" };
   CscRegion m_reg_dict[32];//dictionary of CSC regions
   int m_module_hashes[2][2][8];//dictionary of hashIds
-  
-  
+
+
   ReturnCode initializeHashDictionary();
   ReturnCode initializeDictionaryForData();
   ReturnCode initializePosCorrectionParameters();
-  
-  double PhiConv(double phi); //convert phi [0,2*pi)=>[-pi,pi)
-  
-  TrigL2MuonSA::UtilTools *m_util;
-  
-};
-  
 
-inline double CscRegDict::displacement(int module){
+  double PhiConv(double phi); //convert phi [0,2*pi)=>[-pi,pi)
 
-  return (0<=module && module <32) ? m_reg_dict[module].Displacement : 0.; 
-
-}
+  TrigL2MuonSA::UtilTools m_util;
 
+};
 
 
+inline double CscRegDict::displacement(int module){
+  return (0<=module && module <32) ? m_reg_dict[module].Displacement : 0.;
+}
 
 inline int CscRegDict::stationName(int hash){
- 
    if(hash<0 || hash>31) return 999;
-   else return (hash<16) ? 50 : 51; 
-
+   else return (hash<16) ? 50 : 51;
 }
- 
 
 inline int CscRegDict::stationEta(int hash){
-
    if(hash<0 || hash>31) return 999;
    else{
      int secteta=(hash - hash%8)/8;// secteta: 0(Small Cside),1(Small Aside), 2(Large Cside), 3(Large Aside)
@@ -108,69 +113,36 @@ inline int CscRegDict::stationEta(int hash){
    }
 }
 
-
 inline int CscRegDict::stationPhi(int hash){
-
    if(hash<0 || hash>31) return 999;
    else return hash%8+1;
-
 }
 
 
-class UtilTools{
-  
-public:
-  UtilTools(){}
-  ~UtilTools(){}
-  
-  double calc_theta(double eta){ return 2*atan(exp((-1)*eta)); }
-  double calc_theta(double x, double y, double z){ return acos(z/sqrt(x*x+y*y+z*z)); } // for position not for direction theta in [0,pi]
-  double calc_eta(double x, double y, double z){return (-1)*log(tan(calc_theta(x,y,z)/2.));}
-  double calc_phi( double x, double y);
-  double calc_dphi(double phi1, double phi2);
-  double calc_sumsq(double x, double y){ return sqrt(x*x+y*y); }
-  double calc_sumsq(double x, double y, double z){ return sqrt(x*x+y*y+z*z);}
-  double cotan(double theta){ return tan(M_PI-theta); }
-  double relative_error(double measured, double reference){return (measured-reference)/reference; }
-  double average_phi(double phi1, double phi2);
-
-  
-};
-
-
-
-
 class ReturnCode{
-  
+
 public:
   ReturnCode(){}
   ReturnCode(unsigned int retcode){m_retcode=retcode;}
   ~ReturnCode(){}
-  
+
   enum{
     FAILURE=0,
     SUCCESS=1
   };
-  
+
   bool isSuccess(){return (m_retcode==SUCCESS);}
-  
+
   void operator= (unsigned int retcode){m_retcode=retcode;}
   bool operator== ( unsigned int code){return (m_retcode==code);}
   bool operator!= ( unsigned int code){return (m_retcode!=code);}
-  
+
 private:
   unsigned int m_retcode;
-  
+
 };
 
 
 }//namespace TrigL2MuonSA
 
-
-
-
-
-
-
-
 #endif /* TRIGL2MUONSA_CSCREGUTILS_H */
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h
index e648df997542..a9b438830ae3 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGL2MUONSA_CSCSEGMENTMAKER_H
@@ -7,13 +7,8 @@
 
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/Bootstrap.h"
-#include "GaudiKernel/ToolHandle.h"
 
 #include "GaudiKernel/Service.h"
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/StatusCode.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
 
@@ -32,144 +27,129 @@ namespace MuonGM{
 
 
 namespace TrigL2MuonSA{
-  
-class CscSegment;
- 
- class CscSegmentMaker: public AthAlgTool{
-  
-  
- public:
-  
-  
-  typedef struct{
-    double loc_x;
-    double loc_y;
-    double loc_z;
-    double error;
-    double residual;
-    int measphi;
-    //int index4; not used
-    bool enabled;
-    int stationname;
-    bool isIP;
-  } localCscHit;
-  
-  typedef struct{
-    double a;
-    double b;
-    double zshift;
-    double chi2;
-    int nhit;
-    int stationname;
-    double residual;
-    //int outlier; obsolete
-    std::vector<localCscHit> localHits;
-  }local2dSegment;
-  
- public:
-  static const InterfaceID& interfaceID();
-  CscSegmentMaker(const std::string& type, const std::string &name, const IInterface* parent);
-  ~CscSegmentMaker();
-  
-  
-  StatusCode initialize();
-  StatusCode finalize();
-  
-  
-  //    ReturnCode initializeRegDict(ToolHandle<CscRegDict> cscregdict);
-  
-  ReturnCode	FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits, std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MuonRoad &muroad);
-  
-  
-  ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip );
-  
-  ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc,const std::vector<localCscHit> hits_loc[4], local2dSegment &seg2d_eta,local2dSegment &local2d_noip, int &nhite);
-  
-  ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc,std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhite);
-  
-  ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhit);
-  
-  ReturnCode fit_clusters(int measphi, const std::vector<localCscHit> &hits_fit, local2dSegment &seg2d);
-  
-  ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi,
-			    Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir);
-  
-  ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]);
-  
-  ReturnCode display_hits(const std::vector<localCscHit> localHits[4]);
-  
-  CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg);
-  
- private:
-  IntegerProperty m_msglevel;
-  UtilTools *m_util;
-  ToolHandle<CscRegDict> m_cscregdict {
-	this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""};
-#ifndef XAOD_ANALYSIS
-  const MuonGM::MuonDetectorManager *m_muonMgr;
-#endif
-  
-  
-  //properties                                                                                                                                                             
-  Gaudi::Property< bool > m_use_geometry {
-	this, "UseGeometry", false, ""};
-  Gaudi::Property< double > m_max_chisquare {
-	this, "max_chisquare", 25., ""};
-  Gaudi::Property< double > m_max_residual_eta {
-	this, "max_residual_eta", 100., ""};
-  Gaudi::Property< double > m_max_residual_phi {
-	this, "max_residual_phi", 250., ""};
-  Gaudi::Property< double > m_err_eta {
-	this, "err_eta", 3., ""};
-  Gaudi::Property< double > m_err_phi {
-	this, "err_phi", 6., ""};
-  Gaudi::Property< double > m_err_ip {
-	this, "err_ip", 250., ""};
-  
-  
-};
- 
-class CscSegment{
-  
- public:
-  
-  CscSegment();
-  ~CscSegment();
-  
-  double x(){ return m_x; }
-  double y(){ return m_y; }
-  double z(){ return m_z; }
-  double px(){ return m_px; }
-  double py(){ return m_py; }
-  double pz(){ return m_pz; }
-  double slopeRZ(){ return m_slopeRZ; }
-  double interceptRZ(){ return m_interceptRZ; }
-  double chiSquare(){ return m_chisquare; }
-  double chiSquarePhi(){ return m_chisquare_phi; }
-  
-  //unsigned int l1id(){ return m_l1id; }
-  //void setL1id(unsigned int l1id){ m_l1id = l1id; }
-  int nHitEta(){ return m_nhit_eta; }
-  void setNHitEta( int nhite){ m_nhit_eta = nhite; }
-  int nHitPhi(){ return m_nhit_phi; }
-  void setNHitPhi( int nhitp){ m_nhit_phi = nhitp; }
-  bool isClean();
-  
-  ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi);
-  ReturnCode set(Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir, double chisquare, double chisquare_phi);
-  
- private:
-  //unsigned int m_l1id; //not used
-  double m_x, m_y, m_z, m_px, m_py, m_pz;
-  double m_slopeRZ, m_interceptRZ;
-  int m_nhit_eta, m_nhit_phi;
-  //bool m_clean; //not used
-  double m_chisquare;    
-  double m_chisquare_phi;
-  
-};
- 
- 
+
+  class CscSegment;
+
+  class CscSegmentMaker: public AthAlgTool{
+
+
+  public:
+
+
+    typedef struct{
+      double loc_x;
+      double loc_y;
+      double loc_z;
+      double error;
+      double residual;
+      int measphi;
+      bool enabled;
+      int stationname;
+      bool isIP;
+    } localCscHit;
+
+    typedef struct{
+      double a;
+      double b;
+      double zshift;
+      double chi2;
+      int nhit;
+      int stationname;
+      double residual;
+      std::vector<localCscHit> localHits;
+    }local2dSegment;
+
+  public:
+    CscSegmentMaker(const std::string& type, const std::string &name, const IInterface* parent);
+
+
+    virtual StatusCode initialize() override;
+
+
+    ReturnCode	FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits, std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MuonRoad &muroad);
+
+
+    ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip );
+
+    ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc,const std::vector<localCscHit> hits_loc[4], local2dSegment &seg2d_eta,local2dSegment &local2d_noip, int &nhite);
+
+    ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc,std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhite);
+
+    ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhit);
+
+    ReturnCode fit_clusters(int measphi, const std::vector<localCscHit> &hits_fit, local2dSegment &seg2d);
+
+    ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi,
+			      Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir);
+
+    ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]);
+
+    ReturnCode display_hits(const std::vector<localCscHit> localHits[4]);
+
+    CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg);
+
+  private:
+    UtilTools m_util;
+    ToolHandle<CscRegDict> m_cscregdict {
+      this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""};
+    const MuonGM::MuonDetectorManager *m_muonMgr {nullptr};
+
+
+    //properties
+    Gaudi::Property< bool > m_use_geometry {
+      this, "UseGeometry", false, ""};
+    Gaudi::Property< double > m_max_chisquare {
+      this, "max_chisquare", 25., ""};
+    Gaudi::Property< double > m_max_residual_eta {
+      this, "max_residual_eta", 100., ""};
+    Gaudi::Property< double > m_max_residual_phi {
+      this, "max_residual_phi", 250., ""};
+    Gaudi::Property< double > m_err_eta {
+      this, "err_eta", 3., ""};
+    Gaudi::Property< double > m_err_phi {
+      this, "err_phi", 6., ""};
+    Gaudi::Property< double > m_err_ip {
+      this, "err_ip", 250., ""};
+
+
+  };
+
+  class CscSegment{
+
+  public:
+
+    CscSegment();
+
+    double x(){ return m_x; }
+    double y(){ return m_y; }
+    double z(){ return m_z; }
+    double px(){ return m_px; }
+    double py(){ return m_py; }
+    double pz(){ return m_pz; }
+    double slopeRZ(){ return m_slopeRZ; }
+    double interceptRZ(){ return m_interceptRZ; }
+    double chiSquare(){ return m_chisquare; }
+    double chiSquarePhi(){ return m_chisquare_phi; }
+
+    int nHitEta(){ return m_nhit_eta; }
+    void setNHitEta( int nhite){ m_nhit_eta = nhite; }
+    int nHitPhi(){ return m_nhit_phi; }
+    void setNHitPhi( int nhitp){ m_nhit_phi = nhitp; }
+    bool isClean();
+
+    ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi);
+    ReturnCode set(Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir, double chisquare, double chisquare_phi);
+
+  private:
+    double m_x, m_y, m_z, m_px, m_py, m_pz;
+    double m_slopeRZ, m_interceptRZ;
+    int m_nhit_eta, m_nhit_phi;
+    double m_chisquare;    
+    double m_chisquare_phi;
+
+  };
+
+
 }//namespace TrigL2MuonSA
 
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
index 68f3fde55626..08986d6bed03 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
@@ -42,25 +42,23 @@ namespace MuonGM{
 // --------------------------------------------------------------------------------
 
 namespace TrigL2MuonSA {
-  
+
   class MdtDataPreparator: public AthAlgTool
   {
   public:
-    
+
     static const InterfaceID& interfaceID();
-    
+
   public:
-    
+
     MdtDataPreparator(const std::string& type, 
 		      const std::string& name,
 		      const IInterface*  parent);
-    
-    ~MdtDataPreparator()=default;
-    
-    virtual StatusCode initialize();
-    
+
+    virtual StatusCode initialize() override;
+
   public:
-    
+
     StatusCode prepareData(const LVL1::RecMuonRoI*           p_roi,
 			   const TrigRoiDescriptor*          p_roids,
 			   const TrigL2MuonSA::RpcFitResult& rpcFitResult,
@@ -77,15 +75,15 @@ namespace TrigL2MuonSA {
 			   TrigL2MuonSA::MdtHits&            mdtHits_normal,
 			   TrigL2MuonSA::MdtHits&            mdtHits_overlap);
 
-    void setRpcGeometry(bool use_rpc);
-    void setMdtDataCollection(bool use_mdtcsm);
-    void setRoIBasedDataAccess(bool use_RoIBasedDataAccess);
+    void setRpcGeometry(bool use_rpc) {m_mdtRegionDefiner->setRpcGeometry(use_rpc);};
+    void setMdtDataCollection(bool use_mdtcsm){m_use_mdtcsm = use_mdtcsm;};
+    void setRoIBasedDataAccess(bool use_RoIBasedDataAccess){m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;};
 
   public:
     float etaMinChamber[11],etaMaxChamber[11],phiMinChamber[11],phiMaxChamber[11];
 
   private:
-    
+
     StatusCode getMdtHits(const LVL1::RecMuonRoI* p_roi,
 			  const TrigRoiDescriptor* p_roids, 
 			  const TrigL2MuonSA::MdtRegion& mdtRegion,
@@ -96,19 +94,19 @@ namespace TrigL2MuonSA {
     void getMdtIdHashesBarrel(const TrigL2MuonSA::MdtRegion& mdtRegion,
 			std::vector<IdentifierHash>& mdtIdHashes_normal,
 			std::vector<IdentifierHash>& mdtIdHashes_overlap);
-    
+
     void getMdtIdHashesEndcap(const TrigL2MuonSA::MdtRegion& mdtRegion,
 			std::vector<IdentifierHash>& mdtIdHashes_normal,
 			std::vector<IdentifierHash>& mdtIdHashes_overlap);
-    
+
     StatusCode getMdtCsm(const MdtCsmContainer* pMdtCsmContainer,
 			 const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& v_robFragments,
 			 const std::vector<IdentifierHash>& v_idHash,
 			 std::vector<const MdtCsm*>& v_mdtCsms);
-    
+
     bool decodeMdtCsm(const MdtCsm* csm, TrigL2MuonSA::MdtHits& mdtHits, const TrigL2MuonSA::MuonRoad& muonRoad);
     uint32_t get_system_id (unsigned short int SubsystemId) const;
-    
+
     StatusCode collectMdtHitsFromPrepData(const std::vector<IdentifierHash>& v_idHash,
 					  std::vector<uint32_t>& v_robIds,
 					  TrigL2MuonSA::MdtHits& mdtHits,
@@ -118,33 +116,34 @@ namespace TrigL2MuonSA {
 
   private:
 
-    // Reference to StoreGateSvc;
-    ServiceHandle<ActiveStoreSvc> m_activeStore;
-    
     // Tools for the Raw data conversion
-    ToolHandle<Muon::IMuonRawDataProviderTool>  m_mdtRawDataProvider;
-        
+    ToolHandle<Muon::IMuonRawDataProviderTool>  m_mdtRawDataProvider {
+      this, "MDT_RawDataProvider", "Muon::MDT_RawDataProviderTool"};
+
+
     // Geometry Services
-    const MuonGM::MuonDetectorManager* m_muonMgr;
-    const MuonGM::MdtReadoutElement* m_mdtReadout;
-    const MuonGM::MuonStation* m_muonStation;
+    const MuonGM::MuonDetectorManager* m_muonMgr {nullptr};
+    const MuonGM::MdtReadoutElement* m_mdtReadout {nullptr};
+    const MuonGM::MuonStation* m_muonStation {nullptr};
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     IdentifierHash m_hash_id;
-    
+
     // Region Selector
     ServiceHandle<IRegSelSvc> m_regionSelector;
-    
+
     // ROB DataProvider
-    ServiceHandle<IROBDataProviderSvc>  m_robDataProvider;
-    
+    ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
+
     // Utils
     TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils;
-   
-    //
-    ToolHandle<MdtRegionDefiner>  m_mdtRegionDefiner;
+
+    // MdtRegionDefiner
+    ToolHandle<MdtRegionDefiner> m_mdtRegionDefiner {
+      this, "MdtRegionDefiner", "TrigL2MuonSA::MdtRegionDefiner"};
 
     // handles to data access
-    ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider;
+    ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider {
+      this, "MdtPrepDataProvider", "Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool"};
 
     SG::ReadHandleKey<MdtCsmContainer> m_mdtCsmContainerKey{
 	this, "MDTCSMContainer", "MDTCSM", "Name of the MDTRDO to read in"};
@@ -169,4 +168,4 @@ namespace TrigL2MuonSA {
 
 } // namespace TrigL2MuonSA
 
-#endif  // 
+#endif  //
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h
index 8692341db11d..555de87e2c43 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h
@@ -36,30 +36,27 @@ namespace TrigL2MuonSA {
   class MdtRegionDefiner: public AthAlgTool
   {
   public:
-    static const InterfaceID& interfaceID();
 
     MdtRegionDefiner(const std::string& type, 
 		     const std::string& name,
 		     const IInterface*  parent);
-
-    ~MdtRegionDefiner()=default;
     
-    virtual StatusCode initialize();
+    virtual StatusCode initialize() override;
 
     // function using the new cabling/geometry
-    void setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr);
-    void setRpcGeometry(bool use_rpc);
+    void setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr) {m_muonMgr = muonMgr;};
+    void setRpcGeometry(bool use_rpc){m_use_rpc = use_rpc;};
     
   public:
-    StatusCode getMdtRegions(const LVL1::RecMuonRoI* p_roi,
+    StatusCode getMdtRegions(const LVL1::RecMuonRoI*           p_roi,
 			     const TrigL2MuonSA::RpcFitResult& rpcFitResult,
-			     TrigL2MuonSA::MuonRoad& muonRoad,
-			     TrigL2MuonSA::MdtRegion& mdtRegion);
+			     TrigL2MuonSA::MuonRoad&           muonRoad,
+			     TrigL2MuonSA::MdtRegion&          mdtRegion);
     
-    StatusCode getMdtRegions(const LVL1::RecMuonRoI*    p_roi,
+    StatusCode getMdtRegions(const LVL1::RecMuonRoI*           p_roi,
 			     const TrigL2MuonSA::TgcFitResult& tgcFitResult,
-			     TrigL2MuonSA::MuonRoad& muonRoad,
-			     TrigL2MuonSA::MdtRegion& mdtRegion);
+			     TrigL2MuonSA::MuonRoad&           muonRoad,
+			     TrigL2MuonSA::MdtRegion&          mdtRegion);
     
   private:
     StatusCode prepareTgcPoints(const TrigL2MuonSA::TgcHits& tgcHits);
@@ -72,25 +69,25 @@ namespace TrigL2MuonSA {
 			  float& etaMin, float& etaMax);
     void find_phi_min_max(float phiMiddle, float& phiMin, float& phiMax);
         
-    void find_station_sector(std::string name, int phi, bool& endcap, int& chamber, int& sector);   
+    void find_station_sector(std::string name, int phi, bool& endcap, int& chamber, int& sector);
 
-    StatusCode computePhi(const LVL1::RecMuonRoI*    p_roi,
+    StatusCode computePhi(const LVL1::RecMuonRoI*           p_roi,
 			  const TrigL2MuonSA::RpcFitResult& rpcFitResult,
 			  const TrigL2MuonSA::MdtRegion&    mdtRegion,
 			  TrigL2MuonSA::MuonRoad&           muonRoad);
       
-    StatusCode computePhi(const LVL1::RecMuonRoI*    p_roi,
+    StatusCode computePhi(const LVL1::RecMuonRoI*           p_roi,
 			  const TrigL2MuonSA::TgcFitResult& tgcFitResult,
 			  const TrigL2MuonSA::MdtRegion&    mdtRegion,
 			  TrigL2MuonSA::MuonRoad&           muonRoad);
 
   private:
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    const MuonGM::MuonDetectorManager* m_muonMgr;
-    const MuonGM::MdtReadoutElement* m_mdtReadout;
-    const MuonGM::MuonStation* m_muonStation;
+    const MuonGM::MuonDetectorManager* m_muonMgr {nullptr}; // assined by setMdtGeometry()
+    const MuonGM::MdtReadoutElement* m_mdtReadout {nullptr};
+    const MuonGM::MuonStation* m_muonStation {nullptr};
     
-    bool m_use_rpc;
+    bool m_use_rpc {true};
 
     TrigL2MuonSA::TgcFit::PointArray m_tgcStripMidPoints;  // List of TGC strip middle station points.
     TrigL2MuonSA::TgcFit::PointArray m_tgcWireMidPoints;   // List of TGC wire middle station points.
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx
index 7e9ccbb798ed..c12771e1b308 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigL2MuonSA/AlignmentBarrelLUT.h"
@@ -10,44 +10,11 @@
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-static const InterfaceID IID_AlignmentBarrelLUT("IID_AlignmentBarrelLUT", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::AlignmentBarrelLUT::interfaceID() { return IID_AlignmentBarrelLUT; }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 TrigL2MuonSA::AlignmentBarrelLUT::AlignmentBarrelLUT(const std::string& type,
 						     const std::string& name,
 						     const IInterface*  parent):
   AthAlgTool(type, name, parent)
 {
-  declareInterface<TrigL2MuonSA::AlignmentBarrelLUT>(this);
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::AlignmentBarrelLUT::~AlignmentBarrelLUT()
-{
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::AlignmentBarrelLUT::initialize()
-{
-  ATH_MSG_DEBUG("Initializing AlignmentBarrelLUT - package version " << PACKAGE_VERSION) ;
-   
-  StatusCode sc;
-  sc = AthAlgTool::initialize();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-    return sc;
-  }
-
-  // 
-  return StatusCode::SUCCESS; 
 }
 
 // --------------------------------------------------------------------------------
@@ -62,8 +29,8 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName)
   std::ifstream file;
 
 
-  for(int i_saddress=0; i_saddress<4; i_saddress++) {
-    for(int i_innerR=0; i_innerR<2; i_innerR++) {
+  for(int i_saddress=0; i_saddress<s_saddress; i_saddress++) {
+    for(int i_innerR=0; i_innerR<s_innerR; i_innerR++) {
       m_NbinEta[i_saddress][i_innerR]=0;
       m_EtaMin[i_saddress][i_innerR]=0;
       m_EtaMax[i_saddress][i_innerR]=0;
@@ -73,9 +40,9 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName)
       m_PhiMax[i_saddress][i_innerR]=0;
       m_PhiStep[i_saddress][i_innerR]=0;
       
-      for(int i_eta=0; i_eta<15; i_eta++) {
-	for(int i_phi=0; i_phi<30; i_phi++) {
-	  for(int i_etaQ=0; i_etaQ<2; i_etaQ++) {
+      for(int i_eta=0; i_eta<s_eta; i_eta++) {
+	for(int i_phi=0; i_phi<s_phi; i_phi++) {
+	  for(int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) {
 	    m_dZ[i_saddress][i_innerR][i_eta][i_phi][i_etaQ] = 0;
           }
         }
@@ -99,9 +66,9 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName)
     m_EtaStep[saddress][innerR] = (m_EtaMax[saddress][innerR] - m_EtaMin[saddress][innerR]) / (float)m_NbinEta[saddress][innerR];
     m_PhiStep[saddress][innerR] = (m_PhiMax[saddress][innerR] - m_PhiMin[saddress][innerR]) / (float)m_NbinPhi[saddress][innerR];
 
-    for (int i_eta=0; i_eta<15; i_eta++) {
-      for (int i_phi=0; i_phi<30; i_phi++) {
-	for (int i_etaQ=0; i_etaQ<2; i_etaQ++) {
+    for (int i_eta=0; i_eta<s_eta; i_eta++) {
+      for (int i_phi=0; i_phi<s_phi; i_phi++) {
+	for (int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) {
 
 	  file >> N0 >> N1 >> N2 >> A0 >> A1 >> A2;
 
@@ -188,17 +155,3 @@ std::pair<int, int> TrigL2MuonSA::AlignmentBarrelLUT::GetBinNumber(int saddress,
 
   return std::make_pair(etaBin,phiBin);
 }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::AlignmentBarrelLUT::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing AlignmentBarrelLUT - package version " << PACKAGE_VERSION);
-   
-  StatusCode sc = AthAlgTool::finalize(); 
-  return sc;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx
index d04f84e47ac9..23c6dd7ff580 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GaudiKernel/ISvcLocator.h"
@@ -9,11 +9,8 @@
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-using namespace std;
-
 TrigL2MuonSA::AlignmentBarrelLUTSvc::AlignmentBarrelLUTSvc(const std::string& name,ISvcLocator* sl) :
-  AthService(name,sl),
-  m_alignmentBarrelLUT("TrigL2MuonSA::AlignmentBarrelLUT")
+  AthService(name,sl)
 {
 }
 
@@ -36,46 +33,20 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::queryInterface(const InterfaceID
 
 StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::initialize()
 {
-  ATH_MSG_DEBUG("Initializing " << name() << " - package version " << PACKAGE_VERSION);
-  
-  StatusCode sc;
-  
-  sc = AthService::initialize();
-  if ( sc.isFailure() ) return sc;
-  
+
   // implement the search of LUT trought the pathresolver Tool.
   std::string lut_fileName = PathResolver::find_file (m_lut_fileName, "DATAPATH");
   ATH_MSG_INFO(lut_fileName);
-  
+
   if (lut_fileName.empty()) {
     ATH_MSG_ERROR("Cannot find EndcapLUT file " << lut_fileName);
     return StatusCode::FAILURE;
   }
-  
-  sc = m_alignmentBarrelLUT.retrieve();
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_alignmentBarrelLUT);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved service " << m_alignmentBarrelLUT);
 
-  // read LUT
-  sc = m_alignmentBarrelLUT->readLUT(lut_fileName);
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Failed to read barrel alignment LUT" << lut_fileName);
-    return sc;
-  }
-  
-  return StatusCode::SUCCESS;
-}
+  ATH_CHECK( m_alignmentBarrelLUT.retrieve() );
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
+  // read LUT
+  ATH_CHECK( m_alignmentBarrelLUT->readLUT(lut_fileName) );
 
-StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::finalize() 
-{
   return StatusCode::SUCCESS;
-} 
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
+}
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx
index 1c1fef6ce9fe..71db753e2070 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx
@@ -1,58 +1,24 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigL2MuonSA/AlphaBetaEstimate.h"
 
-#include "CLHEP/Units/PhysicalConstants.h"
+#include <cmath>
 
 #include "xAODTrigMuon/TrigMuonDefs.h"
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_AlphaBetaEstimate("IID_AlphaBetaEstimate", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::AlphaBetaEstimate::interfaceID() { return IID_AlphaBetaEstimate; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
 TrigL2MuonSA::AlphaBetaEstimate::AlphaBetaEstimate(const std::string& type,
 						   const std::string& name,
 						   const IInterface*  parent):
-  AthAlgTool(type, name, parent), 
-  m_ptEndcapLUT(0)
-{
-  declareInterface<TrigL2MuonSA::AlphaBetaEstimate>(this);
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::AlphaBetaEstimate::~AlphaBetaEstimate() 
-{
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::AlphaBetaEstimate::initialize()
+  AthAlgTool(type, name, parent)
 {
-  ATH_MSG_DEBUG("Initializing AlphaBetaEstimate - package version " << PACKAGE_VERSION) ;
-   
-  StatusCode sc;
-  sc = AthAlgTool::initialize();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-    return sc;
-  }
-
-  // 
-  return StatusCode::SUCCESS; 
 }
 
 // --------------------------------------------------------------------------------
@@ -74,7 +40,7 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
                                                          const TrigL2MuonSA::MuonRoad& /*muonRoad*/)
 {
   const int MAX_STATION = 6;
-  const double PHI_RANGE = 12./(CLHEP::pi/8.);
+  const double PHI_RANGE = 12./(M_PI/8.);
   
   // computing ALPHA, BETA and RADIUS
   float InnerSlope      = 0;
@@ -147,11 +113,11 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
     if ( isZero(tgcFitResult.tgcMid1[3]) || isZero(tgcFitResult.tgcMid2[3]) ) {
       if ( !isZero(tgcFitResult.tgcMid1[3]) ) phi = phi1;
       if ( !isZero(tgcFitResult.tgcMid2[3]) ) phi = phi2;
-    } else if( phi1*phi2 < 0 && std::abs(phi1)>(CLHEP::pi/2.) ) {
-      double tmp1 = (phi1>0)? phi1 - CLHEP::pi : phi1 + CLHEP::pi;
-      double tmp2 = (phi2>0)? phi2 - CLHEP::pi : phi2 + CLHEP::pi;
+    } else if( phi1*phi2 < 0 && std::abs(phi1)>(M_PI/2.) ) {
+      double tmp1 = (phi1>0)? phi1 - M_PI : phi1 + M_PI;
+      double tmp2 = (phi2>0)? phi2 - M_PI : phi2 + M_PI;
       double tmp  = (tmp1+tmp2)/2.;
-      phi  = (tmp>0.)? tmp - CLHEP::pi : tmp + CLHEP::pi;
+      phi  = (tmp>0.)? tmp - M_PI : tmp + M_PI;
     } else {      
       phi  = (phi2+phi1)/2.;     
     }
@@ -181,13 +147,13 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
     else if ( !isZero(InnerZ) ) trackPattern.etaMap = etaInner;      
     if ( !isZero(tgcFitResult.tgcInn[3]) ) phi = tgcFitResult.tgcInn[1];
 
-    if ( phim > CLHEP::pi+0.1 ) phim = phim - 2*CLHEP::pi;
+    if ( phim > M_PI+0.1 ) phim = phim - 2*M_PI;
     if ( phim >= 0 ) trackPattern.phiMap = (phi>=0.)? phi - phim : phim - fabs(phi);
     else trackPattern.phiMap = phi - phim;
     
-    int Octant = (int)(tgcFitResult.tgcMid1[1] / (CLHEP::pi/4.));
-    double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (CLHEP::pi/4.));
-    if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant;
+    int Octant = (int)(tgcFitResult.tgcMid1[1] / (M_PI/4.));
+    double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (M_PI/4.));
+    if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant;
     
     trackPattern.endcapBeta = 0.0;
     trackPattern.phiMS      = phi;
@@ -197,8 +163,8 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
     trackPattern.phiBin = static_cast<int>(PhiInOctant * PHI_RANGE);
     trackPattern.etaBin = static_cast<int>((fabs(tgcFitResult.tgcMid1[0])-1.)/0.05);
 
-    double phiEE = (tgcFitResult.tgcMid1[1]>0) ? tgcFitResult.tgcMid1[1] : tgcFitResult.tgcMid1[1] + 2*CLHEP::pi;
-    trackPattern.phiBinEE = static_cast<int> (phiEE*96/CLHEP::pi);
+    double phiEE = (tgcFitResult.tgcMid1[1]>0) ? tgcFitResult.tgcMid1[1] : tgcFitResult.tgcMid1[1] + 2*M_PI;
+    trackPattern.phiBinEE = static_cast<int> (phiEE*96/M_PI);
 
   } else {
     // TGC data readout problem -> use RoI (eta, phi) and assume straight track
@@ -206,13 +172,13 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
     trackPattern.etaMap = p_roi->eta();
     phi = p_roi->phi();
 
-    if ( phim > CLHEP::pi+0.1 ) phim = phim - 2*CLHEP::pi;
+    if ( phim > M_PI+0.1 ) phim = phim - 2*M_PI;
     if ( phim >= 0 ) trackPattern.phiMap = (phi>=0.)? phi - phim : phim - fabs(phi);
     else trackPattern.phiMap = phi - phim;
 
-    int Octant = (int)(p_roi->phi() / (CLHEP::pi/4.));
-    double PhiInOctant = fabs(p_roi->phi() - Octant * (CLHEP::pi/4.));
-    if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant;
+    int Octant = (int)(p_roi->phi() / (M_PI/4.));
+    double PhiInOctant = fabs(p_roi->phi() - Octant * (M_PI/4.));
+    if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant;
 
     trackPattern.endcapBeta = 0.0;
     trackPattern.phiMS      = phi;
@@ -222,8 +188,8 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI*
     trackPattern.phiBin = static_cast<int>(PhiInOctant * PHI_RANGE);
     trackPattern.etaBin = static_cast<int>((fabs(p_roi->eta())-1.)/0.05);
 
-    double phiEE = (p_roi->phi()>0) ? p_roi->phi() : p_roi->phi() + 2*CLHEP::pi;
-    trackPattern.phiBinEE = static_cast<int> (phiEE*96/CLHEP::pi);
+    double phiEE = (p_roi->phi()>0) ? p_roi->phi() : p_roi->phi() + 2*M_PI;
+    trackPattern.phiBinEE = static_cast<int> (phiEE*96/M_PI);
     
   }
 
@@ -391,17 +357,3 @@ double TrigL2MuonSA::AlphaBetaEstimate::calcDistance(double x1,double y1,double
   double d=fabs(b)/sqrt(a*a+1);
   return d;
 }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::AlphaBetaEstimate::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing AlphaBetaEstimate - package version " << PACKAGE_VERSION);
-   
-  StatusCode sc = AthAlgTool::finalize(); 
-  return sc;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx
index 7a87e4d61a95..23586ce55052 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx
@@ -5,22 +5,15 @@
 #include "TrigL2MuonSA/CscDataPreparator.h"
 
 #include "StoreGate/ActiveStoreSvc.h"
-#include "CLHEP/Units/PhysicalConstants.h"
 #include "xAODTrigMuon/TrigMuonDefs.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-using namespace Muon;
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-static const InterfaceID IID_CscDataPreparator("IID_CscDataPreparator", 1, 0);
 bool IsUnspoiled ( Muon::CscClusterStatus status );
 
-
-const InterfaceID& TrigL2MuonSA::CscDataPreparator::interfaceID() { return IID_CscDataPreparator; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -28,15 +21,8 @@ TrigL2MuonSA::CscDataPreparator::CscDataPreparator(const std::string& type,
 						   const std::string& name,
 						   const IInterface*  parent): 
    AthAlgTool(type,name,parent),
-   m_regionSelector( "RegSelSvc", name ),
-   m_rawDataProviderTool("Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool"),
-   m_cscPrepDataProvider("Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"),
-   m_cscClusterProvider("CscThresholdClusterBuilderTool")
+   m_regionSelector( "RegSelSvc", name )
 {
-   declareInterface<TrigL2MuonSA::CscDataPreparator>(this);
-   declareProperty("CscRawDataProvider",  m_rawDataProviderTool);
-   declareProperty("CscPrepDataProvider", m_cscPrepDataProvider);
-   declareProperty("CscClusterProvider",  m_cscClusterProvider);
 }
 
 // --------------------------------------------------------------------------------
@@ -77,22 +63,13 @@ StatusCode TrigL2MuonSA::CscDataPreparator::initialize()
 
    ATH_CHECK(m_cscPrepContainerKey.initialize(!m_cscPrepContainerKey.empty()));
 
-   // 
+   //
    return StatusCode::SUCCESS; 
 }
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
-void TrigL2MuonSA::CscDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess)
-{
-  m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;
-  return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
 StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor* p_roids,
 							TrigL2MuonSA::MuonRoad& muonRoad,
 							TrigL2MuonSA::CscHits&  cscHits)
@@ -152,26 +129,19 @@ StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor*
   // Get CSC container
   if(!m_cscPrepContainerKey.empty() &&(!m_doDecoding || to_full_decode || !cscHashIDs.empty() )){
     auto cscPrepContainerHandle = SG::makeHandle(m_cscPrepContainerKey);
-    const CscPrepDataContainer* cscPrepContainer = cscPrepContainerHandle.cptr();
+    const Muon::CscPrepDataContainer* cscPrepContainer = cscPrepContainerHandle.cptr();
     if (!cscPrepContainerHandle.isValid()) {
       ATH_MSG_ERROR("Cannot retrieve CSC PRD Container key: " << m_cscPrepContainerKey.key());
       return StatusCode::FAILURE;
     }    
-    // Loop over collections
-    CscPrepDataContainer::const_iterator it = cscPrepContainer->begin();
-    CscPrepDataContainer::const_iterator it_end = cscPrepContainer->end();
-    for( ; it != it_end; ++it ){
-      const Muon::CscPrepDataCollection* col = *it;
-      if( !col ) continue;
 
+    // Loop over collections
+    for( const Muon::CscPrepDataCollection* cscCol : *cscPrepContainer ){
+      if( cscCol==nullptr ) continue;
+      cscHits.reserve( cscHits.size() + cscCol->size() );
       // Loop over data in the collection
-      Muon::CscPrepDataCollection::const_iterator cit = col->begin();
-      Muon::CscPrepDataCollection::const_iterator cit_end = col->end();
-      for( ; cit != cit_end; ++cit ){
-	if( !*cit ) continue;
-
-	// Data in the collection
-	const Muon::CscPrepData& prepData = **cit;
+      for( const Muon::CscPrepData* prepData : *cscCol ) {
+    	if( prepData==nullptr ) continue;
 
 	// Road info
 	int chamber = xAOD::L2MuonParameters::Chamber::CSC;
@@ -181,29 +151,29 @@ StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor*
 	double phiw = muonRoad.phi[4][0];//roi_descriptor->phi(); //muonRoad.phi[chamber][0];
 
 	//cluster status
-	bool isunspoiled = IsUnspoiled (prepData.status());
+	bool isunspoiled = IsUnspoiled (prepData->status());
 
 
 	// Create new digit
 	TrigL2MuonSA::CscHitData cscHit;
-	cscHit.StationName  = m_idHelperSvc->cscIdHelper().stationName( prepData.identify() );
-	cscHit.StationEta   = m_idHelperSvc->cscIdHelper().stationEta( prepData.identify() );
-	cscHit.StationPhi   = m_idHelperSvc->cscIdHelper().stationPhi( prepData.identify() );
+	cscHit.StationName  = m_idHelperSvc->cscIdHelper().stationName( prepData->identify() );
+	cscHit.StationEta   = m_idHelperSvc->cscIdHelper().stationEta( prepData->identify() );
+	cscHit.StationPhi   = m_idHelperSvc->cscIdHelper().stationPhi( prepData->identify() );
 	cscHit.ChamberLayer = (true==isunspoiled) ? 1 : 0;
-	cscHit.WireLayer    = m_idHelperSvc->cscIdHelper().wireLayer( prepData.identify() );
-	cscHit.MeasuresPhi  = m_idHelperSvc->cscIdHelper().measuresPhi( prepData.identify() );
-	cscHit.Strip        = m_idHelperSvc->cscIdHelper().strip( prepData.identify() );
+	cscHit.WireLayer    = m_idHelperSvc->cscIdHelper().wireLayer( prepData->identify() );
+	cscHit.MeasuresPhi  = m_idHelperSvc->cscIdHelper().measuresPhi( prepData->identify() );
+	cscHit.Strip        = m_idHelperSvc->cscIdHelper().strip( prepData->identify() );
 	cscHit.Chamber      = chamber;
 	cscHit.StripId = (cscHit.StationName << 18)
 	  | ((cscHit.StationEta + 2) << 16) | (cscHit.StationPhi << 12)
 	  | (cscHit.WireLayer << 9) | (cscHit.MeasuresPhi << 8) | (cscHit.Strip);
-	cscHit.eta = prepData.globalPosition().eta();
-	cscHit.phi = prepData.globalPosition().phi();
-	cscHit.r   = prepData.globalPosition().perp();
-	cscHit.z   = prepData.globalPosition().z();
-	cscHit.charge = prepData.charge();
-	cscHit.time   = prepData.time();
-	cscHit.resolution = sqrt( prepData.localCovariance()(0,0) );
+	cscHit.eta = prepData->globalPosition().eta();
+	cscHit.phi = prepData->globalPosition().phi();
+	cscHit.r   = prepData->globalPosition().perp();
+	cscHit.z   = prepData->globalPosition().z();
+	cscHit.charge = prepData->charge();
+	cscHit.time   = prepData->time();
+	cscHit.resolution = sqrt( prepData->localCovariance()(0,0) );
 	cscHit.Residual =  ( cscHit.MeasuresPhi==0 ) ? calc_residual( aw, bw, cscHit.z, cscHit.r ) : calc_residual_phi( aw,bw,phiw, cscHit.phi, cscHit.z);
 	cscHit.isOutlier = 0;
 	/*if( fabs(cscHit.Residual) > rWidth ) {
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx
index 6bdc41a67f99..3aa88f323f97 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -10,46 +10,28 @@
 #include <cmath>
 
 
-static const InterfaceID IID_CscRegDict("IID_CscRegDict", 1, 0);
-
 namespace TrigL2MuonSA{
 
 
-const InterfaceID& CscRegDict :: interfaceID(){ return IID_CscRegDict; }
-
-
 CscRegDict :: CscRegDict(const std::string &type, const std::string &name, const IInterface *parent)
   : AthAlgTool(type,name,parent),
-    m_util(0)
+    m_util()
 {
-  declareInterface<TrigL2MuonSA::CscRegDict>(this);
 }
 
 
-CscRegDict :: ~CscRegDict(){  }
-
-
 StatusCode CscRegDict :: initialize(){
 
-  ATH_MSG_DEBUG("Initializing TrigL2MuonSA::CscRegDict - package version " << PACKAGE_VERSION );
-  
-  StatusCode sc = AthAlgTool::initialize();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR( "Could not initialize the AthAlgTool base class." );
-    return sc;
-  }
-  
-  if (!m_util) m_util = new UtilTools();
   int i=0;
-  
-    //small sector
+
+  //small sector
   const double SPwid = 0.32369;
   const double Setamin = 1.97667;
   const double Setamax = 2.76781;
   const double SDisplace = (7441.+7518.)/2.;//7428.3;
   const double SAtanNormal = 0.20223129856437;
-  
-    //Cside Small
+
+  //Cside Small
   for (int phi=0; phi<8; ++phi) {
     m_reg_dict[i].etaMin=(-1)*Setamax;
     m_reg_dict[i].etaMax=(-1)*Setamin;
@@ -63,10 +45,10 @@ StatusCode CscRegDict :: initialize(){
     ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i)
 		   << " eta:["  << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]"
 		   << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]"
-		   << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]");
+		   << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]");
     ++i;
   }
-    //Aside Small
+  //Aside Small
   for (int phi=0; phi<8; ++phi) {
     m_reg_dict[i].etaMin=Setamin;
     m_reg_dict[i].etaMax=Setamax;
@@ -80,20 +62,19 @@ StatusCode CscRegDict :: initialize(){
     ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i)
 		   << " eta:["  << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]"
 		   << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]"
-		   << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]");
+		   << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]");
     ++i;
   }
-  
-  
-  
-    //large sector
+
+
+  //large sector
   const double LPwid = 0.514507;
   const double Letamin = 2.01471;
   const double Letamax = 2.75914;
   const double LDisplace = (7800.+7880.)/2.;//7789.6;
   const double LAtanNormal = 0.20223129856437;
-  
-    //Cside Large
+
+  //Cside Large
   for (int phi=0; phi<8; ++phi) {
     m_reg_dict[i].etaMin=(-1)*Letamax;
     m_reg_dict[i].etaMax=(-1)*Letamin;
@@ -107,7 +88,7 @@ StatusCode CscRegDict :: initialize(){
     ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i)
 		   << " eta:["  << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]"
 		   << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]"
-		   << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]");
+		   << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]");
     ++i;
   }
     //Aside Large
@@ -124,36 +105,25 @@ StatusCode CscRegDict :: initialize(){
     ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i)
 		   << " eta:["  << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]"
 		   << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]"
-		   << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]");
+		   << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]");
     ++i;
   }
   /*
-  ATH_MSG_DEBUG( "m_isMC=" << m_isMC );  
+  ATH_MSG_DEBUG( "m_isMC=" << m_isMC );
   if (!m_isMC){
     initializePosCorrectionParameters();
     initializeDictionaryForData();
   }
   */  
   initializeHashDictionary();
- 
-  
-  return StatusCode::SUCCESS;
-}
 
 
-StatusCode CscRegDict :: finalize(){
-  ATH_MSG_DEBUG("Finalizing CscRegDict - package version " << PACKAGE_VERSION);
-  
-  delete m_util; m_util=0;
-  
   return StatusCode::SUCCESS;
 }
 
 
-
 int CscRegDict :: get_hash(int stationname, int stationeta, int stationphi){
-  
-  
+
   int sname, seta, sphi;
   if (stationname == 50 || stationname == 51)  sname = stationname-50;
   else {  ATH_MSG_DEBUG( "stationname is out of [50,51]");
@@ -169,14 +139,11 @@ int CscRegDict :: get_hash(int stationname, int stationeta, int stationphi){
   }
   
   return m_module_hashes[sname][seta][sphi];
-  
 }
 
 
 
 
-
-
 double CscRegDict :: PhiConv(double phi){
   
   if (phi>M_PI) {
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx
index ec8882e83ff8..a66f0c5ba711 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx
@@ -1,12 +1,10 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
-#ifndef XAOD_ANALYSIS
 #include "MuonReadoutGeometry/CscReadoutElement.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
-#endif
 
 #include "TrigL2MuonSA/CscSegmentMaker.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
@@ -15,74 +13,27 @@
 #include "xAODTrigMuon/TrigMuonDefs.h"
 #include <cmath>
 
-static const InterfaceID IID_CscSegmentMaker("IID_CscSegmentMaker", 1, 0);
-
-
 
 namespace TrigL2MuonSA {
 
 
-
-const InterfaceID& CscSegmentMaker::interfaceID() { return IID_CscSegmentMaker; }
-
-
 CscSegmentMaker::CscSegmentMaker(const std::string& type, const std::string& name, const IInterface*  parent)
-  : AthAlgTool(type, name, parent), 
-  m_util(0) 
-#ifndef XAOD_ANALYSIS
-  ,m_muonMgr(0)
-#endif
+  : AthAlgTool(type, name, parent),
+    m_util()
 {
-  declareInterface<TrigL2MuonSA::CscSegmentMaker>(this);
 }
 
 
-CscSegmentMaker :: ~CscSegmentMaker(){}
-
-
 StatusCode CscSegmentMaker :: initialize(){
 
-  ATH_MSG_DEBUG("Initializing TrigL2MuonSA::CscSegmentMaker - package version " << PACKAGE_VERSION);
-  
-  StatusCode sc = AthAlgTool::initialize();
-  if(!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-    return sc;
-  }
-  
-  if (!m_util) m_util = new UtilTools();
-  sc = m_cscregdict.retrieve();
-  if(!sc.isSuccess()) {
-    ATH_MSG_ERROR("Could not initialize CscRegDict");
-    return sc;
-  }
-  
-#ifndef XAOD_ANALYSIS
-  if(detStore()->retrieve(m_muonMgr).isFailure()){
-    ATH_MSG_WARNING("Cannot retrieve MuonDetectorManager");
-    return StatusCode::SUCCESS;
-  }
-#endif
-  
-
-  
-  return StatusCode::SUCCESS;
-}
+  ATH_CHECK( m_cscregdict.retrieve() );
 
+  ATH_CHECK( detStore()->retrieve(m_muonMgr) );
 
-StatusCode CscSegmentMaker :: finalize(){
-  ATH_MSG_DEBUG("Finalizing TgcRoadDefiner - package version " << PACKAGE_VERSION);
-  
-  delete m_util; m_util=0;
-  
-  StatusCode sc = AthAlgTool::finalize();
-  
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 
-
-
 ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits,
                                                 std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns,
                                                 const TrigL2MuonSA::TgcFitResult &tgcFitResult,
@@ -95,14 +46,14 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs
     std::vector<TrigL2MuonSA::TrackPattern>::iterator itTrack;
     for (itTrack=v_trackPatterns.begin(); itTrack!=v_trackPatterns.end(); itTrack++) { // loop for track candidates
       
-        //get module hash  to read
+      //get module hash  to read
       int hash_clusters[32]={0};      
       
       TrigL2MuonSA::CscHits clusters[32][8];
       for(unsigned int iclu=0; iclu<cscHits.size(); ++iclu){
         const TrigL2MuonSA::CscHitData &cscHit = cscHits[iclu];
         
-          //outlier or not
+	//outlier or not
         double width = (cscHit.MeasuresPhi == 0 ) ? m_max_residual_eta : m_max_residual_phi;
         if ( width < fabs(cscHit.Residual) )  continue;
         
@@ -119,7 +70,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs
       }//for clusters
       
       
-        //decide which module to read
+      //decide which module to read
       int hashSPs[2]={999,999};
       if( getModuleSP( hashSPs, tgcFitResult, (*itTrack).phiBin, muroad, hash_clusters)!=ReturnCode::FAILURE ){
         
@@ -158,7 +109,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs
 	    double CSCR=cscsegment_ext.x()*cos(phiMod)+cscsegment_ext.y()*sin(phiMod);
 	    double CSCZ=cscsegment_ext.z();
 	    double PhiAtCsc = phimiddle/* - fabs(CSCZ-tgcmidZ)*dPhidz*/;
-	    double CSCSPR = CSCR/cos( m_util->calc_dphi(PhiAtCsc,phiMod) );
+	    double CSCSPR = CSCR/cos( m_util.calc_dphi(PhiAtCsc,phiMod) );
 	    
 	    
 	    superPoint->Z = CSCZ;
@@ -174,7 +125,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs
 	    
 	    //calculate outerSP's correction (dphidz of tgcFitResult)
 	    double phiouter = phimiddle+fabs(outerz-tgcmidZ)*dPhidz;
-	    outerCorFactor = cos( m_util->calc_dphi(phiouter,phiMod) )/cos( m_util->calc_dphi(phimiddle,phiMod) );
+	    outerCorFactor = cos( m_util.calc_dphi(phiouter,phiMod) )/cos( m_util.calc_dphi(phimiddle,phiMod) );
 	    ATH_MSG_DEBUG("outerCorFactor=" << outerCorFactor);
 	    
 	  }//if there is a segment.
@@ -206,7 +157,6 @@ ReturnCode  CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits
 
  
   Amg::Transform3D gToLocal;
-#ifndef XAOD_ANALYSIS
   if(m_use_geometry){
     const CscIdHelper *idHelper = m_muonMgr->cscIdHelper();
 
@@ -219,16 +169,13 @@ ReturnCode  CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits
     ATH_MSG_DEBUG("CscReadoutElement");
     gToLocal = csc->GlobalToAmdbLRSTransform();
   }else{
-#endif
   double rotpi = (m_cscregdict->stationEta(mod_hash)>0) ? -M_PI/2. : M_PI/2.;
   Amg::AngleAxis3D rotZamg( (-1)*(m_cscregdict->phiMod(mod_hash)), Amg::Vector3D(0,0,1));
   Amg::AngleAxis3D rotYamg( (-1)*(m_cscregdict->actualAtanNormal(mod_hash)), Amg::Vector3D(0,1,0) );
   Amg::AngleAxis3D rotPIamg( rotpi, Amg::Vector3D(0,0,1));
   Amg::Translation3D translation( 0.0, 0.0, (-1)*(m_cscregdict->displacement(mod_hash)) );
   gToLocal=translation*rotPIamg*rotYamg*rotZamg;
-#ifndef XAOD_ANALYSIS
   }
-#endif
 
 
   localCscHit ip_loc;  
@@ -250,7 +197,6 @@ ReturnCode  CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits
       double r = cschit.r;
       double phi = cschit.phi;
       double z = cschit.z;
-        //l1id=cschit.m_l1id;
       
         //move to local coordinate system
       Amg::Vector3D vect(r*cos(phi),r*sin(phi),z);
@@ -262,9 +208,8 @@ ReturnCode  CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits
       loc_hit.loc_y = loc_vect(Amg::y);
       loc_hit.loc_z = loc_vect(Amg::z);
       loc_hit.measphi=cschit.MeasuresPhi;
-      loc_hit.error = (loc_hit.measphi==0) ? m_err_eta : m_err_phi;//cschit.eta;
+      loc_hit.error = (loc_hit.measphi==0) ? m_err_eta : m_err_phi;
       loc_hit.residual = cschit.Residual;
-      //loc_hit.index4=ihit; not used
       loc_hit.enabled=true;
       loc_hit.isIP=false;
       loc_hit.stationname=cschit.StationName;
@@ -306,11 +251,9 @@ ReturnCode  CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits
   cscsegment.set(seg_pos,seg_dir, seg2d_eta.chi2, seg2d_phi.chi2);
   cscsegment.setNHitEta(seg2d_eta.nhit);
   cscsegment.setNHitPhi(seg2d_phi.nhit);
-  //cscsegment.setL1id(l1id);
   cscsegment_noip.set(seg_pos_noip,seg_dir_noip, seg2d_eta_noip.chi2, seg2d_phi_noip.chi2);
   cscsegment_noip.setNHitEta(seg2d_eta_noip.nhit);
   cscsegment_noip.setNHitPhi(seg2d_phi_noip.nhit);
-  //cscsegment_noip.setL1id(l1id);
   
   
   return ReturnCode::SUCCESS;
@@ -555,8 +498,6 @@ ReturnCode CscSegmentMaker :: fit_clusters(int measphi, const std::vector<localC
   seg2d.zshift=rp/rq;
   
   seg2d.residual=aver_res/rq;
-  //int outlier=1; not used
-  //double displace=99999.; not used
   
   
   for (unsigned int ihit=0; ihit< hits_fit.size(); ++ihit) {
@@ -570,16 +511,9 @@ ReturnCode CscSegmentMaker :: fit_clusters(int measphi, const std::vector<localC
     Sxx += w*x*x;
     Syy += w*y*y;
     Sxy += w*x*y;
-    //double displace_tmp = fabs( seg2d.residual - w*x);
     
-    /*obsolete
-    if( !hits_fit[ihit].isIP && displace>displace_tmp ){
-      displace = displace_tmp;
-      outlier = ihit;//most distant hit as outlier
-      }*/
   }//ihit
     
-  //  seg2d.outlier=outlier;
     
   
   if(nhit_with_ip>1){
@@ -656,7 +590,7 @@ ReturnCode CscSegmentMaker :: getModuleSP(int mod_hashes[2], const TrigL2MuonSA:
     int stationeta = m_cscregdict->stationEta(imod);
     int side = (muroad.side) ? 1 : -1;
     double phiMod = m_cscregdict->phiMod(imod);
-    double dphi = m_util->calc_dphi(phiMod, tgcFitResult.phi);
+    double dphi = m_util.calc_dphi(phiMod, tgcFitResult.phi);
     ATH_MSG_DEBUG("getModuleSP()::(phi,side) modlue:(" << phiMod << "," << stationeta << ") tgcroad:(" << tgcFitResult.phi << "," << side << ")");
     if( fabs(dphi)>M_PI/8. || side != stationeta) continue;
 
@@ -700,9 +634,6 @@ CscSegment CscSegmentMaker :: segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::Cs
   double b0=mu_seg->x(), b1=mu_seg->y(),b2=mu_seg->z();
   double t = ( alpha-(n(0)*b0+n(1)*b1+n(2)*b2) )/( n(0)*a0+n(1)*a1+n(2)*a2 );
   double x0=a0*t+b0,x1=a1*t+b1,x2=a2*t+b2;
-  //double phiMod=m_cscregdict->phiMod(mod_hash);
-  //double slope=( (a0*cos(phiMod)+a1*sin(phiMod))/a2 );
-  //double intercept= x0*cos(phiMod)+x1*sin(phiMod) + slope*x2  ;
   double chisquare=mu_seg->chiSquare();  
   double chisquare_phi=mu_seg->chiSquarePhi();  
 
@@ -750,10 +681,6 @@ CscSegment :: CscSegment(){
   m_chisquare_phi=0.;
 }
 
-CscSegment :: ~CscSegment(){}
-
-
-
 ReturnCode CscSegment :: set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi)
 {
   
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
index acc48b43e3be..1812493f0c19 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
@@ -8,7 +8,7 @@
 
 #include "MuonRDO/MdtCsmContainer.h"
 
-#include "CLHEP/Units/PhysicalConstants.h"
+#include <cmath>
 
 #include "Identifier/IdentifierHash.h"
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
@@ -36,16 +36,6 @@
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
-using namespace Muon;
-using namespace MuonGM;
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_MdtDataPreparator("IID_MdtDataPreparator", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::MdtDataPreparator::interfaceID() { return IID_MdtDataPreparator; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -53,21 +43,13 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type,
 						   const std::string& name,
 						   const IInterface*  parent): 
    AthAlgTool(type,name,parent),
-   m_activeStore( "ActiveStoreSvc", name ), 
-   m_mdtRawDataProvider("Muon::MDT_RawDataProviderTool"), 
    m_regionSelector("RegSelSvc", name ), 
    m_robDataProvider("ROBDataProviderSvc", name), 
    m_recMuonRoIUtils(),
-   m_mdtRegionDefiner("TrigL2MuonSA::MdtRegionDefiner"),
-   m_mdtPrepDataProvider("Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool"), 
    m_use_mdtcsm(true),
    m_BMGpresent(false),
    m_BMGid(-1)
 {
-   declareInterface<TrigL2MuonSA::MdtDataPreparator>(this);
-
-   declareProperty("MDT_RawDataProvider", m_mdtRawDataProvider);
-   declareProperty("MdtPrepDataProvider", m_mdtPrepDataProvider);
 }
 
 // --------------------------------------------------------------------------------
@@ -75,113 +57,66 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type,
 
 StatusCode TrigL2MuonSA::MdtDataPreparator::initialize()
 {
-   // Get a message stream instance
-  ATH_MSG_DEBUG("Initializing MdtDataPreparator - package version " << PACKAGE_VERSION);
-   
-   StatusCode sc;
-   sc = AthAlgTool::initialize();
-   if (!sc.isSuccess()) {
-     ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-      return sc;
-   }
-
-   // consistency check for decoding flag settings
-   if(m_decodeBS && !m_doDecoding) {
-     ATH_MSG_FATAL("Inconsistent setup, you tried to enable BS decoding but disable all decoding. Please fix the configuration");
-     return StatusCode::FAILURE;
-   }
-
-   ATH_MSG_DEBUG("Decode BS set to" << m_decodeBS );
-   // disable MDT Raw data provider if we either don't decode BS or don't decode MDTs
-   if ( m_mdtRawDataProvider.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding }).isFailure()) {
-     ATH_MSG_ERROR("Failed to retrieve " << m_mdtRawDataProvider );
-     return StatusCode::FAILURE;
-   } else {
-     ATH_MSG_DEBUG("Retrieved tool " << m_mdtRawDataProvider);
-   }
-   //
-   std::string serviceName;
-
-   // Locate RegionSelector
-   ATH_CHECK( m_regionSelector.retrieve());
-   ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name());
 
-   // Locate ROBDataProvider
-   ATH_CHECK( m_robDataProvider.retrieve() );
-   ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name());
-   
-
-   ATH_CHECK( m_mdtRegionDefiner.retrieve() );
-   ATH_MSG_DEBUG("Retrieved service " << m_mdtRegionDefiner);
-
-   ATH_CHECK( m_readKey.initialize() );
-   
-   // retrieve the mdtidhelper
-   ATH_CHECK( detStore()->retrieve(m_muonMgr,"Muon") );
-   ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore.");
-   ATH_CHECK( m_idHelperSvc.retrieve() );
-
-   // Disable MDT PRD converter if we don't do the MDT data decoding
-   ATH_CHECK( m_mdtPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) );
-   ATH_MSG_DEBUG("Retrieved " << m_mdtPrepDataProvider);
-
-   // Retrieve ActiveStore
-   ATH_CHECK( m_activeStore.retrieve() ); 
-   ATH_MSG_DEBUG("Retrieved ActiveStoreSvc."); 
-
-   m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1;
-   if(m_BMGpresent){
-     ATH_MSG_INFO("Processing configuration for layouts with BMG chambers.");
-     m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
-     for(int phi=6; phi<8; phi++) { // phi sectors - BMGs are ony in (6 aka 12) and (7 aka 14)
-       for(int eta=1; eta<4; eta++) { // eta sectors - BMGs are in eta 1 to 3
-         for(int side=-1; side<2; side+=2) { // side - both sides have BMGs
-           if( !m_muonMgr->getMuonStation("BMG", side*eta, phi) ) continue;
-           for(int roe=1; roe<=( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->nMuonReadoutElements(); roe++) { // iterate on readout elemets
-             const MuonGM::MdtReadoutElement* mdtRE =
-                   dynamic_cast<const MuonGM::MdtReadoutElement*> ( ( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->getMuonReadoutElement(roe) ); // has to be an MDT
-             if(mdtRE) initDeadChannels(mdtRE);
-           }
-         }
-       }
-     }
-   }
-
-   
-   // pass the flags that determine if we run the actual decoding here so we don't create a data dependency if it is not needed
-   ATH_CHECK(m_mdtCsmContainerKey.initialize(m_decodeBS && m_doDecoding));
-
-   ATH_CHECK(m_mdtPrepContainerKey.initialize());
-   
-   // 
-   return StatusCode::SUCCESS; 
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
+  // consistency check for decoding flag settings
+  if(m_decodeBS && !m_doDecoding) {
+    ATH_MSG_FATAL("Inconsistent setup, you tried to enable BS decoding but disable all decoding. Please fix the configuration");
+    return StatusCode::FAILURE;
+  }
 
-void TrigL2MuonSA::MdtDataPreparator::setRpcGeometry(bool use_rpc)
-{
-  m_mdtRegionDefiner->setRpcGeometry(use_rpc);
-  return;
-}
+  ATH_MSG_DEBUG("Decode BS set to" << m_decodeBS );
+  // disable MDT Raw data provider if we either don't decode BS or don't decode MDTs
+  ATH_CHECK( m_mdtRawDataProvider.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding }) );
+  std::string serviceName;
+
+  // Locate RegionSelector
+  ATH_CHECK( m_regionSelector.retrieve());
+  ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name());
+
+  // Locate ROBDataProvider
+  ATH_CHECK( m_robDataProvider.retrieve() );
+  ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name());
+
+
+  ATH_CHECK( m_mdtRegionDefiner.retrieve() );
+  ATH_MSG_DEBUG("Retrieved service " << m_mdtRegionDefiner);
+
+  ATH_CHECK( m_readKey.initialize() );
+
+  // retrieve the mdtidhelper
+  ATH_CHECK( detStore()->retrieve(m_muonMgr,"Muon") );
+  ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore.");
+  ATH_CHECK( m_idHelperSvc.retrieve() );
+
+  // Disable MDT PRD converter if we don't do the MDT data decoding
+  ATH_CHECK( m_mdtPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) );
+  ATH_MSG_DEBUG("Retrieved " << m_mdtPrepDataProvider);
+
+  m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1;
+  if(m_BMGpresent){
+    ATH_MSG_INFO("Processing configuration for layouts with BMG chambers.");
+    m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
+    for(int phi=6; phi<8; phi++) { // phi sectors - BMGs are ony in (6 aka 12) and (7 aka 14)
+      for(int eta=1; eta<4; eta++) { // eta sectors - BMGs are in eta 1 to 3
+	for(int side=-1; side<2; side+=2) { // side - both sides have BMGs
+	  if( !m_muonMgr->getMuonStation("BMG", side*eta, phi) ) continue;
+	  for(int roe=1; roe<=( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->nMuonReadoutElements(); roe++) { // iterate on readout elemets
+	    const MuonGM::MdtReadoutElement* mdtRE =
+	      dynamic_cast<const MuonGM::MdtReadoutElement*> ( ( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->getMuonReadoutElement(roe) ); // has to be an MDT
+	    if(mdtRE) initDeadChannels(mdtRE);
+	  }
+	}
+      }
+    }
+  }
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
 
-void TrigL2MuonSA::MdtDataPreparator::setMdtDataCollection(bool use_mdtcsm)
-{
-  m_use_mdtcsm = use_mdtcsm;
-  return;
-}
+  // pass the flags that determine if we run the actual decoding here so we don't create a data dependency if it is not needed
+  ATH_CHECK(m_mdtCsmContainerKey.initialize(m_decodeBS && m_doDecoding));
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
+  ATH_CHECK(m_mdtPrepContainerKey.initialize());
 
-void TrigL2MuonSA::MdtDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess)
-{
-  m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;
-  return;
+  return StatusCode::SUCCESS;
 }
 
 // --------------------------------------------------------------------------------
@@ -195,25 +130,15 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::prepareData(const LVL1::RecMuonRoI*
 							TrigL2MuonSA::MdtHits&   mdtHits_normal,
 							TrigL2MuonSA::MdtHits&   mdtHits_overlap)
 {
-  StatusCode sc;
 
   m_mdtRegionDefiner->setMdtGeometry(m_muonMgr);
 
   // define regions
-  sc = m_mdtRegionDefiner->getMdtRegions(p_roi, rpcFitResult, muonRoad, mdtRegion);
-  if( sc!= StatusCode::SUCCESS ) {
-    ATH_MSG_WARNING("Error in getting MDT region");
-    return sc;
-  }
+  ATH_CHECK( m_mdtRegionDefiner->getMdtRegions(p_roi, rpcFitResult, muonRoad, mdtRegion) );
 
-  sc = getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap);
-  if( sc!= StatusCode::SUCCESS ) {
-    ATH_MSG_WARNING("Error in getting MDT hits");
-    return sc;
-  }
+  ATH_CHECK( getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap) );
 
   return StatusCode::SUCCESS;
-
 }
 
 // --------------------------------------------------------------------------------
@@ -227,22 +152,13 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::prepareData(const LVL1::RecMuonRoI*
 							TrigL2MuonSA::MdtHits&            mdtHits_normal,
 							TrigL2MuonSA::MdtHits&            mdtHits_overlap)
 {
-  StatusCode sc;
 
   m_mdtRegionDefiner->setMdtGeometry(m_muonMgr);
   
   // define regions
-  sc = m_mdtRegionDefiner->getMdtRegions(p_roi, tgcFitResult, muonRoad, mdtRegion);
-  if( sc!= StatusCode::SUCCESS ) {
-    ATH_MSG_WARNING("Error in getting MDT region");
-    return sc;
-  }
+  ATH_CHECK( m_mdtRegionDefiner->getMdtRegions(p_roi, tgcFitResult, muonRoad, mdtRegion) );
 
-  sc = getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap);
-  if( sc!= StatusCode::SUCCESS ) {
-    ATH_MSG_WARNING("Error in getting MDT hits");
-    return sc;
-  }
+  ATH_CHECK( getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap) );
 
   return StatusCode::SUCCESS;
 }
@@ -267,11 +183,11 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtHits(const LVL1::RecMuonRoI*
     double phi = p_roi->phi();
     double phiMin = p_roi->phi() - 0.1;
     double phiMax = p_roi->phi() + 0.1;
-    if( phi < 0 ) phi += 2*CLHEP::pi;
-    if( phiMin < 0 ) phiMin += 2*CLHEP::pi;
-    if( phiMax < 0 ) phiMax += 2*CLHEP::pi;
+    if( phi < 0 ) phi += 2*M_PI;
+    if( phiMin < 0 ) phiMin += 2*M_PI;
+    if( phiMax < 0 ) phiMax += 2*M_PI;
     
-    TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, phi, phiMin, phiMax ); 
+    TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, phi, phiMin, phiMax );
     
     const IRoiDescriptor* iroi = (IRoiDescriptor*) roi;
     
@@ -407,14 +323,10 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtHits(const LVL1::RecMuonRoI*
       m_regionSelector->DetROBIDListUint(MDT, v_robIds);
     }
 
-    StatusCode sc = collectMdtHitsFromPrepData(mdtHashList, v_robIds, mdtHits_normal, muonRoad);
-    if( sc!= StatusCode::SUCCESS ) {
-      ATH_MSG_WARNING("Error in getting collection of MDT hit from prep data");
-      return sc;
-    }
+    ATH_CHECK( collectMdtHitsFromPrepData(mdtHashList, v_robIds, mdtHits_normal, muonRoad) );
 
   }
-  //
+
   return StatusCode::SUCCESS;
 }
 
@@ -449,7 +361,7 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtCsm(const MdtCsmContainer* pMd
     if(std::find(v_robIds.begin(), v_robIds.end(), newROBId) != v_robIds.end())
       redundant = true;
     if(!redundant)
-      v_robIds.push_back(newROBId); 
+      v_robIds.push_back(newROBId);
     else if(processingDetEl != 2){
       ++i;
       continue;
@@ -563,7 +475,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm,
      // even though the total TDC is 17 bits (19 bits for HPTDC) it's ok to use
      // unsigned short int (16 bit) as no more than 2000 tics are delivered by
      // the DAQ and therefore hte leading bits of coarse can be lost
-     unsigned short int drift     = (*amt)->fine() | ( (*amt)->coarse() << 5);  
+     unsigned short int drift     = (*amt)->fine() | ( (*amt)->coarse() << 5);
      
      int StationPhi;
      int StationName;
@@ -574,7 +486,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm,
      double cXmid;
      double cYmid;
      double cAmid = 0;
-     double cPhip;   
+     double cPhip;
      MdtAmtMap* amtMap = csmMap->getTdcMap(TdcId);
      
      if (!amtMap) {
@@ -582,7 +494,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm,
        ++amt;
        continue;
      }
-     bool offlineID = amtMap->offlineId(ChannelId, StationName, StationEta, StationPhi, MultiLayer, Layer, Tube);	   
+     bool offlineID = amtMap->offlineId(ChannelId, StationName, StationEta, StationPhi, MultiLayer, Layer, Tube);
      
      if(!offlineID) {
        ATH_MSG_WARNING("problem getting info from amtMap");
@@ -661,10 +573,10 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm,
      double cphi  = muonRoad.phi[chamber][0];
      if( cPhip*cphi>0 ) dphi = std::abs(cPhip - cphi);
      else {
-       if(fabs(cphi) > CLHEP::pi/2.) {
-	 double phi1 = (cPhip>0.)? cPhip-CLHEP::pi : cPhip+CLHEP::pi;
-	 double phi2 = (cphi >0.)? cphi -CLHEP::pi : cphi +CLHEP::pi;
-	 dphi = std::abs(phi1) + std::abs(phi2); 
+       if(fabs(cphi) > M_PI/2.) {
+	 double phi1 = (cPhip>0.)? cPhip-M_PI : cPhip+M_PI;
+	 double phi2 = (cphi >0.)? cphi -M_PI : cphi +M_PI;
+	 dphi = std::abs(phi1) + std::abs(phi2);
        }
        else {
 	 dphi = std::abs(cPhip) + std::abs(cphi);
@@ -675,13 +587,13 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm,
        R = sqrt(R*R+R*R*tan(dphi)*tan(dphi));
      
      Amg::Vector3D OrigOfMdtInAmdbFrame = 
-       Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );	    
-     double Rmin =(trans*OrigOfMdtInAmdbFrame).perp();	
+       Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );
+     double Rmin =(trans*OrigOfMdtInAmdbFrame).perp();
 
      float cInCo = 1./cos(std::abs(atan(OrtoRadialPos/Rmin)));
      float cPhi0 = cPhip - atan(OrtoRadialPos/Rmin);
-     if(cPhi0 > CLHEP::pi) cPhip -= 2*CLHEP::pi;
-     if(cPhip<0. && (fabs(CLHEP::pi+cPhip) < 0.05) ) cPhip = acos(0.)*2.;
+     if(cPhi0 > M_PI) cPhip -= 2*M_PI;
+     if(cPhip<0. && (fabs(M_PI+cPhip) < 0.05) ) cPhip = acos(0.)*2.;
      
      uint32_t OnlineId = ChannelId | (TdcId << 5) |
        (LinkId << 10) | (get_system_id(SubsystemId) << 13) | (MrodId <<16);
@@ -768,7 +680,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesBarrel(const TrigL2MuonSA::M
    //combine regions of sector and type
    for(int j_station=0; j_station<6; j_station++) {
      int cha=0;
-     if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::BarrelInner; 
+     if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::BarrelInner;
      if (j_station==1) cha = xAOD::L2MuonParameters::Chamber::BarrelMiddle;
      if (j_station==2) cha = xAOD::L2MuonParameters::Chamber::BarrelOuter;
      if (j_station==3) cha = xAOD::L2MuonParameters::Chamber::BME;
@@ -789,7 +701,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesBarrel(const TrigL2MuonSA::M
    // get hashIdlist by using region selector
    for(int i_station=0; i_station<6; i_station++) {
      int chamber=0;
-     if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::BarrelInner; 
+     if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::BarrelInner;
      if (i_station==1) chamber = xAOD::L2MuonParameters::Chamber::BarrelMiddle;
      if (i_station==2) chamber = xAOD::L2MuonParameters::Chamber::BarrelOuter;
      if (i_station==3) chamber = xAOD::L2MuonParameters::Chamber::BME;
@@ -838,7 +750,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesEndcap(const TrigL2MuonSA::M
    //combine regions of sector and type
    for(int j_station=0; j_station<6; j_station++) {
      int cha=0;
-     if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::EndcapInner; 
+     if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::EndcapInner;
      if (j_station==1) cha = xAOD::L2MuonParameters::Chamber::EndcapMiddle;
      if (j_station==2) cha = xAOD::L2MuonParameters::Chamber::EndcapOuter;
      if (j_station==3) cha = xAOD::L2MuonParameters::Chamber::EndcapExtra;
@@ -859,7 +771,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesEndcap(const TrigL2MuonSA::M
    // get hashIdlist by using region selector
    for(int i_station=0; i_station<6; i_station++) {
      int chamber = 0;
-     if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::EndcapInner; 
+     if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::EndcapInner;
      if (i_station==1) chamber = xAOD::L2MuonParameters::Chamber::EndcapMiddle;
      if (i_station==2) chamber = xAOD::L2MuonParameters::Chamber::EndcapOuter;
      if (i_station==3) chamber = xAOD::L2MuonParameters::Chamber::EndcapExtra;
@@ -904,110 +816,89 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std
 								       std::vector<uint32_t>& v_robIds,
 								       TrigL2MuonSA::MdtHits& mdtHits,
 								       const TrigL2MuonSA::MuonRoad& muonRoad)
-{    
+{
   if(m_doDecoding) {
     if(m_decodeBS) {
       if ( m_mdtRawDataProvider->convert(v_robIds).isFailure()) {
         ATH_MSG_WARNING("Conversion of BS for decoding of MDTs failed");
       }
     }
-    if (m_mdtPrepDataProvider->decode(v_robIds).isSuccess()) {
-      ATH_MSG_DEBUG("Calling ROB based decoding with "<< v_robIds.size() << " ROB's");
-    }
-    else{
-      ATH_MSG_WARNING("Error in ROB based decoding");
-      return StatusCode::FAILURE;
-    }
+    ATH_CHECK( m_mdtPrepDataProvider->decode(v_robIds) );
+    ATH_MSG_DEBUG("Calling ROB based decoding with "<< v_robIds.size() << " ROB's");
   }
-  
-  // Get MDT container                                                                                                                                    
+
+  // Get MDT container
   if (v_idHash.empty()) {
     ATH_MSG_DEBUG("Hash list is empty");
     return StatusCode::SUCCESS;
   }
-  
-  const MdtPrepDataContainer* mdtPrds;
-  if (m_activeStore) {
-    auto mdtPrepContainerHandle = SG::makeHandle(m_mdtPrepContainerKey);
-    mdtPrds = mdtPrepContainerHandle.cptr();
-    if (!mdtPrepContainerHandle.isValid()) {    
-      ATH_MSG_ERROR(" Cannot retrieve MDT PRD Container " << m_mdtPrepContainerKey.key());
-      return StatusCode::FAILURE;
-    }
-  } else {
-    ATH_MSG_ERROR("Null pointer to ActiveStore");
+
+  const Muon::MdtPrepDataContainer* mdtPrds;
+  auto mdtPrepContainerHandle = SG::makeHandle(m_mdtPrepContainerKey);
+  mdtPrds = mdtPrepContainerHandle.cptr();
+  if (!mdtPrepContainerHandle.isValid()) {
+    ATH_MSG_ERROR(" Cannot retrieve MDT PRD Container " << m_mdtPrepContainerKey.key());
     return StatusCode::FAILURE;
   }
-  
-  // Get MDT collections                                                                                                                                
+
+  // Get MDT collections
   ///// Vectors of prep data collections
   std::vector<const Muon::MdtPrepDataCollection*> mdtCols;
-  
-  MdtPrepDataContainer::const_iterator MDTcoll;
-  for(std::vector<IdentifierHash>::const_iterator idit = v_idHash.begin(); idit != v_idHash.end(); ++idit) {
-    
-    MDTcoll = mdtPrds->indexFind(*idit);
-    
+
+  for(const IdentifierHash& id : v_idHash) {
+
+    Muon::MdtPrepDataContainer::const_iterator MDTcoll = mdtPrds->indexFind(id);
+
     if( MDTcoll == mdtPrds->end() ) {
-      ATH_MSG_DEBUG("MDT prep data collection not found in Hash ID" << (int)*idit);
+      ATH_MSG_DEBUG("MDT prep data collection not found in Hash ID" << (int)id);
       continue;
     }
-    
+
     if( (*MDTcoll)->size() == 0 ) {
-      ATH_MSG_DEBUG("MDT prep data collection is empty in Hash ID" << (int)*idit);
+      ATH_MSG_DEBUG("MDT prep data collection is empty in Hash ID" << (int)id);
       continue;
     }
-    
+
     mdtCols.push_back(*MDTcoll);
-    
+
     ATH_MSG_DEBUG("Selected Mdt Collection: "
 		  << m_idHelperSvc->mdtIdHelper().show_to_string((*MDTcoll)->identify())
 		  << " with size " << (*MDTcoll)->size()
-		  << "in Hash ID" << (int)*idit);
+		  << "in Hash ID" << (int)id);
   }
-  
-  std::vector< const MdtPrepDataCollection*>::const_iterator it = mdtCols.begin();
-  std::vector< const MdtPrepDataCollection*>::const_iterator it_end = mdtCols.end();
-  
-  for( ;it!=it_end;++it ){
-    
-    Muon::MdtPrepDataCollection::const_iterator cit_begin = (*it)->begin();
-    Muon::MdtPrepDataCollection::const_iterator cit_end = (*it)->end();
-    
-    if (cit_begin == cit_end) return StatusCode::SUCCESS;
-    
-    Muon::MdtPrepDataCollection::const_iterator cit = cit_begin;   
-    for( ; cit!=cit_end;++cit ) {
-      
-      const Muon::MdtPrepData* mdt = (*cit);
-      
+
+  for( const Muon::MdtPrepDataCollection* mdtCol : mdtCols ){
+
+    mdtHits.reserve( mdtHits.size() + mdtCol->size() );
+    for( const Muon::MdtPrepData* mdt : *mdtCol ) {
+
       m_mdtReadout = mdt->detectorElement();
-      if (!m_mdtReadout) continue;	
-      
+      if (!m_mdtReadout) continue;
+
       m_muonStation = m_mdtReadout->parentMuonStation();
-      
+
       int StationPhi = m_mdtReadout->getStationPhi();
       int StationEta = m_mdtReadout->getStationEta();
       int MultiLayer = m_mdtReadout->getMultilayer();
       double cXmid;
       double cYmid;
       double cAmid = 0;
-      double cPhip;   
-      
+      double cPhip;
+
       Identifier id = mdt->identify();
       int adc       = mdt->adc();
       int drift     = mdt->tdc();
-      
+
       int TubeLayers = m_mdtReadout->getNLayers();
       int TubeLayer = m_idHelperSvc->mdtIdHelper().tubeLayer(id);
       if(TubeLayer > TubeLayers) TubeLayer -= TubeLayers;
       int Layer = (MultiLayer-1)*TubeLayers + TubeLayer;
       int Tube = m_idHelperSvc->mdtIdHelper().tube(id);
-      
+
       double OrtoRadialPos = m_mdtReadout->getStationS();
       std::string chamberType = m_mdtReadout->getStationType();
       char st = chamberType[1];
-      
+
       int chamber = 0;
       if (chamberType[0]=='E') {
 	/// Endcap
@@ -1020,9 +911,9 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std
 	if (st=='I') chamber = xAOD::L2MuonParameters::Chamber::BarrelInner;
 	if (st=='M') chamber = xAOD::L2MuonParameters::Chamber::BarrelMiddle;
 	if (st=='O') chamber = xAOD::L2MuonParameters::Chamber::BarrelOuter;
-  if (st=='E' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BEE;
-  if (st=='M' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BME;
-  if (st=='M' && chamberType[2]=='G') chamber = xAOD::L2MuonParameters::Chamber::Backup;
+	if (st=='E' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BEE;
+	if (st=='M' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BME;
+	if (st=='M' && chamberType[2]=='G') chamber = xAOD::L2MuonParameters::Chamber::Backup;
       }
 
       double R = -99999., Z = -99999.;
@@ -1037,7 +928,7 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std
       }
       R = m_mdtReadout->center(TubeLayer, Tube).perp();
       Z = m_mdtReadout->center(TubeLayer, Tube).z();
-      
+
       Amg::Transform3D trans = Amg::CLHEPTransformToEigen(*m_muonStation->getNominalAmdbLRSToGlobal());
       if(m_muonStation->endcap()==0){
 	cXmid = (trans*Amg::Vector3D(0.,0.,0.)).z();
@@ -1052,42 +943,42 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std
 	else cYmid -= halfZThicknessOfMultilayer;
       }
       cPhip = (trans*Amg::Vector3D(0.,0.,0.)).phi();
-      
+
       double dphi  = 0;
       double cphi  = muonRoad.phi[chamber][0];
       if( cPhip*cphi>0 ) {
 	dphi = std::abs(cPhip - cphi);
       } else {
-	if(fabs(cphi) > CLHEP::pi/2.) {
-	  double phi1 = (cPhip>0.)? cPhip-CLHEP::pi : cPhip+CLHEP::pi;
-	  double phi2 = (cphi >0.)? cphi -CLHEP::pi : cphi +CLHEP::pi;
-	  dphi = std::abs(phi1) + std::abs(phi2); 
+	if(fabs(cphi) > M_PI/2.) {
+	  double phi1 = (cPhip>0.)? cPhip-M_PI : cPhip+M_PI;
+	  double phi2 = (cphi >0.)? cphi -M_PI : cphi +M_PI;
+	  dphi = std::abs(phi1) + std::abs(phi2);
 	}
 	else {
 	  dphi = std::abs(cPhip) + std::abs(cphi);
 	}
       }
-      
+
       if(m_muonStation->endcap()==1)
 	R = sqrt(R*R+R*R*tan(dphi)*tan(dphi));
-      
-      Amg::Vector3D OrigOfMdtInAmdbFrame = 
-	Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );      
-      double Rmin =(trans*OrigOfMdtInAmdbFrame).perp();  
-      
+
+      Amg::Vector3D OrigOfMdtInAmdbFrame =
+	Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );
+      double Rmin =(trans*OrigOfMdtInAmdbFrame).perp();
+
       float cInCo = 1./cos(std::abs(atan(OrtoRadialPos/Rmin)));
       float cPhi0 = cPhip - atan(OrtoRadialPos/Rmin);
-      if(cPhi0 > CLHEP::pi) cPhip -= 2*CLHEP::pi;
-      if(cPhip<0. && (fabs(CLHEP::pi+cPhip) < 0.05) ) cPhip = acos(0.)*2.;
-      
+      if(cPhi0 > M_PI) cPhip -= 2*M_PI;
+      if(cPhip<0. && (fabs(M_PI+cPhip) < 0.05) ) cPhip = acos(0.)*2.;
+
       ATH_MSG_DEBUG(" ...MDT hit Z/R/chamber/MultiLater/TubeLayer/Tube/Layer/adc/tdc = "
 		    << Z << "/" << R << "/" << chamber << "/" << MultiLayer << "/" << TubeLayer << "/" 
 		    << Tube << "/" << Layer << "/" << adc << "/" << drift);
-      
+
       // no residual check for the moment
       // (residual check at pattern finder)
       if(Layer!=0 && Tube !=0) {
-	
+
 	// create the new digit
 	TrigL2MuonSA::MdtHitData tmp;
 	tmp.name       = 0;
@@ -1118,10 +1009,10 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std
 	tmp.Residual  = 0;
 	tmp.isOutlier = 0;
 	tmp.Chamber = chamber;
-  tmp.Id = id;
-        
+	tmp.Id = id;
+
 	mdtHits.push_back(tmp);
-      }	  
+      }
     } // end of MdtPrepDataCollection loop
   } // end of MdtPrepDataCollection vector loop
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx
index 2c43904d65b5..e7de388953c0 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx
@@ -4,23 +4,13 @@
 
 #include "TrigL2MuonSA/MdtRegionDefiner.h"
 
-#include "CLHEP/Units/PhysicalConstants.h"
 #include "TrigL2MuonSA/MdtRegion.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
 #include "MuonReadoutGeometry/MuonStation.h"
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
 #include "xAODTrigMuon/TrigMuonDefs.h"
-
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_MdtRegionDefiner("IID_MdtRegionDefiner", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::MdtRegionDefiner::interfaceID() { return IID_MdtRegionDefiner; }
-
+#include <cmath>
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
@@ -28,11 +18,8 @@ const InterfaceID& TrigL2MuonSA::MdtRegionDefiner::interfaceID() { return IID_Md
 TrigL2MuonSA::MdtRegionDefiner::MdtRegionDefiner(const std::string& type,
 						 const std::string& name,
 						 const IInterface*  parent):
-  AthAlgTool(type, name, parent),
-  m_muonMgr(0), m_mdtReadout(0), m_muonStation(0),
-  m_use_rpc(true)
+  AthAlgTool(type, name, parent)
 {
-  declareInterface<TrigL2MuonSA::MdtRegionDefiner>(this);
 }
 
 // --------------------------------------------------------------------------------
@@ -40,30 +27,10 @@ TrigL2MuonSA::MdtRegionDefiner::MdtRegionDefiner(const std::string& type,
 
 StatusCode TrigL2MuonSA::MdtRegionDefiner::initialize()
 {
-  ATH_MSG_DEBUG("Initializing MdtRegionDefiner - package version " << PACKAGE_VERSION) ;
   ATH_CHECK(m_idHelperSvc.retrieve());
-  return StatusCode::SUCCESS; 
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-void TrigL2MuonSA::MdtRegionDefiner::setRpcGeometry(bool use_rpc)
-{
-  m_use_rpc = use_rpc;
-  return;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-// set the pointers for the new cabling and geometry
-void TrigL2MuonSA::MdtRegionDefiner::setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr)
-{
-  m_muonMgr = muonMgr;
+  return StatusCode::SUCCESS;
 }
 
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -79,7 +46,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
   sectors[0] = muonRoad.MDT_sector_trigger;
   sectors[1] = muonRoad.MDT_sector_overlap;
 
-  int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; 
+  int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner;
 
   for(int i_station=0; i_station<6; i_station++) {
     int chamber = 0;
@@ -129,29 +96,29 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
 	    ty1 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1;
 	  else if(ty2 == -1)
 	    ty2 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1;
-	  m_mdtReadout = m_muonMgr->getMdtReadoutElement(id);	
+	  m_mdtReadout = m_muonMgr->getMdtReadoutElement(id);
 	  m_muonStation = m_mdtReadout->parentMuonStation();
 	  
 	  Amg::Transform3D trans = Amg::CLHEPTransformToEigen(*m_muonStation->getNominalAmdbLRSToGlobal());
 	  //HepGeom::Transform3D* trans = m_muonStation->getNominalAmdbLRSToGlobal();
 	  
 	  Amg::Vector3D OrigOfMdtInAmdbFrame = 
-	    Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );	    
+	    Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );
 	  //	    HepPoint3D OrigOfMdtInAmdbFrame = m_muonStation->getBlineFixedPointInAmdbLRS();
 	  
 	  tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp();
 	  tmp_rMax = tmp_rMin+m_muonStation->Rsize();
 	  
 	  if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin;
-	  if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;	
-    if ( chamber_this == endcap_inner ){
-      tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z();
-      if(tmp_zMin < 0) sign = -1;
-      else if(tmp_zMin > 0) sign = 1;
-      tmp_zMax = tmp_zMin + sign*m_muonStation->Zsize();
+	  if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;
+	  if ( chamber_this == endcap_inner ){
+	    tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z();
+	    if(tmp_zMin < 0) sign = -1;
+	    else if(tmp_zMin > 0) sign = 1;
+	    tmp_zMax = tmp_zMin + sign*m_muonStation->Zsize();
 	    if(zMin==0 || tmp_zMin < zMin)zMin = tmp_zMin;
-	    if(zMax==0 || tmp_zMax > zMax)zMax = tmp_zMax;	
-    }
+	    if(zMax==0 || tmp_zMax > zMax)zMax = tmp_zMax;
+	  }
 	  
 	}
       }
@@ -234,9 +201,9 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
   sectors[0] = muonRoad.MDT_sector_trigger;
   sectors[1] = muonRoad.MDT_sector_overlap;
   
-  int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; 
-  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; 
-  int bee = xAOD::L2MuonParameters::Chamber::BEE; 
+  int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle;
+  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner;
+  int bee = xAOD::L2MuonParameters::Chamber::BEE;
 
   for(int i_station=0; i_station<7; i_station++) {
     int chamber = 0;
@@ -262,8 +229,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
       int types[2];
       int& ty1 = types[0];
       int& ty2 = types[1];
-      float sta_zMin = 0;                                                                              
-      float sta_zMax = 0;                                                                                                                 
+      float sta_zMin = 0;
+      float sta_zMax = 0;
 	
       float tmp_zMin = 0;
       float tmp_zMax = 0;
@@ -289,7 +256,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
 	    ty1 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1;
 	  else if(ty2 == -1)
 		ty2 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1;
-	  m_mdtReadout = m_muonMgr->getMdtReadoutElement(id);	
+	  m_mdtReadout = m_muonMgr->getMdtReadoutElement(id);
 	  m_muonStation = m_mdtReadout->parentMuonStation();
 	  float scale = 10.;
 	  
@@ -297,7 +264,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
 	  //HepGeom::Transform3D* trans = m_muonStation->getNominalAmdbLRSToGlobal();
 	  
 	  Amg::Vector3D OrigOfMdtInAmdbFrame = 
-	    Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );	    
+	    Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() );
 	  //	    HepPoint3D OrigOfMdtInAmdbFrame = m_muonStation->getBlineFixedPointInAmdbLRS();
 	  
 	  tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z();
@@ -314,14 +281,14 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI*
 	    tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp()/scale;
 	    tmp_rMax = tmp_rMin+m_muonStation->Rsize()/scale;
 	    if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin;
-	    if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;	
+	    if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;
 	  }
 
 	  if (chamber_this==bee){//BEE
 	    tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp()/scale;
 	    tmp_rMax = tmp_rMin+m_muonStation->Rsize()/scale;
 	    if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin;
-	    if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;	
+	    if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax;
 	  }
 	  
 	}
@@ -447,8 +414,8 @@ void TrigL2MuonSA::MdtRegionDefiner::find_phi_min_max(float phiMiddle, float& ph
 {   
    phiMin = phiMiddle - 0.1;
    phiMax = phiMiddle + 0.1;
-   if ( phiMin < -1.*CLHEP::pi ) phiMin += 2.*CLHEP::pi;
-   if ( phiMax > 1.*CLHEP::pi ) phiMax -= 2.*CLHEP::pi;
+   if ( phiMin < -1.*M_PI ) phiMin += 2.*M_PI;
+   if ( phiMax > 1.*M_PI ) phiMax -= 2.*M_PI;
 }
 
 // --------------------------------------------------------------------------------
@@ -468,18 +435,18 @@ void TrigL2MuonSA::MdtRegionDefiner::find_eta_min_max(float zMin, float rMin, fl
       float eta[4];
       float theta;
 
-      theta  = (fabs(zMin)>0.1)? atan(rMin/fabsf(zMin)): CLHEP::pi/2.;
+      theta  = (fabs(zMin)>0.1)? atan(rMin/fabsf(zMin)): M_PI/2.;
       eta[0] = (zMin>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.));
 
-      theta  = (fabs(zMax)>0.1)? atan(rMin/fabsf(zMax)): CLHEP::pi/2.;
+      theta  = (fabs(zMax)>0.1)? atan(rMin/fabsf(zMax)): M_PI/2.;
       eta[1] = (zMax>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.));
       if(doEmulateMuFast) eta[1] = eta[0];
 
-      theta  = (fabs(zMax)>0.1)? atan(rMax/fabsf(zMax)): CLHEP::pi/2.;
-      eta[2] = (zMax>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.)); 
+      theta  = (fabs(zMax)>0.1)? atan(rMax/fabsf(zMax)): M_PI/2.;
+      eta[2] = (zMax>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.));
 
-      theta  = (fabs(zMin)>0.1)? atan(rMax/fabsf(zMin)): CLHEP::pi/2.;
-      eta[3] = (zMin>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.)); 
+      theta  = (fabs(zMin)>0.1)? atan(rMax/fabsf(zMin)): M_PI/2.;
+      eta[3] = (zMin>0.)?  -log(tan(theta/2.)) : log(tan(theta/2.));
       if(doEmulateMuFast) eta[3] = eta[2];
 
       etaMin = eta[0];
@@ -593,7 +560,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::prepareTgcPoints(const TrigL2MuonSA::
       {
 	 w *= hit.r * hit.r;
 	 double phi = hit.phi;
-	 if( phi < 0 && ( (CLHEP::pi+phi)<PHI_BOUNDARY) ) phi += CLHEP::pi*2;
+	 if( phi < 0 && ( (M_PI+phi)<PHI_BOUNDARY) ) phi += M_PI*2;
 	 if      ( hit.sta < 3 ) { m_tgcStripMidPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); }
 	 else if ( hit.sta ==3 ) { m_tgcStripInnPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); }
       }
@@ -616,8 +583,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_
 						      const TrigL2MuonSA::MdtRegion& mdtRegion,
 						      TrigL2MuonSA::MuonRoad& muonRoad)
 {
-  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; 
-  int barrel_middle = xAOD::L2MuonParameters::Chamber::BarrelMiddle; 
+  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner;
+  int barrel_middle = xAOD::L2MuonParameters::Chamber::BarrelMiddle;
   int barrel_outer = xAOD::L2MuonParameters::Chamber::BarrelOuter;
 
   for(int i_station=0; i_station<3; i_station++) {
@@ -664,11 +631,11 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_
         
 	muonRoad.phi[chamber][i_sector] = (dz)* rpcFitResult.dPhidZ + rpcFitResult.phi;
 	
-	while (muonRoad.phi[chamber][i_sector] > CLHEP::pi)
-	  muonRoad.phi[chamber][i_sector] -= 2*CLHEP::pi;
+	while (muonRoad.phi[chamber][i_sector] > M_PI)
+	  muonRoad.phi[chamber][i_sector] -= 2*M_PI;
 	
-	while (muonRoad.phi[chamber][i_sector] <-CLHEP::pi)
-	  muonRoad.phi[chamber][i_sector] += 2*CLHEP::pi;
+	while (muonRoad.phi[chamber][i_sector] <-M_PI)
+	  muonRoad.phi[chamber][i_sector] += 2*M_PI;
 
       } else {
         // RPC data is not read -> use RoI
@@ -687,10 +654,10 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_
 						      const TrigL2MuonSA::MdtRegion& mdtRegion,
 						      TrigL2MuonSA::MuonRoad& muonRoad)
 {
-  int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; 
-  int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; 
+  int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner;
+  int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle;
   int endcap_outer = xAOD::L2MuonParameters::Chamber::EndcapOuter;
-  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; 
+  int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner;
 
   for(int i_station=0; i_station<5; i_station++) {
     int chamber = 0;
@@ -738,8 +705,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_
 	}
         
 	muonRoad.phi[chamber][i_sector] = (dz)* tgcFitResult.dPhidZ + tgcFitResult.phi;
-	while (muonRoad.phi[chamber][i_sector] > CLHEP::pi)  muonRoad.phi[chamber][i_sector] -= 2*CLHEP::pi;
-	while (muonRoad.phi[chamber][i_sector] <-CLHEP::pi)  muonRoad.phi[chamber][i_sector] += 2*CLHEP::pi;
+	while (muonRoad.phi[chamber][i_sector] > M_PI)  muonRoad.phi[chamber][i_sector] -= 2*M_PI;
+	while (muonRoad.phi[chamber][i_sector] <-M_PI)  muonRoad.phi[chamber][i_sector] += 2*M_PI;
 
       } else {
         // TGC data is not read -> use RoI
-- 
GitLab


From 44f0f7d6f3d127e9d453e35031974f8b3fcc14d7 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Sun, 14 Jun 2020 14:33:44 +0200
Subject: [PATCH 253/266] Remove delete from SCT_SpacePoint using
 std::unique_ptr.

---
 .../InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
index 312ae0b072ea..cabc8efbafe9 100755
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrkPrepRawData/PrepRawData.h"
@@ -9,6 +9,8 @@
 #include "EventPrimitives/EventPrimitivesToStringConverter.h"
 #include "GeoPrimitives/GeoPrimitivesToStringConverter.h"
 
+#include <memory>
+
 namespace InDet
 {
   //-------------------------------------------------------------
@@ -43,10 +45,9 @@ namespace InDet
     m_elemIdList.second = elementIdList.second ;
     assert( (clusList->first!=0) && (clusList->second!=0) );
     assert(clusList->first->detectorElement()) ;
-    const Amg::Vector2D* locpos = (clusList->first->detectorElement()->surface().globalToLocal(position)) ;  
+    std::unique_ptr<const Amg::Vector2D> locpos{clusList->first->detectorElement()->surface().globalToLocal(position)};
     assert(locpos);
     Trk::MeasurementBase::m_localParams = Trk::LocalParameters(*locpos ) ;
-    delete locpos ;
 
   }
 
-- 
GitLab


From 4fbadc58c2e76d65fea5f3c7467d12ac8dd411be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Sun, 14 Jun 2020 16:00:11 +0200
Subject: [PATCH 254/266] fix python indentation

---
 .../MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
index 49848ff8e238..9140d537a9ad 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py
@@ -43,10 +43,10 @@ if __name__ == "__main__":
         nPRDMM = 0
         nPRDSTGC = 0
     for i in range(nEntries):
-    	inputTree.GetEntry(i)
+        inputTree.GetEntry(i)
         nHitsMM += inputTree.Hits_MM_n
         nHitsSTGC += inputTree.Hits_sTGC_n
-    	nDigitsMM += inputTree.Digits_MM
+        nDigitsMM += inputTree.Digits_MM
         nDigitsSTGC += inputTree.Digits_sTGC
         nSDOMM += inputTree.SDO_MM
         nSDOSTGC += inputTree.SDO_sTGC
-- 
GitLab


From 96253d1841e31b79dc51851737f9f35444031a73 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 14 Jun 2020 17:19:22 +0100
Subject: [PATCH 255/266] try to also simplify a bit the conditionals

---
 .../MagFieldElements/AtlasFieldCache.icc      | 91 ++++++++++---------
 1 file changed, 47 insertions(+), 44 deletions(-)

diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
index 2aa851d47476..ed6d347de9db 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
@@ -9,17 +9,14 @@ MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi)
   // search for the zone
   const BFieldZone* zone =
     m_fieldMap ? m_fieldMap->findBFieldZone(z, r, phi) : nullptr;
-  if (zone == nullptr) {
+
+  if (!zone) {
     // outsize all zones
     return false;
   }
 
   // set scale for field
-  if (zone->id() == m_solZoneId) {
-    m_scaleToUse = m_solScale;
-  } else {
-    m_scaleToUse = m_torScale;
-  }
+  m_scaleToUse = (zone->id() == m_solZoneId) ? m_solScale : m_torScale;
 
   // fill the cache, pass in current scale factor
   zone->getCache(z, r, phi, m_cache3d, m_scaleToUse);
@@ -34,14 +31,17 @@ MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi)
 inline bool
 MagField::AtlasFieldCache::fillFieldCacheZR(double z, double r)
 {
-  // is it inside the solenoid zone?
-  if (m_meshZR && m_meshZR->inside(z, r)) {
-    // fill the cache, pass in current scale factor
-    m_meshZR->getCache(z, r, m_cacheZR, m_solScale);
-    return true;
+  // No mesh available
+  if (!m_meshZR) {
+    return false;
   }
-  // outside solenoid
-  return false;
+  // Not inside the solenoid zone?
+  if (!m_meshZR->inside(z, r)) {
+    return false;
+  }
+  // fill the cache, pass in current scale factor
+  m_meshZR->getCache(z, r, m_cacheZR, m_solScale);
+  return true;
 }
 
 inline void
@@ -49,18 +49,18 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
                                     double* ATH_RESTRICT bxyz,
                                     double* ATH_RESTRICT deriv)
 {
-    // Allow for the case of no map for testing
-  if ( m_fieldMap == nullptr ) {
-      // constant ATLAS magnetic field if no map has been set - for testing
-      constexpr double TEST_BFIELD = 1.997;      
-      bxyz[0] = bxyz[1] = 0;
-      bxyz[2] = TEST_BFIELD;
-      if (deriv) {
-        for (int i = 0; i < 9; i++) {
-          deriv[i] = 0.;
-        }
+  // Allow for the case of no map for testing
+  if (m_fieldMap == nullptr) {
+    // constant ATLAS magnetic field if no map has been set - for testing
+    constexpr double TEST_BFIELD = 1.997;
+    bxyz[0] = bxyz[1] = 0;
+    bxyz[2] = TEST_BFIELD;
+    if (deriv) {
+      for (int i = 0; i < 9; i++) {
+        deriv[i] = 0.;
       }
-      return;
+    }
+    return;
   }
 
   const double x = xyz[0];
@@ -89,13 +89,15 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
 
   // do interpolation (cache3d has correct scale factor)
   m_cache3d.getB(xyz, r, phi, bxyz, deriv);
+
+  if (!m_cond) {
+    return;
+  }
   // add biot savart component - must add in scale factor to avoid changing
   // conductor SF since the conductor is part of the static magnetic field model
-  if (m_cond) {
-    const size_t condSize = m_cond->size();
-    for (size_t i = 0; i < condSize; i++) {
-      (*m_cond)[i].addBiotSavart(m_scaleToUse, xyz, bxyz, deriv);
-    }
+  const size_t condSize = m_cond->size();
+  for (size_t i = 0; i < condSize; i++) {
+    (*m_cond)[i].addBiotSavart(m_scaleToUse, xyz, bxyz, deriv);
   }
 }
 
@@ -106,17 +108,17 @@ MagField::AtlasFieldCache::getFieldZR(const double* ATH_RESTRICT xyz,
 {
 
   // Allow for the case of no map for testing
-  if ( m_fieldMap == nullptr ) {
-      // constant ATLAS magnetic field if no map has been set - for testing
-      constexpr double TEST_BFIELD = 1.997;
-      bxyz[0] = bxyz[1] = 0;
-      bxyz[2] = TEST_BFIELD;
-      if (deriv) {
-        for (int i = 0; i < 9; i++) {
-          deriv[i] = 0.;
-        }
+  if (m_fieldMap == nullptr) {
+    // constant ATLAS magnetic field if no map has been set - for testing
+    constexpr double TEST_BFIELD = 1.997;
+    bxyz[0] = bxyz[1] = 0;
+    bxyz[2] = TEST_BFIELD;
+    if (deriv) {
+      for (int i = 0; i < 9; i++) {
+        deriv[i] = 0.;
       }
-      return;
+    }
+    return;
   }
 
   const double x = xyz[0];
@@ -141,13 +143,14 @@ MagField::AtlasFieldCache::getFieldZR(const double* ATH_RESTRICT xyz,
   m_cacheZR.getB(xyz, r, bxyz, deriv);
 }
 
-
 inline bool
-MagField::AtlasFieldCache::solenoidOn() const {
-    return m_fieldMap ? m_fieldMap->solenoidOn() : false;
+MagField::AtlasFieldCache::solenoidOn() const
+{
+  return m_fieldMap ? m_fieldMap->solenoidOn() : false;
 }
 
 inline bool
-MagField::AtlasFieldCache::toroidOn() const {
-    return m_fieldMap ? m_fieldMap->toroidOn() : false;
+MagField::AtlasFieldCache::toroidOn() const
+{
+  return m_fieldMap ? m_fieldMap->toroidOn() : false;
 }
-- 
GitLab


From 470c649a2281e851e2df36a6812fd194dda7948f Mon Sep 17 00:00:00 2001
From: Zach Marshall <ZLMarshall@lbl.gov>
Date: Mon, 15 Jun 2020 04:54:18 +0200
Subject: [PATCH 256/266] Updating reference for PROC Tier0 tests

This test changes the random numbers used by the frozen shower libraries
package. It therefore violates strict tier0 policy, but should not
change the output beyond statistical fluctuations. Updating the
reference, which has been added to cvmfs.
---
 Tools/PROCTools/python/RunTier0TestsTools.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 1344cc6849e3..4675853a8960 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -25,7 +25,7 @@ ciRefFileMap = {
                 's3505-21.0'           : 'v1',
                 's3505-21.3'           : 'v1',
                 's3505-21.9'           : 'v1',
-                's3505-22.0'           : 'v3',
+                's3505-22.0'           : 'v4',
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
                 'overlay-d1498-22.0'   : 'v30',
-- 
GitLab


From 9defd01924cc8ac043134469de2f89ada961de51 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 11:02:50 +0200
Subject: [PATCH 257/266] TrigHIHypo: cmake cleanup and enable flake8

Enable flake8 and cleanup cmake configuration. Removes unused CLHEP
dependency.
---
 .../TrigHypothesis/TrigHIHypo/CMakeLists.txt  | 39 ++-----------------
 .../TrigHypothesis/TrigHIHypo/python/UE.py    |  4 +-
 .../TrigHIHypo/src/TrigHIEFTrackHypo.cxx      |  3 +-
 3 files changed, 7 insertions(+), 39 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt
index e6ba875b48e5..8fe5905d50eb 100644
--- a/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt
@@ -1,43 +1,12 @@
-################################################################################
-# Package: TrigHIHypo
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigHIHypo )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Trigger/TrigEvent/TrigCaloEvent
-                          Trigger/TrigEvent/TrigInDetEvent
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloInterface
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/xAOD/xAODHIEvent
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTracking
-                          GaudiKernel
-                          Reconstruction/HeavyIonRec/HIGlobal
-                          Reconstruction/Particle
-                          Tracking/TrkEvent/TrkParameters
-                          Trigger/TrigEvent/TrigMissingEtEvent
-                          Trigger/TrigEvent/TrigMuonEvent
-                          Trigger/TrigEvent/TrigParticle
-                          Trigger/TrigSteer/TrigInterfaces
-                          Trigger/TrigT1/TrigT1Interfaces )
-
-# External dependencies:
-find_package( CLHEP )
-
 # Component(s) in the package:
 atlas_add_component( TrigHIHypo
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigCaloEvent TrigInDetEvent TrigSteeringEvent CaloEvent AthenaBaseComps xAODHIEvent xAODMuon xAODTracking GaudiKernel Particle TrkParameters TrigMissingEtEvent TrigMuonEvent TrigParticle TrigInterfacesLib TrigT1Interfaces )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloEvent CaloInterfaceLib GaudiKernel HIGlobalLib Particle StoreGateLib TrigCaloEvent TrigInDetEvent TrigInterfacesLib TrigMissingEtEvent TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib TrkParameters xAODHIEvent xAODMuon xAODTracking )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py b/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py
index 379bc2121157..bc46bb1c9d4b 100644
--- a/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py
+++ b/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 
 from AthenaCommon.AppMgr import ToolSvc
@@ -45,7 +45,7 @@ class ElectronUEMonitoringTool(TrigGenericMonitoringToolConfig):
 
         
 from TrigHIHypo.TrigHIHypoConf import ElectronUEMonitoring
-theElectronUEMonitoring = ElectronUEMonitoring("EgammaUEMonitoring");
+theElectronUEMonitoring = ElectronUEMonitoring("EgammaUEMonitoring")
 theElectronUEMonitoring.AthenaMonTools = [ElectronUEMonitoringTool()]
 
 
diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
index 1e9a66c0a392..18a3430a735d 100755
--- a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ********************************************************************
@@ -24,7 +24,6 @@
 #include "TrigHIEFTrackHypo.h"
 //
 #include "Particle/TrackParticleContainer.h"
-#include "CLHEP/Units/SystemOfUnits.h"
 #include "GaudiKernel/ITHistSvc.h"
 
 class ISvcLocator;
-- 
GitLab


From 25d662f776f24ad96ff39da74093b761641f7f90 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 11:10:17 +0200
Subject: [PATCH 258/266] TrigAFPHypo: cmake/flake8 cleanup

Cleanup cmake configuration, enable flake8 and delete obsolete file.
---
 .../TrigHypothesis/TrigAFPHypo/CMakeLists.txt | 30 +++----------------
 .../python/TrigAFPJetAllTEConfig.py           |  7 ++---
 .../python/TrigAFPJetAllTEMonitoring.py       |  1 +
 .../TrigAFPHypo/share/HypoJobOptions.py       | 19 ------------
 4 files changed, 7 insertions(+), 50 deletions(-)
 delete mode 100644 Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py

diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt
index 89fd71dba4a2..5bdbcbf3b81a 100644
--- a/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt
@@ -1,35 +1,13 @@
-################################################################################
-# Package: TrigAFPHypo
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigAFPHypo )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Trigger/TrigEvent/TrigParticle
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigSteer/TrigInterfaces
-                          PRIVATE
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODTrigger
-			              Event/xAOD/xAODForward
-						  Tools/PathResolver
-                          Trigger/TrigEvent/TrigMissingEtEvent )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_component( TrigAFPHypo
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-					 LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib xAODJet xAODTrigger TrigMissingEtEvent xAODForward PathResolver)
+                     src/*.cxx src/components/*.cxx
+					 LINK_LIBRARIES GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib xAODJet xAODTrigger TrigMissingEtEvent xAODForward PathResolver)
 
 # Install files from the package:
-atlas_install_joboptions( share/HypoJobOptions.py )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_runtime( optics/*.txt )
-
diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py
index 8090926e7185..0d5a2e003ec4 100644
--- a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py
+++ b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py
@@ -1,15 +1,12 @@
-#from TrigAFPHypo.TrigAFPHypoConf import TrigAFPJetAllTE
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 import TrigAFPHypoConf
 from TrigAFPHypo.TrigAFPJetAllTEMonitoring import (
     TrigAFPJetAllTEValidationMonitoring,
     TrigAFPJetAllTEOnlineMonitoring)
 
-from AthenaCommon.SystemOfUnits import GeV
-
 class TrigAFPJetAllTE(TrigAFPHypoConf.TrigAFPJetAllTE):
     __slots__ = []
-    def __init__(self,
-            name = "TrigAFPJetAllTE"):
+    def __init__(self, name = "TrigAFPJetAllTE"):
 
         super( TrigAFPJetAllTE, self ).__init__( name )
 
diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py
index 165625debc13..4cbd17972ba8 100644
--- a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py
+++ b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
 
 class TrigAFPJetAllTEValidationMonitoring(TrigGenericMonitoringToolConfig):
diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py b/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py
deleted file mode 100644
index 06acd2227dfa..000000000000
--- a/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#-- ------------------------------------------------------------
-# Private Application Configuration options
-#-- ------------------------------------------------------------
-# Full job is a list of algorithms
-from AthenaCommon.AlgSequence import AlgSequence
-  job = AlgSequence()
-# Add top algorithms to be run
-        from TrigAFPHypo.TrigAFPHypoConf import TrigAFPJetAllTE
-        job += TrigAFPHypo("TrigAFPHypo")
-#-- ------------------------------------------------------------
-# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL)
-#-- ------------------------------------------------------------
-               job.TrigAFPHypo.OutputLevel = INFO
-#-- ------------------------------------------------------------
-# Event related parameters
-#-- ------------------------------------------------------------
-# Number of events to be processed (default is 10)
-#theApp .EvtMax = 1
-#== ============================================================
-- 
GitLab


From 703021f54ad810e5e568b340a1d4f89483f347b6 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 15 Jun 2020 09:33:13 +0000
Subject: [PATCH 259/266] Add ability to run the coverage check in all events
 (SCTErrMonAlg)

---
 .../InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx        | 3 ++-
 .../InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h          | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
index a29a4483fa03..bc7f213eef47 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
@@ -281,7 +281,8 @@ SCTErrMonAlg::fillByteStreamErrors(const EventContext& ctx) const {
   }
   
   // Coverage check is time consuming and run at the first event of each lumi block.
-  if (m_coverageCheck and m_firstEventOfLB[pEvent->lumiBlock()]) {
+  if (m_coverageCheck and
+      (not m_coverageCheckOnlyFirtsEventOfLB or m_firstEventOfLB[pEvent->lumiBlock()])) {
     m_firstEventOfLB[pEvent->lumiBlock()] = false;
     ATH_MSG_DEBUG("Detector Coverage calculation starts" );
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
index 8e07f89dbd60..99c57e2d233e 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
@@ -92,6 +92,7 @@ class SCTErrMonAlg : public AthMonitorAlgorithm {
 
   BooleanProperty m_makeConfHisto{this, "MakeConfHisto", true};
   BooleanProperty m_coverageCheck{this, "CoverageCheck", true};
+  BooleanProperty m_coverageCheckOnlyFirtsEventOfLB{this, "CoverageCheckOnlyFirtsEventOfLB", true};
   BooleanProperty m_useDCS{this, "UseDCS", true};
   BooleanProperty m_doPerLumiErrors{this, "DoPerLumiErrors", true, "Do lumi block 2D error histos"};
 
-- 
GitLab


From ec542473d09009ed0ae85414932c7fa79a40be22 Mon Sep 17 00:00:00 2001
From: Nora Emilia Pettersson <npetters@pcumass4.dyndns.cern.ch>
Date: Mon, 15 Jun 2020 12:16:18 +0200
Subject: [PATCH 260/266] Use absolute import to fix crash in py3

---
 .../InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
index e337d1a2b23e..aba39091c3fe 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration 
 from __future__ import print_function
 
-from ConfigUtils import serviceFactory,toolFactory
+from InDetPhysValMonitoring.ConfigUtils import serviceFactory,toolFactory
 from InDetRecExample.TrackingCommon import setDefaults
 
 import InDetPhysValMonitoring.InDetPhysValMonitoringConf
-- 
GitLab


From b3c013f1795d0754e956cf0648f6aba3a48fb725 Mon Sep 17 00:00:00 2001
From: Guillaume Unal <guillaume.unal@cern.ch>
Date: Mon, 15 Jun 2020 11:33:56 +0000
Subject: [PATCH 261/266] Add LArReadCells algorithm to produce ntuples from
 LAr cell level information

---
 LArCalorimeter/LArCafJobs/CMakeLists.txt      |   1 +
 .../LArCafJobs/LArCafJobs/LArReadCells.h      |  63 ++++++
 .../LArCafJobs/share/LArReadCells_overlay.py  | 110 +++++++++++
 .../LArCafJobs/src/LArReadCells.cxx           | 184 ++++++++++++++++++
 .../src/components/LArCafJobs_entries.cxx     |   2 +
 5 files changed, 360 insertions(+)
 create mode 100644 LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
 create mode 100644 LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py
 create mode 100644 LArCalorimeter/LArCafJobs/src/LArReadCells.cxx

diff --git a/LArCalorimeter/LArCafJobs/CMakeLists.txt b/LArCalorimeter/LArCafJobs/CMakeLists.txt
index dc9e4624743c..48c593bbfa42 100644
--- a/LArCalorimeter/LArCafJobs/CMakeLists.txt
+++ b/LArCalorimeter/LArCafJobs/CMakeLists.txt
@@ -69,6 +69,7 @@ atlas_add_library( LArCafJobsLib
                    src/SimpleShape.cxx
                    src/LArNoiseBursts.cxx
                    src/LArHECNoise.cxx
+                   src/LArReadCells.cxx
                    PUBLIC_HEADERS LArCafJobs
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} 
                    LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent TrigSteeringEvent McParticleEvent StoreGateLib SGtests LArToolsLib TrigDecisionToolLib CaloDetDescrLib
diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
new file mode 100644
index 000000000000..f1dfb7ee16e2
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
@@ -0,0 +1,63 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef LARCAFJOBS_LArReadCells_H
+#define LARCAFJOBS_LArReadCells_H 1
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+
+#include "CaloIdentifier/CaloIdManager.h"
+#include "LArCabling/LArOnOffIdMapping.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArElecCalib/ILArPedestal.h"
+#include "TTree.h"
+
+class CaloCell_ID;
+
+
+class LArReadCells: public ::AthAlgorithm { 
+ public: 
+  LArReadCells( const std::string& name, ISvcLocator* pSvcLocator );
+  virtual ~LArReadCells(); 
+
+  virtual StatusCode  initialize();
+  virtual StatusCode  execute();
+  virtual StatusCode  finalize();
+
+ private: 
+
+   Gaudi::Property<double> m_etcut{this,"etCut",1000.,"Et cut to dump cells"};
+
+   const DataHandle<CaloIdManager> m_caloIdMgr;
+   const CaloCell_ID*       m_calo_id;
+
+
+   TTree* m_tree;
+   int m_runNumber;
+   int m_lbNumber;
+   int m_eventNumber;
+   int m_bcid; 
+   int m_error;
+   int m_ncells;
+   float m_ECell[250000];
+   float m_TCell[250000];
+   float m_EtaCell[250000];
+   float m_PhiCell[250000];
+   int   m_LayerCell[250000];
+   int   m_ProvCell[250000];
+   int   m_QuaCell[250000];
+   int   m_GainCell[250000];
+   int   m_HwidCell[250000];
+   int   m_ADC[250000][32];
+
+    SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
+    SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"};
+    const LArOnlineID*          m_lar_online_id;
+
+
+}; 
+
+#endif //> !MYSPLASHANALYSIS_LArReadCells_H
+
diff --git a/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py b/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py
new file mode 100644
index 000000000000..6c7cd5f4ac65
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py
@@ -0,0 +1,110 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+###############################################################
+#
+# Job options file to read data overlay  pool file with LArRawChannel and run LArReadCells
+#
+#==============================================================
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.all_setOn()
+DetFlags.Muon_setOff()
+DetFlags.Forward_setOff()
+
+
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetGeo = 'atlas'
+globalflags.DataSource = 'data'
+globalflags.InputFormat = 'pool'
+
+from RecExConfig.RecFlags import rec
+rec.readESD.set_Value_and_Lock(False)
+rec.readRDO.set_Value_and_Lock(True)
+
+from AthenaCommon.BeamFlags import jobproperties
+jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0)
+jobproperties.Beam.bunchSpacing.set_Value_and_Lock(25)
+
+from LArROD.LArRODFlags import larRODFlags
+larRODFlags.readDigits.set_Value_and_Lock(False)
+
+from LArConditionsCommon.LArCondFlags import larCondFlags
+larCondFlags.LoadElecCalib.set_Value_and_Lock(True)
+
+from CaloRec.CaloCellFlags import jobproperties
+jobproperties.CaloCellFlags.doLArDeadOTXCorr=False
+jobproperties.CaloCellFlags.doLArThinnedDigits=False
+jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr=False
+
+include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
+include( "PartPropSvc/PartPropSvc.py" )
+#
+# Pool Converters
+#
+include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
+include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
+include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
+
+# Get a handle to the ServiceManager
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+# Get a handle to the ApplicationManager
+from AthenaCommon.AppMgr import theApp
+
+#
+# Pool input
+#
+PoolRDOInput = [
+"test1/dataOverlayRDO.pool.root"
+]
+
+svcMgr.EventSelector.InputCollections = PoolRDOInput
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.FilesInput = PoolRDOInput
+
+# the Tile, LAr and Calo detector description package
+from AthenaCommon.GlobalFlags import jobproperties
+jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00'
+
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+
+from IOVDbSvc.CondDB import conddb
+conddb.blockFolder("/LAR/LArCellPositionShift")
+conddb.addFolderWithTag("LAR_OFL","/LAR/LArCellPositionShift","LArCellPositionShift-ideal",force=True,forceMC=True) 
+
+include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
+include( "LArDetDescr/LArDetDescr_joboptions.py" )
+include( "LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
+include("TileConditions/TileConditions_jobOptions.py" )
+include( "TileConditions/TileConditions_jobOptions.py" ) 
+
+from RecExConfig.ObjKeyStore import objKeyStore
+objKeyStore.readInputFile('RecExPers/OKS_streamRDO.py')
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+from CaloRec.CaloCellGetter import CaloCellGetter
+CaloCellGetter()
+
+topSequence += CfgMgr.LArReadCells()
+topSequence.LArReadCells.etCut = -1e6
+
+#--------------------------------------------------------------
+# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
+#-------------------------------------------------------------
+svcMgr.MessageSvc.OutputLevel      = INFO
+
+if not hasattr(ServiceMgr, 'THistSvc'):
+   from GaudiSvc.GaudiSvcConf import THistSvc
+   ServiceMgr += THistSvc()
+
+ServiceMgr.THistSvc.Output  = ["SPLASH DATAFILE='ntuple1.root' OPT='RECREATE'"]
+
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+# Number of events to be processed (default is 10)
+theApp.EvtMax = 1000000
+theApp.EvtSel = "EventSelector"
+
diff --git a/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx
new file mode 100644
index 000000000000..2a3f4f35c7ef
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx
@@ -0,0 +1,184 @@
+/*
+  Copyright (C) 2002-2028 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArCafJobs/LArReadCells.h"
+
+#include "xAODEventInfo/EventInfo.h"
+
+#include "Identifier/Identifier.h"
+#include "Identifier/HWIdentifier.h"
+
+#include "CaloIdentifier/CaloCell_ID.h"
+#include "CaloGeoHelpers/CaloSampling.h"
+#include "CaloEvent/CaloCell.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+#include "LArRawEvent/LArDigit.h"
+#include "LArRawEvent/LArDigitContainer.h"
+
+#include "GaudiKernel/ITHistSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "LArElecCalib/ILArPedestal.h"
+
+
+
+LArReadCells::LArReadCells( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm( name, pSvcLocator ){
+}
+
+
+LArReadCells::~LArReadCells() {}
+
+
+StatusCode LArReadCells::initialize() {
+  ATH_MSG_INFO ("Initializing " << name() << "...");
+
+  ServiceHandle<ITHistSvc> histSvc("THistSvc",name()); 
+  CHECK( histSvc.retrieve() );
+  m_tree = new TTree("myTree","myTree");
+  CHECK( histSvc->regTree("/SPLASH/myTree",m_tree) );
+  m_tree->Branch("RunNumber",&m_runNumber,"RunNumber/I");
+  m_tree->Branch("LBNumber",&m_lbNumber,"LBNumber/I");
+  m_tree->Branch("EventNumber",&m_eventNumber,"EventNumber/I");
+  m_tree->Branch("BCID",&m_bcid,"BCID/I");
+  m_tree->Branch("LArError",&m_error,"LArError/I");
+  m_tree->Branch("ncells",&m_ncells,"ncells/I");
+  m_tree->Branch("ECell",m_ECell,"eCell[ncells]/F");
+  m_tree->Branch("TCell",m_TCell,"tCell[ncells]/F");
+  m_tree->Branch("EtaCell",m_EtaCell,"etaCell[ncells]/F");
+  m_tree->Branch("PhiCell",m_PhiCell,"phiCell[ncells]/F");
+  m_tree->Branch("LayerCell",m_LayerCell,"layerCell[ncells]/I");
+  m_tree->Branch("ProvCell", m_ProvCell,"provCell[ncells]/I");
+  m_tree->Branch("QuaCell", m_QuaCell,"quaCell[ncells]/I");
+  m_tree->Branch("GainCell", m_GainCell,"gainCell[ncells]/I");
+  m_tree->Branch("HwidCell", m_HwidCell,"hwidCell[ncells]/I");
+  m_tree->Branch("ADC",m_ADC,"ADC[ncells][32]/I");
+
+  ATH_CHECK(detStore()->retrieve(m_caloIdMgr));
+  m_calo_id      = m_caloIdMgr->getCaloCell_ID();
+  ATH_CHECK( detStore()->retrieve(m_lar_online_id, "LArOnlineID") );
+
+  ATH_CHECK( m_cablingKey.initialize() );
+  ATH_CHECK(m_pedestalKey.initialize());
+
+  ATH_MSG_INFO("Energy cut for time and quality computation: " << m_etcut);
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode LArReadCells::finalize() {
+  ATH_MSG_INFO ("Finalizing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode LArReadCells::execute() {  
+  ATH_MSG_DEBUG ("Executing " << name() << "...");
+
+  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+  const LArOnOffIdMapping* cabling=*cablingHdl;
+  if(!cabling) {
+     ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" );
+     return StatusCode::FAILURE;
+  }
+
+  //Get Conditions input
+  SG::ReadCondHandle<ILArPedestal> pedHdl{m_pedestalKey};
+  const ILArPedestal* larPedestal=*pedHdl;
+
+
+  const xAOD::EventInfo* eventInfo = 0;
+  ATH_CHECK( evtStore()->retrieve( eventInfo) );
+  ATH_MSG_INFO( " run number " << eventInfo->runNumber() );
+  
+  m_runNumber   = eventInfo->runNumber();
+  m_eventNumber = eventInfo->eventNumber();
+  m_lbNumber    = eventInfo->lumiBlock();
+  m_bcid        = eventInfo->bcid();
+  m_error       = 0;
+  if (eventInfo->errorState(xAOD::EventInfo::LAr)==xAOD::EventInfo::Error) m_error=1;
+
+  std::vector<const LArDigit*> IndexDigit;
+  int nCell = m_calo_id->calo_cell_hash_max();
+  IndexDigit.resize(nCell,NULL);
+
+  const LArDigitContainer* digit_container;
+  if (evtStore()->contains<LArDigitContainer>("FREE")) {
+  CHECK(evtStore()->retrieve(digit_container,"FREE"));
+  LArDigitContainer::const_iterator first_digit = digit_container->begin();
+  LArDigitContainer::const_iterator end_digit   = digit_container->end();
+  for (; first_digit != end_digit; ++first_digit)
+  {
+    HWIdentifier hwid = (*first_digit)->hardwareID();
+    Identifier   id = cabling->cnvToIdentifier(hwid);
+    int index = (int) (m_calo_id->calo_cell_hash(id));
+    if (index>=0 && index<nCell) IndexDigit[index]=(*first_digit);
+  }
+  }
+
+
+ const CaloCellContainer* cell_container;
+ CHECK( evtStore()->retrieve(cell_container,"AllCalo"));
+
+ CaloCellContainer::const_iterator first_cell = cell_container->begin();
+ CaloCellContainer::const_iterator end_cell   = cell_container->end();
+ m_ncells=0;
+ for (; first_cell != end_cell; ++first_cell)
+ {
+     Identifier cellID = (*first_cell)->ID();
+     double et    =  (*first_cell)->et();
+
+     if (et > m_etcut && !(m_calo_id->is_tile(cellID)) ){
+
+        m_ECell[m_ncells]= (*first_cell)->energy();
+        m_TCell[m_ncells]= (*first_cell)->time();
+        m_EtaCell[m_ncells]= (*first_cell)->eta();
+        m_PhiCell[m_ncells]= (*first_cell)->phi();
+        m_LayerCell[m_ncells]= m_calo_id->calo_sample(cellID);
+        m_ProvCell[m_ncells]=(*first_cell)->provenance();
+        m_QuaCell[m_ncells]=(*first_cell)->quality();
+        m_GainCell[m_ncells]=(*first_cell)->gain();
+
+        HWIdentifier hwid =  cabling->createSignalChannelID(cellID);
+        int barrel_ec = m_lar_online_id->barrel_ec(hwid);
+        int pos_neg   = m_lar_online_id->pos_neg(hwid);
+        int FT        = m_lar_online_id->feedthrough(hwid);
+        int slot      = m_lar_online_id->slot(hwid);
+        int channel   = m_lar_online_id->channel(hwid);
+        int myid=0;
+        if (barrel_ec<2 && pos_neg<2 && FT<32 && slot<16 && channel<128) 
+         myid = (channel) | (slot << 7) | (FT<<11) | (pos_neg << 16) | (barrel_ec << 17);
+
+        float pedestal=0.;
+        if (larPedestal) {
+         pedestal =  larPedestal->pedestal(hwid,(*first_cell)->gain());
+        }
+   
+        m_HwidCell[m_ncells]=myid;
+
+        int index = (int) (m_calo_id->calo_cell_hash(cellID));
+        if (IndexDigit[index]) {
+            const std::vector<short>& vSamples=(IndexDigit[index])->samples();
+            int nsamples = vSamples.size();
+            for (int i=0;i<std::min(32,nsamples);i++) {
+              m_ADC[m_ncells][i]=vSamples[i]-pedestal;
+            }
+        }
+        m_ncells++;
+
+     }
+
+    if (m_ncells>=250000) {
+       ATH_MSG_WARNING(" --- too many cells ");
+       break;
+    }
+ }
+
+  ATH_MSG_INFO("Number of cells read " << m_ncells );
+
+  m_tree->Fill();
+
+  return StatusCode::SUCCESS;
+}
+
diff --git a/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx b/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx
index d9e1c86bff7e..0e933f4a6b74 100644
--- a/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx
+++ b/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx
@@ -3,10 +3,12 @@
 #include "LArCafJobs/LArSimpleShapeDumper.h"
 #include "LArCafJobs/LArNoiseBursts.h"
 #include "LArCafJobs/LArHECNoise.h"
+#include "LArCafJobs/LArReadCells.h"
 
 DECLARE_COMPONENT( LArShapeDumper )
 DECLARE_COMPONENT( LArSimpleShapeDumper )
 DECLARE_COMPONENT( LArNoiseBursts )
 DECLARE_COMPONENT( LArHECNoise )
 DECLARE_COMPONENT( LArShapeDumperTool )
+DECLARE_COMPONENT( LArReadCells )
 
-- 
GitLab


From 9dc1036917d72d5b5ab2e797a69f07a17531e054 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Mon, 15 Jun 2020 11:38:51 +0000
Subject: [PATCH 262/266] Switch to HepMC3/HepMC2 compatible loops part 2

---
 .../GeneratorFilters/BSubstruct.h             |  9 +--
 .../GeneratorFilters/src/ATauFilter.cxx       | 61 +++++++++----------
 .../GeneratorFilters/src/BSubstruct.cxx       | 26 ++++----
 3 files changed, 46 insertions(+), 50 deletions(-)

diff --git a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
index 4ab32c7eb9a5..c5fd3002fc98 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef GENERATORFILTERS_BSUBSTRUCTURE_H
@@ -9,8 +9,6 @@
 #include "xAODJet/Jet.h"
 class TH1;
 
-typedef std::vector<HepMC::ConstGenParticlePtr> Particles;
-
 class BSubstruct : public GenFilter{
 public:
 
@@ -31,7 +29,7 @@ private:
    *  Recursively calls itself to return a list of all particles earlier in the
    *  decay chain that are c or b-flavoured.
    */
-  Particles ancestorCBs(HepMC::ConstGenParticlePtr p)const;
+  std::vector<HepMC::ConstGenParticlePtr> ancestorCBs(HepMC::ConstGenParticlePtr p)const;
 
   /// the delta-r between two vectors at y, phi
   double deltaR(double y1, double phi1, double y2, double phi2)const;
@@ -45,7 +43,7 @@ private:
   double deltaPhi(double phi1, double phi2)const;
 
   void fillHistos(TH1 *phihisto, TH1 *rHisto, TH1 *nHisto, TH1 *bHisto,
-                  const Particles &bHadrons, double weight);
+                  const std::vector<HepMC::ConstGenParticlePtr> &bHadrons, double weight);
 
   /// Count of events input for filtering
   size_t m_nEvents;
@@ -85,7 +83,6 @@ private:
   // Do we store histograms
   bool m_doHistos;
 
-  const static double TWOPI;
 
   TH1 *m_h_nBPass;
   TH1 *m_h_nBAll;
diff --git a/Generators/GeneratorFilters/src/ATauFilter.cxx b/Generators/GeneratorFilters/src/ATauFilter.cxx
index 443f1f8cebf8..1eb9a7ff62e5 100644
--- a/Generators/GeneratorFilters/src/ATauFilter.cxx
+++ b/Generators/GeneratorFilters/src/ATauFilter.cxx
@@ -74,60 +74,59 @@ StatusCode ATauFilter::filterEvent() {
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     // Loop over all particles in the event
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ) {
+  for (auto part: *genEvt){
       // Look for the first tau with genstat != 3 which has not a tau as daughter
       fsr = 0;
-      if ( (*pitr)->end_vertex()!= 0 ) {
-        HepMC::GenVertex::particles_out_const_iterator  itr = (*pitr)->end_vertex()->particles_out_const_begin();
-        for ( ; itr != (*pitr)->end_vertex()->particles_out_const_end(); itr++ ) {
-          if ( (*pitr)->pdg_id() == (*itr)->pdg_id() ) fsr = 1;
+      if ( part->end_vertex()!= 0 ) {
+        for ( auto itr = part->end_vertex()->particles_out_const_begin(); itr != part->end_vertex()->particles_out_const_end(); itr++ ) {
+          if ( part->pdg_id() == (*itr)->pdg_id() ) fsr = 1;
         }
       }
 
-      if ( ( (*pitr)->pdg_id() == 15 ) && ( tau == 0 ) && ( (*pitr)->status() != 3 ) && ( fsr == 0 ) ) {
-        tau = (*pitr);
-        ATH_MSG_DEBUG("Found tau with barcode " << tau->barcode() << " status " << (*pitr)->status());
+      if ( ( part->pdg_id() == 15 ) && ( tau == 0 ) && ( part->status() != 3 ) && ( fsr == 0 ) ) {
+        tau = part;
+        ATH_MSG_DEBUG("Found tau with barcode " << tau->barcode() << " status " << part->status());
       }
 
       // Look for the first atau with genstat != 3 which has not a tau as daughter
-      if ( ( (*pitr)->pdg_id() == -15 ) && ( atau == 0 ) && ( (*pitr)->status() != 3 ) && ( fsr == 0 ) ) {
-        atau = (*pitr);
-        ATH_MSG_DEBUG("Found atau with barcode " << atau->barcode() << " status " << (*pitr)->status());
+      if ( ( part->pdg_id() == -15 ) && ( atau == 0 ) && ( part->status() != 3 ) && ( fsr == 0 ) ) {
+        atau = part;
+        ATH_MSG_DEBUG("Found atau with barcode " << atau->barcode() << " status " << part->status());
       }
 
       // If tau was already found look for his nu
-      if ( ( tau != 0 ) && ( (*pitr)->pdg_id() == 16 ) ) {
-        if ( tau->end_vertex() == (*pitr)->production_vertex() ) {
-          ATH_MSG_DEBUG("Found nutau with barcode " << HepMC::barcode(*pitr) << " and pdg_id " <<
-                        (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp());
-          nutau = (*pitr);
+      if ( ( tau != 0 ) && ( part->pdg_id() == 16 ) ) {
+        if ( tau->end_vertex() == part->production_vertex() ) {
+          ATH_MSG_DEBUG("Found nutau with barcode " << HepMC::barcode(part) << " and pdg_id " <<
+                        part->pdg_id() << " pt=" << part->momentum().perp());
+          nutau = part;
         }
       }
 
       // If atau was already found look for his anu
-      if ( ( atau != 0 ) && ( (*pitr)->pdg_id() == -16 ) ) {
-        if ( atau->end_vertex() == (*pitr)->production_vertex() ) {
-          ATH_MSG_DEBUG("Found anutau with barcode " << HepMC::barcode(*pitr) << " and pdg_id " <<
-                        (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp());
-          anutau = (*pitr);
+      if ( ( atau != 0 ) && ( part->pdg_id() == -16 ) ) {
+        if ( atau->end_vertex() == part->production_vertex() ) {
+          ATH_MSG_DEBUG("Found anutau with barcode " << HepMC::barcode(part) << " and pdg_id " <<
+                        part->pdg_id() << " pt=" << part->momentum().perp());
+          anutau = part;
         }
       }
 
       // if tau was already found look for his lepton
-      if ( ( tau != 0 ) && ( ( (*pitr)->pdg_id() == 13 ) || ( (*pitr)->pdg_id() == 11 ) ) ) {
-        if ( tau->end_vertex() == (*pitr)->production_vertex() ) {
-          ATH_MSG_DEBUG("Found tau-lepton with barcode " << HepMC::barcode(*pitr) << " and pdg_id " <<
-                        (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp());
-          taulep = (*pitr);
+      if ( ( tau != 0 ) && ( ( part->pdg_id() == 13 ) || ( part->pdg_id() == 11 ) ) ) {
+        if ( tau->end_vertex() == part->production_vertex() ) {
+          ATH_MSG_DEBUG("Found tau-lepton with barcode " <<HepMC::barcode(part) << " and pdg_id " <<
+                        part->pdg_id() << " pt=" << part->momentum().perp());
+          taulep = part;
         }
       }
 
       // If atau was already found look for his alepton
-      if ( ( atau != 0 ) && ( ( (*pitr)->pdg_id() == -13 ) || ( (*pitr)->pdg_id() == -11 ) ) ) {
-        if ( atau->end_vertex() == (*pitr)->production_vertex() ) {
-          ATH_MSG_DEBUG("Found atau-lepton with barcode "  << HepMC::barcode(*pitr) << " and pdg_id " <<
-                        (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp());
-          ataulep = (*pitr);
+      if ( ( atau != 0 ) && ( ( part->pdg_id() == -13 ) || ( part->pdg_id() == -11 ) ) ) {
+        if ( atau->end_vertex() == part->production_vertex() ) {
+          ATH_MSG_DEBUG("Found atau-lepton with barcode "  << HepMC::barcode(part) << " and pdg_id " <<
+                        part->pdg_id() << " pt=" << part->momentum().perp());
+          ataulep = part;
         }
       }
     }
diff --git a/Generators/GeneratorFilters/src/BSubstruct.cxx b/Generators/GeneratorFilters/src/BSubstruct.cxx
index 8fe8c53f7873..1179941b42c7 100644
--- a/Generators/GeneratorFilters/src/BSubstruct.cxx
+++ b/Generators/GeneratorFilters/src/BSubstruct.cxx
@@ -88,8 +88,8 @@ inline double BSubstruct::deltaR(const xAOD::Jet* jet1, const xAOD::Jet* jet2) c
 }
 
 
-inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr  p) const {
-  Particles parentBs;
+inline std::vector<HepMC::ConstGenParticlePtr> BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr  p) const {
+  std::vector<HepMC::ConstGenParticlePtr> parentBs;
   auto vtx = p->production_vertex();
 
   // If the particle has no production vertex then can only assume it is beam or similar
@@ -102,7 +102,7 @@ inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr  p) const {
   for (HepMC::GenVertex::particles_in_const_iterator parent = vtx->particles_in_const_begin();
        parent != vtx->particles_in_const_end(); ++parent) {
     if (hasCBQuark((*parent)->pdg_id())) parentBs.push_back(*parent);
-    Particles ancestors = ancestorCBs(*parent);
+    std::vector<HepMC::ConstGenParticlePtr> ancestors = ancestorCBs(*parent);
     parentBs.insert(parentBs.end(), ancestors.begin(), ancestors.end());
   }
   return parentBs;
@@ -110,14 +110,14 @@ inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr  p) const {
 
 
 void BSubstruct::fillHistos(TH1* phiHisto, TH1* rHisto, TH1* nHisto, TH1* bHisto,
-                            const Particles& bHadrons, double weight) {
+                            const std::vector<HepMC::ConstGenParticlePtr>& bHadrons, double weight) {
   if (!m_doHistos) return;
 
-  for (Particles::const_iterator bHad1 = bHadrons.begin(); bHad1 != bHadrons.end(); ++bHad1) {
+  for (auto bHad1 = bHadrons.begin(); bHad1 != bHadrons.end(); ++bHad1) {
     if (bHisto != 0) {
       bHisto->Fill((*bHad1)->momentum().phi(), weight);
     }
-    Particles::const_iterator bHad2 = bHad1;
+    auto bHad2 = bHad1;
     ++bHad2;
     while (bHad2 != bHadrons.end()) {
       const double dPhi = deltaPhi((*bHad1)->momentum().phi(), (*bHad2)->momentum().phi());
@@ -179,11 +179,11 @@ StatusCode BSubstruct::filterEvent() {
   }
 
   // Look for c or b-hadrons that are in the same decay chain as each other and remove the first one
-  for (Particles::reverse_iterator bHad = bHadrons.rbegin(); bHad != bHadrons.rend(); ++bHad) {
+  for (auto bHad = bHadrons.rbegin(); bHad != bHadrons.rend(); ++bHad) {
     if ((*bHad) == 0) continue;
-    Particles ancestors = ancestorCBs(*bHad);
-    for (Particles::const_iterator ancestor = ancestors.begin(); ancestor != ancestors.end(); ++ancestor) {
-      for (Particles::iterator p = bHadrons.begin(); p != bHadrons.end(); ++p) {
+    std::vector<HepMC::ConstGenParticlePtr> ancestors = ancestorCBs(*bHad);
+    for (auto ancestor = ancestors.begin(); ancestor != ancestors.end(); ++ancestor) {
+      for (auto p = bHadrons.begin(); p != bHadrons.end(); ++p) {
         if((*p)==0 || (*p)==(*bHad)) continue;
         if((*ancestor) == (*p)) (*p) = 0;
       }
@@ -191,12 +191,12 @@ StatusCode BSubstruct::filterEvent() {
   }
 
   // Remove the null pointers and any duplicates
-  Particles::iterator p = bHadrons.begin();
+  auto p = bHadrons.begin();
   while (p != bHadrons.end()) {
     if ((*p)==0) {
       p = bHadrons.erase(p);
     } else {
-      Particles::iterator p2 = p;
+      auto p2 = p;
       ++p2;
       while (p2 != bHadrons.end()) {
         if ((*p)==(*p2)) {
@@ -232,7 +232,7 @@ StatusCode BSubstruct::filterEvent() {
     gotJet = true;
 
     size_t nBs = 0;
-    for (Particles::const_iterator bHad = bHadrons.begin(); bHad != bHadrons.end(); ++bHad) {
+    for (auto bHad = bHadrons.begin(); bHad != bHadrons.end(); ++bHad) {
       if (deltaR(*bHad, *jet) < m_drMatch) ++nBs;
     }
 
-- 
GitLab


From dcfc6a4506f29cc463a748354a6a4ebdf4352a2c Mon Sep 17 00:00:00 2001
From: Marcin Nowak <marcin.nowak@cern.ch>
Date: Mon, 15 Jun 2020 15:06:35 +0000
Subject: [PATCH 263/266] Migrate CopyEventStreamInfo to use
 MetaCont<EventStreamInfo>

by accessing MetaDataSvc instead of MetaDataStore
Also added MetaDataSvc::record(unique_ptr, key) method
---
 .../AthenaKernel/AthenaKernel/IMetaDataSvc.h  | 17 ++++++++
 .../src/CopyEventStreamInfo.cxx               | 39 +++++++++----------
 .../src/CopyEventStreamInfo.h                 |  8 ++--
 .../src/MakeEventStreamInfo.cxx               |  6 +--
 4 files changed, 43 insertions(+), 27 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
index ec82de1182d4..bf81f6019be4 100644
--- a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
@@ -39,6 +39,10 @@ public: // Non-static members
    template <typename T, typename TKEY> 
    StatusCode record(T* p2BRegistered, const TKEY& key);
 
+   /// Record an object with a key, take ownership of the unique_ptr obj
+   template <typename T, typename TKEY> 
+   StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key);
+
    /// Remove object with this type+key
    template <typename T, typename TKEY> 
    StatusCode remove(const TKEY& key, bool ignoreIfAbsent=false);
@@ -103,6 +107,19 @@ StatusCode IMetaDataSvc::record(T* pObject, const TKEY& key)
    return StatusCode::FAILURE;
 }
 
+
+template <typename T, typename TKEY> 
+StatusCode IMetaDataSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
+{
+   if( this->record( pUnique.get(), key ).isSuccess() ) {
+      pUnique.release();
+      return StatusCode::SUCCESS;
+   }
+   pUnique.reset();
+   return StatusCode::FAILURE;
+}
+
+
 template <typename T, class TKEY>
 StatusCode IMetaDataSvc::remove(const TKEY& key, bool ignoreIfAbsent)
 {
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
index a9a7e911770e..2ea6e688543d 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /** @file CopyEventStreamInfo.cxx
@@ -17,7 +17,7 @@
 CopyEventStreamInfo::CopyEventStreamInfo(const std::string& type,
 	const std::string& name,
 	const IInterface* parent) : ::AthAlgTool(type, name, parent),
-		m_metaDataStore("StoreGateSvc/MetaDataStore", name),
+                m_metaDataSvc("MetaDataSvc", name),
 		m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name) {
    // Declare IMetaDataTool interface
    declareInterface<IMetaDataTool>(this);
@@ -31,9 +31,9 @@ CopyEventStreamInfo::~CopyEventStreamInfo() {
 //___________________________________________________________________________
 StatusCode CopyEventStreamInfo::initialize() {
    ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION);
-   // Locate the MetaDataStore and InputMetaDataStore
-   if (!m_metaDataStore.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Could not find MetaDataStore");
+   // Locate the MetaDataSvc and InputMetaDataStore
+   if (!m_metaDataSvc.retrieve().isSuccess()) {
+      ATH_MSG_FATAL("Could not find MetaDataSvc");
       return(StatusCode::FAILURE);
    }
    if (!m_inputMetaDataStore.retrieve().isSuccess()) {
@@ -45,9 +45,9 @@ StatusCode CopyEventStreamInfo::initialize() {
 //___________________________________________________________________________
 StatusCode CopyEventStreamInfo::finalize() {
    ATH_MSG_DEBUG("in finalize()");
-   // release the MetaDataStore and InputMetaDataStore
-   if (!m_metaDataStore.release().isSuccess()) {
-      ATH_MSG_WARNING("Could not release MetaDataStore");
+   // release the MetaDataSvc and InputMetaDataStore
+   if (!m_metaDataSvc.release().isSuccess()) {
+      ATH_MSG_WARNING("Could not release MetaDataSvc");
    }
    if (!m_inputMetaDataStore.release().isSuccess()) {
       ATH_MSG_WARNING("Could not release InputMetaDataStore");
@@ -79,40 +79,37 @@ StatusCode CopyEventStreamInfo::beginInputFile(const SG::SourceID&)
          EventStreamInfo* evtStrInfo_out = 0;
          for (SG::ObjectWithVersion<EventStreamInfo>& obj : allVersions) {
             const EventStreamInfo* evtStrInfo_in = obj.dataObject.cptr();
-            if (!m_metaDataStore->contains<EventStreamInfo>(key)) {
-               evtStrInfo_out = new EventStreamInfo(*evtStrInfo_in);
-               if (!m_metaDataStore->record(evtStrInfo_out, key).isSuccess()) {
+            evtStrInfo_out = m_metaDataSvc->tryRetrieve<EventStreamInfo>(key);
+            if( !evtStrInfo_out ) {
+               auto esinfo_up = std::make_unique<EventStreamInfo>(*evtStrInfo_in);
+               if( m_metaDataSvc->record( std::move(esinfo_up), key ).isFailure()) {
                   ATH_MSG_ERROR("Could not record DataObject: " << key);
                   return StatusCode::FAILURE;
                }
             } else {
-               if (!m_metaDataStore->retrieve(evtStrInfo_out, key).isSuccess()) {
-                  ATH_MSG_ERROR("Could not find DataObject in output: " << key);
-                  return StatusCode::FAILURE;
-               }
                evtStrInfo_out->addEvent(evtStrInfo_in->getNumberOfEvents());
                for (auto elem = evtStrInfo_in->getRunNumbers().begin(),
-	                 lastElem = evtStrInfo_in->getRunNumbers().end(); 
+                         lastElem = evtStrInfo_in->getRunNumbers().end(); 
                          elem != lastElem; elem++) {
-               evtStrInfo_out->insertRunNumber(*elem);
+                  evtStrInfo_out->insertRunNumber(*elem);
                }
                for (auto elem = evtStrInfo_in->getLumiBlockNumbers().begin(),
-	                 lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); 
+                         lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); 
                          elem != lastElem; elem++) {
                   evtStrInfo_out->insertLumiBlockNumber(*elem);
                }
                for (auto elem = evtStrInfo_in->getProcessingTags().begin(),
-	                 lastElem = evtStrInfo_in->getProcessingTags().end(); 
+                         lastElem = evtStrInfo_in->getProcessingTags().end(); 
                          elem != lastElem; elem++) {
                   evtStrInfo_out->insertProcessingTag(*elem);
                }
                for (auto elem = evtStrInfo_in->getItemList().begin(),
-	                 lastElem = evtStrInfo_in->getItemList().end(); 
+                         lastElem = evtStrInfo_in->getItemList().end(); 
                          elem != lastElem; elem++) {
                   evtStrInfo_out->insertItemList((*elem).first, (*elem).second);
                }
                for (auto elem = evtStrInfo_in->getEventTypes().begin(),
-	                 lastElem = evtStrInfo_in->getEventTypes().end(); 
+                         lastElem = evtStrInfo_in->getEventTypes().end(); 
                          elem != lastElem; elem++) {
                   evtStrInfo_out->insertEventType(*elem);
                }
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h
index 7d6e68dbf4e5..43682f609541 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef COPYEVENTSTREAMINFO_H
@@ -15,6 +15,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 
 #include "AthenaKernel/IMetaDataTool.h"
+#include "AthenaKernel/IMetaDataSvc.h"
 
 #include <string>
 
@@ -48,8 +49,9 @@ private:
    /// Key, the StoreGate key for the EventStreamInfo object.
    StringProperty m_key;
 
-   /// Pointer to the metadata stores
-   ServiceHandle<StoreGateSvc> m_metaDataStore;
+   /// Access to output MetaDataStore through MetaDataSvc (using MetaContainers)
+   ServiceHandle<IMetaDataSvc> m_metaDataSvc;
+   /// MetaDataStore for input 
    ServiceHandle<StoreGateSvc> m_inputMetaDataStore;
 };
 #endif
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
index 462cecda784e..8b49f3e3ae13 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
@@ -102,10 +102,10 @@ StatusCode MakeEventStreamInfo::postExecute() {
 
    EventStreamInfo* pEventStream = m_metaDataSvc->tryRetrieve<EventStreamInfo>(m_key.value());
    if( !pEventStream ) {
-      pEventStream = new EventStreamInfo();
-      if( m_metaDataSvc->record(pEventStream, m_key.value() ).isFailure()) {
+      auto esinfo_up = std::make_unique<EventStreamInfo>();
+      pEventStream = esinfo_up.get();
+      if( m_metaDataSvc->record(std::move(esinfo_up), m_key.value()).isFailure() ) {
          ATH_MSG_ERROR("Could not register EventStreamInfo object");
-         delete pEventStream;
          return(StatusCode::FAILURE);
       }
    }
-- 
GitLab


From bdf9ba0e739f11bc3e3ad57f946b591e01a91859 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Mon, 15 Jun 2020 15:16:13 +0000
Subject: [PATCH 264/266] Allow ByteStreamRDP_OutputSvc to handle multiple
 events on the fly

---
 .../ByteStreamCnvSvc/ByteStreamOutputSvc.h    |  7 ++-
 .../src/ByteStreamEventStorageOutputSvc.cxx   |  7 ++-
 .../src/ByteStreamEventStorageOutputSvc.h     | 15 +++---
 .../src/ByteStreamMergeOutputSvc.cxx          |  7 ++-
 .../src/ByteStreamMergeOutputSvc.h            |  9 ++--
 .../src/ByteStreamRDP_OutputSvc.cxx           | 51 +++++++++----------
 .../src/ByteStreamRDP_OutputSvc.h             | 34 ++++++++-----
 7 files changed, 76 insertions(+), 54 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
index 2e986118ce34..0871f3c65b40 100644
--- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BYTESTREAMCNVSVC_BYTESTREAMOUTPUTSVC_H
@@ -15,6 +15,8 @@
 
 #include "ByteStreamData/RawEvent.h"
 
+#include "GaudiKernel/EventContext.h"
+
 /** @class ByteStreamOutputSvc
  *  @brief This class provides the base class to services to write bytestream data.
  *  The concrete class can provide Raw event to a file, transient store, or through network.
@@ -31,6 +33,9 @@ public:
 
   /// virtual method for writing the event
   virtual bool putEvent(RawEvent* re) = 0;
+
+  /// context-aware method for writing the event
+  virtual bool putEvent(RawEvent* re, const EventContext& ctx) = 0;
 };
 
 inline const InterfaceID& ByteStreamOutputSvc::interfaceID() {
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
index 1ce60ee24cef..6e8b751ca496 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ByteStreamEventStorageOutputSvc.h"
@@ -354,6 +354,11 @@ ByteStreamEventStorageOutputSvc::putEvent(RawEvent* re)
   return(true);
 }
 
+bool ByteStreamEventStorageOutputSvc::putEvent(RawEvent* /*re*/, const EventContext& /*ctx*/) {
+  ATH_MSG_FATAL(name() << " does not implement the context-aware putEvent method");
+  return false;
+}
+
 
 /******************************************************************************/
 StatusCode
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
index 9bf035bf44f0..8c9daa9a515e 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
    */
 
 #ifndef BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
@@ -42,19 +42,20 @@ public:
   virtual ~ByteStreamEventStorageOutputSvc();
 
   /// Required of all Gaudi Services
-  virtual StatusCode initialize();
-  virtual StatusCode stop      ();
-  virtual StatusCode finalize  ();
+  virtual StatusCode initialize() override;
+  virtual StatusCode stop      () override;
+  virtual StatusCode finalize  () override;
 
   /// Required of all Gaudi services:  see Gaudi documentation for details
-  StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
+  StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
   /// Implementation of the ByteStreamOutputSvc interface method putEvent.
-  virtual bool putEvent(RawEvent* re);
+  virtual bool putEvent(RawEvent* re) override;
+  virtual bool putEvent(RawEvent* re, const EventContext& ctx) override;
 
   // Callback method to reinitialize the internal state of the component
   // for I/O purposes (e.g. upon @c fork(2))
-  virtual StatusCode io_reinit();
+  virtual StatusCode io_reinit() override;
 
 
 private: // internal member functions
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
index 0a24e50e40c3..8148846ca32e 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ByteStreamMergeOutputSvc.h"
@@ -173,6 +173,11 @@ bool  ByteStreamMergeOutputSvc::putEvent(RawEvent* newEvent) {
    return(true);
 }
 
+bool ByteStreamMergeOutputSvc::putEvent(RawEvent* /*re*/, const EventContext& /*ctx*/) {
+  ATH_MSG_FATAL(name() << " does not implement the context-aware putEvent method");
+  return false;
+}
+
 StatusCode ByteStreamMergeOutputSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
   if (ByteStreamOutputSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ByteStreamOutputSvc*>(this);
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h
index fda0e3d78cac..9794a8a8332a 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BYTESTREAMMERGEOUTPUTSVC_H
@@ -27,12 +27,13 @@ public:
    /// Destructor.
    virtual ~ByteStreamMergeOutputSvc();
 
-   virtual StatusCode initialize();
+   virtual StatusCode initialize() override;
    /// Implementation of the ByteStreamOutputSvc interface methods.
-   virtual bool putEvent(RawEvent* re);
+   virtual bool putEvent(RawEvent* re) override;
+   virtual bool putEvent(RawEvent* re, const EventContext& ctx) override;
 
    /// Required of all Gaudi services:  see Gaudi documentation for details
-   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
+   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
 private:
    uint32_t reducedROBid(uint32_t);
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx
index 595dc78364e8..517ece2152b7 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //===================================================================
@@ -15,15 +15,8 @@
 
 // Constructor.
 ByteStreamRDP_OutputSvc::ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc)
-	: ByteStreamOutputSvc(name, svcloc),
-	m_totalEventCounter(0), m_re(0), m_buf(0), m_robProvider("ROBDataProviderSvc", name) {
-   declareProperty("BSOutputStreamName", m_bsOutputStreamName = name);
-}
-
-// Destructor.
-ByteStreamRDP_OutputSvc::~ByteStreamRDP_OutputSvc() {
-   delete [] m_buf;
-   delete m_re; m_re = 0;
+	: ByteStreamOutputSvc(name, svcloc) {
+      if (m_bsOutputStreamName.empty()) m_bsOutputStreamName = name;
 }
 
 // Open the first input file and read the first event.
@@ -42,23 +35,27 @@ StatusCode ByteStreamRDP_OutputSvc::initialize() {
    return(StatusCode::SUCCESS);
 }
 
-// Receive the next event.
-bool  ByteStreamRDP_OutputSvc::putEvent(RawEvent* re) {
-  delete [] m_buf;
-  delete m_re; m_re = 0;
-  // Keep a local copy
-  uint32_t reSize = re->fragment_size_word();
-  OFFLINE_FRAGMENTS_NAMESPACE::PointerType reStart;
-  re->start(reStart);
-  m_buf = new OFFLINE_FRAGMENTS_NAMESPACE::DataType[reSize];
-  memcpy (reinterpret_cast<void *>(m_buf), reinterpret_cast<const void *>(reStart), reSize*sizeof(reStart[0]));
-  m_re = new RawEvent(m_buf);
-  // Give RawEvent to RDP 
-  m_robProvider->setNextEvent(m_re); 
-  // Event Count 
-  ++m_totalEventCounter; 
-  ATH_MSG_DEBUG("Number of Events in ByteStreamRDP_OutputSvc: " << m_totalEventCounter); 
-  return(true); 
+// Receive the next event without explicit context
+bool ByteStreamRDP_OutputSvc::putEvent(RawEvent* re) {
+   return putEvent(re, Gaudi::Hive::currentContext());
+}
+
+// Receive the next event
+bool ByteStreamRDP_OutputSvc::putEvent(RawEvent* re, const EventContext& ctx) {
+   EventCache* cache = m_eventsCache.get(ctx);
+   cache->releaseEvent();
+   const uint32_t reSize = re->fragment_size_word();
+   const uint32_t* reStart = re->start();
+   cache->dataBuffer = std::make_unique<uint32_t[]>(reSize);
+   std::copy(reStart, reStart+reSize, cache->dataBuffer.get());
+
+   // Create a cached RawEvent object from the cached data buffer
+   cache->rawEvent = std::make_unique<RawEvent>(cache->dataBuffer.get());
+
+   // Give the RawEvent to ROBDataProvider
+   m_robProvider->setNextEvent(ctx, cache->rawEvent.get());
+
+   return true;
 }
 
 StatusCode ByteStreamRDP_OutputSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h
index 249396214b64..af2d3e1c4eda 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BYTESTREAMRDP_OUTPUTSVC_H
@@ -17,6 +17,7 @@
 
 #include "ByteStreamData/RawEvent.h" 
 #include "ByteStreamCnvSvc/ByteStreamOutputSvc.h"
+#include "AthenaKernel/SlotSpecificObj.h"
 #include "GaudiKernel/ServiceHandle.h"
 
 class IROBDataProviderSvc;
@@ -25,25 +26,32 @@ class ByteStreamRDP_OutputSvc: public ByteStreamOutputSvc {
 public:
    /// Constructors:
    ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc);
-   /// Destructor.
-   virtual ~ByteStreamRDP_OutputSvc();
 
    /// Required of all Gaudi Services
-   virtual StatusCode initialize();
+   virtual StatusCode initialize() override;
+
    /// Implementation of the ByteStreamOutputSvc interface methods.
-   virtual bool putEvent(RawEvent* re);
+   virtual bool putEvent(RawEvent* re) override;
+   virtual bool putEvent(RawEvent* re, const EventContext& ctx) override;
 
    /// Required of all Gaudi services:  see Gaudi documentation for details
-   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
+   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
 private: // data
-   int                m_totalEventCounter; //!< number of event counter
-   RawEvent* m_re;
-   OFFLINE_FRAGMENTS_NAMESPACE::DataType* m_buf;
-   ServiceHandle<IROBDataProviderSvc> m_robProvider; 
-
-private: // properties
-   Gaudi::Property<std::string> m_bsOutputStreamName; //!< stream name for multiple output 
+   struct EventCache {
+      void releaseEvent() {
+         this->rawEvent.reset();
+         this->dataBuffer.reset();
+      }
+      std::unique_ptr<RawEvent> rawEvent {nullptr}; //!< Current event fragment
+      std::unique_ptr<uint32_t[]> dataBuffer {nullptr}; //!< Underlying data structure
+   };
+   SG::SlotSpecificObj<EventCache> m_eventsCache; //!< Cache of event data for each slot
+
+   ServiceHandle<IROBDataProviderSvc> m_robProvider {
+      this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"};
+   Gaudi::Property<std::string> m_bsOutputStreamName {
+      this, "BSOutputStreamName", "", "Stream name for multiple output"};
 };
 
 #endif  
-- 
GitLab


From 091e999b356a558aadcc8984ef4cab45f141f6f0 Mon Sep 17 00:00:00 2001
From: Masato Aoki <masato.aoki@cern.ch>
Date: Mon, 15 Jun 2020 15:26:49 +0000
Subject: [PATCH 265/266] Update of TGC DQ to use TGC PRD AllBCs

---
 .../TgcRawDataMonitoring/TgcRawDataValAlg.h   |  6 ++---
 .../share/TgcRaw_MonitoringOptions.py         |  3 +--
 .../src/TgcRawDataValAlg.cxx                  | 23 ++++---------------
 .../src/TgcRawDataValAlg_ReadContainer.cxx    |  6 ++++-
 4 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h
index d10309fa3092..3195dd3a1b6e 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h
@@ -66,9 +66,7 @@ private:
   std::string m_generic_path_tgcmonitoring;
   
   // Keys and Locations for retrieving collections
-  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataContainerName{this,"TgcPrepDataContainer","TGC_Measurements","current BC TGC PRD"};
-  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataPreviousContainerName{this,"TgcPrepDataPreviousContainer","TGC_MeasurementsPriorBC","previous BC TGC PRD"};
-  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataNextContainerName{this,"TgcPrepDataNextContainer","TGC_MeasurementsNextBC","next BC TGC PRD"};
+  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataContainerName{this,"TgcPrepDataContainerAllBCs","TGC_MeasurementsAllBCs","TGC PRD"};
   SG::ReadHandleKey<Muon::TgcCoinDataContainer> m_outputCoinCollectionLocation{this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC T1 coincidences"};
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","EventInfo"};
 
@@ -116,7 +114,7 @@ private:
   std::vector<double> m_hitPosPhi[2][2];    //[ac][ws]
   
   // read Tgc PRD Container
-  void readTgcPrepDataContainer(const Muon::TgcPrepDataContainer *tgc_prep_container, int pcn);
+  void readTgcPrepDataContainer(const Muon::TgcPrepDataContainer *tgc_prep_container, int pcn = -1);
   
   
   ///////////////////////////////////////////////////////////////////////////
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py
index 4aef14a00236..9cdb7a6ee1f7 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py
@@ -17,8 +17,7 @@ tgcLv1RawMonMan = AthenaMonManager(name="TgcLv1RawMonManager",
                                    OutputLevel         = muonOutputLevel)
 ############## TgcRawDataValAlg #############
 from TgcRawDataMonitoring.TgcRawDataMonitoringConf import TgcRawDataValAlg
-tgcRawDataValAlg = TgcRawDataValAlg(name='tgcRawDataValAlg',
-                                    TgcPrepDataContainer="TGC_Measurements")
+tgcRawDataValAlg = TgcRawDataValAlg(name='tgcRawDataValAlg')
 #ToolSvc += tgcRawDataValAlg
 tgcRawMonMan.AthenaMonTools += [ tgcRawDataValAlg ]
 topSequence += tgcRawMonMan
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx
index e5317518bae0..ed663040d57c 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx
@@ -61,8 +61,6 @@ TgcRawDataValAlg::initialize(){
   m_mon_profile=true;
 
   ATH_CHECK(m_tgcPrepDataContainerName.initialize());
-  ATH_CHECK(m_tgcPrepDataPreviousContainerName.initialize());
-  ATH_CHECK(m_tgcPrepDataNextContainerName.initialize());
   ATH_CHECK(m_outputCoinCollectionLocation.initialize());
   ATH_CHECK(m_eventInfo.initialize());
   
@@ -121,20 +119,9 @@ TgcRawDataValAlg::fillHistograms(){
   
   /////////////////////////////////////
   // Get TGC Hit PRD Containers
-  SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_previous_prd_container(m_tgcPrepDataContainerName);
-  SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_current_prd_container(m_tgcPrepDataPreviousContainerName);
-  SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_next_prd_container(m_tgcPrepDataNextContainerName);
-  
-  // Previous
-  ATH_MSG_DEBUG( "****** tgc previous prd container size() : " << tgc_previous_prd_container->size()  );
-  
-  // Current
-  ATH_MSG_DEBUG( "****** tgc current prd container size() : " << tgc_current_prd_container->size()  );
-  
-  // Next
-  ATH_MSG_DEBUG( "****** tgc next prd container size() : " << tgc_next_prd_container->size()  );
-  
-  
+  SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_prd_container(m_tgcPrepDataContainerName);
+  ATH_MSG_DEBUG( "****** tgc prd container size() : " << tgc_prd_container->size()  );
+
   // Increment event counter
   m_nEvent++;
   ATH_MSG_DEBUG("event : " << m_nEvent  );
@@ -144,9 +131,7 @@ TgcRawDataValAlg::fillHistograms(){
   // Get Data from TGC Containers
   clearVectorsArrays();
   // fill vectors and arrays from TgcPrepData
-  readTgcPrepDataContainer(tgc_previous_prd_container.cptr(), PREV);
-  readTgcPrepDataContainer( tgc_current_prd_container.cptr(), CURR);
-  readTgcPrepDataContainer(    tgc_next_prd_container.cptr(), NEXT);
+  readTgcPrepDataContainer(tgc_prd_container.cptr());
   
   
   ///////////////////////////////////////////////////////////////////////////
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx
index 360855306553..c07746b8fa79 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx
@@ -75,7 +75,6 @@ TgcRawDataValAlg::readTgcPrepDataContainer(const Muon::TgcPrepDataContainer* tgc
   ///////////////////////////////////////////////////////////////////////////
   // Loop over TgcPrepDataContainer
   if(pcn!=TOTA){
-
     // MuonDetectorManager from the conditions store
     SG::ReadCondHandle<MuonGM::MuonDetectorManager> DetectorManagerHandle{m_DetectorManagerKey};
     const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr(); 
@@ -130,6 +129,11 @@ TgcRawDataValAlg::readTgcPrepDataContainer(const Muon::TgcPrepDataContainer* tgc
       for(Muon::TgcPrepDataCollection::const_iterator collectionIt=(*containerIt)->begin();
           collectionIt!= collection_end;
           ++collectionIt){
+	if(pcn<0){
+	  if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_PREVIOUS)==Muon::TgcPrepData::BCBIT_PREVIOUS) pcn=PREV;
+	  if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_CURRENT)==Muon::TgcPrepData::BCBIT_CURRENT) pcn=CURR;
+	  if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_NEXT)==Muon::TgcPrepData::BCBIT_NEXT) pcn=NEXT;
+	}
         // Increment Prd Counter
         if(pcn==CURR)m_nPrd++;
         
-- 
GitLab


From ceca1a53804043fa96085760c921dc9d9634242f Mon Sep 17 00:00:00 2001
From: Paul Gessinger-Befurt <paul.gessinger@cern.ch>
Date: Mon, 15 Jun 2020 15:33:05 +0000
Subject: [PATCH 266/266] Change prop step writer to not use multiple threads

there was a race condition that i don't fully understand. Since the
multithreading is not really needed, i just dropped it.
---
 Projects/AnalysisBase/externals.txt           |   2 +-
 Projects/AthDataQuality/externals.txt         |   2 +-
 Projects/AthGeneration/externals.txt          |   2 +-
 Projects/AthSimulation/externals.txt          |   2 +-
 Projects/Athena/externals.txt                 |   2 +-
 .../ActsGeometry/ActsExtrapolationAlg.h       |   6 +-
 .../ActsGeometry/python/ActsGeometryConfig.py |  50 ++++
 .../share/ActsExtrapolationAlg.py             | 221 +++++++-----------
 .../src/ActsCaloTrackingVolumeBuilder.cxx     |  73 ++++--
 .../ActsGeometry/src/ActsExtrapolationAlg.cxx |   3 +
 .../src/ActsExtrapolationTool.cxx             |   7 +-
 .../ActsGeometry/src/ActsLayerBuilder.cxx     |  51 ++--
 .../src/ActsPropStepRootWriterSvc.cxx         |  10 +-
 .../src/ActsStrawLayerBuilder.cxx             |  53 +++--
 .../src/ActsTrackingGeometrySvc.cxx           |  34 ++-
 Tracking/Acts/ActsInterop/src/Logger.cxx      |  20 +-
 .../TrkExAlgs/python/TrkExAlgsConfig.py       |   4 +-
 17 files changed, 292 insertions(+), 250 deletions(-)

diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index 0e7e510b504d..dbecc1c4cf52 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = 2.0.68
+AnalysisBaseExternalsVersion = 2.0.69
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 8a3575cd65ea..c5635ff6b2f3 100644
--- a/Projects/AthDataQuality/externals.txt
+++ b/Projects/AthDataQuality/externals.txt
@@ -5,4 +5,4 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AtlasExternalsVersion = 2.0.68
+AtlasExternalsVersion = 2.0.69
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index 06658d1ef1da..e7e6d7f962e7 100644
--- a/Projects/AthGeneration/externals.txt
+++ b/Projects/AthGeneration/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthGenerationExternalsVersion = 2.0.68
+AthGenerationExternalsVersion = 2.0.69
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v33r1.002
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index ef09ae53f009..4124d342967f 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = 2.0.68
+AthSimulationExternalsVersion = 2.0.69
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v33r1.002
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index f2bf542d9d92..0dee979c7170 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = 2.0.68
+AthenaExternalsVersion = 2.0.69
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v33r1.002
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
index 938f0c02330b..f7992802058a 100755
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
@@ -33,10 +33,6 @@ namespace Acts {
   }
 }
 
-//class IActsMaterialTrackWriterSvc;
-
-template<typename>
-class RootExCellWriter;
 class EventContext;
 class IAthRNGSvc;
 class IActsExtrapolationTool;
@@ -55,7 +51,7 @@ private:
 
   ToolHandle<IActsExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"};
 
-  std::shared_ptr<RootExCellWriter<Acts::TrackParameters>> m_rootEccWriter;
+  // std::shared_ptr<RootExCellWriter<Acts::TrackParameters>> m_rootEccWriter;
 
   // poor-mans Particle Gun is included here right now
   Gaudi::Property<std::vector<double>> m_etaRange{this, "EtaRange", {-3, 3}, "The eta range for particles"};
diff --git a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
index 2a07d14ba361..d22b648a9354 100644
--- a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
+++ b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
@@ -16,11 +16,49 @@ def ActsTrackingGeometrySvcCfg(configFlags, name = "ActsTrackingGeometrySvc" ) :
     subDetectors += ["TRT"]
   if configFlags.Detector.GeometryCalo:
     subDetectors += ["Calo"]
+
+    # need to configure calo geometry, otherwise we get a crash
+    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
+    result.merge(LArGMCfg(configFlags))
+    from TileGeoModel.TileGMConfig import TileGMCfg
+    result.merge(TileGMCfg(configFlags))
+
+  idSub = [sd in subDetectors for sd in ("Pixel", "SCT", "TRT")]
+  if any(idSub):
+    # ANY of the ID subdetectors are on => we require GM sources
+    # In principle we could require only what is enabled, but the group
+    # does extra config that I don't want to duplicate here
+    from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
+    result.merge(InDetGeometryCfg(configFlags))
+    
+    if not all(idSub):
+      from AthenaCommon.Logging import log
+      log.warning("ConfigFlags indicate %s should be built. Not all ID subdetectors are set, but I'll set all of them up to capture the extra setup happening here.", ", ".join(subDetectors))
+      
+
     
   actsTrackingGeometrySvc = Acts_ActsTrackingGeometrySvc(name, BuildSubDetectors = subDetectors)
+
+  from AthenaCommon.Constants import VERBOSE
+  actsTrackingGeometrySvc.OutputLevel = VERBOSE
   result.addService(actsTrackingGeometrySvc)
   return result
 
+def ActsPropStepRootWriterSvcCfg(configFlags, 
+                                 name="ActsPropStepRootWriterSvc",
+                                 FilePath="propsteps.root",
+                                 TreeName="propsteps"):
+    result = ComponentAccumulator()
+
+    ActsPropStepRootWriterSvc = CompFactory.ActsPropStepRootWriterSvc
+    svc = ActsPropStepRootWriterSvc(name=name, 
+                                    FilePath=FilePath, 
+                                    TreeName=TreeName)
+
+    result.addService(svc)
+
+    return result
+
 def ActsTrackingGeometryToolCfg(configFlags, name = "ActsTrackingGeometryTool" ) :
   result = ComponentAccumulator()
   
@@ -45,6 +83,18 @@ def NominalAlignmentCondAlgCfg(configFlags, name = "NominalAlignmentCondAlg", **
   
   return result
 
+def ActsAlignmentCondAlgCfg(configFlags, name = "ActsAlignmentCondAlg", **kwargs) :
+  result = ComponentAccumulator()
+  
+  acc = ActsTrackingGeometrySvcCfg(configFlags)
+  result.merge(acc)
+  
+  Acts_ActsAlignmentCondAlg = CompFactory.ActsAlignmentCondAlg
+  actsAlignmentCondAlg = Acts_ActsAlignmentCondAlg(name, **kwargs)
+  result.addCondAlgo(actsAlignmentCondAlg)
+  
+  return result
+
 from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
 def ActsExtrapolationToolCfg(configFlags, name = "ActsExtrapolationTool" ) :
   result=ComponentAccumulator()
diff --git a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
index 76328e786a3b..8e52e01b9219 100644
--- a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
+++ b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
@@ -3,143 +3,84 @@ This job options file will run an example extrapolation using the
 Acts tracking geometry and the Acts extrapolation toolchain.
 """
 
-import os
-import logging
-
-# Use Global flags and DetFlags.
-from AthenaCommon.DetFlags import DetFlags
-from AthenaCommon.GlobalFlags import globalflags
-
-from AthenaCommon.ConcurrencyFlags import jobproperties as jp
-from AthenaCommon.Logging import log as msg
-nThreads = jp.ConcurrencyFlags.NumThreads()
-# for some reason, the synchronization fails if we run in ST...
-if (nThreads < 1) :
-    msg.fatal('numThreads must be >0. Did you set the --threads=N option?')
-    sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.FilesInput = [
-    "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/esd/100evts10lumiblocks.ESD.root"
-]
-
-import AthenaPoolCnvSvc.ReadAthenaPool
-
-# build GeoModel
-import AthenaPython.ConfigLib as apcl
-cfg = apcl.AutoCfg(name = 'TrackingGeometryTest', input_files=athenaCommonFlags.FilesInput())
-
-cfg.configure_job()
-
-from AthenaCommon.GlobalFlags import globalflags
-if len(globalflags.ConditionsTag())!=0:
-  from IOVDbSvc.CondDB import conddb
-  conddb.setGlobalTag(globalflags.ConditionsTag())
-
-from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags
-InDetGeometryFlags.useDynamicAlignFolders=True
-
-# Just the pixel and SCT
-DetFlags.ID_setOn()
-DetFlags.Calo_setOn()
-
-
-# Initialize geometry
-# THIS ACTUALLY DOES STUFF!!
-from AtlasGeoModel import GeoModelInit
-from AtlasGeoModel import SetGeometryVersion
-
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.OutputLevel( INFO )
-AlgScheduler.ShowControlFlow( True )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.EnableConditions( True )
-AlgScheduler.setDataLoaderAlg( "SGInputLoader" )
-
-## SET UP ALIGNMENT CONDITIONS ALGORITHM
-from IOVSvc.IOVSvcConf import CondSvc
-svcMgr += CondSvc( OutputLevel=INFO )
-from ActsGeometry import ActsGeometryConf
-from AthenaCommon.AlgSequence import AthSequencer
-condSeq = AthSequencer("AthCondSeq")
-
-# nominal alignment: all deltas are identity
-# condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg",
-                                                     # OutputLevel=VERBOSE)
-
-condSeq += ActsGeometryConf.ActsAlignmentCondAlg("ActsAlignCondAlg",
-                                                 OutputLevel=VERBOSE)
-# periodic shift alignment. Configurable z-shift per lumiblock.
-# (currently pixel only)
-# condSeq+=ActsGeometryConf.GeomShiftCondAlg("GeomShiftCondAlg_1",
-                                            # ZShiftPerLB=0.5,
-                                            # OutputLevel=VERBOSE)
-## END OF CONDITIONS SETUP
-
-
-from AthenaCommon.AppMgr import ServiceMgr
-
-# set up and configure the acts geometry construction
-from ActsGeometry.ActsGeometryConfig import ActsTrackingGeometrySvc
-trkGeomSvc = ActsTrackingGeometrySvc()
-# used for the proxies during material mapping
-trkGeomSvc.BarrelMaterialBins = [40, 60] # phi z
-trkGeomSvc.EndcapMaterialBins = [50, 20] # phi r
-trkGeomSvc.OutputLevel = VERBOSE
-trkGeomSvc.BuildSubDetectors = [
-  "Pixel",
-  "SCT",
-  "TRT",
-  # "Calo",
-]
-ServiceMgr += trkGeomSvc
-
-# We need the Magnetic fiels
-import MagFieldServices.SetupField
-
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-# This is the main extrapolation demo algorithm
-from ActsGeometry.ActsGeometryConf import ActsExtrapolationAlg
-alg = ActsExtrapolationAlg()
-alg.EtaRange = [-5, 5]
-alg.OutputLevel = INFO
-alg.NParticlesPerEvent = int(1e4)
-
-# not really needed right now (also not working)
-# this can be used to test an input material map file
-# alg.WriteMaterialTracks = False
-# # we only need this if the extrap alg is set up to write mat tracks
-# if alg.WriteMaterialTracks == True:
-  # mTrackWriterSvc = CfgMgr.ActsMaterialTrackWriterSvc("ActsMaterialTrackWriterSvc")
-  # mTrackWriterSvc.OutputLevel = DEBUG
-  # mTrackWriterSvc.FilePath = "MaterialTracks_mapped.root"
-  # ServiceMgr += mTrackWriterSvc
-
-# sets up the extrapolation tool
-# this sets up the tracking geometry svc through the tracking geometry tool
-exTool = CfgMgr.ActsExtrapolationTool("ActsExtrapolationTool")
-exTool.OutputLevel = INFO
-exTool.FieldMode = "ATLAS"
-
-# The extrapolation tool accesses the trackinggeometry service
-# through this tool. This tool has the conditions dependencies
-# on the alignment GeoAlignmentStores (pseudo-alignment only right now).
-# For each event, the GAS for the IOV needs to be set from the algorithm.
-trkGeomTool = CfgMgr.ActsTrackingGeometryTool("ActsTrackingGeometryTool")
-trkGeomTool.OutputLevel = INFO;
-exTool.TrackingGeometryTool = trkGeomTool
-
-alg.ExtrapolationTool = exTool
-
-# Make the event heardbeat output a bit nicer
-eventPrintFrequency = 10000
-if hasattr(ServiceMgr,"AthenaEventLoopMgr"):
-    ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
-if hasattr(ServiceMgr,"AthenaHiveEventLoopMgr"):
-    ServiceMgr.AthenaHiveEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
-
-job += alg
-
-theApp.EvtMax = 1234
+# start from scratch with component accumulator
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator 
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+from ActsGeometry.ActsGeometryConfig import ActsExtrapolationToolCfg
+from ActsGeometry.ActsGeometryConfig import ActsAlignmentCondAlgCfg, ActsPropStepRootWriterSvcCfg
+
+def ActsExtrapolationAlgCfg(configFlags, name = "ActsExtrapolationAlg", **kwargs):
+  result = ComponentAccumulator()
+
+  if "ExtrapolationTool" not in kwargs:
+    extrapTool = ActsExtrapolationToolCfg(configFlags)
+    kwargs["ExtrapolationTool"] = extrapTool.getPrimary()
+    result.merge(extrapTool)
+
+  propStepWriterSvc = ActsPropStepRootWriterSvcCfg(configFlags)
+  result.merge(propStepWriterSvc)
+
+  ActsExtrapolationAlg = CompFactory.ActsExtrapolationAlg
+  alg = ActsExtrapolationAlg(name, **kwargs)
+  result.addEventAlgo(alg)
+
+  return result
+
+if "__main__" == __name__:
+  from AthenaCommon.Configurable import Configurable
+  from AthenaCommon.Logging import log
+  from AthenaCommon.Constants import VERBOSE
+  from AthenaConfiguration.AllConfigFlags import ConfigFlags
+  from AthenaConfiguration.MainServicesConfig import MainServicesCfg    
+
+  Configurable.configurableRun3Behavior = True
+
+  ## Just enable ID for the moment.
+  ConfigFlags.Input.isMC             = True
+  ConfigFlags.Beam.Type = ''
+  ConfigFlags.GeoModel.AtlasVersion  = "ATLAS-R2-2016-01-00-01"
+  ConfigFlags.IOVDb.GlobalTag        = "OFLCOND-SIM-00-00-00"
+  ConfigFlags.Detector.SimulateBpipe = True
+  ConfigFlags.Detector.SimulateID    = True    
+  ConfigFlags.Detector.GeometryBpipe = True
+  ConfigFlags.Detector.GeometryID    = True
+  ConfigFlags.Detector.GeometryPixel = True
+  ConfigFlags.Detector.GeometrySCT   = True
+  ConfigFlags.Detector.GeometryCalo  = True
+  ConfigFlags.Detector.GeometryMuon  = False
+  ConfigFlags.Detector.GeometryTRT   = True
+  ConfigFlags.TrackingGeometry.MaterialSource = "Input"
+
+  ConfigFlags.Concurrency.NumThreads = 10
+  ConfigFlags.Concurrency.NumConcurrentEvents = 10
+
+  ConfigFlags.lock()
+  ConfigFlags.dump()
+
+  cfg = MainServicesCfg(ConfigFlags)
+
+  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
+  cfg.merge(BeamPipeGeometryCfg(ConfigFlags))
+
+  alignCondAlgCfg = ActsAlignmentCondAlgCfg(ConfigFlags)
+
+  cfg.merge(alignCondAlgCfg)
+
+  alg = ActsExtrapolationAlgCfg(ConfigFlags,
+                                OutputLevel=VERBOSE,
+                                NParticlesPerEvent = int(10),
+                                EtaRange = [-0.5, 0.5],
+                                PtRange = [20, 100])
+
+  cfg.merge(alg)
+
+  cfg.printConfig()
+
+  log.info("CONFIG DONE")
+
+  cfg.run(1)
+
+
+
diff --git a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
index 4ea902f2c964..b80997c2103c 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
@@ -194,13 +194,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   // Attach that volume array to the calo inner cover
   ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " inner cover to " << idOutVolArray->arrayObjects().size() << " volumes");
   std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::tubeInnerCover))
-    ->attachVolumeArray(idOutVolArray, Acts::outsideVolume);
+    ->attachVolumeArray(idOutVolArray, Acts::backward);
   // Loop through the array and attach their boundary surfaces to the calo
   for(const auto& idVol : idOutVolArray->arrayObjects()){
     ATH_MSG_VERBOSE("Glueing outer cover of " << idVol->volumeName()
     << " to inner cover of " << calo->volumeName());
     std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::tubeOuterCover))
-      ->attachVolume(calo.get(), Acts::outsideVolume);
+      ->attachVolume(calo.get(), Acts::forward);
   }
 
   // Glue positive XY face of ID to inner positive XY face of Calo.
@@ -209,13 +209,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " positive inner cutout disc to "
       << idPosXYVolArray->arrayObjects().size() << " volumes");
   std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::index5))
-    ->attachVolumeArray(idPosXYVolArray, Acts::outsideVolume);
+    ->attachVolumeArray(idPosXYVolArray, Acts::backward);
   // Other way round, attach ID volumes to calo
   for(const auto& idVol : idPosXYVolArray->arrayObjects()){
     ATH_MSG_VERBOSE("Glueing positive XY face of " << idVol->volumeName()
     << " to positive inner coutout disc of " << calo->volumeName());
     std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::positiveFaceXY))
-      ->attachVolume(calo.get(), Acts::outsideVolume);
+      ->attachVolume(calo.get(), Acts::forward);
   }
 
   // Glue negative XY face of ID to inner negative XY face of Calo.
@@ -224,13 +224,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " negative inner cutout disc to "
       << idNegXYVolArray->arrayObjects().size() << " volumes");
   std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::index4))
-    ->attachVolumeArray(idNegXYVolArray, Acts::outsideVolume);
+    ->attachVolumeArray(idNegXYVolArray, Acts::forward);
   // Other way round, attach ID volumes to calo
   for(const auto& idVol : idNegXYVolArray->arrayObjects()){
     ATH_MSG_VERBOSE("Glueing negative XY face of " << idVol->volumeName()
     << " to negative inner coutout disc of " << calo->volumeName());
     std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::negativeFaceXY))
-      ->attachVolume(calo.get(), Acts::outsideVolume);
+      ->attachVolume(calo.get(), Acts::backward);
   }
 
   // For navigational purposes we need to create three pseudo container cylinders.
@@ -240,11 +240,11 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   // Construct track vol array for use in positive and negative pseudocontainer.
   // This will only contain the calo
 
-	double caloRMin = caloVolBounds->get(CCVBBV::eMinR);
-	double caloRMed = caloVolBounds->get(CCVBBV::eMedR);
-	double caloRMax = caloVolBounds->get(CCVBBV::eMaxR);
-	double caloDZ1 = caloVolBounds->get(CCVBBV::eHalfLengthZ);
-	double caloDZ2 = caloVolBounds->get(CCVBBV::eHalfLengthZcutout);
+  double caloRMin = caloVolBounds->get(CCVBBV::eMinR);
+  double caloRMed = caloVolBounds->get(CCVBBV::eMedR);
+  double caloRMax = caloVolBounds->get(CCVBBV::eMaxR);
+  double caloDZ1 = caloVolBounds->get(CCVBBV::eHalfLengthZ);
+  double caloDZ2 = caloVolBounds->get(CCVBBV::eHalfLengthZcutout);
 
   Acts::Vector3D caloChokeRPos
     = {caloRMin + (caloRMax - caloRMin)/2., 0, 0};
@@ -383,10 +383,10 @@ ActsCaloTrackingVolumeBuilder::makeCaloVolumeBounds(const std::vector<std::uniqu
   rmin_at_center -= envR;
 
 
-  std::cout << "rmin_at_center: " << rmin_at_center
-            << " rmin at choke: " << rmin_at_choke;
-  std::cout << " rmax: " << rmax << " zmin: " << zmin << " zmax: " << zmax;
-  std::cout << " coutout_zmin_abs: " << cutout_zmin_abs << std::endl;
+  ATH_MSG_VERBOSE("rmin_at_center: " << rmin_at_center
+                  << " rmin at choke: " << rmin_at_choke
+                  << " rmax: " << rmax << " zmin: " << zmin << " zmax: " << zmax
+                  << " coutout_zmin_abs: " << cutout_zmin_abs);
 
   // Ok now let's analyse what we're wrapping the calo around: the ID
   // The ID will have to be built already.
@@ -400,20 +400,55 @@ ActsCaloTrackingVolumeBuilder::makeCaloVolumeBounds(const std::vector<std::uniqu
   double idRMin = idCylBds->get(CVBBV::eMinR);
   double idHlZ = idCylBds->get(CVBBV::eHalfLengthZ);
 
+  ATH_MSG_VERBOSE("ID volume bounds:\n" << *idCylBds);
+
+  ATH_MSG_VERBOSE("Inside volume transform: \n" << insideVolume->transform().matrix());
+
   if (!insideVolume->transform().isApprox(Acts::Transform3D::Identity())) {
-    ATH_MSG_ERROR("The ID appears to be shifted from the origin. I cannot handle this.");
-    ATH_MSG_ERROR("(I'm not building the Calo!)");
-    return nullptr;
+    ATH_MSG_VERBOSE("Inside volume transform is not unity.");
+    
+    // transformation matrix is NOT unity. Let's check:
+    // - Rotation is approximate unity
+    // - Translation is only along z axis
+    const auto& trf = insideVolume->transform();
+  
+    Acts::RotationMatrix3D rot = trf.rotation();
+    bool unityRot = rot.isApprox(Acts::RotationMatrix3D::Identity());
+
+    ATH_MSG_VERBOSE("\n" << rot);
+
+    // dot product with Z axis is about 1 => ok
+    const Acts::Vector3D trl = trf.translation();
+    bool transZOnly = std::abs(1 - std::abs(Acts::Vector3D::UnitZ().dot(trl.normalized()))) < 1e-6;
+
+    ATH_MSG_VERBOSE("TRL "<< trl.transpose());
+    ATH_MSG_VERBOSE("TRL "<< trl.normalized().dot(Acts::Vector3D::UnitZ()));
+
+    if(!unityRot || !transZOnly) {
+      ATH_MSG_ERROR("The ID appears to be shifted from the origin. I cannot handle this.");
+      ATH_MSG_ERROR("(I'm not building the Calo!)");
+      throw std::runtime_error("Error building calo");
+    }
+    else {
+      ATH_MSG_VERBOSE("Checked: non unitarity is ONLY due to shift along z axis: that's ok");
+      double prevIdHlZ = idHlZ;
+      idHlZ += std::abs(trl.z());
+      ATH_MSG_VERBOSE("Modifying effective half length of ID cylinder: " << prevIdHlZ << " => " << idHlZ);
+    }
   }
 
   // make sure we can fit the ID inside the calo cutout
   if (idRMax > rmin_at_center || idHlZ > dz2 || (idRMin > rmin_at_choke && idRMin != 0.)) {
     ATH_MSG_ERROR("Cannot fit ID inside the Calo");
+    ATH_MSG_ERROR("This can be because the ID overlaps into the calo volume");
+    ATH_MSG_ERROR("Or because the Calo choke radius is SMALLER than the ID inner radius");
+    ATH_MSG_ERROR("Currently, I can only make the choke radius smaller, I can not make it larger");
+    ATH_MSG_ERROR("nor can I manipulate the ID volume bounds at this point.");
     ATH_MSG_ERROR("ID rMax: " << idRMax << " Calo rMin@center: " << rmin_at_center);
     ATH_MSG_ERROR("ID hlZ: " << idHlZ << " Calo inner Z hl: " << dz2);
     ATH_MSG_ERROR("ID rMin: " << idRMin << " Calo rMin@choke: " << rmin_at_choke);
     ATH_MSG_ERROR("(I'm not building the Calo!)");
-    return nullptr;
+    throw std::runtime_error("Error building calo");
   }
 
   // Let's harmonize the sizes, so we have a exact wrap of the ID
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
index beb72522c2ef..8ed4b0569a2e 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
@@ -115,6 +115,9 @@ StatusCode ActsExtrapolationAlg::execute(const EventContext &ctx) const {
       Acts::BoundParameters startParameters(
           anygctx, std::move(cov), std::move(pars), std::move(surface));
       steps = m_extrapolationTool->propagationSteps(ctx, startParameters);
+      if(steps.size() == 0) {
+	ATH_MSG_WARNING("Got ZERO steps from the extrapolation tool");
+      }
       m_propStepWriterSvc->write(steps);
     }
 
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
index 328085f7bd84..1ce2a07cc996 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
@@ -157,7 +157,8 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
     }, *m_varProp);
 
   if (!res.ok()) {
-    ATH_MSG_ERROR("Got error during propagation:" << res.error()
+    ATH_MSG_ERROR("Got error during propagation: " 
+		  << res.error() << " " << res.error().message()
                   << ". Returning empty step vector.");
     return {};
   }
@@ -168,6 +169,10 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
   }
 
   ATH_MSG_VERBOSE("Collected " << steps.size() << " steps");
+  if(steps.size() == 0) {
+    ATH_MSG_WARNING("ZERO steps returned by stepper, that is not typically a good sign");
+  }
+
   ATH_MSG_VERBOSE(name() << "::" << __FUNCTION__ << " end");
 
   return steps;
diff --git a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
index 83af685cbeae..05c2f7deefd5 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
@@ -21,11 +21,14 @@
 #include "Acts/Utilities/Definitions.hpp"
 #include "Acts/Geometry/GeometryContext.hpp"
 #include "Acts/Utilities/Units.hpp"
+#include "Acts/Utilities/BinningType.hpp"
+
 
 using Acts::Surface;
 using Acts::Transform3D;
 using Acts::Translation3D;
 
+
 using namespace Acts::UnitLiterals;
 
 const Acts::LayerVector
@@ -146,10 +149,12 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
       ACTS_VERBOSE("Layer #" << n << " with layerKey: ("
           << key.first << ", " << key.second << ")");
       if (type == 0) {  // BARREL
-        ACTS_VERBOSE(" -> at rMin / rMax: " << pl.minR << " / " << pl.maxR);
+        ACTS_VERBOSE(" -> at rMin / rMax: " << pl.min(Acts::binR) << " / " << pl.max(Acts::binR));
+        ACTS_VERBOSE("    -> at zMin / zMax: " << pl.min(Acts::binZ) << " / " << pl.max(Acts::binZ));
       }
       else {
-        ACTS_VERBOSE(" -> at zMin / zMax: " << pl.minZ << " / " << pl.maxZ);
+        ACTS_VERBOSE(" -> at zMin / zMax: " << pl.min(Acts::binZ) << " / " << pl.max(Acts::binZ));
+        ACTS_VERBOSE("    -> at rMin / rMax: " << pl.min(Acts::binR) << " / " << pl.max(Acts::binR));
       }
 
       n++;
@@ -167,27 +172,27 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
     if (type == 0) {  // BARREL
       // layers and extent are determined, build actual layer
       Acts::ProtoLayer pl(gctx, layerSurfaces);
-      pl.envR    = {0_mm, 0_mm};
-      pl.envZ    = {20_mm, 20_mm};
+      pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm);
+      pl.envelope[Acts::binZ] = std::make_pair(20_mm, 20_mm);
 
-      double binPosZ   = 0.5 * (pl.minZ + pl.maxZ);
-      double envZShift = 0.5 * (-pl.envZ.first + pl.envZ.second);
+      double binPosZ   = 0.5 * (pl.min(Acts::binZ) + pl.max(Acts::binZ));
+      double envZShift = 0.5 * (-pl.envelope[Acts::binZ].first + pl.envelope[Acts::binZ].second);
       double layerZ    = binPosZ + envZShift;
       double layerHalfZ
-        = std::abs(pl.maxZ + pl.envZ.second - layerZ);
+        = std::abs(pl.max(Acts::binZ) + pl.envelope[Acts::binZ].second - layerZ);
 
       auto transform
         = std::make_shared<const Transform3D>(Translation3D(0., 0., -layerZ));
       // set up approach descriptor
 
       std::shared_ptr<Acts::CylinderSurface> innerBoundary
-        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.minR, layerHalfZ);
+        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.min(Acts::binR), layerHalfZ);
 
       std::shared_ptr<Acts::CylinderSurface> outerBoundary
-        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.maxR, layerHalfZ);
+        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.max(Acts::binR), layerHalfZ);
 
       std::shared_ptr<Acts::CylinderSurface> centralSurface
-        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, (pl.minR + pl.maxR)/2., layerHalfZ);
+        = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, (pl.min(Acts::binR) + pl.max(Acts::binR))/2., layerHalfZ);
 
       size_t binsPhi = m_cfg.barrelMaterialBins.first;
       size_t binsZ = m_cfg.barrelMaterialBins.second;
@@ -205,9 +210,9 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
       ACTS_VERBOSE("with binning: [" << binsPhi << ", " << binsZ << "]");
 
       ACTS_VERBOSE("Created ApproachSurfaces for cylinder layer at:");
-      ACTS_VERBOSE(" - inner:   R=" << pl.minR);
-      ACTS_VERBOSE(" - central: R=" << (pl.minR + pl.maxR)/2.);
-      ACTS_VERBOSE(" - outer:   R=" << pl.maxR);
+      ACTS_VERBOSE(" - inner:   R=" << pl.min(Acts::binR));
+      ACTS_VERBOSE(" - central: R=" << (pl.min(Acts::binR) + pl.max(Acts::binR))/2.);
+      ACTS_VERBOSE(" - outer:   R=" << pl.max(Acts::binR));
 
       // set material on inner
       // @TODO: make this configurable somehow
@@ -232,15 +237,15 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
       layersOutput.push_back(layer);
     } else {  // ENDCAP
       Acts::ProtoLayer pl(gctx, layerSurfaces);
-      pl.envR    = {0_mm, 0_mm};
-      pl.envZ    = {10_mm, 10_mm};
+      pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm);
+      pl.envelope[Acts::binZ] = std::make_pair(10_mm, 10_mm);
 
       // copied from layercreator
       double layerZ
-        = 0.5 * (pl.minZ - pl.envZ.first + pl.maxZ
-            + pl.envZ.second);
-      double layerThickness = (pl.maxZ - pl.minZ)
-        + pl.envZ.first + pl.envZ.second;
+        = 0.5 * (pl.min(Acts::binZ) - pl.envelope[Acts::binZ].first + pl.max(Acts::binZ)
+            + pl.envelope[Acts::binZ].second);
+      double layerThickness = (pl.max(Acts::binZ) - pl.min(Acts::binZ))
+        + pl.envelope[Acts::binZ].first + pl.envelope[Acts::binZ].second;
 
       double layerZInner = layerZ - layerThickness/2.;
       double layerZOuter = layerZ + layerThickness/2.;
@@ -257,13 +262,13 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
         = std::make_shared<const Transform3D>(Translation3D(0., 0., layerZOuter));
 
       std::shared_ptr<Acts::DiscSurface> innerBoundary
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.minR, pl.maxR);
+        = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.min(Acts::binR), pl.max(Acts::binR));
 
       std::shared_ptr<Acts::DiscSurface> nominalSurface
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.minR, pl.maxR);
+        = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.min(Acts::binR), pl.max(Acts::binR));
 
       std::shared_ptr<Acts::DiscSurface> outerBoundary
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.minR, pl.maxR);
+        = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.min(Acts::binR), pl.max(Acts::binR));
 
       size_t matBinsPhi = m_cfg.endcapMaterialBins.first;
       size_t matBinsR = m_cfg.endcapMaterialBins.second;
@@ -271,7 +276,7 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
       Acts::BinUtility materialBinUtil(
           matBinsPhi, -M_PI, M_PI, Acts::closed, Acts::binPhi);
       materialBinUtil += Acts::BinUtility(
-          matBinsR, pl.minR, pl.maxR, Acts::open, Acts::binR, transformNominal);
+          matBinsR, pl.min(Acts::binR), pl.max(Acts::binR), Acts::open, Acts::binR, transformNominal);
 
       materialProxy
         = std::make_shared<const Acts::ProtoSurfaceMaterial>(materialBinUtil);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
index 51d52f868b88..003a5e3b2fd0 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
@@ -26,9 +26,6 @@ StatusCode
 ActsPropStepRootWriterSvc::initialize()
 {
 
-  ATH_MSG_INFO("Starting writer thread");
-  m_doEnd = false;
-  m_writeThread = std::thread(&ActsPropStepRootWriterSvc::writeThread, this);
 
   std::string filePath = m_filePath;
   m_outputFile = TFile::Open(filePath.c_str(), "RECREATE");
@@ -63,10 +60,7 @@ ActsPropStepRootWriterSvc::initialize()
 StatusCode 
 ActsPropStepRootWriterSvc::finalize()
 {
-  ATH_MSG_INFO("Waiting for writer thread to finish.");
-  m_doEnd = true;
-  m_writeThread.join();
-  ATH_MSG_INFO("Writer thread has terminated.");
+  end();
 
   return StatusCode::SUCCESS;
 }
@@ -82,7 +76,7 @@ ActsPropStepRootWriterSvc::write(const StepVector& steps)
   //for(size_t i=0;i<ecells.size();++i) {
     //m_queue.emplace_back(ctx.eventID().event_number(), std::move(ecells[i]));
   //}
-  m_queue.emplace_back(ctx.eventID().event_number(), steps);
+  doWrite(steps, ctx.eventID().event_number());
 }
 
 void
diff --git a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
index f028815b5d09..214222de2aa8 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
@@ -22,6 +22,7 @@
 #include "Acts/Geometry/ProtoLayer.hpp"
 #include "Acts/Geometry/GeometryContext.hpp"
 #include "Acts/Utilities/Units.hpp"
+#include "Acts/Utilities/BinningType.hpp"
 
 // STL
 #include <iostream>
@@ -82,15 +83,16 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx)
 
     // were calculating min/max radius while were at it.
     Acts::ProtoLayer pl;
-    pl.minR = std::numeric_limits<double>::max();
-    pl.maxR = std::numeric_limits<double>::lowest();
-    pl.minZ = std::numeric_limits<double>::max();
-    pl.maxZ = std::numeric_limits<double>::lowest();
-    pl.minPhi = -M_PI;
-    pl.maxPhi = M_PI;
+    auto& ext = pl.extent;
+    ext.min(Acts::binR) = std::numeric_limits<double>::max();
+    ext.max(Acts::binR) = std::numeric_limits<double>::lowest();
+    ext.min(Acts::binZ) = std::numeric_limits<double>::max();
+    ext.max(Acts::binZ) = std::numeric_limits<double>::lowest();
+    ext.min(Acts::binPhi) = -M_PI;
+    ext.max(Acts::binPhi) = M_PI;
 
-    pl.envZ = {1_mm, 1_mm};
-    pl.envR = {0_mm, 0_mm};
+    pl.envelope[Acts::binZ] = std::make_pair(1_mm, 1_mm);
+    pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm);
 
     double fudge = 0_mm;
     // RING in TRT speak is translated to Layer in ACTS speak
@@ -136,10 +138,10 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx)
 
             // calculate min/max R and Z
             Vector3D ctr = straw->center(gctx);
-            pl.maxR = std::max(pl.maxR, ctr.perp() + radius);
-            pl.minR = std::min(pl.minR, ctr.perp() - radius);
-            pl.maxZ = std::max(pl.maxZ, ctr.z() + length);
-            pl.minZ = std::min(pl.minZ, ctr.z() - length);
+            ext.max(Acts::binR) = std::max(ext.max(Acts::binR), ctr.perp() + radius);
+            ext.min(Acts::binR) = std::min(ext.min(Acts::binR), ctr.perp() - radius);
+            ext.max(Acts::binZ) = std::max(ext.max(Acts::binZ), ctr.z() + length);
+            ext.min(Acts::binZ) = std::min(ext.min(Acts::binZ), ctr.z() - length);
 
             layerSurfaces.push_back(straw->getSharedPtr());
           }
@@ -152,7 +154,7 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx)
     if(iring > 0) {
       // match outer radius of previous ring
       const Acts::ProtoLayer &prev = protoLayers.at(iring-1);
-      pl.minR = prev.maxR + prev.envR.second + pl.envR.first + fudge;
+      ext.min(Acts::binR) = prev.extent.max(Acts::binR) + prev.envelope[Acts::binR].second + pl.envelope[Acts::binR].first + fudge;
     }
 
     std::shared_ptr<Acts::Layer> layer
@@ -192,13 +194,14 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side)
 
 
       Acts::ProtoLayer pl;
-      pl.minR = std::numeric_limits<double>::max();
-      pl.maxR = std::numeric_limits<double>::lowest();
-      pl.minZ = std::numeric_limits<double>::max();
-      pl.maxZ = std::numeric_limits<double>::lowest();
-      pl.minPhi = -M_PI;
-      pl.maxPhi = M_PI;
-      pl.envR = {0_mm, 0_mm};
+      auto& ext = pl.extent;;
+      ext.min(Acts::binR) = std::numeric_limits<double>::max();
+      ext.max(Acts::binR) = std::numeric_limits<double>::lowest();
+      ext.min(Acts::binZ) = std::numeric_limits<double>::max();
+      ext.max(Acts::binZ) = std::numeric_limits<double>::lowest();
+      ext.min(Acts::binPhi) = -M_PI;
+      ext.max(Acts::binPhi) = M_PI;
+      pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm);
 
       for (unsigned int iphisec=0; iphisec<nEndcapPhiSectors; ++iphisec) {
 
@@ -233,11 +236,11 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side)
               double length = strawBounds->get(LBBV::eHalfLengthZ);
 
               Vector3D ctr = straw->center(gctx);
-              pl.maxZ = std::max(pl.maxZ, ctr.z() + radius);
-              pl.minZ = std::min(pl.minZ, ctr.z() - radius);
-              pl.maxR = std::max(pl.maxR, ctr.perp() + length);
-              pl.minR = std::min(pl.minR, ctr.perp() - length);
-              pl.envZ = {radius/2., radius/2.};
+              ext.max(Acts::binZ) = std::max(ext.max(Acts::binZ), ctr.z() + radius);
+              ext.min(Acts::binZ) = std::min(ext.min(Acts::binZ), ctr.z() - radius);
+              ext.max(Acts::binR) = std::max(ext.max(Acts::binR), ctr.perp() + length);
+              ext.min(Acts::binR) = std::min(ext.min(Acts::binR), ctr.perp() - length);
+	      pl.envelope[Acts::binZ] = std::make_pair(radius/2., radius/2.);
 
               wheelSurfaces.push_back(straw->getSharedPtr());
             }
diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
index 80379f2b758f..92590d9feda6 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
@@ -138,7 +138,7 @@ ActsTrackingGeometrySvc::initialize()
           cvbConfig.buildToRadiusZero = false;
 
           Acts::CylinderVolumeBuilder cvb(cvbConfig,
-              makeActsAthenaLogger(this, "CylVolBldr", "ActsTGSvc"));
+              makeActsAthenaLogger(this, "SCTCylVolBldr", "ActsTGSvc"));
 
           return cvb.trackingVolume(gctx, inner);
         });
@@ -156,7 +156,7 @@ ActsTrackingGeometrySvc::initialize()
           cvbConfig.buildToRadiusZero = false;
 
           Acts::CylinderVolumeBuilder cvb(cvbConfig,
-              makeActsAthenaLogger(this, "CylVolBldr", "ActsTGSvc"));
+              makeActsAthenaLogger(this, "TRTCylVolBldr", "ActsTGSvc"));
 
           return cvb.trackingVolume(gctx, inner);
         });
@@ -170,7 +170,8 @@ ActsTrackingGeometrySvc::initialize()
       });
     }
   }
-  catch (const std::invalid_argument& e) {
+  catch (const std::exception& e) {
+    ATH_MSG_ERROR("Encountered error when building Acts tracking geometry");
     ATH_MSG_ERROR(e.what());
     return StatusCode::FAILURE;
   }
@@ -185,8 +186,10 @@ ActsTrackingGeometrySvc::initialize()
   ActsGeometryContext constructionContext;
   constructionContext.construction = true;
 
+  ATH_MSG_VERBOSE("Begin building process");
   m_trackingGeometry = trackingGeometryBuilder
     ->trackingGeometry(constructionContext.any());
+  ATH_MSG_VERBOSE("Building process completed");
 
   ATH_MSG_VERBOSE("Building nominal alignment store");
   ActsAlignmentStore* nominalAlignmentStore = new ActsAlignmentStore();
@@ -226,11 +229,11 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m
 
     auto surfaceArrayCreator = std::make_shared<Acts::SurfaceArrayCreator>(
         sacCfg,
-        makeActsAthenaLogger(this, "SrfArrCrtr", "ActsTGSvc"));
+        makeActsAthenaLogger(this, managerName+"SrfArrCrtr", "ActsTGSvc"));
     Acts::LayerCreator::Config lcCfg;
     lcCfg.surfaceArrayCreator = surfaceArrayCreator;
     auto layerCreator = std::make_shared<Acts::LayerCreator>(
-        lcCfg, makeActsAthenaLogger(this, "LayCrtr", "ActsTGSvc"));
+        lcCfg, makeActsAthenaLogger(this, managerName+"LayCrtr", "ActsTGSvc"));
 
     ActsStrawLayerBuilder::Config cfg;
     cfg.mng = static_cast<const InDetDD::TRT_DetectorManager*>(manager);
@@ -238,7 +241,7 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m
     cfg.layerCreator = layerCreator;
     cfg.idHelper = m_TRT_idHelper;
     gmLayerBuilder = std::make_shared<const ActsStrawLayerBuilder>(cfg,
-      makeActsAthenaLogger(this, "GMSLayBldr", "ActsTGSvc"));
+      makeActsAthenaLogger(this, managerName+"GMSLayBldr", "ActsTGSvc"));
 
     //gmLayerBuilder->centralLayers();
     //gmLayerBuilder->negativeLayers();
@@ -286,11 +289,11 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m
 
     auto surfaceArrayCreator = std::make_shared<Acts::SurfaceArrayCreator>(
         sacCfg,
-        makeActsAthenaLogger(this, "SrfArrCrtr", "ActsTGSvc"));
+        makeActsAthenaLogger(this, managerName+"SrfArrCrtr", "ActsTGSvc"));
     Acts::LayerCreator::Config lcCfg;
     lcCfg.surfaceArrayCreator = surfaceArrayCreator;
     auto layerCreator = std::make_shared<Acts::LayerCreator>(
-        lcCfg, makeActsAthenaLogger(this, "LayCrtr", "ActsTGSvc"));
+        lcCfg, makeActsAthenaLogger(this, managerName+"LayCrtr", "ActsTGSvc"));
 
 
 
@@ -324,7 +327,7 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m
     cfg.layerCreator = layerCreator;
 
     gmLayerBuilder = std::make_shared<const ActsLayerBuilder>(cfg,
-      makeActsAthenaLogger(this, "GMLayBldr", "ActsTGSvc"));
+      makeActsAthenaLogger(this, managerName+"GMLayBldr", "ActsTGSvc"));
   }
 
 
@@ -342,13 +345,19 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
   Acts::CylinderVolumeBuilder::Config cvbCfg;
   Acts::CylinderVolumeBuilder cvb(cvbCfg, makeActsAthenaLogger(this, "SCTTRTCVB", "ActsTGSvc"));
 
+  ATH_MSG_VERBOSE("Making SCT negative layers: ");
   Acts::VolumeConfig sctNegEC = cvb.analyzeContent(gctx, sct_lb.negativeLayers(gctx), {});
+  ATH_MSG_VERBOSE("Making SCT positive layers: ");
   Acts::VolumeConfig sctPosEC = cvb.analyzeContent(gctx, sct_lb.positiveLayers(gctx), {});
+  ATH_MSG_VERBOSE("Making SCT central layers: ");
   Acts::VolumeConfig sctBrl = cvb.analyzeContent(gctx, sct_lb.centralLayers(gctx), {});
 
 
+  ATH_MSG_VERBOSE("Making TRT negative layers: ");
   Acts::VolumeConfig trtNegEC = cvb.analyzeContent(gctx, trt_lb.negativeLayers(gctx), {});
+  ATH_MSG_VERBOSE("Making TRT positive layers: ");
   Acts::VolumeConfig trtPosEC = cvb.analyzeContent(gctx, trt_lb.positiveLayers(gctx), {});
+  ATH_MSG_VERBOSE("Making TRT central layers: ");
   Acts::VolumeConfig trtBrl = cvb.analyzeContent(gctx, trt_lb.centralLayers(gctx), {});
   
 
@@ -373,6 +382,9 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
     sctPosEC.rMin = pixelBounds->get(CVBBV::eMaxR);
     sctBrl.rMin = pixelBounds->get(CVBBV::eMaxR);
   }
+  else {
+    ATH_MSG_VERBOSE("Pixel is not configured, not wrapping");
+  }
 
 
   ATH_MSG_VERBOSE("SCT Volume Configuration:");
@@ -384,6 +396,10 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
   ATH_MSG_VERBOSE("- TRT::NegativeEndcap: " << trtNegEC.layers.size() << " layers, " << trtNegEC.toString());
   ATH_MSG_VERBOSE("- TRT::Barrel: " << trtBrl.layers.size() << " layers, " << trtBrl.toString());
   ATH_MSG_VERBOSE("- TRT::PositiveEncap: " << trtPosEC.layers.size() << " layers, " << trtPosEC.toString());
+
+  // harmonize SCT BRL <-> EC, normally the CVB does this, but we're skipping that
+  sctBrl.zMax = (sctBrl.zMax + sctPosEC.zMin)/2.;
+  sctBrl.zMin = -sctBrl.zMax;
   
   // and now harmonize everything
   // inflate TRT Barrel to match SCT
diff --git a/Tracking/Acts/ActsInterop/src/Logger.cxx b/Tracking/Acts/ActsInterop/src/Logger.cxx
index 781eb7edd477..e40f9e47943b 100644
--- a/Tracking/Acts/ActsInterop/src/Logger.cxx
+++ b/Tracking/Acts/ActsInterop/src/Logger.cxx
@@ -17,10 +17,8 @@
 #include <iostream>
 #include <string>
 
-void
-ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostringstream& input)
-{
-  const std::vector<MSG::Level> athLevelVector{
+namespace {
+  const std::array<MSG::Level, 6> athLevelVector{
     MSG::VERBOSE, 
     MSG::DEBUG,
     MSG::INFO, 
@@ -28,7 +26,11 @@ ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostring
     MSG::ERROR, 
     MSG::FATAL
   };
+}
 
+void
+ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostringstream& input)
+{
   MSG::Level athLevel = athLevelVector[lvl];
   (*m_msg) << athLevel << input.str() << endmsg;
 }
@@ -37,14 +39,6 @@ ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostring
 bool
 ActsAthenaFilterPolicy::doPrint(const Acts::Logging::Level& lvl) const 
 {
-  const std::array<MSG::Level, 6> athLevelVector{
-    MSG::VERBOSE, 
-    MSG::DEBUG,
-    MSG::INFO, 
-    MSG::WARNING, 
-    MSG::ERROR, 
-    MSG::FATAL
-  };
 
   MSG::Level athLevel = athLevelVector[lvl];
   return m_msg->level() <= athLevel;
@@ -88,7 +82,7 @@ makeActsAthenaLogger(const CommonMessagingBase* parent, const std::string& name,
   int level = 0;
   const INamedInterface *inamed = dynamic_cast<const INamedInterface*>(parent);
   if (inamed != nullptr) {
-    level = parent->msgSvc()->outputLevel(inamed->name());
+    level = parent->msg().level();
   }
   return makeActsAthenaLogger(parent->msgSvc().get(), name, level, parent_name);
 }
diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py b/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py
index 390f038c8eb3..f594d6e7b2af 100644
--- a/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py
+++ b/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py
@@ -38,7 +38,7 @@ if __name__=="__main__":
     from AthenaCommon.Logging import log
     from AthenaCommon.Constants import VERBOSE
     from AthenaConfiguration.AllConfigFlags import ConfigFlags
-    from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg    
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg    
     
     #log.setLevel(VERBOSE)
     
@@ -69,7 +69,7 @@ if __name__=="__main__":
     
     ConfigFlags.dump()
 
-    cfg=MainServicesThreadedCfg(ConfigFlags)
+    cfg=MainServicesCfg(ConfigFlags)
 
     from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg     
     cfg.merge(InDetGeometryCfg(ConfigFlags))
-- 
GitLab